Skip to main content
Gets statistics about token outputs in the wallet.

Method Signature

async getTokenOutputStats(
  tokenIdentifier: Bech32mTokenIdentifier
): Promise<{
  outputCount: number;
  totalAmount: bigint;
}>

Parameters

tokenIdentifier
Bech32mTokenIdentifier
required
Token identifier to get stats for.

Returns

outputCount
number
required
Number of token outputs
totalAmount
bigint
required
Total amount across all outputs

Example

// Get stats for a specific token
const stats = await wallet.getTokenOutputStats("btkn1...");
console.log("Output count:", stats.outputCount);
console.log("Total amount:", stats.totalAmount);