Pular para o conteúdo

Freeze and unfreeze MPT tokens

Control token transfers by freezing individual holders or the entire MPT issuance.

How freezing works

Issuers can freeze tokens at two levels:

  • Individual freeze — Freeze a specific holder's balance.
  • Global freeze — Freeze all holders of the MPT.

When tokens are frozen, the holder cannot send or receive tokens until unfrozen.

Freezing requires lsfMPTCanLock to be set during issuance. If this flag is not set, the issuer cannot freeze tokens.

Prerequisites

  • You are the issuer of the MPT
  • The MPT has lsfMPTCanLock enabled

Freeze or unfreeze in the UI

To freeze a holder or all holders:

  1. Go to Accounts and open the issuer account.

  2. Click Create order and select Ledger-specific operations.

  3. In Ledger, select the XRP Ledger network.

  4. In Operation, select Freeze one or all holders.

  5. In Freeze scope, select one of these options:

    • Individual holder — Then, in Holder, select the holder's account.
    • All holders — A warning confirms that all transfers for every holder stop until you unfreeze all holders.
  6. Select the token:

    • Listed asset — Select the token from the list.
    • Unlisted asset — Enter the token's issuance ID.
    The Freeze form with an individual holder selectedThe Freeze form with all holders selected
  7. Select a Fee Strategy, then click Submit for approval and sign the operation with the app. The signing window shows the operation as MPT Issuance Set with the setting Freeze. For an individual freeze, it also shows the holder.

    The signing window for a Freeze operation on one holder

To unfreeze, follow the same steps and select Unfreeze one or all holders in Operation. Use the same scope that you froze with. A global freeze stays in place until you unfreeze All holders, even if you unfreeze individual holders.

The Unfreeze form with all holders selected

The Lock status column on the account page shows the Ripple Custody (Vault) lock status of the asset, not the ledger freeze. A holder that you freeze on the ledger still shows Allowed.

Freeze a specific holder with the API

To freeze a specific holder's tokens, use MPTokenIssuanceSet with the tfMPTLock flag:

{
  "payload": {
    "id": "{{intent_id}}",
    "accountId": "{{issuer_account_id}}",
    "ledgerId": "xrpl-testnet",
    "parameters": {
      "type": "XRPL",
      "feeStrategy": {
        "priority": "Medium",
        "type": "Priority"
      },
      "memos": [],
      "operation": {
        "type": "MPTokenIssuanceSet",
        "tokenIdentifier": {
          "issuanceId": "000004C463C52827307480341125DA0577AFFC21D4B2D083",
          "type": "MPTokenIssuanceId"
        },
        "holder": {
          "address": "rHolderAddress...",
          "type": "Address"
        },
        "flags": ["tfMPTLock"]
      }
    },
    "customProperties": {},
    "type": "v0_CreateTransactionOrder"
  }
}

Unfreeze a specific holder with the API

To unfreeze a holder, use the tfMPTUnlock flag:

{
  "payload": {
    "id": "{{intent_id}}",
    "accountId": "{{issuer_account_id}}",
    "ledgerId": "xrpl-testnet",
    "parameters": {
      "type": "XRPL",
      "feeStrategy": {
        "priority": "Medium",
        "type": "Priority"
      },
      "memos": [],
      "operation": {
        "type": "MPTokenIssuanceSet",
        "tokenIdentifier": {
          "issuanceId": "000004C463C52827307480341125DA0577AFFC21D4B2D083",
          "type": "MPTokenIssuanceId"
        },
        "holder": {
          "address": "rHolderAddress...",
          "type": "Address"
        },
        "flags": ["tfMPTUnlock"]
      }
    },
    "customProperties": {},
    "type": "v0_CreateTransactionOrder"
  }
}

Global freeze with the API

To freeze all holders, omit the holder field:

{
  "operation": {
    "type": "MPTokenIssuanceSet",
    "tokenIdentifier": {
      "issuanceId": "000004C463C52827307480341125DA0577AFFC21D4B2D083",
      "type": "MPTokenIssuanceId"
    },
    "flags": ["tfMPTLock"]
  }
}

Parameters

FieldTypeRequiredDescription
tokenIdentifier.issuanceIdstringConditionalThe 192-bit MPT issuance ID. Required when tokenIdentifier.type is MPTokenIssuanceId.
tokenIdentifier.typestringYesMPTokenIssuanceId to identify the MPT by its issuance ID, or TickerId to identify it by its ticker ID. With TickerId, set tokenIdentifier.tickerId in place of tokenIdentifier.issuanceId.
holderobjectNoThe holder to freeze. Omit for global freeze.
holder.typestringConditionalOne of: Account (internal account UUID), Address (XRPL address), or Endpoint (endpoint UUID). Required when holder is provided.
holder.addressstringConditionalThe holder's XRPL address. Required when holder.type is Address.
holder.accountIdstringConditionalInternal account UUID. Required when holder.type is Account.
holder.endpointIdstringConditionalEndpoint UUID. Required when holder.type is Endpoint.
flagsarrayYes["tfMPTLock"] to freeze, ["tfMPTUnlock"] to unfreeze.

Response

A successful request returns the transaction order with status Pending. After confirmation, the holder's (or all holders') transfer capabilities are updated.