Gets the issuer’s own token balance via the IssuerSparkWallet. Throws an error if the issuer has multiple tokens.
Method Signature
async function getIssuerTokenBalance(): Promise<{
tokenIdentifier: Bech32mTokenIdentifier | undefined;
balance: bigint;
}>;
Returns
tokenIdentifier
Bech32mTokenIdentifier | undefined
required
Bech32m token identifier (e.g., btkn1...), or undefined if no token exists
Token balance held by the issuer
Example
const { tokenIdentifier, balance } = await issuerWallet.getIssuerTokenBalance();
if (tokenIdentifier) {
console.log("Token identifier:", tokenIdentifier);
console.log("Issuer balance:", balance);
} else {
console.log("No token created yet");
}