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

ThirdwebProviderProps

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

Interface: ThirdwebProviderProps<TSupportedChain>

Type parameters

Name Type
TSupportedChain extends SupportedChain = SupportedChain

Table of contents

Properties

Properties

chainRpc

Optional chainRpc: Partial<ChainRpc<TSupportedChain>>

A partial map of chainIds to rpc urls to use for certain chains If not provided, will default to the rpcUrls of the chain objects for the supported chains

Defined in

src/Provider.tsx:76


dAppMeta

Optional dAppMeta: DAppMetaData

Metadata to pass to wallet connect and walletlink wallet connect. (Used to show which dApp is being connected to in mobile wallets that support it) Defaults to just the name being passed as thirdweb powered dApp.

Defined in

src/Provider.tsx:81


desiredChainId

desiredChainId: TSupportedChain extends Chain ? TSupportedChain["id"] : undefined | TSupportedChain

The chainId that your dApp is running on. While this can be undefined it is required to be passed. Passing undefined will cause no SDK to be instantiated. When passing a chainId, it must be part of the supportedChains array.

Defined in

src/Provider.tsx:87


sdkOptions

Optional sdkOptions: Object

The {@link SDKOptions} to pass to the thirdweb SDK comes with sensible defaults

Type declaration

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

Defined in

src/Provider.tsx:61


storageInterface

Optional storageInterface: IStorage

The storage interface to use with the sdk.

Defined in

src/Provider.tsx:94


supportedChains

Optional supportedChains: TSupportedChain[]

An array of chainIds or {@link Chain} objects that the dApp supports If not provided, all chains supported by the SDK will be supported by default

Defined in

src/Provider.tsx:66


walletConnectors

Optional walletConnectors: WalletConnector[]

An array of connector types (strings) or WalletConnector objects that the dApp supports If not provided, will default to metamask (injected), wallet connect and walletlink (coinbase wallet) with sensible defaults

Defined in

src/Provider.tsx:71