This module allows you to make generic requests to the network.

The RpcQueryRequest struct takes in a BlockReference and a QueryRequest.

The BlockReference enum allows you to specify a block by Finality, BlockId or SyncCheckpoint.

The QueryRequest enum provides multiple variants for performing the following actions:

  • View an account's details
  • View a contract's code
  • View the state of an account
  • View the AccessKey of an account
  • View the AccessKeyList of an account
  • Call a function in a contract deployed on the network.
post/query

Request body

idstring

JSON-RPC request id. Auto-populated; can be any string.

jsonrpc'2.0'

JSON-RPC protocol version. Always 2.0.

method'query' required

Response

OR

Changes

Changed in 5 of the 9 revisions of this API.616

  • f586f485313811See the full diff
    • added subschema #1 subschema #2 to the response body oneOf list for the response status

      response-body-one-of-added

    • removed subschema #1 subschema #2 from the response body oneOf list for the response status

      response-body-one-of-removed

  • cb6bdde6167d17See the full diff
    • added subschema #1 subschema #2 to the response body oneOf list for the response status

      response-body-one-of-added

    • added the new optional request property ///

      new-optional-request-property

    • added the new optional request property ///

      new-optional-request-property

    • added the new optional request property ///

      new-optional-request-property

    • added the new optional request property ///

      new-optional-request-property

    • added the new optional request property ///

      new-optional-request-property

    • added the new optional request property ///

      new-optional-request-property

    • removed subschema #1 subschema #2 from the response body oneOf list for the response status

      response-body-one-of-removed

  • 97b870f1f63811See the full diff
    • added subschema #1 subschema #2 to the response body oneOf list for the response status

      response-body-one-of-added

    • removed subschema #1 subschema #2 from the response body oneOf list for the response status

      response-body-one-of-removed

  • e1982645f48322See the full diff
    • removed from the request property oneOf list

      request-property-one-of-removed

    • added subschema #1 subschema #2 to the response body oneOf list for the response status

      response-body-one-of-added

    • added subschema #1: view_account_by_block_id subschema #2: view_code_by_block_id subschema #3: view_state_by_block_id subschema #4: view_access_key_by_block_id subschema #5: view_access_key_list_by_block_id subschema #6: view_gas_key_nonces_by_block_id subschema #7: call_function_by_block_id subschema #9: view_global_contract_code_by_account_id_by_block_id subschema #10: view_account_by_finality subschema #11: view_code_by_finality subschema #12: view_state_by_finality subschema #13: view_access_key_by_finality subschema #14: view_access_key_list_by_finality subschema #15: view_gas_key_nonces_by_finality subschema #16: call_function_by_finality subschema #18: view_global_contract_code_by_account_id_by_finality subschema #19: view_account_by_sync_checkpoint subschema #20: view_code_by_sync_checkpoint subschema #21: view_state_by_sync_checkpoint subschema #22: view_access_key_by_sync_checkpoint subschema #23: view_access_key_list_by_sync_checkpoint subschema #24: view_gas_key_nonces_by_sync_checkpoint subschema #25: call_function_by_sync_checkpoint subschema #27: view_global_contract_code_by_account_id_by_sync_checkpoint to the request property oneOf list

      request-property-one-of-added

    • removed from the response body oneOf list for the response status

      response-body-one-of-removed

    This revision also has 570 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • request property was restricted to a list of enum values

      request-property-became-enum

    • the request property became optional

      request-property-became-optional

    • the request property became optional

      request-property-became-optional

    • the request property default value dontcare was added

      request-property-default-value-added

    • the request property default value 2.0 was added

      request-property-default-value-added

    • added the new 2.0 enum value to the request property

      request-property-enum-value-added