Unfreezes issuer’s tokens for a specific wallet via the IssuerSparkWallet.
Method Signature
// Single-token issuer (positional parameter)
async unfreezeTokens(sparkAddress: string): Promise<{
impactedOutputIds: string[];
impactedTokenAmount: bigint;
}>
// Multi-token issuer (object parameters)
async unfreezeTokens({
tokenIdentifier,
sparkAddress,
}: {
tokenIdentifier: Bech32mTokenIdentifier;
sparkAddress: string;
}): Promise<{
impactedOutputIds: string[];
impactedTokenAmount: bigint;
}>
Parameters
Single-token issuer
The Spark Address to unfreeze
Multi-token issuer
tokenIdentifier
Bech32mTokenIdentifier
required
The token identifier to unfreeze. Required for multi-token issuers.
The Spark Address to unfreeze
Returns
Array of output IDs that were unfrozen
Total amount of tokens unfrozen
Example
// Single token issuer (simple positional parameter)
const result = await issuerWallet.unfreezeTokens(
"spark1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx"
);
console.log("Unfrozen outputs:", result.impactedOutputIds);
console.log("Unfrozen amount:", result.impactedTokenAmount);
// Multi-token issuer (specify which token with object parameters)
const tokenId = await issuerWallet.getIssuerTokenIdentifier();
const result2 = await issuerWallet.unfreezeTokens({
tokenIdentifier: tokenId,
sparkAddress: "spark1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx"
});