Skip to main content

WalletProvider

Description

The WalletProvider 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 WalletProvider before you start to use them.

Examples

Basic Usage

import ReactDOM from 'react-dom';
import { WalletProvider } from '@suiet/wallet-kit';

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

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