CrossmintWallets class is the main entry point for the Wallets SDK. It provides methods to create, retrieve, and manage wallets across different blockchain networks.
Initialization
from()
Initialize the Wallets SDK with Crossmint configuration.Crossmint instance created using
createCrossmint() from @crossmint/common-sdk-baseA new CrossmintWallets instance
Example
Wallet Management
getOrCreateWallet()
Get an existing wallet or create a new one. This method can only be called on the client side.Wallet configuration options
A wallet instance for the specified chain
Example
getWallet()
Get an existing wallet by its locator. This method can only be called on the server side.The wallet locator (typically the wallet address)
Wallet configuration options (same as
getOrCreateWallet)The wallet instance if found
Thrown if the wallet is not found
Example
createWallet()
Create a new wallet. This method can only be called on the server side.Wallet configuration options (same as
getOrCreateWallet)A new wallet instance
Example
Related Types
- Wallet - Base wallet class
- EVMWallet - EVM-specific wallet
- SolanaWallet - Solana-specific wallet
- StellarWallet - Stellar-specific wallet
- Types - Type definitions