Gets the token balance of the wallet via the IssuerSparkWallet.
Method Signature
async function getIssuerTokenBalance(sparkAddress?: string): Promise<{
balance: bigint,
bech32mTokenIdentifier: string
}>;
Parameters
Spark Address of the wallet to get the balance of (if not provided, returns issuer’s own balance)
Returns
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);