NEAR Protocol Query API

The Query API from NEAR Protocol — 1 operation(s) for query.

Operations 1

POST /query #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/near-query-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

near-query-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Low-latency indexed account, token, and public-key lookup APIs for wallets and explorers. Embedded portal clients may forward an optional `apiKey` query parameter, but the public FastNEAR API does not require it.
  title: FastNEAR accounts Query API
  version: 3.0.3
servers:
- description: Mainnet
  url: https://api.fastnear.com
- description: Testnet
  url: https://test.api.fastnear.com
tags:
- name: Query
paths:
  /query:
    post:
      description: "This module allows you to make generic requests to the network.\n\nThe `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).\n\nThe `BlockReference` enum allows you to specify a block by `Finality`, `BlockId` or `SyncCheckpoint`.\n\nThe `QueryRequest` enum provides multiple variants for performing the following actions:\n - View an account's details\n - View a contract's code\n - View the state of an account\n - View the `AccessKey` of an account\n - View the `AccessKeyList` of an account\n - 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'
      tags:
      - Query
components:
  schemas:
    GlobalContractIdentifier:
      oneOf:
      - additionalProperties: false
        properties:
          hash:
            $ref: '#/components/schemas/CryptoHash'
        required:
        - hash
        type: object
      - additionalProperties: false
        properties:
          account_id:
            $ref: '#/components/schemas/AccountId'
        required:
        - account_id
        type: object
    InternalError:
      oneOf:
      - properties:
          info:
            properties:
              error_message:
                type: string
            required:
            - error_message
            type: object
          name:
            enum:
            - INTERNAL_ERROR
            type: string
        required:
        - name
        - info
        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
    BlockId:
      anyOf:
      - format: uint64
        minimum: 0
        title: block_height
        type: integer
      - $ref: '#/components/schemas/CryptoHash'
    RpcQueryRequest:
      oneOf:
      - 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
      - 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
      - allOf:
        - properties:
            block_id:
              $ref: '#/components/schemas/BlockId'
          required:
          - block_id
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            after_key_base64:
              anyOf:
              - $ref: '#/components/schemas/StoreKey'
              - enum:
                - null
            include_proof:
              type: boolean
            limit:
              format: uint32
              minimum: 1
              type:
              - integer
              - 'null'
            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
      - 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
      - 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
      - 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
      - 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
      - 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
      - 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
      - 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
      - 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
      - allOf:
        - properties:
            finality:
              $ref: '#/components/schemas/Finality'
          required:
          - finality
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            after_key_base64:
              anyOf:
              - $ref: '#/components/schemas/StoreKey'
              - enum:
                - null
            include_proof:
              type: boolean
            limit:
              format: uint32
              minimum: 1
              type:
              - integer
              - 'null'
            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
      - 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
      - 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
      - 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
      - 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
      - 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
      - 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
      - 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
      - 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
      - allOf:
        - properties:
            sync_checkpoint:
              $ref: '#/components/schemas/SyncCheckpoint'
          required:
          - sync_checkpoint
          type: object
        - properties:
            account_id:
              $ref: '#/components/schemas/AccountId'
            after_key_base64:
              anyOf:
              - $ref: '#/components/schemas/StoreKey'
              - enum:
                - null
            include_proof:
              type: boolean
            limit:
              format: uint32
              minimum: 1
              type:
              - integer
              - 'null'
            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
      - 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
      - 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
      - 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
      - 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
      - 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
      - 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
      title: RpcQueryRequest
      type: object
    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
    CompilationError:
      oneOf:
      - additionalProperties: false
        properties:
          CodeDoesNotExist:
            properties:
              account_id:
                $ref: '#/components/schemas/AccountId'
            required:
            - account_id
            type: object
        required:
        - CodeDoesNotExist
        type: object
      - additionalProperties: false
        properties:
          PrepareError:
            $ref: '#/components/schemas/PrepareError'
        required:
        - PrepareError
        type: object
      - 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
    MethodResolveError:
      enum:
      - MethodEmptyName
      - MethodNotFound
      - MethodInvalidSignature
      type: string
    PublicKey:
      type: string
    ViewStateResult:
      description: Resulting state values for a view state query request
      properties:
        last_key:
          anyOf:
          - $ref: '#/components/schemas/StoreKey'
          - enum:
            - null
        proof:
          items:
            type: string
          type: array
        values:
          items:
            $ref: '#/components/schemas/StateItem'
          type: array
      required:
      - values
      type: object
    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
    AccessKeyInfoView:
      description: 'Describes information about an access key including its on-trie

        identifier. For ed25519/secp256k1 access keys the `public_key` field

        is the full public key (string form unchanged from before); for

        ML-DSA-65 access keys it is a `ml-dsa-65-hash:...` SHA3-256 digest

        (the full pubkey is not stored on-chain).'
      properties:
        access_key:
          $ref: '#/components/schemas/AccessKeyView'
        public_key:
          $ref: '#/components/schemas/PublicKeyHandle'
      required:
      - public_key
      - access_key
      type: object
    WasmTrap:
      description: A kind of a trap happened during execution of a binary
      oneOf:
      - description: An `unreachable` opcode was executed.
        enum:
        - Unreachable
        type: string
      - description: Call indirect incorrect signature trap.
        enum:
        - IncorrectCallIndirectSignature
        type: string
      - description: Memory out of bounds trap.
        enum:
        - MemoryOutOfBounds
        type: string
      - description: Call indirect out of bounds trap.
        enum:
        - CallIndirectOOB
        type: string
      - description: An arithmetic exception, e.g. divided by zero.
        enum:
        - IllegalArithmetic
        type: string
      - description: Misaligned atomic access trap.
        enum:
        - MisalignedAtomicAccess
        type: string
      - description: Indirect call to null.
        enum:
        - IndirectCallToNull
        type: string
      - description: Stack overflow.
        enum:
        - StackOverflow
        type: string
      - description: Generic trap.
        enum:
        - GenericTrap
        type: string
    NearToken:
      type: string
    Finality:
      description: Different types of finality.
      enum:
      - optimistic
      - near-final
      - final
      type: string
    AccessKeyList:
      description: Lists access keys
      properties:
        keys:
          items:
            $ref: '#/components/schemas/AccessKeyInfoView'
          type: array
      required:
      - keys
      type: object
    RpcRequestValidationErrorKind:
      oneOf:
      - properties:
          info:
            properties:
              method_name:
                type: string
            required:
            - method_name
            type: object
          name:
            enum:
            - METHOD_NOT_FOUND
            type: string
        required:
        - name
        - info
        type: object
      - properties:
          info:
            properties:
              error_message:
                type: string
            required:
            - error_message
            type: object
          name:
            enum:
            - PARSE_ERROR
            type: string
        required:
        - name
        - info
        type: object
    AccountId:
      $schema: https://json-schema.org/draft/2020-12/schema
      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
    PublicKeyHandle:
      type: string
    PrepareError:
      description: Error that can occur while preparing or executing Wasm smart-contract.
      oneOf:
      - description: Error happened while serializing the module.
        enum:
        - Serialization
        type: string
      - description: Error happened while deserializing the module.
        enum:
        - Deserialization
        type: string
      - description: Internal memory declaration has been found in the module.
        enum:
        - InternalMemoryDeclared
        type: string
      - description: 'Gas instrumentation failed.


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


          This  most likely indicates the module isn''t valid.'
        enum:
        - StackHeightInstrumentation
        type: string
      - 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
      - description: Error creating memory.
        enum:
        - Memory
        type: string
      - description: Contract contains too many functions.
        enum:
        - TooManyFunctions
        type: string
      - description: Contract contains too many locals.
        enum:
        - TooManyLocals
        type: string
      - description: Contract contains too many tables.
        enum:
        - TooManyTables
        type: string
      - description: Contract contains too many table elements.
        enum:
        - TooManyTableElements
        type: string
      - description: A function body in the contract exceeds the size limit.
        enum:
        - FunctionBodyTooLarge
        type: string
      - description: The instrumented code exceeds the size limit.
        enum:
        - InstrumentedCodeTooLarge
        type: string
      - description: A function contains too many basic blocks.
        enum:
        - TooManyBlocksPerFunction
        type: string
      - description: A contract contains too many basic blocks.
        enum:
        - TooManyBlocksPerContract
        type: string
      - description: Contract declares too many entries in the wasm type section.
        enum:
        - TooManyTypes
        type: string
      - description: All contract functions combined have more than `max_params_per_contract` parameters.
        enum:
        - TooManyParamsPerFunction
        type: string
      - description: A function has more than `max_params_per_function` parameters.
        enum:
        - TooManyParamsPerContract
        type: string
      - description: 'A function''s max operand-stack size (in bytes) exceeds

          `max_operand_stack_bytes_per_function`.'
        enum:
        - OperandStackTooLarge
        type: string
    ErrorWrapper_for_RpcQueryError:
      oneOf:
      - properties:
          cause:
            $ref: '#/components/schemas/RpcRequestValidationErrorKind'
          name:
            enum:
            - REQUEST_VALIDATION_ERROR
            type: string
        required:
        - name
        - cause
        type: object
      - properties:
          cause:
            $ref: '#/components/schemas/RpcQueryError'
          name:
            enum:
            - HANDLER_ERROR
            type: string
        required:
        - name
        - cause
        type: object
      - properties:
          cause:
            $ref: '#/components/schemas/InternalError'
          name:
            enum:
            - INTERNAL_ERROR
            type: string
        required:
        - name
        - cause
        type: object
    JsonRpcResponse_for_RpcQueryResponse_and_RpcQueryError:
      oneOf:
      - properties:
          result:
            $ref: '#/components/schemas/RpcQueryResponse'
        required:
        - result
        type: object
      - properties:
          error:
            $ref: '#/components/schemas/ErrorWrapper_for_RpcQueryError'
        required:
        - error
        type: object
      properties:
        id:
          type: string
        jsonrpc:
          type: string
      required:
      - jsonrpc
      - id
      title: JsonRpcResponse_for_RpcQueryResponse_and_RpcQueryError
      type: object
    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
    ContractCodeView:
      description: A view of the contract code.
      properties:
        code_base64:
          type: string
        hash:
          $ref: '#/components/schemas/CryptoHash'
      required:
      - code_base64
      - hash
      type: object
    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
    CryptoHash:
      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
    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
        global_contract_hash:
          anyOf:
          - $ref: '#/components/schemas/CryptoHash'
          - enum:
            - null
        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
          ty

# --- truncated at 32 KB (56 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/near/refs/heads/main/openapi/near-query-api-openapi.yml