--- html: enable-no-freeze.html parent: use-tokens.html blurb: Permanently give up your account's ability to freeze tokens it issues. embed_ripple_lib: true filters: - interactive_steps - include_code labels: - Tokens --- # Enable No Freeze If you [issue tokens](issued-currencies.html) in the XRP Ledger, can enable the [No Freeze setting](freezes.html#no-freeze) to permanently limit your own ability to use the token freezing features of the XRP Ledger. (As a reminder, this only applies to issued tokens, not XRP.) This tutorial shows how to enable the No Freeze setting on your issuing account. ## Prerequisites - You need a connection to the XRP Ledger network. As shown in this tutorial, you can use public servers for testing. - You should be familiar with the Getting Started instructions for your preferred client library. This page provides examples for the following: - **JavaScript** with the [xrpl.js library](https://github.com/XRPLF/xrpl.js/). See [Get Started Using JavaScript](get-started-using-javascript.html) for setup steps. - You don't need to have [issued a token](issue-a-fungible-token.html) in the XRP Ledger to enable No Freeze, but the main reason you would do so is if you intend to or have already issued such a token. ## Example Code Complete sample code for all of the steps of this tutorial is available under the [MIT license](https://github.com/XRPLF/xrpl-dev-portal/blob/master/LICENSE). - See [Code Samples: Freeze](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/freeze/) in the source repository for this website. ## Steps {% set n = cycler(* range(1,99)) %} ### {{n.next()}}. Get Credentials To transact on the XRP Ledger, you need an address and secret key, and some XRP. If you use the best practice of having separate ["cold" and "hot" addresses](issuing-and-operational-addresses.html), you need the **master keys** to the _cold address_, which is the **issuer** of the token. Only the issuer's No Freeze setting has any effect on a token. **Caution:** You cannot use a [regular key pair](cryptographic-keys.html) or [multi-signing](multi-signing.html) to enable the No Freeze setting. For this tutorial, you can get credentials from the following interface: {% include '_snippets/interactive-tutorials/generate-step.md' %} When you're [building actual production-ready software](production-readiness.html), you'll instead use an existing account, and manage your keys using a [secure signing configuration](set-up-secure-signing.html). ### {{n.next()}}. Connect to the Network You must be connected to the network to submit transactions to it. The following code shows how to connect to a public XRP Ledger Testnet server a supported [client library](client-libraries.html): _JavaScript_ {{ include_code("_code-samples/get-started/js/base.js", language="js") }} For this tutorial, you can connect directly from your browser by pressing the following button: {% include '_snippets/interactive-tutorials/connect-step.md' %} ### {{n.next()}}. Send AccountSet Transaction To enable the No Freeze setting, send an [AccountSet transaction][] with a `SetFlag` field containing the [`asfNoFreeze` value (`6`)](accountset.html#accountset-flags). To send the transaction, you first _prepare_ it to fill out all the necessary fields, then _sign_ it with your account's secret key, and finally _submit_ it to the network. For example: _JavaScript_ {{ include_code("_code-samples/freeze/set-no-freeze.js", start_with="// Submit an AccountSet transaction", end_before="// Done", language="js") }} _WebSocket_ ```json { "id": 12, "command": "submit", "tx_json": { "TransactionType": "AccountSet", "Account": "raKEEVSGnKSD9Zyvxu4z6Pqpm4ABH8FS6n", "Fee": "12", "Flags": 0, "SetFlag": 6, "LastLedgerSequence": 18124917, "Sequence": 4 }, "secret": "s████████████████████████████" } ``` {{ start_step("Send AccountSet") }}
Sending...
Sending...