View State
view_state request type
This endpoint allows you to view the key-value state of a smart contract on the NEAR blockchain.
Live Response
Responses from the selected endpoint appear here after you run a request.
Live response output will appear here after you run a request.
Request reference
application/jsonThis operation accepts a JSON-RPC body over POST to /.
Required request inputs: yes
{
"jsonrpc": "2.0",
"id": "fastnear",
"method": "query",
"params": {
"request_type": "view_state",
"finality": "final",
"account_id": "lockup.near",
"prefix_base64": "U1RBVEU="
}
}Request schema
object
requires jsonrpc, id, method, paramsjsonrpc *string2.0id *stringmethod *stringqueryparams *objectaccount_id *stringNEAR account ID
include_proofbooleanprefix_base64 *stringBase64-encoded storage key
request_type *stringview_statefinality *stringBlock finality
finalnear-finaloptimisticResponse reference
200 application/jsonSuccessful response
Response schema
objectJsonRpcResponse
requires jsonrpc, idjsonrpc *string2.0id *one ofstringnumber
resultobjectResulting state values for a view state query request
proofarrayitemsstringvalues *arrayitemsobjectItem of the state, key and value are serialized in base64 and proof for inclusion of given state item.
errorobjectcodeintegermessagestringdataobject