POSTview_state
https://near-mainnet.nodit.io/Returns the key-value pairs stored in a contract's storage, encoded in base64. Only keys starting with the prefix given in prefix_base64 are returned; pass an empty string ("") to return the entire state.
Call the query method with request_type: "view_state". For large state, set how many entries to receive at once with limit, then pass the last_key from the response as after_key_base64 in the next request to continue. include_proof cannot be combined with after_key_base64 or limit; specifying them together returns REQUEST_VALIDATION_ERROR (PARSE_ERROR).
By default, RPC nodes return at most 50 kB of state. Querying state larger than this limit without pagination returns the TOO_LARGE_CONTRACT_STATE error (for example, requesting wrap.near with prefix_base64: ""). Querying an account that does not exist returns the UNKNOWN_ACCOUNT error.
Request ID. Any string; it is returned unchanged in the response.
Query type. Fixed to view_state for contract state lookups.
Specifies the block finality. Cannot be used together with block_id.
optimistic: the latest block the node has received (may be reorganized)near-final: a Doomslug-final block (not reverted in most cases)final: a fully finalized block
Specifies the block to query by block height (integer) or block hash (base58 string).
Cannot be used together with finality.
NEAR account ID. A human-readable name (e.g. wrap.near) or a 64-character hex implicit account ID.
Prefix of the keys to look up (base64). An empty string ("") targets all keys.
Resume listing after this key (exclusive). Pass the last_key from the previous response; it must start with prefix_base64. Cannot be combined with include_proof.
Maximum number of key-value pairs to return in one page. Cannot be combined with include_proof.
If true, also returns inclusion proofs (proof) for the state entries. Defaults to false; cannot be combined with after_key_base64 or limit.
JSON-RPC version
Request ID
Key-value pairs matching the condition. An empty array if no key matches or the state is empty.
Storage key (base64)
Storage value (base64). The value format follows the serialization chosen by the contract (Borsh, JSON, etc.).
Key (base64) to pass as after_key_base64 to fetch the next page. Present only when entries remain; absent on the last page.
Inclusion proofs for the state entries (array of base64 strings). Present only when requested with include_proof: true.
Block height.
Example: 220785385
Base58-encoded 32-byte hash (block hash, chunk hash, transaction hash, etc.).
Example: 8EjuQRnAJiWkRmqxfexQFJWXXonuSMbz5AZziJLCWnWS
Error class. REQUEST_VALIDATION_ERROR (invalid request), HANDLER_ERROR (processing error), INTERNAL_ERROR (node internal error)
The specific cause of the error.
Name of the error cause (e.g. UNKNOWN_BLOCK, UNKNOWN_ACCOUNT, PARSE_ERROR)
Additional information about the error (block hash, height, account ID, etc.)
Legacy JSON-RPC error code (e.g. -32000 server error, -32700 parse error, -32601 method not found)
Legacy error message
Legacy error details