> ## Documentation Index
> Fetch the complete documentation index at: https://docs.near.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Network Query

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

The `RpcQueryRequest` struct takes in a [`BlockReference`](https://docs.rs/near-primitives/0.12.0/near_primitives/types/enum.BlockReference.html) and a [`QueryRequest`](https://docs.rs/near-primitives/0.12.0/near_primitives/views/enum.QueryRequest.html).

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.



## OpenAPI

````yaml /openapi.json post /query
openapi: 3.0.0
info:
  title: NEAR Protocol JSON RPC API
  version: 1.2.3
servers:
  - url: https://rpc.mainnet.near.org
    description: Mainnet
  - url: https://rpc.testnet.near.org
    description: Testnet
security: []
paths:
  /query:
    post:
      summary: Network Query
      description: >-
        This module allows you to make generic requests to the network.


        The `RpcQueryRequest` struct takes in a
        [`BlockReference`](https://docs.rs/near-primitives/0.12.0/near_primitives/types/enum.BlockReference.html)
        and a
        [`QueryRequest`](https://docs.rs/near-primitives/0.12.0/near_primitives/views/enum.QueryRequest.html).


        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.
      operationId: query
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonRpcRequest_for_query'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/JsonRpcResponse_for_RpcQueryResponse_and_RpcQueryError
components:
  schemas:
    JsonRpcRequest_for_query:
      properties:
        id:
          type: string
        jsonrpc:
          type: string
        method:
          enum:
            - query
          type: string
        params:
          $ref: '#/components/schemas/RpcQueryRequest'
      required:
        - jsonrpc
        - id
        - params
        - method
      title: JsonRpcRequest_for_query
      type: object
    JsonRpcResponse_for_RpcQueryResponse_and_RpcQueryError:
      oneOf:
        - $ref: >-
            #/components/schemas/JsonRpcResponse_for_RpcQueryResponse_and_RpcQueryError_variant0
        - $ref: >-
            #/components/schemas/JsonRpcResponse_for_RpcQueryResponse_and_RpcQueryError_variant1
      properties:
        id:
          type: string
        jsonrpc:
          type: string
      required:
        - jsonrpc
        - id
      title: JsonRpcResponse_for_RpcQueryResponse_and_RpcQueryError
      type: object
    RpcQueryRequest:
      oneOf:
        - $ref: '#/components/schemas/RpcQueryRequest_variant0'
        - $ref: '#/components/schemas/RpcQueryRequest_variant1'
        - $ref: '#/components/schemas/RpcQueryRequest_variant2'
        - $ref: '#/components/schemas/RpcQueryRequest_variant3'
        - $ref: '#/components/schemas/RpcQueryRequest_variant4'
        - $ref: '#/components/schemas/RpcQueryRequest_variant5'
        - $ref: '#/components/schemas/RpcQueryRequest_variant6'
        - $ref: '#/components/schemas/RpcQueryRequest_variant7'
        - $ref: '#/components/schemas/RpcQueryRequest_variant8'
        - $ref: '#/components/schemas/RpcQueryRequest_variant9'
        - $ref: '#/components/schemas/RpcQueryRequest_variant10'
        - $ref: '#/components/schemas/RpcQueryRequest_variant11'
        - $ref: '#/components/schemas/RpcQueryRequest_variant12'
        - $ref: '#/components/schemas/RpcQueryRequest_variant13'
        - $ref: '#/components/schemas/RpcQueryRequest_variant14'
        - $ref: '#/components/schemas/RpcQueryRequest_variant15'
        - $ref: '#/components/schemas/RpcQueryRequest_variant16'
        - $ref: '#/components/schemas/RpcQueryRequest_variant17'
        - $ref: '#/components/schemas/RpcQueryRequest_variant18'
        - $ref: '#/components/schemas/RpcQueryRequest_variant19'
        - $ref: '#/components/schemas/RpcQueryRequest_variant20'
        - $ref: '#/components/schemas/RpcQueryRequest_variant21'
        - $ref: '#/components/schemas/RpcQueryRequest_variant22'
        - $ref: '#/components/schemas/RpcQueryRequest_variant23'
        - $ref: '#/components/schemas/RpcQueryRequest_variant24'
        - $ref: '#/components/schemas/RpcQueryRequest_variant25'
        - $ref: '#/components/schemas/RpcQueryRequest_variant26'
      title: RpcQueryRequest
      type: object
    JsonRpcResponse_for_RpcQueryResponse_and_RpcQueryError_variant0:
      properties:
        result:
          $ref: '#/components/schemas/RpcQueryResponse'
      required:
        - result
      type: object
    JsonRpcResponse_for_RpcQueryResponse_and_RpcQueryError_variant1:
      properties:
        error:
          $ref: '#/components/schemas/ErrorWrapper_for_RpcQueryError'
      required:
        - error
      type: object
    RpcQueryRequest_variant0:
      allOf:
        - properties:
            block_id:
              $ref: '#/components/schemas/BlockId'
          required:
            - block_id
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            request_type:
              enum:
                - view_account
              type: string
          required:
            - request_type
            - account_id
          type: object
      title: view_account_by_block_id
    RpcQueryRequest_variant1:
      allOf:
        - properties:
            block_id:
              $ref: '#/components/schemas/BlockId'
          required:
            - block_id
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            request_type:
              enum:
                - view_code
              type: string
          required:
            - request_type
            - account_id
          type: object
      title: view_code_by_block_id
    RpcQueryRequest_variant2:
      allOf:
        - properties:
            block_id:
              $ref: '#/components/schemas/BlockId'
          required:
            - block_id
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            include_proof:
              type: boolean
            prefix_base64:
              $ref: '#/components/schemas/StoreKey'
            request_type:
              enum:
                - view_state
              type: string
          required:
            - request_type
            - account_id
            - prefix_base64
          type: object
      title: view_state_by_block_id
    RpcQueryRequest_variant3:
      allOf:
        - properties:
            block_id:
              $ref: '#/components/schemas/BlockId'
          required:
            - block_id
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            public_key:
              $ref: '#/components/schemas/PublicKey'
            request_type:
              enum:
                - view_access_key
              type: string
          required:
            - request_type
            - account_id
            - public_key
          type: object
      title: view_access_key_by_block_id
    RpcQueryRequest_variant4:
      allOf:
        - properties:
            block_id:
              $ref: '#/components/schemas/BlockId'
          required:
            - block_id
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            request_type:
              enum:
                - view_access_key_list
              type: string
          required:
            - request_type
            - account_id
          type: object
      title: view_access_key_list_by_block_id
    RpcQueryRequest_variant5:
      allOf:
        - properties:
            block_id:
              $ref: '#/components/schemas/BlockId'
          required:
            - block_id
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            public_key:
              $ref: '#/components/schemas/PublicKey'
            request_type:
              enum:
                - view_gas_key_nonces
              type: string
          required:
            - request_type
            - account_id
            - public_key
          type: object
      title: view_gas_key_nonces_by_block_id
    RpcQueryRequest_variant6:
      allOf:
        - properties:
            block_id:
              $ref: '#/components/schemas/BlockId'
          required:
            - block_id
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            args_base64:
              $ref: '#/components/schemas/FunctionArgs'
            method_name:
              type: string
            request_type:
              enum:
                - call_function
              type: string
          required:
            - request_type
            - account_id
            - method_name
            - args_base64
          type: object
      title: call_function_by_block_id
    RpcQueryRequest_variant7:
      allOf:
        - properties:
            block_id:
              $ref: '#/components/schemas/BlockId'
          required:
            - block_id
          type: object
        - properties:
            code_hash:
              $ref: '#/components/schemas/CryptoHash'
            request_type:
              enum:
                - view_global_contract_code
              type: string
          required:
            - request_type
            - code_hash
          type: object
      title: view_global_contract_code_by_block_id
    RpcQueryRequest_variant8:
      allOf:
        - properties:
            block_id:
              $ref: '#/components/schemas/BlockId'
          required:
            - block_id
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            request_type:
              enum:
                - view_global_contract_code_by_account_id
              type: string
          required:
            - request_type
            - account_id
          type: object
      title: view_global_contract_code_by_account_id_by_block_id
    RpcQueryRequest_variant9:
      allOf:
        - properties:
            finality:
              $ref: '#/components/schemas/Finality'
          required:
            - finality
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            request_type:
              enum:
                - view_account
              type: string
          required:
            - request_type
            - account_id
          type: object
      title: view_account_by_finality
    RpcQueryRequest_variant10:
      allOf:
        - properties:
            finality:
              $ref: '#/components/schemas/Finality'
          required:
            - finality
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            request_type:
              enum:
                - view_code
              type: string
          required:
            - request_type
            - account_id
          type: object
      title: view_code_by_finality
    RpcQueryRequest_variant11:
      allOf:
        - properties:
            finality:
              $ref: '#/components/schemas/Finality'
          required:
            - finality
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            include_proof:
              type: boolean
            prefix_base64:
              $ref: '#/components/schemas/StoreKey'
            request_type:
              enum:
                - view_state
              type: string
          required:
            - request_type
            - account_id
            - prefix_base64
          type: object
      title: view_state_by_finality
    RpcQueryRequest_variant12:
      allOf:
        - properties:
            finality:
              $ref: '#/components/schemas/Finality'
          required:
            - finality
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            public_key:
              $ref: '#/components/schemas/PublicKey'
            request_type:
              enum:
                - view_access_key
              type: string
          required:
            - request_type
            - account_id
            - public_key
          type: object
      title: view_access_key_by_finality
    RpcQueryRequest_variant13:
      allOf:
        - properties:
            finality:
              $ref: '#/components/schemas/Finality'
          required:
            - finality
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            request_type:
              enum:
                - view_access_key_list
              type: string
          required:
            - request_type
            - account_id
          type: object
      title: view_access_key_list_by_finality
    RpcQueryRequest_variant14:
      allOf:
        - properties:
            finality:
              $ref: '#/components/schemas/Finality'
          required:
            - finality
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            public_key:
              $ref: '#/components/schemas/PublicKey'
            request_type:
              enum:
                - view_gas_key_nonces
              type: string
          required:
            - request_type
            - account_id
            - public_key
          type: object
      title: view_gas_key_nonces_by_finality
    RpcQueryRequest_variant15:
      allOf:
        - properties:
            finality:
              $ref: '#/components/schemas/Finality'
          required:
            - finality
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            args_base64:
              $ref: '#/components/schemas/FunctionArgs'
            method_name:
              type: string
            request_type:
              enum:
                - call_function
              type: string
          required:
            - request_type
            - account_id
            - method_name
            - args_base64
          type: object
      title: call_function_by_finality
    RpcQueryRequest_variant16:
      allOf:
        - properties:
            finality:
              $ref: '#/components/schemas/Finality'
          required:
            - finality
          type: object
        - properties:
            code_hash:
              $ref: '#/components/schemas/CryptoHash'
            request_type:
              enum:
                - view_global_contract_code
              type: string
          required:
            - request_type
            - code_hash
          type: object
      title: view_global_contract_code_by_finality
    RpcQueryRequest_variant17:
      allOf:
        - properties:
            finality:
              $ref: '#/components/schemas/Finality'
          required:
            - finality
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            request_type:
              enum:
                - view_global_contract_code_by_account_id
              type: string
          required:
            - request_type
            - account_id
          type: object
      title: view_global_contract_code_by_account_id_by_finality
    RpcQueryRequest_variant18:
      allOf:
        - properties:
            sync_checkpoint:
              $ref: '#/components/schemas/SyncCheckpoint'
          required:
            - sync_checkpoint
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            request_type:
              enum:
                - view_account
              type: string
          required:
            - request_type
            - account_id
          type: object
      title: view_account_by_sync_checkpoint
    RpcQueryRequest_variant19:
      allOf:
        - properties:
            sync_checkpoint:
              $ref: '#/components/schemas/SyncCheckpoint'
          required:
            - sync_checkpoint
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            request_type:
              enum:
                - view_code
              type: string
          required:
            - request_type
            - account_id
          type: object
      title: view_code_by_sync_checkpoint
    RpcQueryRequest_variant20:
      allOf:
        - properties:
            sync_checkpoint:
              $ref: '#/components/schemas/SyncCheckpoint'
          required:
            - sync_checkpoint
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            include_proof:
              type: boolean
            prefix_base64:
              $ref: '#/components/schemas/StoreKey'
            request_type:
              enum:
                - view_state
              type: string
          required:
            - request_type
            - account_id
            - prefix_base64
          type: object
      title: view_state_by_sync_checkpoint
    RpcQueryRequest_variant21:
      allOf:
        - properties:
            sync_checkpoint:
              $ref: '#/components/schemas/SyncCheckpoint'
          required:
            - sync_checkpoint
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            public_key:
              $ref: '#/components/schemas/PublicKey'
            request_type:
              enum:
                - view_access_key
              type: string
          required:
            - request_type
            - account_id
            - public_key
          type: object
      title: view_access_key_by_sync_checkpoint
    RpcQueryRequest_variant22:
      allOf:
        - properties:
            sync_checkpoint:
              $ref: '#/components/schemas/SyncCheckpoint'
          required:
            - sync_checkpoint
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            request_type:
              enum:
                - view_access_key_list
              type: string
          required:
            - request_type
            - account_id
          type: object
      title: view_access_key_list_by_sync_checkpoint
    RpcQueryRequest_variant23:
      allOf:
        - properties:
            sync_checkpoint:
              $ref: '#/components/schemas/SyncCheckpoint'
          required:
            - sync_checkpoint
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            public_key:
              $ref: '#/components/schemas/PublicKey'
            request_type:
              enum:
                - view_gas_key_nonces
              type: string
          required:
            - request_type
            - account_id
            - public_key
          type: object
      title: view_gas_key_nonces_by_sync_checkpoint
    RpcQueryRequest_variant24:
      allOf:
        - properties:
            sync_checkpoint:
              $ref: '#/components/schemas/SyncCheckpoint'
          required:
            - sync_checkpoint
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            args_base64:
              $ref: '#/components/schemas/FunctionArgs'
            method_name:
              type: string
            request_type:
              enum:
                - call_function
              type: string
          required:
            - request_type
            - account_id
            - method_name
            - args_base64
          type: object
      title: call_function_by_sync_checkpoint
    RpcQueryRequest_variant25:
      allOf:
        - properties:
            sync_checkpoint:
              $ref: '#/components/schemas/SyncCheckpoint'
          required:
            - sync_checkpoint
          type: object
        - properties:
            code_hash:
              $ref: '#/components/schemas/CryptoHash'
            request_type:
              enum:
                - view_global_contract_code
              type: string
          required:
            - request_type
            - code_hash
          type: object
      title: view_global_contract_code_by_sync_checkpoint
    RpcQueryRequest_variant26:
      allOf:
        - properties:
            sync_checkpoint:
              $ref: '#/components/schemas/SyncCheckpoint'
          required:
            - sync_checkpoint
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            request_type:
              enum:
                - view_global_contract_code_by_account_id
              type: string
          required:
            - request_type
            - account_id
          type: object
      title: view_global_contract_code_by_account_id_by_sync_checkpoint
    RpcQueryResponse:
      anyOf:
        - $ref: '#/components/schemas/AccountView'
        - $ref: '#/components/schemas/ContractCodeView'
        - $ref: '#/components/schemas/ViewStateResult'
        - $ref: '#/components/schemas/CallResult'
        - $ref: '#/components/schemas/AccessKeyView'
        - $ref: '#/components/schemas/AccessKeyList'
        - $ref: '#/components/schemas/GasKeyNoncesView'
      properties:
        block_hash:
          $ref: '#/components/schemas/CryptoHash'
        block_height:
          format: uint64
          minimum: 0
          type: integer
      required:
        - block_height
        - block_hash
      type: object
    ErrorWrapper_for_RpcQueryError:
      oneOf:
        - $ref: '#/components/schemas/ErrorWrapper_for_RpcQueryError_variant0'
        - $ref: '#/components/schemas/ErrorWrapper_for_RpcQueryError_variant1'
        - $ref: '#/components/schemas/ErrorWrapper_for_RpcQueryError_variant2'
    BlockId:
      anyOf:
        - $ref: '#/components/schemas/BlockId_variant0'
        - $ref: '#/components/schemas/CryptoHash'
    AccountId:
      description: >-
        NEAR Account Identifier.


        This is a unique, syntactically valid, human-readable account identifier
        on the NEAR network.


        [See the crate-level docs for information about
        validation.](index.html#account-id-rules)


        Also see [Error kind precedence](AccountId#error-kind-precedence).


        ## Examples


        ```

        use near_account_id::AccountId;


        let alice: AccountId = "alice.near".parse().unwrap();


        assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f)

        ```
      title: AccountId
      type: string
    StoreKey:
      description: >-
        This type is used to mark keys (arrays of bytes) that are queried from
        store.


        NOTE: Currently, this type is only used in the view_client and RPC to be
        able to transparently

        pretty-serialize the bytes arrays as base64-encoded strings (see
        `serialize.rs`).
      format: bytes
      type: string
    PublicKey:
      type: string
    FunctionArgs:
      description: >-
        This type is used to mark function arguments.


        NOTE: The main reason for this to exist (except the type-safety) is that
        the value is

        transparently serialized and deserialized as a base64-encoded string
        when serde is used

        (serde_json).
      format: bytes
      type: string
    CryptoHash:
      type: string
    Finality:
      description: Different types of finality.
      enum:
        - optimistic
        - near-final
        - final
      type: string
    SyncCheckpoint:
      enum:
        - genesis
        - earliest_available
      type: string
    AccountView:
      description: A view of the account
      properties:
        amount:
          $ref: '#/components/schemas/NearToken'
        code_hash:
          $ref: '#/components/schemas/CryptoHash'
        global_contract_account_id:
          anyOf:
            - $ref: '#/components/schemas/AccountId'
            - enum:
                - null
              nullable: true
        global_contract_hash:
          anyOf:
            - $ref: '#/components/schemas/CryptoHash'
            - enum:
                - null
              nullable: true
        locked:
          $ref: '#/components/schemas/NearToken'
        storage_paid_at:
          default: 0
          description: 'TODO(2271): deprecated.'
          format: uint64
          minimum: 0
          type: integer
        storage_usage:
          format: uint64
          minimum: 0
          type: integer
      required:
        - amount
        - locked
        - code_hash
        - storage_usage
      type: object
    ContractCodeView:
      description: A view of the contract code.
      properties:
        code_base64:
          type: string
        hash:
          $ref: '#/components/schemas/CryptoHash'
      required:
        - code_base64
        - hash
      type: object
    ViewStateResult:
      description: Resulting state values for a view state query request
      properties:
        proof:
          items:
            type: string
          type: array
        values:
          items:
            $ref: '#/components/schemas/StateItem'
          type: array
      required:
        - values
      type: object
    CallResult:
      description: A result returned by contract method
      properties:
        logs:
          items:
            type: string
          type: array
        result:
          items:
            format: uint8
            maximum: 255
            minimum: 0
            type: integer
          type: array
      required:
        - result
        - logs
      type: object
    AccessKeyView:
      description: Describes access key permission scope and nonce.
      properties:
        nonce:
          format: uint64
          minimum: 0
          type: integer
        permission:
          $ref: '#/components/schemas/AccessKeyPermissionView'
      required:
        - nonce
        - permission
      type: object
    AccessKeyList:
      description: Lists access keys
      properties:
        keys:
          items:
            $ref: '#/components/schemas/AccessKeyInfoView'
          type: array
      required:
        - keys
      type: object
    GasKeyNoncesView:
      description: Gas key nonces view returned by the `view_gas_key_nonces` RPC query.
      properties:
        nonces:
          items:
            format: uint64
            minimum: 0
            type: integer
          type: array
      required:
        - nonces
      type: object
    ErrorWrapper_for_RpcQueryError_variant0:
      properties:
        cause:
          $ref: '#/components/schemas/RpcRequestValidationErrorKind'
        name:
          enum:
            - REQUEST_VALIDATION_ERROR
          type: string
      required:
        - name
        - cause
      type: object
    ErrorWrapper_for_RpcQueryError_variant1:
      properties:
        cause:
          $ref: '#/components/schemas/RpcQueryError'
        name:
          enum:
            - HANDLER_ERROR
          type: string
      required:
        - name
        - cause
      type: object
    ErrorWrapper_for_RpcQueryError_variant2:
      properties:
        cause:
          $ref: '#/components/schemas/InternalError'
        name:
          enum:
            - INTERNAL_ERROR
          type: string
      required:
        - name
        - cause
      type: object
    BlockId_variant0:
      format: uint64
      minimum: 0
      title: block_height
      type: integer
    NearToken:
      type: string
    StateItem:
      description: >-
        Item of the state, key and value are serialized in base64 and proof for
        inclusion of given state item.
      properties:
        key:
          $ref: '#/components/schemas/StoreKey'
        value:
          $ref: '#/components/schemas/StoreValue'
      required:
        - key
        - value
      type: object
    AccessKeyPermissionView:
      description: >-
        Describes the permission scope for an access key. Whether it is a
        function call or a full access key.
      anyOf:
        - $ref: '#/components/schemas/AccessKeyPermissionView_variant0'
        - $ref: '#/components/schemas/AccessKeyPermissionView_variant1'
        - $ref: '#/components/schemas/AccessKeyPermissionView_variant2'
        - $ref: '#/components/schemas/AccessKeyPermissionView_variant3'
    AccessKeyInfoView:
      description: Describes information about an access key including the public key.
      properties:
        access_key:
          $ref: '#/components/schemas/AccessKeyView'
        public_key:
          $ref: '#/components/schemas/PublicKey'
      required:
        - public_key
        - access_key
      type: object
    RpcRequestValidationErrorKind:
      oneOf:
        - $ref: '#/components/schemas/RpcRequestValidationErrorKind_variant0'
        - $ref: '#/components/schemas/RpcRequestValidationErrorKind_variant1'
    RpcQueryError:
      oneOf:
        - $ref: '#/components/schemas/RpcQueryError_variant0'
        - $ref: '#/components/schemas/RpcQueryError_variant1'
        - $ref: '#/components/schemas/RpcQueryError_variant2'
        - $ref: '#/components/schemas/RpcQueryError_variant3'
        - $ref: '#/components/schemas/RpcQueryError_variant4'
        - $ref: '#/components/schemas/RpcQueryError_variant5'
        - $ref: '#/components/schemas/RpcQueryError_variant6'
        - $ref: '#/components/schemas/RpcQueryError_variant7'
        - $ref: '#/components/schemas/RpcQueryError_variant8'
        - $ref: '#/components/schemas/RpcQueryError_variant9'
        - $ref: '#/components/schemas/RpcQueryError_variant10'
        - $ref: '#/components/schemas/RpcQueryError_variant11'
        - $ref: '#/components/schemas/RpcQueryError_variant12'
    InternalError:
      oneOf:
        - $ref: '#/components/schemas/InternalError_variant0'
    StoreValue:
      description: >-
        This type is used to mark values returned from store (arrays of bytes).


        NOTE: Currently, this type is only used in the view_client and RPC to be
        able to transparently

        pretty-serialize the bytes arrays as base64-encoded strings (see
        `serialize.rs`).
      format: bytes
      type: string
    AccessKeyPermissionView_variant0:
      enum:
        - FullAccess
      type: string
    AccessKeyPermissionView_variant1:
      additionalProperties: false
      properties:
        FunctionCall:
          properties:
            allowance:
              anyOf:
                - $ref: '#/components/schemas/NearToken'
                - enum:
                    - null
                  nullable: true
            method_names:
              items:
                type: string
              type: array
            receiver_id:
              type: string
          required:
            - receiver_id
            - method_names
          type: object
      required:
        - FunctionCall
      type: object
    AccessKeyPermissionView_variant2:
      additionalProperties: false
      properties:
        GasKeyFunctionCall:
          properties:
            allowance:
              anyOf:
                - $ref: '#/components/schemas/NearToken'
                - enum:
                    - null
                  nullable: true
            balance:
              $ref: '#/components/schemas/NearToken'
            method_names:
              items:
                type: string
              type: array
            num_nonces:
              format: uint16
              maximum: 65535
              minimum: 0
              type: integer
            receiver_id:
              type: string
          required:
            - balance
            - num_nonces
            - receiver_id
            - method_names
          type: object
      required:
        - GasKeyFunctionCall
      type: object
    AccessKeyPermissionView_variant3:
      additionalProperties: false
      properties:
        GasKeyFullAccess:
          properties:
            balance:
              $ref: '#/components/schemas/NearToken'
            num_nonces:
              format: uint16
              maximum: 65535
              minimum: 0
              type: integer
          required:
            - balance
            - num_nonces
          type: object
      required:
        - GasKeyFullAccess
      type: object
    RpcRequestValidationErrorKind_variant0:
      properties:
        info:
          properties:
            method_name:
              type: string
          required:
            - method_name
          type: object
        name:
          enum:
            - METHOD_NOT_FOUND
          type: string
      required:
        - name
        - info
      type: object
    RpcRequestValidationErrorKind_variant1:
      properties:
        info:
          properties:
            error_message:
              type: string
          required:
            - error_message
          type: object
        name:
          enum:
            - PARSE_ERROR
          type: string
      required:
        - name
        - info
      type: object
    RpcQueryError_variant0:
      properties:
        name:
          enum:
            - NO_SYNCED_BLOCKS
          type: string
      required:
        - name
      type: object
    RpcQueryError_variant1:
      properties:
        info:
          properties:
            requested_shard_id:
              $ref: '#/components/schemas/ShardId'
          required:
            - requested_shard_id
          type: object
        name:
          enum:
            - UNAVAILABLE_SHARD
          type: string
      required:
        - name
        - info
      type: object
    RpcQueryError_variant2:
      properties:
        info:
          properties:
            block_hash:
              $ref: '#/components/schemas/CryptoHash'
            block_height:
              format: uint64
              minimum: 0
              type: integer
          required:
            - block_height
            - block_hash
          type: object
        name:
          enum:
            - GARBAGE_COLLECTED_BLOCK
          type: string
      required:
        - name
        - info
      type: object
    RpcQueryError_variant3:
      properties:
        info:
          properties:
            block_reference:
              $ref: '#/components/schemas/BlockReference'
          required:
            - block_reference
          type: object
        name:
          enum:
            - UNKNOWN_BLOCK
          type: string
      required:
        - name
        - info
      type: object
    RpcQueryError_variant4:
      properties:
        info:
          properties:
            block_hash:
              $ref: '#/components/schemas/CryptoHash'
            block_height:
              format: uint64
              minimum: 0
              type: integer
            requested_account_id:
              $ref: '#/components/schemas/AccountId'
          required:
            - requested_account_id
            - block_height
            - block_hash
          type: object
        name:
          enum:
            - INVALID_ACCOUNT
          type: string
      required:
        - name
        - info
      type: object
    RpcQueryError_variant5:
      properties:
        info:
          properties:
            block_hash:
              $ref: '#/components/schemas/CryptoHash'
            block_height:
              format: uint64
              minimum: 0
              type: integer
            requested_account_id:
              $ref: '#/components/schemas/AccountId'
          required:
            - requested_account_id
            - block_height
            - block_hash
          type: object
        name:
          enum:
            - UNKNOWN_ACCOUNT
          type: string
      required:
        - name
        - info
      type: object
    RpcQueryError_variant6:
      properties:
        info:
          properties:
            block_hash:
              $ref: '#/components/schemas/CryptoHash'
            block_height:
              format: uint64
              minimum: 0
              type: integer
            contract_account_id:
              $ref: '#/components/schemas/AccountId'
          required:
            - contract_account_id
            - block_height
            - block_hash
          type: object
        name:
          enum:
            - NO_CONTRACT_CODE
          type: string
      required:
        - name
        - info
      type: object
    RpcQueryError_variant7:
      properties:
        info:
          properties:
            block_hash:
              $ref: '#/components/schemas/CryptoHash'
            block_height:
              format: uint64
              minimum: 0
              type: integer
            contract_account_id:
              $ref: '#/components/schemas/AccountId'
          required:
            - contract_account_id
            - block_height
            - block_hash
          type: object
        name:
          enum:
            - TOO_LARGE_CONTRACT_STATE
          type: string
      required:
        - name
        - info
      type: object
    RpcQueryError_variant8:
      properties:
        info:
          properties:
            block_hash:
              $ref: '#/components/schemas/CryptoHash'
            block_height:
              format: uint64
              minimum: 0
              type: integer
            public_key:
              $ref: '#/components/schemas/PublicKey'
          required:
            - public_key
            - block_height
            - block_hash
          type: object
        name:
          enum:
            - UNKNOWN_ACCESS_KEY
          type: string
      required:
        - name
        - info
      type: object
    RpcQueryError_variant9:
      properties:
        info:
          properties:
            block_hash:
              $ref: '#/components/schemas/CryptoHash'
            block_height:
              format: uint64
              minimum: 0
              type: integer
            public_key:
              $ref: '#/components/schemas/PublicKey'
          required:
            - public_key
            - block_height
            - block_hash
          type: object
        name:
          enum:
            - UNKNOWN_GAS_KEY
          type: string
      required:
        - name
        - info
      type: object
    RpcQueryError_variant10:
      properties:
        info:
          properties:
            block_hash:
              $ref: '#/components/schemas/CryptoHash'
            block_height:
              format: uint64
              minimum: 0
              type: integer
            error:
              $ref: '#/components/schemas/FunctionCallError'
            vm_error:
              type: string
          required:
            - vm_error
            - error
            - block_height
            - block_hash
          type: object
        name:
          enum:
            - CONTRACT_EXECUTION_ERROR
          type: string
      required:
        - name
        - info
      type: object
    RpcQueryError_variant11:
      properties:
        info:
          properties:
            block_hash:
              $ref: '#/components/schemas/CryptoHash'
            block_height:
              format: uint64
              minimum: 0
              type: integer
            identifier:
              $ref: '#/components/schemas/GlobalContractIdentifier'
          required:
            - identifier
            - block_height
            - block_hash
          type: object
        name:
          enum:
            - NO_GLOBAL_CONTRACT_CODE
          type: string
      required:
        - name
        - info
      type: object
    RpcQueryError_variant12:
      properties:
        info:
          properties:
            error_message:
              type: string
          required:
            - error_message
          type: object
        name:
          enum:
            - INTERNAL_ERROR
          type: string
      required:
        - name
        - info
      type: object
    InternalError_variant0:
      properties:
        info:
          properties:
            error_message:
              type: string
          required:
            - error_message
          type: object
        name:
          enum:
            - INTERNAL_ERROR
          type: string
      required:
        - name
        - info
      type: object
    ShardId:
      description: >-
        The shard identifier. It may be an arbitrary number - it does not need
        to be

        a number in the range 0..NUM_SHARDS. The shard ids do not need to be

        sequential or contiguous.


        The shard id is wrapped in a new type to prevent the old pattern of
        using

        indices in range 0..NUM_SHARDS and casting to ShardId. Once the
        transition

        if fully complete it potentially may be simplified to a regular type
        alias.
      format: uint64
      minimum: 0
      type: integer
    BlockReference:
      oneOf:
        - $ref: '#/components/schemas/BlockReference_variant0'
        - $ref: '#/components/schemas/BlockReference_variant1'
        - $ref: '#/components/schemas/BlockReference_variant2'
    FunctionCallError:
      description: >-
        Serializable version of `near-vm-runner::FunctionCallError`.


        Must never reorder/remove elements, can only add new variants at the end
        (but do that very

        carefully). It describes stable serialization format, and only used by
        serialization logic.
      anyOf:
        - $ref: '#/components/schemas/FunctionCallError_variant0'
        - $ref: '#/components/schemas/FunctionCallError_variant1'
        - $ref: '#/components/schemas/FunctionCallError_variant2'
        - $ref: '#/components/schemas/FunctionCallError_variant3'
        - $ref: '#/components/schemas/FunctionCallError_variant4'
        - $ref: '#/components/schemas/FunctionCallError_variant5'
        - $ref: '#/components/schemas/FunctionCallError_variant6'
    GlobalContractIdentifier:
      oneOf:
        - $ref: '#/components/schemas/GlobalContractIdentifier_variant0'
        - $ref: '#/components/schemas/GlobalContractIdentifier_variant1'
    BlockReference_variant0:
      additionalProperties: false
      properties:
        block_id:
          $ref: '#/components/schemas/BlockId'
      required:
        - block_id
      type: object
    BlockReference_variant1:
      additionalProperties: false
      properties:
        finality:
          $ref: '#/components/schemas/Finality'
      required:
        - finality
      type: object
    BlockReference_variant2:
      additionalProperties: false
      properties:
        sync_checkpoint:
          $ref: '#/components/schemas/SyncCheckpoint'
      required:
        - sync_checkpoint
      type: object
    FunctionCallError_variant0:
      enum:
        - WasmUnknownError
        - _EVMError
      type: string
    FunctionCallError_variant1:
      additionalProperties: false
      description: Wasm compilation error
      properties:
        CompilationError:
          $ref: '#/components/schemas/CompilationError'
      required:
        - CompilationError
      type: object
    FunctionCallError_variant2:
      additionalProperties: false
      description: >-
        Wasm binary env link error


        Note: this is only to deserialize old data, use execution error for new
        data
      properties:
        LinkError:
          properties:
            msg:
              type: string
          required:
            - msg
          type: object
      required:
        - LinkError
      type: object
    FunctionCallError_variant3:
      additionalProperties: false
      description: Import/export resolve error
      properties:
        MethodResolveError:
          $ref: '#/components/schemas/MethodResolveError'
      required:
        - MethodResolveError
      type: object
    FunctionCallError_variant4:
      additionalProperties: false
      description: >-
        A trap happened during execution of a binary


        Note: this is only to deserialize old data, use execution error for new
        data
      properties:
        WasmTrap:
          $ref: '#/components/schemas/WasmTrap'
      required:
        - WasmTrap
      type: object
    FunctionCallError_variant5:
      additionalProperties: false
      description: >-
        Note: this is only to deserialize old data, use execution error for new
        data
      properties:
        HostError:
          $ref: '#/components/schemas/HostError'
      required:
        - HostError
      type: object
    FunctionCallError_variant6:
      additionalProperties: false
      properties:
        ExecutionError:
          type: string
      required:
        - ExecutionError
      type: object
    GlobalContractIdentifier_variant0:
      additionalProperties: false
      properties:
        CodeHash:
          $ref: '#/components/schemas/CryptoHash'
      required:
        - CodeHash
      type: object
    GlobalContractIdentifier_variant1:
      additionalProperties: false
      properties:
        AccountId:
          $ref: '#/components/schemas/AccountId'
      required:
        - AccountId
      type: object
    CompilationError:
      oneOf:
        - $ref: '#/components/schemas/CompilationError_variant0'
        - $ref: '#/components/schemas/CompilationError_variant1'
        - $ref: '#/components/schemas/CompilationError_variant2'
    MethodResolveError:
      enum:
        - MethodEmptyName
        - MethodNotFound
        - MethodInvalidSignature
      type: string
    WasmTrap:
      description: A kind of a trap happened during execution of a binary
      oneOf:
        - $ref: '#/components/schemas/WasmTrap_variant0'
        - $ref: '#/components/schemas/WasmTrap_variant1'
        - $ref: '#/components/schemas/WasmTrap_variant2'
        - $ref: '#/components/schemas/WasmTrap_variant3'
        - $ref: '#/components/schemas/WasmTrap_variant4'
        - $ref: '#/components/schemas/WasmTrap_variant5'
        - $ref: '#/components/schemas/WasmTrap_variant6'
        - $ref: '#/components/schemas/WasmTrap_variant7'
        - $ref: '#/components/schemas/WasmTrap_variant8'
    HostError:
      anyOf:
        - $ref: '#/components/schemas/HostError_variant0'
        - $ref: '#/components/schemas/HostError_variant1'
        - $ref: '#/components/schemas/HostError_variant2'
        - $ref: '#/components/schemas/HostError_variant3'
        - $ref: '#/components/schemas/HostError_variant4'
        - $ref: '#/components/schemas/HostError_variant5'
        - $ref: '#/components/schemas/HostError_variant6'
        - $ref: '#/components/schemas/HostError_variant7'
        - $ref: '#/components/schemas/HostError_variant8'
        - $ref: '#/components/schemas/HostError_variant9'
        - $ref: '#/components/schemas/HostError_variant10'
        - $ref: '#/components/schemas/HostError_variant11'
        - $ref: '#/components/schemas/HostError_variant12'
        - $ref: '#/components/schemas/HostError_variant13'
        - $ref: '#/components/schemas/HostError_variant14'
        - $ref: '#/components/schemas/HostError_variant15'
        - $ref: '#/components/schemas/HostError_variant16'
        - $ref: '#/components/schemas/HostError_variant17'
        - $ref: '#/components/schemas/HostError_variant18'
        - $ref: '#/components/schemas/HostError_variant19'
        - $ref: '#/components/schemas/HostError_variant20'
        - $ref: '#/components/schemas/HostError_variant21'
        - $ref: '#/components/schemas/HostError_variant22'
        - $ref: '#/components/schemas/HostError_variant23'
        - $ref: '#/components/schemas/HostError_variant24'
        - $ref: '#/components/schemas/HostError_variant25'
        - $ref: '#/components/schemas/HostError_variant26'
        - $ref: '#/components/schemas/HostError_variant27'
        - $ref: '#/components/schemas/HostError_variant28'
        - $ref: '#/components/schemas/HostError_variant29'
        - $ref: '#/components/schemas/HostError_variant30'
        - $ref: '#/components/schemas/HostError_variant31'
        - $ref: '#/components/schemas/HostError_variant32'
    CompilationError_variant0:
      additionalProperties: false
      properties:
        CodeDoesNotExist:
          properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
          required:
            - account_id
          type: object
      required:
        - CodeDoesNotExist
      type: object
    CompilationError_variant1:
      additionalProperties: false
      properties:
        PrepareError:
          $ref: '#/components/schemas/PrepareError'
      required:
        - PrepareError
      type: object
    CompilationError_variant2:
      additionalProperties: false
      description: >-
        This is for defense in depth.

        We expect our runtime-independent preparation code to fully catch all
        invalid wasms,

        but, if it ever misses something we’ll emit this error
      properties:
        WasmerCompileError:
          properties:
            msg:
              type: string
          required:
            - msg
          type: object
      required:
        - WasmerCompileError
      type: object
    WasmTrap_variant0:
      description: An `unreachable` opcode was executed.
      enum:
        - Unreachable
      type: string
    WasmTrap_variant1:
      description: Call indirect incorrect signature trap.
      enum:
        - IncorrectCallIndirectSignature
      type: string
    WasmTrap_variant2:
      description: Memory out of bounds trap.
      enum:
        - MemoryOutOfBounds
      type: string
    WasmTrap_variant3:
      description: Call indirect out of bounds trap.
      enum:
        - CallIndirectOOB
      type: string
    WasmTrap_variant4:
      description: An arithmetic exception, e.g. divided by zero.
      enum:
        - IllegalArithmetic
      type: string
    WasmTrap_variant5:
      description: Misaligned atomic access trap.
      enum:
        - MisalignedAtomicAccess
      type: string
    WasmTrap_variant6:
      description: Indirect call to null.
      enum:
        - IndirectCallToNull
      type: string
    WasmTrap_variant7:
      description: Stack overflow.
      enum:
        - StackOverflow
      type: string
    WasmTrap_variant8:
      description: Generic trap.
      enum:
        - GenericTrap
      type: string
    HostError_variant0:
      description: String encoding is bad UTF-16 sequence
      enum:
        - BadUTF16
      type: string
    HostError_variant1:
      description: String encoding is bad UTF-8 sequence
      enum:
        - BadUTF8
      type: string
    HostError_variant2:
      description: Exceeded the prepaid gas
      enum:
        - GasExceeded
      type: string
    HostError_variant3:
      description: Exceeded the maximum amount of gas allowed to burn per contract
      enum:
        - GasLimitExceeded
      type: string
    HostError_variant4:
      description: Exceeded the account balance
      enum:
        - BalanceExceeded
      type: string
    HostError_variant5:
      description: Tried to call an empty method name
      enum:
        - EmptyMethodName
      type: string
    HostError_variant6:
      additionalProperties: false
      description: Smart contract panicked
      properties:
        GuestPanic:
          properties:
            panic_msg:
              type: string
          required:
            - panic_msg
          type: object
      required:
        - GuestPanic
      type: object
    HostError_variant7:
      description: IntegerOverflow happened during a contract execution
      enum:
        - IntegerOverflow
      type: string
    HostError_variant8:
      additionalProperties: false
      description: '`promise_idx` does not correspond to existing promises'
      properties:
        InvalidPromiseIndex:
          properties:
            promise_idx:
              format: uint64
              minimum: 0
              type: integer
          required:
            - promise_idx
          type: object
      required:
        - InvalidPromiseIndex
      type: object
    HostError_variant9:
      description: Actions can only be appended to non-joint promise.
      enum:
        - CannotAppendActionToJointPromise
      type: string
    HostError_variant10:
      description: Returning joint promise is currently prohibited
      enum:
        - CannotReturnJointPromise
      type: string
    HostError_variant11:
      additionalProperties: false
      description: Accessed invalid promise result index
      properties:
        InvalidPromiseResultIndex:
          properties:
            result_idx:
              format: uint64
              minimum: 0
              type: integer
          required:
            - result_idx
          type: object
      required:
        - InvalidPromiseResultIndex
      type: object
    HostError_variant12:
      additionalProperties: false
      description: Accessed invalid register id
      properties:
        InvalidRegisterId:
          properties:
            register_id:
              format: uint64
              minimum: 0
              type: integer
          required:
            - register_id
          type: object
      required:
        - InvalidRegisterId
      type: object
    HostError_variant13:
      additionalProperties: false
      description: >-
        Iterator `iterator_index` was invalidated after its creation by
        performing a mutable operation on trie
      properties:
        IteratorWasInvalidated:
          properties:
            iterator_index:
              format: uint64
              minimum: 0
              type: integer
          required:
            - iterator_index
          type: object
      required:
        - IteratorWasInvalidated
      type: object
    HostError_variant14:
      description: Accessed memory outside the bounds
      enum:
        - MemoryAccessViolation
      type: string
    HostError_variant15:
      additionalProperties: false
      description: VM Logic returned an invalid receipt index
      properties:
        InvalidReceiptIndex:
          properties:
            receipt_index:
              format: uint64
              minimum: 0
              type: integer
          required:
            - receipt_index
          type: object
      required:
        - InvalidReceiptIndex
      type: object
    HostError_variant16:
      additionalProperties: false
      description: Iterator index `iterator_index` does not exist
      properties:
        InvalidIteratorIndex:
          properties:
            iterator_index:
              format: uint64
              minimum: 0
              type: integer
          required:
            - iterator_index
          type: object
      required:
        - InvalidIteratorIndex
      type: object
    HostError_variant17:
      description: VM Logic returned an invalid account id
      enum:
        - InvalidAccountId
      type: string
    HostError_variant18:
      description: VM Logic returned an invalid method name
      enum:
        - InvalidMethodName
      type: string
    HostError_variant19:
      description: VM Logic provided an invalid public key
      enum:
        - InvalidPublicKey
      type: string
    HostError_variant20:
      additionalProperties: false
      description: '`method_name` is not allowed in view calls'
      properties:
        ProhibitedInView:
          properties:
            method_name:
              type: string
          required:
            - method_name
          type: object
      required:
        - ProhibitedInView
      type: object
    HostError_variant21:
      additionalProperties: false
      description: The total number of logs will exceed the limit.
      properties:
        NumberOfLogsExceeded:
          properties:
            limit:
              format: uint64
              minimum: 0
              type: integer
          required:
            - limit
          type: object
      required:
        - NumberOfLogsExceeded
      type: object
    HostError_variant22:
      additionalProperties: false
      description: The storage key length exceeded the limit.
      properties:
        KeyLengthExceeded:
          properties:
            length:
              format: uint64
              minimum: 0
              type: integer
            limit:
              format: uint64
              minimum: 0
              type: integer
          required:
            - length
            - limit
          type: object
      required:
        - KeyLengthExceeded
      type: object
    HostError_variant23:
      additionalProperties: false
      description: The storage value length exceeded the limit.
      properties:
        ValueLengthExceeded:
          properties:
            length:
              format: uint64
              minimum: 0
              type: integer
            limit:
              format: uint64
              minimum: 0
              type: integer
          required:
            - length
            - limit
          type: object
      required:
        - ValueLengthExceeded
      type: object
    HostError_variant24:
      additionalProperties: false
      description: The total log length exceeded the limit.
      properties:
        TotalLogLengthExceeded:
          properties:
            length:
              format: uint64
              minimum: 0
              type: integer
            limit:
              format: uint64
              minimum: 0
              type: integer
          required:
            - length
            - limit
          type: object
      required:
        - TotalLogLengthExceeded
      type: object
    HostError_variant25:
      additionalProperties: false
      description: The maximum number of promises within a FunctionCall exceeded the limit.
      properties:
        NumberPromisesExceeded:
          properties:
            limit:
              format: uint64
              minimum: 0
              type: integer
            number_of_promises:
              format: uint64
              minimum: 0
              type: integer
          required:
            - number_of_promises
            - limit
          type: object
      required:
        - NumberPromisesExceeded
      type: object
    HostError_variant26:
      additionalProperties: false
      description: The maximum number of input data dependencies exceeded the limit.
      properties:
        NumberInputDataDependenciesExceeded:
          properties:
            limit:
              format: uint64
              minimum: 0
              type: integer
            number_of_input_data_dependencies:
              format: uint64
              minimum: 0
              type: integer
          required:
            - number_of_input_data_dependencies
            - limit
          type: object
      required:
        - NumberInputDataDependenciesExceeded
      type: object
    HostError_variant27:
      additionalProperties: false
      description: The returned value length exceeded the limit.
      properties:
        ReturnedValueLengthExceeded:
          properties:
            length:
              format: uint64
              minimum: 0
              type: integer
            limit:
              format: uint64
              minimum: 0
              type: integer
          required:
            - length
            - limit
          type: object
      required:
        - ReturnedValueLengthExceeded
      type: object
    HostError_variant28:
      additionalProperties: false
      description: The contract size for DeployContract action exceeded the limit.
      properties:
        ContractSizeExceeded:
          properties:
            limit:
              format: uint64
              minimum: 0
              type: integer
            size:
              format: uint64
              minimum: 0
              type: integer
          required:
            - size
            - limit
          type: object
      required:
        - ContractSizeExceeded
      type: object
    HostError_variant29:
      additionalProperties: false
      description: The host function was deprecated.
      properties:
        Deprecated:
          properties:
            method_name:
              type: string
          required:
            - method_name
          type: object
      required:
        - Deprecated
      type: object
    HostError_variant30:
      additionalProperties: false
      description: General errors for ECDSA recover.
      properties:
        ECRecoverError:
          properties:
            msg:
              type: string
          required:
            - msg
          type: object
      required:
        - ECRecoverError
      type: object
    HostError_variant31:
      additionalProperties: false
      description: |-
        Invalid input to alt_bn128 family of functions (e.g., point which isn't
        on the curve).
      properties:
        AltBn128InvalidInput:
          properties:
            msg:
              type: string
          required:
            - msg
          type: object
      required:
        - AltBn128InvalidInput
      type: object
    HostError_variant32:
      additionalProperties: false
      description: >-
        Invalid input to ed25519 signature verification function (e.g. signature
        cannot be

        derived from bytes).
      properties:
        Ed25519VerifyInvalidInput:
          properties:
            msg:
              type: string
          required:
            - msg
          type: object
      required:
        - Ed25519VerifyInvalidInput
      type: object
    PrepareError:
      description: Error that can occur while preparing or executing Wasm smart-contract.
      oneOf:
        - $ref: '#/components/schemas/PrepareError_variant0'
        - $ref: '#/components/schemas/PrepareError_variant1'
        - $ref: '#/components/schemas/PrepareError_variant2'
        - $ref: '#/components/schemas/PrepareError_variant3'
        - $ref: '#/components/schemas/PrepareError_variant4'
        - $ref: '#/components/schemas/PrepareError_variant5'
        - $ref: '#/components/schemas/PrepareError_variant6'
        - $ref: '#/components/schemas/PrepareError_variant7'
        - $ref: '#/components/schemas/PrepareError_variant8'
        - $ref: '#/components/schemas/PrepareError_variant9'
        - $ref: '#/components/schemas/PrepareError_variant10'
    PrepareError_variant0:
      description: Error happened while serializing the module.
      enum:
        - Serialization
      type: string
    PrepareError_variant1:
      description: Error happened while deserializing the module.
      enum:
        - Deserialization
      type: string
    PrepareError_variant2:
      description: Internal memory declaration has been found in the module.
      enum:
        - InternalMemoryDeclared
      type: string
    PrepareError_variant3:
      description: |-
        Gas instrumentation failed.

        This most likely indicates the module isn't valid.
      enum:
        - GasInstrumentation
      type: string
    PrepareError_variant4:
      description: |-
        Stack instrumentation failed.

        This  most likely indicates the module isn't valid.
      enum:
        - StackHeightInstrumentation
      type: string
    PrepareError_variant5:
      description: |-
        Error happened during instantiation.

        This might indicate that `start` function trapped, or module isn't
        instantiable and/or un-linkable.
      enum:
        - Instantiate
      type: string
    PrepareError_variant6:
      description: Error creating memory.
      enum:
        - Memory
      type: string
    PrepareError_variant7:
      description: Contract contains too many functions.
      enum:
        - TooManyFunctions
      type: string
    PrepareError_variant8:
      description: Contract contains too many locals.
      enum:
        - TooManyLocals
      type: string
    PrepareError_variant9:
      description: Contract contains too many tables.
      enum:
        - TooManyTables
      type: string
    PrepareError_variant10:
      description: Contract contains too many table elements.
      enum:
        - TooManyTableElements
      type: string

````