getwalletinformation - TON

Example code for the getwalletinformation JSON-RPC method. Сomplete guide on how to use getwalletinformation JSON-RPC in GetBlock.io Web3 documentation.

This method returns wallet-specific information for a TON address. It identifies the wallet type, returns the current seqno (used as a nonce), wallet ID, and the last transaction. Use this method to prepare outgoing transactions from a wallet contract.

Parameters

Parameter
Type
Required
Description

address

string

Yes

Wallet address in any form

seqno

integer

No

Masterchain seqno at which to read state. Defaults to the latest block

Request Example

REST (GET):

curl --location --request GET 'https://go.getblock.io/<ACCESS-TOKEN>/getWalletInformation?address=EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2' \
--header 'Content-Type: application/json'

JSON-RPC (POST):

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "getWalletInformation",
    "params": {
        "address": "EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2"
    },
    "id": "getblock.io"
}'

Response Example

Response Parameters

Field
Type
Description

result.wallet

boolean

Whether the contract is a recognised wallet

result.wallet_type

string

Identifier of the wallet version (e.g. wallet v4 r2, wallet v3 r2)

result.seqno

integer

Current wallet seqno — use as the nonce for the next outgoing message

result.wallet_id

integer

Subwallet identifier for the wallet contract

result.balance

string

Wallet balance in nanotons

result.account_state

string

Account state: active, uninitialized, or frozen

result.last_transaction_id

object

Last transaction logical time and hash

Use Cases

  • Preparing a transfer by reading the current wallet seqno

  • Detecting wallet version to build a compatible message body

  • Wallet application UX that displays type and version

  • Validating that a destination is an initialised wallet before depositing

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid <ACCESS-TOKEN>

422

Validation Error

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

504

Lite Server Timeout

Upstream TON liteserver timed out

SDK Integration

Last updated

Was this helpful?