Skip to main content

Interface: WalletProviderProps

GalaChain core SDK 1.0.0-rc.8


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?​

optional autoConnect?: 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?​

optional autoDetect?: boolean

Defined in: packages/gala-core-sdk/dist/react.d.ts:45

Detect wallets on mount (default: true in a browser).


children?​

optional children?: ReactNode

Defined in: packages/gala-core-sdk/dist/react.d.ts:43

The app below the provider.


initialProvider?​

optional initialProvider?: WalletProvider

Defined in: packages/gala-core-sdk/dist/react.d.ts:47

A provider to start with.


onConnect?​

optional onConnect?: (address, provider) => void

Defined in: packages/gala-core-sdk/dist/react.d.ts:57

Called after a connection succeeds.

Parameters​

address​

string

provider​

WalletProvider

Returns​

void


onDisconnect?​

optional onDisconnect?: () => 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?​

optional onError?: (error) => void

Defined in: packages/gala-core-sdk/dist/react.d.ts:61

Called when a connection fails.

Parameters​

error​

Error

Returns​

void