cURL
curl --request POST \
--url https://api.example.com/EXPERIMENTAL_view_state \
--header 'Content-Type: application/json' \
--data '
{
"method": "EXPERIMENTAL_view_state",
"params": {
"block_id": 1,
"account_id": "<string>",
"prefix_base64": "<string>",
"after_key_base64": "<string>",
"include_proof": false,
"limit": null
},
"id": "dontcare",
"jsonrpc": "2.0"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'EXPERIMENTAL_view_state',
params: {
block_id: 1,
account_id: '<string>',
prefix_base64: '<string>',
after_key_base64: '<string>',
include_proof: false,
limit: null
},
id: 'dontcare',
jsonrpc: '2.0'
})
};
fetch('https://api.example.com/EXPERIMENTAL_view_state', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/EXPERIMENTAL_view_state"
payload = {
"method": "EXPERIMENTAL_view_state",
"params": {
"block_id": 1,
"account_id": "<string>",
"prefix_base64": "<string>",
"after_key_base64": "<string>",
"include_proof": False,
"limit": None
},
"id": "dontcare",
"jsonrpc": "2.0"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"result": {
"block_hash": "<string>",
"block_height": 1,
"values": [
{
"key": "<string>",
"value": "<string>"
}
],
"last_key": "<string>",
"proof": [
"<string>"
]
},
"id": "<string>",
"jsonrpc": "<string>"
}Post experimental view state
Returns the state (key-value pairs) of a contract based on the key prefix.
POST
/
EXPERIMENTAL_view_state
cURL
curl --request POST \
--url https://api.example.com/EXPERIMENTAL_view_state \
--header 'Content-Type: application/json' \
--data '
{
"method": "EXPERIMENTAL_view_state",
"params": {
"block_id": 1,
"account_id": "<string>",
"prefix_base64": "<string>",
"after_key_base64": "<string>",
"include_proof": false,
"limit": null
},
"id": "dontcare",
"jsonrpc": "2.0"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'EXPERIMENTAL_view_state',
params: {
block_id: 1,
account_id: '<string>',
prefix_base64: '<string>',
after_key_base64: '<string>',
include_proof: false,
limit: null
},
id: 'dontcare',
jsonrpc: '2.0'
})
};
fetch('https://api.example.com/EXPERIMENTAL_view_state', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/EXPERIMENTAL_view_state"
payload = {
"method": "EXPERIMENTAL_view_state",
"params": {
"block_id": 1,
"account_id": "<string>",
"prefix_base64": "<string>",
"after_key_base64": "<string>",
"include_proof": False,
"limit": None
},
"id": "dontcare",
"jsonrpc": "2.0"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"result": {
"block_hash": "<string>",
"block_height": 1,
"values": [
{
"key": "<string>",
"value": "<string>"
}
],
"last_key": "<string>",
"proof": [
"<string>"
]
},
"id": "<string>",
"jsonrpc": "<string>"
}Body
application/json
Available options:
EXPERIMENTAL_view_state - RpcViewStateRequest
- RpcViewStateRequest
- RpcViewStateRequest
Show child attributes
Show child attributes
JSON-RPC request id. Auto-populated; can be any string.
JSON-RPC protocol version. Always 2.0.
Available options:
2.0 Was this page helpful?