unpackAddress | TON v2

The unpackAddress method converts a user-friendly TON address to its raw format. This method is useful for converting human-readable addresses into the format required for certain low-level operations or for consistency in data storage.

👍

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

JSON-RPC example

curl -X POST \
  'https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/jsonRPC' \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "unpackAddress",
    "params": {
      "address": "EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2"
    }
  }'

Parameters

  • address (string, required) — The user-friendly address to unpack. Example: EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2.

Response

  • address (string) — The unpacked address in raw format. This format typically includes the workchain ID and the raw address without any encoding or checksum.

Use case

A possible use case for the unpackAddress method in TON is for developers building applications that need to interact with the TON blockchain at a lower level. This method can be used to:

  1. Convert user-input addresses to the raw format required for certain blockchain operations.
  2. Standardize address storage in databases or other backend systems.
  3. Prepare addresses for use in smart contract interactions that require the raw format.
  4. Verify the validity of a user-friendly address by unpacking it and checking its structure.

Try the unpackAddress RPC method yourself

Language
Click Try It! to start a request and see the response here!