JSON-RPC

chain_getFinalizedHead

Get hash of the last finalized block in the canon chain

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "chain_getFinalizedHead",
    "params": []
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": "0x86b1cd818c8fca2a3ac5dbc86e8adfc5279edb7ae8ee024b09c9504034c3a251",
    "id": "test"
}

chain_getBlock

Get the block hash for a specific block

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "chain_getBlock",
    "params": [
        "0xe989360ae9983bdd1c13ea0b18cea85a751c576788644407747484516570a466"
    ]
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": {
        "block": {
            "header": {
                "parentHash": "0xc4039c4642d010c47411ebd5a9147068336a8c8d614726627302a5aa74c07e58",
                "number": "0x3f8fc",
                "stateRoot": "0x2774971b37f719b335cdf0a0d31baff082baee09a2cc852d627db533f6bcad8f",
                "extrinsicsRoot": "0x30b066735be64e004bf1f0912db387751366a2d5d43cc13f03507c8dabcf55d8",
                "digest": {
                    "logs": [
                        "0x0642414245b5010300000000848c341100000000d21b0d74ddfe4121cd5957279898841dbb210b092775e546da37c4e521105d4514e920eabcd2667a56979beded4dc828afabe1a1f9fd409b38b16f750a26ba057b176fa0b84c65699e69e18e7ae2e45cacd1e680079c9f1b5ee2087e86f5730f",
                        "0x044245454684039fed9cbaeee3f8bfc90bcd7b473b37df140096a3870b7c69bd861bdb1a0dda15",
                        "0x0466726f6e88010616234149e01411047397b90fdc5de3cb104ea8b393733f7a573ea8553bb8f200",
                        "0x05424142450101329918ac870605e6aaacbb9579ad6e4a379c0b16419851a55eb53101fc46fd63517e7cd6be18fb3b839a1eae3ebf2e0fed1669af22ef3cc26ae08eafda476e87"
                    ]
                }
            },
            "extrinsics": [
                "0x280401000bc1559d3f9301",
                "0x390b0428001400000000008c48bd51381c4202db7520c12963fd89bb151b47416ce7d74e9f5ab14ded1275990788beced7b3cd4f038dcd592f76d3048e7191fcdf66c2488a81efc9f2c983000100000...
...                

chain_getBlockHash

Get the block hash for a specific block

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "chain_getBlockHash",
    "params": [
        260348
    ]
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": "0xe989360ae9983bdd1c13ea0b18cea85a751c576788644407747484516570a466",
    "id": "test"
}

author_submitExtrinsic

Submit a fully formatted extrinsic for block inclusion

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "jsonrpc": "2.0",
    "id": "test",
    "method": "author_submitExtrinsic",
    "params": [
        "0x280401000bc1559d3f9301"
    ]
}

Example response: 200

{
    "jsonrpc": "2.0",
    "error": {
        "code": 1010,
        "message": "Invalid Transaction",
        "data": "Transaction dispatch is mandatory; transactions must not be validated."
    },
    "id": "test"
}

state_getStorage

Retrieves the storage for a key

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "state_getStorage",
    "params": [
        "StorageKey"
    ]
}

Example response: 200

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32602,
        "message": "Invalid params",
        "data": "invalid hex character: S, at 0 at line 1 column 12"
    },
    "id": "test"
}

payment_queryInfo

Retrieves the fee information for an encoded extrinsic

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "jsonrpc": "2.0",
    "id": "test",
    "method": "payment_queryInfo",
    "params": [
        "0x280401000b31d309409301"
    ]
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": {
        "weight": {
            "ref_time": 158684000,
            "proof_size": 1493
        },
        "class": "mandatory",
        "partialFee": "0"
    },
    "id": "test"
}

state_getRuntimeVersion

Get the runtime version

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "state_getRuntimeVersion",
    "params": []
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": {
        "specName": "atleta",
        "implName": "atleta",
        "authoringVersion": 1,
        "specVersion": 5,
        "implVersion": 1,
        "apis": [
            [
                "0xdf6acb689907609b",
                5
            ],
            [
                "0x37e397fc7c91f5e4",
                2
            ],
            [
                "0x40fe3ad401f8959a",
                6
            ],
...

state_getMetadata

Returns the runtime metadata

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "state_getMetadata",
    "params": []
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": "0x6d6574610e2d0d00082866705f6163636f756e742c4163636f756e7449643230000004000401205b75383b2032305d0000040000031400000008000800000503000c08306672616d655f73797374656d2c41636
...

system_properties

Get a custom set of properties as a JSON object, defined in the chain spec

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "system_properties",
    "params": []
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": {
        "ss58Format": 2340,
        "tokenDecimals": 18,
        "tokenSymbol": "ATLA"
    },
    "id": "test"
}

system_chain

Retrieves the chain

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "system_chain",
    "params": []
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": "Olympia",
    "id": "test"
}

author_submitAndWatchExtrinsic

Submit and subscribe to watch an extrinsic until unsubscribed

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "author_submitAndWatchExtrinsic",
    "params": [
        "0x290284ffdc3488acc1a6b90aa92cea0cfbe2b00754a74084970b08d968e948d4d3bf161a01e2f2be0a634faeb8401ed2392731df803877dcb2422bb396d48ca24f18661059e3dde41d14b87eb929ec41ab36e6d63be5a1f5c3c5c092c79646a453f4b392890000000600ff488f6d1b0114674dcd81fd29642bc3bcec8c8366f6af0665860f9d4e8c8a972404"
    ]
}

Example response: 200

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32603,
        "message": "Internal error"
    },
    "id": "test"
}

author_pendingExtrinsics

Returns all pending extrinsics, potentially grouped by sender

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "author_pendingExtrinsics",
    "params": []
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": [
        "0x45028400f9962d3f868978a985847685dd47224fe0c47531fe7ee823b9393d29fe8be9650054230d07aebde185a95e5ff68258ef3d2f21226c9789d6666c29e63af3a9f95cb053c7729af09ef2dd64e070eb5e05b09bd4eafac0528eac9587ad7d1a82010e15033d010005000065b06effe23b1ee6351b473fd8f7fd32e66b2ec5d29ee03e1d5d6f22dd5e667e07503d15cc04"
    ],
    "id": "test"
}

state_getReadProof

Returns proof of storage entries at a specific block state

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "state_getReadProof",
    "params": [
        "keys: Vec<StorageKey>"
    ]
}

Example response: 200

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32602,
        "message": "Invalid params",
        "data": "invalid type: string \"keys: Vec<StorageKey>\", expected a sequence at line 1 column 23"
    },
    "id": "test"
}

state_getStorageHash

Retrieves the storage hash

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "state_getStorageHash",
    "params": [
        "StorageKey"
    ]
}

Example response: 200

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32602,
        "message": "Invalid params",
        "data": "invalid hex character: S, at 0 at line 1 column 12"
    },
    "id": "test"
}

state_getStorageSize

Retrieves the storage size

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "state_getStorageSize",
    "params": [
        "StorageKey"
    ]
}

Example response: 200

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32602,
        "message": "Invalid params",
        "data": "invalid hex character: S, at 0 at line 1 column 12"
    },
    "id": "test"
}

state_queryStorage

Query historical storage entries (by key) starting from a start block

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "state_queryStorage",
    "params": [
        "StorageKeys",
        "fromBlock",
        "toBlock" 
    ]
}

Example response: 200

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32602,
        "message": "Invalid params",
        "data": "invalid type: string \"StorageKeys\", expected a sequence at line 1 column 13"
    },
    "id": "test"
}

state_queryStorageAt

Query storage entries (by key) starting at block hash given as the second parameter

Method: POST

https://atleta-testnet.nownodes.io

Example body (raw)

{
    "API_key": "your_API_key",
    "jsonrpc": "2.0",
    "id": "test",
    "method": "state_queryStorageAt",
    "params": [
        "StorageKeys",
        "fromBlock"
    ]
}

Example response: 200

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32602,
        "message": "Invalid params",
        "data": "invalid type: string \"StorageKeys\", expected a sequence at line 1 column 13"
    },
    "id": "test"
}

Last updated