Skip to main content
The Wallet class is the base class for all wallet types. It provides common functionality for balance queries, transactions, delegated signers, and more.

Properties

chain
Chain
The blockchain network this wallet operates on
address
string
The wallet’s address on the blockchain
owner
string | undefined
Optional owner identifier
alias
string | undefined
Optional wallet alias
signer
Signer
The signer used for authentication and signing

Balance Methods

balances()

Get the wallet balances including native token, USDC, and optionally other tokens.
public async balances(tokens?: string[]): Promise<Balances<C>>
tokens
string[]
Additional token addresses to query (native token and USDC are always included)
balances
Balances<C>
The wallet balances

Example

const balances = await wallet.balances([
  "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" // Additional token
]);

console.log("ETH Balance:", balances.nativeToken.amount);
console.log("USDC Balance:", balances.usdc.amount);
console.log("Other tokens:", balances.tokens);

stagingFund()

Fund the wallet with Crossmint’s stablecoin (USDXM). Note: This method is only available in staging environments.
public async stagingFund(
  amount: number,
  chain?: Chain
): Promise<FundWalletResponse>
amount
number
required
The amount of USDXM to fund the wallet with
chain
Chain
Optional chain to fund on. If not provided, uses the wallet’s default chain
response
FundWalletResponse
The funding response

Example

const fundResponse = await wallet.stagingFund(100);
console.log("Wallet funded:", fundResponse);

Transaction Methods

send()

Send tokens to a wallet address or user locator.
public async send<T extends SendTokenTransactionOptions | undefined = undefined>(
  to: string | UserLocator,
  token: string,
  amount: string,
  options?: T
): Promise<Transaction<T extends PrepareOnly<true> ? true : false>>
to
string | UserLocator
required
Recipient wallet address or user locator (email, phone, etc.)
token
string
required
Token contract address or currency symbol (e.g., “usdc”, “eth”)
amount
string
required
Amount to send in decimal units (e.g., “1.5” for 1.5 tokens)
options
SendTokenTransactionOptions
Transaction options
transaction
Transaction
The transaction result

Example

// Send to wallet address
const tx = await wallet.send(
  "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "usdc",
  "10.50"
);

console.log("Transaction hash:", tx.hash);
console.log("Explorer:", tx.explorerLink);

// Send to email
const tx2 = await wallet.send(
  { email: "[email protected]" },
  "usdc",
  "5.0"
);

// Prepare only (don't auto-approve)
const tx3 = await wallet.send(
  "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "usdc",
  "10.50",
  { experimental_prepareOnly: true }
);
console.log("Transaction ID:", tx3.transactionId);
// Later: await wallet.approve({ transactionId: tx3.transactionId });

approve()

Approve a transaction or signature that is awaiting approval.
public async approve<T extends ApproveParams>(
  params: T
): Promise<ApproveResult<T>>
params
ApproveParams
required
Approval parameters
result
Transaction | Signature
The approved transaction or signature result

Example

// Approve a transaction
const result = await wallet.approve({
  transactionId: "tx_123abc"
});
console.log("Transaction hash:", result.hash);

// Approve a signature
const sigResult = await wallet.approve({
  signatureId: "sig_456def"
});
console.log("Signature:", sigResult.signature);

Delegated Signers

addDelegatedSigner()

Add a delegated signer to the wallet for gasless transactions or multi-sig.
public async addDelegatedSigner<T extends AddDelegatedSignerOptions | undefined = undefined>(params: {
  signer: string | RegisterSignerPasskeyParams;
  options?: T;
}): Promise<T extends PrepareOnly<true> ? AddDelegatedSignerReturnType<C> : void>
params
object
required
result
void | AddDelegatedSignerReturnType<C>
Returns void if approved, or transaction/signature ID if prepareOnly

Example

// Add delegated signer (auto-approve)
await wallet.addDelegatedSigner({
  signer: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
});

// Add delegated signer (prepare only)
const result = await wallet.addDelegatedSigner({
  signer: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  options: { experimental_prepareOnly: true }
});

// For Solana, returns transactionId
if ('transactionId' in result) {
  await wallet.approve({ transactionId: result.transactionId });
}
// For EVM, returns signatureId
if ('signatureId' in result) {
  await wallet.approve({ signatureId: result.signatureId });
}

delegatedSigners()

List all delegated signers for this wallet.
public async delegatedSigners(): Promise<DelegatedSigner[]>
signers
DelegatedSigner[]
Array of delegated signers

Example

const signers = await wallet.delegatedSigners();
console.log("Delegated signers:", signers);
// [{ signer: "external-wallet:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb" }]

Experimental Methods

experimental_apiClient()

Get the underlying API client.
public experimental_apiClient(): ApiClient
apiClient
ApiClient
The API client instance

experimental_nfts()

Get NFTs owned by the wallet.
public async experimental_nfts(params: {
  perPage: number;
  page: number;
}): Promise<NftsResponse>
params
object
required

Example

const nfts = await wallet.experimental_nfts({
  perPage: 20,
  page: 0
});

experimental_transactions()

Get all transactions for this wallet.
public async experimental_transactions(): Promise<GetTransactionsResponse>
transactions
GetTransactionsResponse
List of transactions

Example

const transactions = await wallet.experimental_transactions();
console.log("Transaction history:", transactions);

experimental_transaction()

Get a specific transaction by ID.
public async experimental_transaction(
  transactionId: string
): Promise<GetTransactionSuccessResponse>
transactionId
string
required
The transaction ID
transaction
GetTransactionSuccessResponse
The transaction details

Example

const transaction = await wallet.experimental_transaction("tx_123abc");
console.log("Transaction:", transaction);

experimental_activity()

Get wallet activity (transactions, transfers, etc.).
public async experimental_activity(): Promise<Activity>
activity
Activity
Wallet activity data

Example

const activity = await wallet.experimental_activity();
console.log("Wallet activity:", activity);

Build docs developers (and LLMs) love