curl --request GET \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/detectAddress{
"raw_form": "<string>",
"bounceable": {
"b64": "<string>",
"b64url": "<string>"
},
"non_bounceable": {
"b64": "<string>",
"b64url": "<string>"
},
"given_type": "<string>",
"test_only": true
}curl --request GET \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/detectAddress{
"raw_form": "<string>",
"bounceable": {
"b64": "<string>",
"b64url": "<string>"
},
"non_bounceable": {
"b64": "<string>",
"b64url": "<string>"
},
"given_type": "<string>",
"test_only": true
}detectAddress method is used to detect the type and format of a TON address. This method provides detailed information about the given address, including its raw form, bounceable and non-bounceable representations, and whether it’s a testnet address.
address (string, required) — The address to detect. Example: EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2.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": "detectAddress",
"params": {
"address": "EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2"
}
}'
raw_form (string) — The raw form of the address.bounceable (object) — The bounceable representations of the address:
b64 (string) — The bounceable address in base64 format.b64url (string) — The bounceable address in base64url format.non_bounceable (object) — The non-bounceable representations of the address:
b64 (string) — The non-bounceable address in base64 format.b64url (string) — The non-bounceable address in base64url format.given_type (string) — The type of the given address (e.g., “friendly”, “raw”).test_only (boolean) — Indicates whether the address is for testnet use only.detectAddress method in TON is for applications that need to handle various types of TON addresses. This method can be used to:
The address to detect
Information about the detected address
The raw form of the address
The type of the given address
Whether the address is for testnet only
Was this page helpful?