Interface: WalletProviderProps
GalaChain core SDK 1.0.0-rc.8 / react / WalletProviderProps
Interface: WalletProviderProps
Defined in: packages/gala-core-sdk/dist/react.d.ts:41
The props of the WalletProvider component.
Properties
autoConnect?
optionalautoConnect?:boolean
Defined in: packages/gala-core-sdk/dist/react.d.ts:55
Connect initialProvider on mount, once (default: true). A wallet-backed provider is restored
silently (restore(), no wallet prompt; with no account to restore the context stays not
connected, without an error), so a page reload after an earlier connection reconnects without
a prompt. A provider that has no restore() is connected with connect(). Connect a wallet
that needs the user's approval with connect() from a user action.
autoDetect?
optionalautoDetect?:boolean
Defined in: packages/gala-core-sdk/dist/react.d.ts:45
Detect wallets on mount (default: true in a browser).
children?
optionalchildren?:ReactNode
Defined in: packages/gala-core-sdk/dist/react.d.ts:43
The app below the provider.
initialProvider?
optionalinitialProvider?:WalletProvider
Defined in: packages/gala-core-sdk/dist/react.d.ts:47
A provider to start with.
onConnect?
optionalonConnect?: (address,provider) =>void
Defined in: packages/gala-core-sdk/dist/react.d.ts:57
Called after a connection succeeds.
Parameters
address
string
provider
Returns
void
onDisconnect?
optionalonDisconnect?: () =>void
Defined in: packages/gala-core-sdk/dist/react.d.ts:59
Called after the provider disconnects (by the app or by the wallet).
Returns
void
onError?
optionalonError?: (error) =>void
Defined in: packages/gala-core-sdk/dist/react.d.ts:61
Called when a connection fails.
Parameters
error
Error
Returns
void