Parameters
childStorageKey
string
REQUIRED
The child storage key
prefix
string
REQUIRED
The prefix to filter keys. Leave empty to get all keys
hash
string
The block hash. If not provided, uses the latest block
Returns
result
array
An array containing the keys with the specified prefix from the child storage
Request
1curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/asset-hub' \2--header 'Content-Type: application/json' \3--data '{"method":"childstate_getKeys","params":["CHILD_STORAGE_KEY", "PREFIX"],"id":1,"jsonrpc":"2.0"}'
1curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/asset-hub' \2--header 'Content-Type: application/json' \3--data '{"method":"childstate_getKeys","params":["CHILD_STORAGE_KEY", "PREFIX"],"id":1,"jsonrpc":"2.0"}'
1const myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34const raw = JSON.stringify({5"method": "childstate_getKeys",6"params": [7"CHILD_STORAGE_KEY",8"PREFIX"9],10"id": 1,11"jsonrpc": "2.0"12});131415const requestOptions = {16method: "POST",17headers: myHeaders,18body: raw,19redirect: "follow"20};2122fetch("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub", requestOptions)23.then((response) => response.text())24.then((result) => console.log(result))25.catch((error) => console.error(error));26
1const myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34const raw = JSON.stringify({5"method": "childstate_getKeys",6"params": [7"CHILD_STORAGE_KEY",8"PREFIX"9],10"id": 1,11"jsonrpc": "2.0"12});131415const requestOptions = {16method: "POST",17headers: myHeaders,18body: raw,19redirect: "follow"20};2122fetch("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub", requestOptions)23.then((response) => response.text())24.then((result) => console.log(result))25.catch((error) => console.error(error));26
1import requests2import json34url = "https://docs-demo.dot-mainnet.quiknode.pro/asset-hub"56payload = json.dumps({7"method": "childstate_getKeys",8"params": [9"CHILD_STORAGE_KEY",10"PREFIX"11],12"id": 1,13"jsonrpc": "2.0"14})1516headers = {17'Content-Type': 'application/json'18}1920response = requests.request("POST", url, headers=headers, data=payload)21print(response.text)22
1import requests2import json34url = "https://docs-demo.dot-mainnet.quiknode.pro/asset-hub"56payload = json.dumps({7"method": "childstate_getKeys",8"params": [9"CHILD_STORAGE_KEY",10"PREFIX"11],12"id": 1,13"jsonrpc": "2.0"14})1516headers = {17'Content-Type': 'application/json'18}1920response = requests.request("POST", url, headers=headers, data=payload)21print(response.text)22
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request.body = JSON.dump({13"method": "childstate_getKeys",14"params": [15"CHILD_STORAGE_KEY",16"PREFIX"17],18"id": 1,19"jsonrpc": "2.0"20})2122response = https.request(request)23puts response.read_body24
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request.body = JSON.dump({13"method": "childstate_getKeys",14"params": [15"CHILD_STORAGE_KEY",16"PREFIX"17],18"id": 1,19"jsonrpc": "2.0"20})2122response = https.request(request)23puts response.read_body24
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free