> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spark.money/llms.txt
> Use this file to discover all available pages before exploring further.

# Freeze Tokens

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:

```typescript theme={null}
const [tokenIdentifier] = await wallet.getIssuerTokenIdentifiers();
if (!tokenIdentifier) throw new Error("No token identifiers found for this issuer");

const result = await wallet.freezeTokens({
  tokenIdentifier,
  sparkAddress: "spark1abc..."
});
console.log("Frozen amount:", result.impactedTokenAmount);
```

The response includes:

* `impactedTokenOutputs`: Array of token output references that were frozen (each containing `transactionHash` and `vout`)
* `impactedTokenAmount`: Total amount of tokens frozen

## Unfreeze

```typescript theme={null}
await wallet.unfreezeTokens({
  tokenIdentifier,
  sparkAddress: "spark1abc..."
});
```

## Check Freezability

```typescript theme={null}
const [tokenIdentifier] = await wallet.getIssuerTokenIdentifiers();
if (!tokenIdentifier) throw new Error("No token identifiers found for this issuer");

const [metadata] = await wallet.getIssuerTokensMetadata([tokenIdentifier]);
if (!metadata) throw new Error(`No metadata found for token ${tokenIdentifier}`);

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`
