Sui Wallets
Introduction
The Sui wallet connectors will generally have a couple of extra methods to simplify interactions with Sui wallets.
Checking if a Wallet is a Sui Wallet
You can use the isSuiWallet
helper method to check if a wallet is a Sui wallet. That way, TypeScript will know which methods are available to you.
SuiWallet Class
We expose multiple helper methods that make it easier to interact with Sui wallets while maintaining consistency with familiar patterns.
getWalletClient
Params: none
Returns: Promise<SuiClient | undefined>
This method will return a Sui client with an RPC url already configured for the active network.
getWalletAccount
Params: none
Returns: Promise<WalletAccount | undefined>
This method will return the currently active WalletAccount.
getActiveNetwork
Params: none
Returns: Promise<string | undefined>
The active network will usually be one of the following:
sui:mainnet
sui:testnet
sui:devnet
sui:localnet
Examples
You can find examples of how to interact with Sui wallets in the examples section:
Was this page helpful?