How-to for developers · Tokens and stablecoins

Freeze a Trust Line

In plain words

This tutorial shows how the issuer of a token freezes one trust line. A trust line links the issuer's account with one other account for one currency. Freezes apply only to issued tokens, not XRP.

Written by zerps in plain words, from the source linked below.
Section
Tutorials

What you will do

You pick one trust line, freeze it with a TrustSet transaction, check that the freeze is in place and, if you wish, end it again. You can freeze only one trust line per transaction.

What you need

You need a connection to the XRP Ledger network, an address, a secret key and some XRP. The tutorial assumes you have already issued a token. You cannot have enabled the No Freeze setting, because it gives up your ability to freeze individual trust lines. You need the keys to the issuer's address. The examples use JavaScript with the xrpl.js library.

The steps in short

Choose the trust line. It is identified by your own address, the address of the other account and the currency code. The account_lines method with a pair of accounts finds all trust lines between them. Send a TrustSet transaction with the tfSetFreeze flag enabled. Its LimitAmount field names the currency and the other account, and for an issuer the value is typically 0. It may take 4 to 7 seconds for the outcome to be final. Then call account_lines again. A freeze field that is true means the account in the request has frozen that trust line. A freeze_peer field that is true means the other account has frozen it.

Ending the freeze

To end the freeze, send a TrustSet transaction with the tfClearFreeze flag enabled. The other fields stay the same as when you froze the trust line.

Good to know

There can be several trust lines between two accounts, each for a different currency. To freeze more than one, repeat the step for each trust line. You can send several transactions in a single ledger if each one uses a different sequence number.

Source: xrpl.org. Read 6 December 2026.

Zerpedia states what the source says, in plain words, and gives no opinion. How Zerpedia is made

zerps Trading tokens on the XRP Ledger carries risk, including total loss. zerps is a self-custodial interface; it does not hold funds, give advice, or execute trades on your behalf.