Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

Exports

Wiki Sync edited this page Mar 2, 2022 · 14 revisions

@thirdweb-dev/react

Table of contents

Interfaces

Type aliases

Variables

Functions

Type aliases

ChainRpc

Ƭ ChainRpc<TSupportedChain>: Record<TSupportedChain extends Chain ? TSupportedChain["id"] : TSupportedChain, string>

Type parameters

Name Type
TSupportedChain extends SupportedChain

Defined in

src/Provider.tsx:41


InjectedConnectorType

Ƭ InjectedConnectorType: "injected" | "metamask" | { name: "injected" | "metamask" ; options?: InjectedConnector["options"] }

Defined in

src/Provider.tsx:19


WalletConnectConnectorType

Ƭ WalletConnectConnectorType: "walletConnect" | { name: "walletConnect" ; options: WalletConnectConnector["options"] }

Defined in

src/Provider.tsx:24


WalletConnector

Ƭ WalletConnector: InjectedConnectorType | WalletConnectConnectorType | WalletLinkConnectorType

Defined in

src/Provider.tsx:36


WalletLinkConnectorType

Ƭ WalletLinkConnectorType: "walletLink" | "coinbase" | { name: "walletLink" | "coinbase" ; options: WalletLinkConnector["options"] }

Defined in

src/Provider.tsx:28

Variables

defaultChains

Const defaultChains: Chain[]

Defined in

node_modules/wagmi-core/dist/declarations/src/constants/chains.d.ts:9


defaultL2Chains

Const defaultL2Chains: Chain[]

Defined in

node_modules/wagmi-core/dist/declarations/src/constants/chains.d.ts:10

Functions

ThirdwebProvider

ThirdwebProvider<TSupportedChain>(__namedParameters): Element

Type parameters

Name Type
TSupportedChain extends SupportedChain = SupportedChain

Parameters

Name Type
__namedParameters PropsWithChildren<ThirdwebProviderProps<TSupportedChain>>

Returns

Element

Defined in

src/Provider.tsx:114


useAccount

useAccount(__namedParameters?): readonly [{ data: undefined | { address: string ; connector: undefined | Connector<any, any> ; ens: undefined | { avatar: undefined | null | string ; name: string } } ; error: undefined | Error ; loading: boolean }, () => void]

Parameters

Name Type
__namedParameters? Config

Returns

readonly [{ data: undefined | { address: string ; connector: undefined | Connector<any, any> ; ens: undefined | { avatar: undefined | null | string ; name: string } } ; error: undefined | Error ; loading: boolean }, () => void]

Defined in

node_modules/wagmi/dist/declarations/src/hooks/accounts/useAccount.d.ts:5


useAddress

useAddress(): string | undefined

Returns

string | undefined

Defined in

src/hooks/useAddress.ts:3


useConnect

useConnect(): readonly [{ data: { connected: boolean ; connector: undefined | Connector<any, any> ; connectors: Connector<any, any>[] } ; error: undefined | Error ; loading: undefined | boolean }, (connector: Connector<any, any>) => Promise<{ data?: ConnectorData<any> ; error?: Error }>]

for now just re-exported

Returns

readonly [{ data: { connected: boolean ; connector: undefined | Connector<any, any> ; connectors: Connector<any, any>[] } ; error: undefined | Error ; loading: undefined | boolean }, (connector: Connector<any, any>) => Promise<{ data?: ConnectorData<any> ; error?: Error }>]

Defined in

src/hooks/useConnect.ts:6


useDisconnect

useDisconnect(): () => void

Returns

fn

▸ (): void

Returns

void

Defined in

src/hooks/useDisconnect.ts:3


useEdition

useEdition(moduleAddress?): Edition | undefined

Parameters

Name Type
moduleAddress? string

Returns

Edition | undefined

Defined in

src/hooks/modules/useEdition.ts:4


useEditionDrop

useEditionDrop(moduleAddress?): EditionDrop | undefined

Parameters

Name Type
moduleAddress? string

Returns

EditionDrop | undefined

Defined in

src/hooks/modules/useEditionDrop.ts:4


useMarketplace

useMarketplace(moduleAddress?): Marketplace | undefined

Parameters

Name Type
moduleAddress? string

Returns

Marketplace | undefined

Defined in

src/hooks/modules/useMarketplace.ts:4


useMetamask

useMetamask(): () => Promise<{ data?: ConnectorData<any> ; error?: Error }>

Returns

fn

▸ (): Promise<{ data?: ConnectorData<any> ; error?: Error }>

Returns

Promise<{ data?: ConnectorData<any> ; error?: Error }>

Defined in

src/hooks/connectors/useMetamask.ts:4


useNFTCollection

useNFTCollection(moduleAddress?): NFTCollection | undefined

Parameters

Name Type
moduleAddress? string

Returns

NFTCollection | undefined

Defined in

src/hooks/modules/useNFTCollection.ts:4


useNFTDrop

useNFTDrop(moduleAddress?): NFTDrop | undefined

Parameters

Name Type
moduleAddress? string

Returns

NFTDrop | undefined

Defined in

src/hooks/modules/useNFTDrop.ts:4


useNetwork

useNetwork(): readonly [{ data: { chain: undefined | { blockExplorers?: { name: string ; url: string }[] ; id: number ; name?: string ; nativeCurrency?: { decimals: 18 ; name: string ; symbol: string } ; rpcUrls?: string[] ; testnet?: boolean ; unsupported: undefined | boolean } ; chains: Chain[] } ; error: undefined | Error ; loading: undefined | boolean }, undefined | (chainId: number) => Promise<{ data: undefined ; error: SwitchChainError } | { data: undefined | Chain ; error: undefined }>]

Returns

readonly [{ data: { chain: undefined | { blockExplorers?: { name: string ; url: string }[] ; id: number ; name?: string ; nativeCurrency?: { decimals: 18 ; name: string ; symbol: string } ; rpcUrls?: string[] ; testnet?: boolean ; unsupported: undefined | boolean } ; chains: Chain[] } ; error: undefined | Error ; loading: undefined | boolean }, undefined | (chainId: number) => Promise<{ data: undefined ; error: SwitchChainError } | { data: undefined | Chain ; error: undefined }>]

Defined in

node_modules/wagmi/dist/declarations/src/hooks/accounts/useNetwork.d.ts:2


usePackModule

usePackModule(moduleAddress?): Pack | undefined

Parameters

Name Type
moduleAddress? string

Returns

Pack | undefined

Defined in

src/hooks/modules/usePack.ts:4


useReadonlySDK

useReadonlySDK(readonlyRpcUrl, sdkOptions, storageInterface?): ThirdwebSDK

Parameters

Name Type
readonlyRpcUrl string
sdkOptions undefined | { gasSettings?: { maxPriceInGwei?: number ; speed?: "standard" | "fast" | "fastest" } ; gasless?: { openzeppelin: { relayerForwarderAddress?: string ; relayerUrl: string } } | { biconomy: { apiId: string ; apiKey: string ; deadlineSeconds?: number } } ; readonlySettings?: { chainId?: number ; rpcUrl: string } }
storageInterface? IStorage

Returns

ThirdwebSDK

Defined in

src/hooks/useReadonlySDK.ts:4


useSDK

useSDK(): ThirdwebSDK | undefined

Returns

ThirdwebSDK | undefined

Defined in

src/Provider.tsx:310


useSigner

useSigner(): undefined | Signer

Returns

undefined | Signer

Defined in

src/hooks/useSigner.ts:5


useToken

useToken(moduleAddress?): Token | undefined

Parameters

Name Type
moduleAddress? string

Returns

Token | undefined

Defined in

src/hooks/modules/useTokenModule.ts:4


useVote

useVote(moduleAddress?): Vote | undefined

Parameters

Name Type
moduleAddress? string

Returns

Vote | undefined

Defined in

src/hooks/modules/useVoteModule.ts:4