Skip to main content

SuiWalletProvider

Description

The SuiWalletProvider provides the essential data and functions for our kit. And it is the entrypoint for customized configurations.

tip

So you need to wrap all the kit hooks and components under SuiWalletProvider before you start to use them.

Examples

Basic Usage

import ReactDOM from 'react-dom';
import { SuiWalletProvider } from '@razorlabs/wallet-kit';

function Root() {
// wrap your app component
<SuiWalletProvider>
<App />
</SuiWalletProvider>;
}

ReactDOM.render(<Root />, docoument.getElementById('root'));

Customize your wallet list on modal

Check #Tutorial/Customize Wallet List for details.

Configure supported chains (networks)

Check #Tutorial/Configure supported chains (networks) for details.

API

Props

PropTypeDefaultDescription
defaultWalletsIDefaultWallet[...AllPresetWallets]Configure wallet list for dapp, by default we load all the preset wallets
chainsChain[]DefaultChainsConfigure supported chains (networks) for dapp
autoConnectbooleantrueAuto connect to the last connected wallet when launched