WSS

chain_getFinalizedHead

Get hash of the last finalized block in the canon chain

wss://dot.nownodes.io/wss/{{api-key}}

Message:

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

Example response: 200

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

chain_getBlock

Get the block hash for a specific block

wss://dot.nownodes.io/wss/{{api-key}}

Message:

{
    "jsonrpc": "2.0",
    "id": "test",
    "method": "chain_getBlock",
    "params": [
        "0x475cdb8d947ce40f8b56abc8dadf65b9d7fb2167213ef0d013eae9b30c9aeaee"
    ]
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": {
        "block": {
            "header": {
                "parentHash": "0x3a4894dd30e6fe1cb868a9d8cbe8e3ffa5c4034bb55093f24e54f702dc7a2895",
                "number": "0x137e5c5",
                "stateRoot": "0xd126bc14cf47552e6a73d0660dddc06e54e3b6821012b2b0d333fd933d9965af",
                "extrinsicsRoot": "0x973d7fc88a17381de87cd2616c57f3ad5d61c39a7b30c8f565a8d4c67fba2e06",
                "digest": {
                    "logs": [
                        "0x0642414245b5010324010000d52e061100000000f2780c157c51a66501973a47f59552e30aa5ba32c6d96c00effc9a4e859eda373c4b435f98002d8899de4c4cb7c04f3cf8ba896c7512fcc2535fe6848f72dd0bb17989d0c40cb587189c70738330f541a75ffa09af2226aa019c84958ce6ba0b",
                        "0x04424545468403c4e92ad85af429580631cdfd3eb5bdf55b68238332e1c0855519fcdad4130362",
                        "0x0542414245010102eaf7bc01d508d9cc3cb4d889f4f8e25993aa6be2bd201bf1a9de502ea54a175ea456381d4948b2909d77a682c532b6497554e2915e4919c8bc2e8acb0ccc8c"
                    ]
                }
            },
            "extrinsics": [
                "0x280403000b30a0e9008f01",
                "0x12da0200043600a504ec08ac00209009000000000000d2d31976c948cd6c5dc8d517e24a756b7e5c05642e3c97fafff2fafefd5aa13324608cf6c76f0df3e5cae6a898c327267bbbf13e1dcb2e41b3b1fe498c32cf81ec08ac0020900900000100000086101e7fa4032b84e78ae315d8eda393bb4c11aa3a8d517bfc77c496bc1d306c939165276b590552d189eb983b20377341290f075512b74db5307581bca29085ec08ac00209009000002000000a49687f6eae5765bd132b75ab116561f3bcfda3566985dc9b5419dfd97f1dc3579bdef668c97de40ce858819f8eb2d84f0ad2c7dd320cc450da083a32ca74181ec08ac002090090000030000002a22645a18020239c9b0facb815f956d139106fbd0a2ff797cca5d74f47a161eb0933621c83b85ce91cfd7e9b12fb78223e31d4bcade4b01c77dc2bc1e68f080ec08ac0020900900000400000084fb756ca54bb7136ef02c2e445578064e4bc725b0deaaaa8079d43eb1b55f1e9d2830e547892794f60fe9d258ad5c5eebdae158a200cabfeaa5e6b9f56fb58fec08ac0020900900000500000042bdf7e6c6980a8491fe66d321b73fce50cd416582079aba8e4e143d78c1db4098ba1832e9839ee942fecb7f0e0e4e91c3f1eeb528d5291378ce79b2fb144c8aec08ac00209009000006000000b0c8e16a4868265002183d6b9483f86b0b125660886e892324154549f60f595280be98e843d4df6ccc8e556f6baafa8f1c7f391e2744c7b26b4c886fcc6dee85ec08ac0020900900000700000018e4cfd8a44a8871518f410f9390fff479f76481e5080538f00eb7e85036ea5ce2525016b7dabba8f0d70c36082878f8f1051a962b5374d9d78fa4a342c7b389ec08ac00209009000008000000d0388900163fcaa7f7de6ef106bc23173d68a4fc4118d7b47bb5175b1b61fa46d9707b9ab7f897fdd9e5a0d0a9ed1cae417767fe285228047d5146db532a158eec08ac00209009000009000000b60173c5ccb1c623689ba50a368a439440f2e9d244d15b1f8b66dcfe84881c5af090541680bfeacbf0c407eee83c0af004705d5999de5b0d0c8f45779832b883ec08ac0020900900000a00000074b37457b05b99ee2ade20ddda2c8ce67f55a1927efc0e9fed115d272b7fe5629b66ce79ffcd562f08556e257641e38b16e527cb1cfabefdc18ab2198421c28fec08ac0020900900000b0000007491f778c2ff073fb5f16668a26ee96dcd7815f1c7bda3843027b1984560946366b2adc28e2f12f9c001b353a6c9583984426f2eccd5355e07cb2e81d1be9d84ec08ac0020900900000c0000008622c687fbeb44a5f5c9974bf3bbac91cc59a7150f7e01743029cfcc24d14b057155993e1361ba11e6c8ddd069e14eb38d7349783a00c61b83479c30341c0287ec08ac0020900900000d00000018972eee7c587ae6b35f5053b63c1e8766693629d4e1f12a953a20a03859246fd4f2d61a6aacc501f927a6ad04d38ab0975214bc0dc1621b328ba04c6bd1a78fec08ac0020900900000e000000fa1200e8079b576459b84b80368e1266bfb4551cae602f21f1391141f0191043ffc30c9f7fdca327f53c13d829ae231777e2b12e9b04a9d6bf8f2a94a71e7d83ec08ac0020900900000f000000ace8da9e9e08854c544bafc9dda03ecd2512da679aaccaa65d9d9e500f0c2d6267c8bd17b56adc42baace757300ac855544eab26585314539a1b06315ed72788ec08ac00209009000010000000c8a42b74daee066e08fa95d608e76b26fd17bd2f8002f1e4908a60c02508bd27e8cf82170559636507c2dbf893391b1f41022aeceb2ff2a0d113a4a0ad8fe883ec08ac0020900900001100000008487460af3e7deb8548ea5fbd505e1ca07638b8ce0767c1417bc589537c74714080f76ff5c3293247fc97ef76385a61e1a2e8f8c4f27242ab7f57f246a7ed83ec00000000000000001200000060de6bde1ecfbd6c80773c763ef3300d6098abc384311915f179416bad51372778af9502490262fd9cdfa7ed8a64e8587070b66d797f4abb96a1a82070f0b388ec000000009000000013000000740e6ca4a08b77254a43e3f29ebf03a90c959ba68ac7197b4f07feec4756df3a2b25c9e441660fa4634f04ffe89ed21318c849db6cd62d1a27d558fbc6436483ec08ac002090090000140000005cd6f1a399425f4383784f375fe5159b88f0c502a0c88cb9e5166dc2c0c614753f59d72b8747a97f7c819c8d08eaaa286fa47ac37505c237ceaa37f29cd0b08bec08ac0020900900001500000010baa84853dcb4a61beefa59a4879a29fee179386a82b67bbc460a2a672b2c21b95cb45bffc521451d9ee44eeeeb31dea7cbc933ee5bd802c378f0514da2ba88ec08ac00209009000016000000fef759e1d4e619c0869742535db2c563f1d8667552c5c6826f8feae168bcfb1698205e196ac019bb44600b943bee6dee818f952b971c51a9ac8d6c654bdfda87ec08ac002090090000170000000ab52eb488ec2d9ba20234e3eb79d5dc638634d3cde55df06ec6e27ab7b67819261c33e57e120f42456d134fffe1295451b6a0123cccb36e69b2699e18d90f87ec08ac002090090000180000000a170e1bd376634433d4ec1ca2585529f70da0e15fccdb601b39781890251d6167e45fd821987d620d5f78d8dacf129a3c8d1c478fe5a7a40dd41adba38e7b87ec08ac00209009000019000000ae86c0dc34f68c199db69bbd6944d91bc0d282797b28df0915c6cb5f0b6e60783ccd353f06d1832ade563997fe8afc2acaa926f9387ad78f54d0e6ade5e6ba81ec08ac0020900900001a000000ac179983043f37226687cb92b13ddbdaca34dd7d0be8b0971fb922132f32ca61e485a5b07cdf8aeabb6f01a412e9084c9138d6c235a8816fabdec6ede77d218bec08ac0020900900001b000000c8f9d85c36758bd2bb0568b97d4f6095cbede64c1dfc2680b2824c55a54a01420627a2dcf22235d59bb975f2fc2a476a1f523a80aa455610b7aa71165e777885ec08ac0020900900001c0...
...                

chain_getBlockHash

Get the block hash for a specific block

wss://dot.nownodes.io/wss/{{api-key}}

Message:

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

Example response: 200

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

author_submitExtrinsic

Submit a fully formatted extrinsic for block inclusion

wss://dot.nownodes.io/wss/{{api-key}}

Message:

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

Example response: 200

{
    "jsonrpc": "2.0",
    "error": {
        "hash": "0xc3b470035c615d45e3a3b4cedb8b559eee842b27751353419212cee97d709f28"
    },
    "id": "test"
}

state_getStorage

Retrieves the storage for a key

wss://dot.nownodes.io/wss/{{api-key}}

Message:

{
    "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

wss://dot.nownodes.io/wss/{{api-key}}

Message:

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

Example response: 200

{
    "jsonrpc": "2.0",
    "result": {
        "weight": {
            "ref_time": 139630000,
            "proof_size": 3593
        },
        "class": "normal",
        "partialFee": "157107779"
    },
    "id": "test"
}

state_getRuntimeVersion

Get the runtime version

wss://dot.nownodes.io/wss/{{api-key}}

Message:

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

Example response: 200

{
    "jsonrpc": "2.0",
    "result": {
        "specName": "polkadot",
        "implName": "parity-polkadot",
        "authoringVersion": 0,
        "specVersion": 1002000,
        "implVersion": 0,
        "apis": [
            [
                "0xdf6acb689907609b",
                4
            ],
            [
                "0x37e397fc7c91f5e4",
                2
            ],
            [
                "0x40fe3ad401f8959a",
                6
            ],
            [
                "0x17a6bc0d0062aeb3",
                1
            ],
            [
                "0x18ef58a3b67ba770",
                1
            ],
            [
                "0xd2bc9897eed08f15",
                3
            ],
            [
                "0xf78b278be53f454c",
                2
            ],
            [
                "0xaf2c0297a23e6d3d",
                10
            ],
            [
                "0x49eaaf1b548a0cb0",
                3
            ],
            [
                "0x91d5df18b0d2cf58",
                2
            ],
...

state_getMetadata

Returns the runtime metadata

wss://dot.nownodes.io/wss/{{api-key}}

Message:

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

Example response: 200

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

system_properties

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

wss://dot.nownodes.io/wss/{{api-key}}

Message:

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

Example response: 200

{
    "jsonrpc": "2.0",
    "result": {
        "ss58Format": 0,
        "tokenDecimals": 10,
        "tokenSymbol": "DOT"
    },
    "id": "test"
}

system_chain

Retrieves the chain

wss://dot.nownodes.io/wss/{{api-key}}

Message:

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

Example response: 200

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

author_submitAndWatchExtrinsic

Submit and subscribe to watch an extrinsic until unsubscribed

wss://dot.nownodes.io/wss/{{api-key}}

Message:

{
    "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

wss://dot.nownodes.io/wss/{{api-key}}

Message:

{
    "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

wss://dot.nownodes.io/wss/{{api-key}}

Message:

{
    "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

wss://dot.nownodes.io/wss/{{api-key}}

Message:

{
    "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

wss://dot.nownodes.io/wss/{{api-key}}

Message:

{
    "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

wss://dot.nownodes.io/wss/{{api-key}}

Message:

{
    "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

wss://dot.nownodes.io/wss/{{api-key}}

Message:

{
    "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