Skip to main content
Gets the token balance of the wallet via the IssuerSparkWallet.

Method Signature

async function getIssuerTokenBalance(sparkAddress?: string): Promise<{ 
  balance: bigint, 
  bech32mTokenIdentifier: string 
}>;

Parameters

sparkAddress
string
Spark Address of the wallet to get the balance of (if not provided, returns issuer’s own balance)

Returns

balance
bigint
required
Token balance
bech32mTokenIdentifier
string
required
Bech32m token identifier

Example

// Get issuer's own token balance
const issuerBalance = await issuerWallet.getIssuerTokenBalance();

// Get specific wallet's token balance
const walletBalance = await issuerWallet.getIssuerTokenBalance("spark:wallet-address");

console.log("Issuer balance:", issuerBalance.balance);
console.log("Wallet balance:", walletBalance.balance);