Gets statistics about token outputs in the wallet.
Method Signature
async getTokenOutputStats(
tokenIdentifier?: Bech32mTokenIdentifier
): Promise<{
outputCount: number;
totalAmount: bigint;
}>
Parameters
Optional token identifier to get stats for. If not provided, returns stats for all tokens.
Returns
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);
// Get stats for all tokens
const allStats = await wallet.getTokenOutputStats();
console.log("All token outputs:", allStats.outputCount);