Skip to main content
Freezing is an optional capability that issuers can enable when creating a token. Spark does not require or enforce freezing. If you created your token with isFreezable: false, this feature is permanently disabled and your token operates without any freeze restrictions. Issuers who need compliance controls (regulated stablecoins, for example) can opt into freezing. Issuers who want fully permissionless tokens simply set isFreezable: false at creation.

Freeze an Address

If your token has freezing enabled, you can prevent an address from sending or receiving:
const result = await wallet.freezeTokens("spark1abc...");
console.log("Frozen amount:", result.impactedTokenAmount);
The response includes:
  • impactedOutputIds: The token outputs that were frozen
  • impactedTokenAmount: Total amount of tokens frozen

Unfreeze

await wallet.unfreezeTokens("spark1abc...");

Check Freezability

const metadata = await wallet.getIssuerTokenMetadata();

if (!metadata.isFreezable) {
  console.log("This token cannot freeze addresses");
}

Limitations

  • You cannot freeze your own issuer address
  • Freezing takes effect immediately
  • Only works for tokens created with isFreezable: true