Query

Use the query method to read the state of the network. query has the following parameters:

  • scope is the scope of the query. This must be an account URL or a message ID. The message ID may be suffixed with an account or with unknown. For example:

    • acc://accumulate.acme

    • acc://bbcea39f9c5cc8175fd5b12ab4b1173adf7c00755386f8a9db0801682034c67f@unknown

    • acc://bbcea39f9c5cc8175fd5b12ab4b1173adf7c00755386f8a9db0801682034c67f@staking.acme/governance/1

  • query may be used to query specific parts of an account or message's state.

REST examples are relative to an endpoint such as https://mainnet.accumulatenetwork.io.

JSON-RPC must be submitted with POST /v3 to an endpoint, e.g. curl -X POST https://mainnet.accumulatenetwork.io/v3 --data-raw '<json>'.

Query an account

Parameters

Parameter
Optional
Description

account

URL of the account

include receipt

yes

Include a receipt for the account state

REST

GET /query/{account}?include_receipt={include receipt}

JSON-RPC

{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "query",
    "params": {
        "scope": "<account>",
        "query": {
            "queryType": "default",
            "includeReceipt": <include receipt>
        }
    }
}

Examples

acc://ACME

Last updated