Wallet Integration
The SDK supports three browser wallets (Keplr, Leap, XYZ Wallet) and a mnemonic-based connection for development. All return a standardWalletConnection interface.
Wallet Modal (Recommended)
The easiest way to connect a wallet in a browser dApp. Shows a selection dialog with all available wallets:Individual Wallet Connections
Connect to a specific wallet directly:Keplr
Leap
XYZ Wallet
Wallet Detection
Check which wallets are available before connecting:Direct Connection (Development)
For Node.js scripts, tests, and development, connect with a mnemonic:WalletConnection Interface
All connection methods return the same interface:wallet.signer with createContractClient() or other SDK transaction functions:
Chain Registration
WhensuggestChain: true is set, the SDK automatically registers XYZ Chain in the wallet if it hasn’t been added before. This uses the chain info from the SDK:
Disconnecting
Always clean up wallet connections when done:disconnect() in cleanup effects or when the user logs out.
Next Steps
Transactions
Sign and broadcast transactions
Queries
Read chain data without a wallet