openapi: 3.0.0
info:
  title: Substrate API Sidecar
  description: Substrate API Sidecar is a REST service that makes it easy to
    interact with blockchain nodes built using Substrate's FRAME framework.
  contact:
    url: https://github.com/paritytech/substrate-api-sidecar
  license:
    name: GPL-3.0-or-later
    url: https://github.com/paritytech/substrate-api-sidecar/blob/master/LICENSE
  version: 17.5.1
servers:
- url: https://polkadot-public-sidecar.parity-chains.parity.io/
  description: Polkadot Parity public sidecar
- url: https://kusama-public-sidecar.parity-chains.parity.io/
  description: Kusama Parity public sidecar
- url: https://polkadot-asset-hub-public-sidecar.parity-chains.parity.io/
  description: Polkadot Asset Hub Parity public sidecar
- url: https://kusama-asset-hub-public-sidecar.parity-chains.parity.io/
  description: Kusama Asset Hub Parity public sidecar
tags:
- name: accounts
- name: blocks
- name: contracts
- name: node
  description: node connected to sidecar
- name: pallets
  description: pallets employed in the runtime
- name: runtime
- name: transaction
- name: paras
- name: trace
paths:
  /accounts/{accountId}/asset-balances:
    get:
      tags:
      - accounts
      summary: Get an array of asset-balances for an account.
      description: Returns information about an account's asset-balances. This is
        specific to the assets pallet for parachains. If no `assets` query parameter
        is provided, all asset-balances for the given account will be returned.
      operationId: getAssetBalances
      parameters:
      - name: accountId
        in: path
        description: SS58 address of the account.
        required: true
        schema:
          type: string
          format: SS58
      - name: at
        in: query
        description: Block at which to query asset-balance info for the
          specified account.
        required: false
        schema:
          type: string
          description: Block height (as a positive integer) or hash
            (as a hex string).
          format: unsignedInteger or $hex
      - name: assets
        in: query
        description: An array of AssetId's to be queried. If not supplied, defaults to providing
          all asset balances associated with the `accountId` will be returned. The array query param
          format follows Express 4.x API. ex:`?assets[]=1&assets[]=2&assets[]=3`.
        required: false
        schema:
          type: array
          items:
            type: string
          description: An array of assetId numbers represented as strings
          format: Array of unsignedInteger's
      responses:
        "200":
          description: successfull operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountAssetsBalances'
        "400":
          description: Invalid Address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /accounts/{accountId}/asset-approvals:
    get:
      tags:
      - accounts
      summary: Get an asset approval for an account.
      description: Returns information about an account's asset approval transaction.
        It is required to pass in a delegate and an assetId as query parameters.
      operationId: getAssetApprovals
      parameters:
      - name: accountId
        in: path
        description: SS58 address of the account.
        required: true
        schema:
          type: string
          format: SS58
      - name: at
        in: query
        description: Block at which to query asset approval info for the
          specified account.
        required: false
        schema:
          type: string
          description: Block height (as a non-negative integer) or hash
            (as a hex string).
          format: unsignedInteger or $hex
      - name: assetId
        in: query
        description: The `assetId` associated with the asset-approval.
        required: true
        schema:
          type: string
          description: An assetId represented as an unsignedInteger.
          format: unsignedInteger
      - name: delegate
        in: query
        description: The delegate's `accountId` associated with an asset-approval.
        required: true
        schema:
          type: string
          format: SS58
      responses:
        "200":
          description: successfull operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountAssetsApproval'
        "400":
          description: Invalid Address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /accounts/{accountId}/balance-info:
    get:
      tags:
      - accounts
      summary: Get balance information for an account.
      description: Returns information about an account's balance.
        Replaces `/balance/{address}` from versions < v1.0.0.
      operationId: getAccountBalanceInfo
      parameters:
      - name: accountId
        in: path
        description: SS58 address of the account.
        required: true
        schema:
          type: string
          format: SS58
      - name: at
        in: query
        description: Block at which to query balance info for the
          specified account.
        required: false
        schema:
          type: string
          description: Block height (as a non-negative integer) or hash
            (as a hex string).
          format: unsignedInteger or $hex
      - name: token
        in: query
        description: 'Token to query the balance of. If not specified it will query
          the chains native token (e.g. DOT for Polkadot). Note: this is only relevant
          for chains that support multiple tokens through the ORML tokens pallet.'
        required: false
        schema:
          type: string
          description: Token symbol
      - name: denominated
        in: query
        description: When set to `true` it will denominate any balance's given atomic value
          using the chains given decimal value.
        required: false
        schema:
          type: boolean
          default: false
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountBalanceInfo'
        "400":
          description: Invalid Address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /accounts/{accountId}/convert:
    get:
      tags:
      - accounts
      summary: Convert a given AccountId to an SS58 address.
      description: Returns the SS58 prefix, the network address format, the SS58 address, and the AccountId
        that was given as input parameter, the scheme that was used and if it is a public key or not (boolean).
      operationId: accountConvert
      parameters:
      - name: accountId
        in: path
        description: AccountId or Public Key (hex).
        required: true
        schema:
          format: AccountId or Hex
          type: string
      - name: scheme
        in: query
        description: The cryptographic scheme to be used in order to convert the AccountId to
          an SS58 address. It can take one of three values [sr25519, ed25519, ecdsa].
          The default scheme that is used is `sr25519` (if it is not set in the query parameter).
        required: false
        schema:
          type: string
          format: string
          default: 'sr25519'
      - name: prefix
        in: query
        description: The address prefix which can be one of the values found in the SS58-registry.
        required: false
        schema:
          type: string
          format: number
          default: 42
      - name: publicKey
        in: query
        description: Defines if the given value in the path parameter is a Public Key (hex)
          or not (hence AccountId).
        required: false
        schema:
          type: string
          format: boolean
          default: true
      responses:
        "200":
          description: successfully converted the AccountId and retrieved the address info.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountConvert'
        "400":
          description: Invalid AccountId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: AccountId not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /accounts/{accountId}/pool-asset-balances:
    get:
      tags:
      - accounts
      summary: Get an array of pool-asset-balances for an account.
      description: Returns information about an account's pool-asset-balances. This is
        specific to the pool assets pallet for parachains. If no `assets` query parameter
        is provided, all pool-asset-balances for the given account will be returned.
      operationId: getPoolAssetBalances
      parameters:
      - name: accountId
        in: path
        description: SS58 address of the account.
        required: true
        schema:
          type: string
          format: SS58
      - name: at
        in: query
        description: Block at which to query pool-asset-balance info for the
          specified account.
        required: false
        schema:
          type: string
          description: Block height (as a positive integer) or hash
            (as a hex string).
          format: unsignedInteger or $hex
      - name: assets
        in: query
        description: An array of AssetId's to be queried. If not supplied, defaults to providing
          all asset balances associated with the `accountId` will be returned. The array query param
          format follows Express 4.x API. ex:`?assets[]=1&assets[]=2&assets[]=3`.
        required: false
        schema:
          type: array
          items:
            type: string
          description: A list of assetId numbers represented as strings
          format: Array of unsignedInteger's
      responses:
        "200":
          description: successfull operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountPoolAssetsBalances'
        "400":
          description: Invalid Address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /accounts/{accountId}/pool-asset-approvals:
    get:
      tags:
      - accounts
      summary: Get an asset approval for an account.
      description: Returns information about an account's asset approval transaction.
        It is required to pass in a delegate and an assetId as query parameters.
      operationId: getPoolAssetApprovals
      parameters:
      - name: accountId
        in: path
        description: SS58 address of the account.
        required: true
        schema:
          type: string
          format: SS58
      - name: at
        in: query
        description: Block at which to query asset approval info for the
          specified account.
        required: false
        schema:
          type: string
          description: Block height (as a non-negative integer) or hash
            (as a hex string).
          format: unsignedInteger or $hex
      - name: assetId
        in: query
        description: The `assetId` associated with the asset-approval.
        required: true
        schema:
          type: string
          description: An assetId represented as an unsignedInteger.
          format: unsignedInteger
      - name: delegate
        in: query
        description: The delegate's `accountId` associated with an asset-approval.
        required: true
        schema:
          type: string
          format: SS58
      responses:
        "200":
          description: successfull operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountAssetsApproval'
        "400":
          description: Invalid Address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /accounts/{accountId}/proxy-info:
    get:
      tags:
      - accounts
      summary: Get proxy account information.
      description: Returns information about a proxy account. This will include 
        delegated accounts and deposits held.
      operationId: getProxyInfo
      parameters:
      - name: accountId
        in: path
        description: SS58 address of the account.
        required: true
        schema:
          type: string
          format: SS58
      - name: at
        in: query
        description: Block at which to query proxy info for the
          specified account.
        required: false
        schema:
          type: string
          description: Block height (as a non-negative integer) or hash
            (as a hex string).
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successfull operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountProxyInfo'
        "400":
          description: Invalid Address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /accounts/{accountId}/staking-info:
    get:
      tags:
      - staking
      summary: Get staking information for a _Stash_ account.
      description: Returns information about a _Stash_ account's staking activity.
        Replaces `/staking/{address}` from versions < v1.0.0.
      operationId: getStakingSummaryByAccountId
      parameters:
      - name: accountId
        in: path
        description: SS58 address of the account. Must be a _Stash_ account.
        required: true
        schema:
          format: SS58
          type: string
      - name: at
        in: query
        description: Block at which to query the staking info for the
          specified account.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountStakingInfo'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /accounts/{accountId}/staking-payouts:
    get:
      tags:
      - staking
      summary: Get payout information for a _Stash_ account.
      description: Returns payout information for the last specified eras. If
        specifying both the depth and era query params, this endpoint will
        return information for (era - depth) through era. (i.e. if depth=5 and
        era=20 information will be returned for eras 16 through 20). N.B. You
        cannot query eras less then `current_era - HISTORY_DEPTH`. N.B. The
        `nominator*` fields correspond to the address being queried, even if it
        is a validator's _Stash_ address. This is because a validator is technically
        nominating itself.
      operationId: getStakingPayoutsByAccountId
      parameters:
      - name: accountId
        in: path
        description: SS58 address of the account. Must be a _Stash_ account.
        required: true
        schema:
          format: SS58
          type: string
      - name: at
        in: query
        description: Block at which to query staking payouts.
        required: false
        schema:
          type: string
          description: Block height (as a non-negative integer) or hash
            (as a hex string).
          format: unsignedInteger or $hex
      - name: depth
        in: query
        description: The number of eras to query for payouts of. Must be less
          than or equal to `HISTORY_DEPTH`. In cases where `era - (depth -1)` is
          less than 0, the first era queried will be 0.
        required: false
        schema:
          type: string
          format: unsignedInteger
          default: 1
      - name: era
        in: query
        description: The era to query at.
        required: false
        schema:
          type: string
          format: unsignedInteger
          default: '`active_era - 1`'
      - name: unclaimedOnly
        in: query
        description: Only return unclaimed rewards.
        required: false
        schema:
          type: string
          format: boolean
          default: true
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountStakingPayouts'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /accounts/{accountId}/vesting-info:
    get:
      tags:
      - accounts
      summary: Get vesting information for an account.
      description: Returns the vesting schedule for an account.
        Replaces `/vesting/{address}` from versions < v1.0.0.
      operationId: getVestingSummaryByAccountId
      parameters:
      - name: accountId
        in: path
        description: SS58 address of the account.
        required: true
        schema:
          format: SS58
          type: string
      - name: at
        in: query
        description: Block at which to query the vesting info for the
          specified account.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountVestingInfo'
        "400":
          description: Invalid Address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /accounts/{address}/validate:
    get:
      tags:
      - accounts
      summary: Validate a given address.
      description: Returns whether the given address is valid ss58 format, the ss58 prefix if the address has one,
        the network address format, and what the account ID is for this address.
      operationId: getValidationByAccountId
      parameters:
      - name: address
        in: path
        description: SS58 or Hex address of the account.
        required: true
        schema:
          format: SS58 or Hex
          type: string
      responses:
        "200":
          description: successfully retrieved address info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountValidation'
  /blocks:
    get:
      tags:
      - blocks
      summary: Get a range of blocks by their height.
      description: Given a range query parameter return an array of all the blocks within that range.
      operationId: getBlock
      parameters:
      - name: range
        in: query
        description: A range of integers. There is a max limit of 500 blocks per request.
        required: true
        example: 0-499
        schema:
          type: string
      - name: eventDocs
        in: query
        description: When set to `true`, every event will have an extra `docs`
          property with a string of the events documentation.
        required: false
        schema:
          type: boolean
          default: false
      - name: extrinsicDocs
        in: query
        description: When set to `true`, every extrinsic will have an extra `docs`
          property with a string of the extrinsics documentation.
        required: false
        schema:
          type: boolean
          default: false
      - name: noFees
        in: query
        description: When set to `true`, the fee won't be calculated for the extrinsics.
        required: false
        schema:
          type: boolean
          default: false
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blocks'
        "400":
          description: invalid Block identifier supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'      
  /blocks/{blockId}:
    get:
      tags:
      - blocks
      summary: Get a block by its height or hash.
      description: Returns a single block. BlockId can either be a block hash or a
        block height. Replaces `/block/{number}` from versions < v1.0.0.
      operationId: getBlockById
      parameters:
      - name: blockId
        in: path
        description: Block identifier, as the block height or block hash.
        required: true
        schema:
          pattern: '^0[xX][0-9a-fA-F]{1,64}$|[0-9]{1,12}'
          type: string
      - name: eventDocs
        in: query
        description: When set to `true`, every event will have an extra `docs`
          property with a string of the events documentation.
        required: false
        schema:
          type: boolean
          default: false
      - name: extrinsicDocs
        in: query
        description: When set to `true`, every extrinsic will have an extra `docs`
          property with a string of the extrinsics documentation.
        required: false
        schema:
          type: boolean
          default: false
      - name: noFees
        in: query
        description: When set to `true`, the fee won't be calculated for the extrinsics.
        required: false
        schema:
          type: boolean
          default: false
      - name: finalizedKey
        in: query
        description: When set to false, this will override the chain-config, and omit the
          finalized key in the response. This can increase performance slightly by avoiding an additional 
          RPC call to the node.
        required: false
        schema:
          type: boolean
      - name: decodedXcmMsgs
        in: query
        description: When set to `true`, this will show the decoded XCM messages within
          the extrinsics of the requested block.
        required: false
        schema:
          type: boolean
          default: false
      - name: paraId
        in: query
        description: When it is set, this will return only the decoded XCM messages
          for the specified paraId/parachain Id. To activate this functionality,
          ensure that the `decodedXcmMsgs` parameter is set to true.
        required: false
        schema:
          type: string
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockWithDecodedXcmMsgs'
        "400":
          description: invalid Block identifier supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /blocks/{blockId}/header:
    get:
      tags:
      - blocks
      summary: Get a block's header by its height or hash.
      description: Returns a single block's header. BlockId can either be a block hash or a
        block height.
      operationId: getBlockHeaderById
      parameters:
      - name: blockId
        in: path
        description: Block identifier, as the block height or block hash.
        required: true
        schema:
          pattern: '^0[xX][0-9a-fA-F]{1,64}$|[0-9]{1,12}'
          type: string
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockHeader'
        "400":
          description: invalid Block identifier supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /blocks/{blockId}/extrinsics/{extrinsicIndex}:
    get:
      tags:
      - blocks
      summary: Get an extrinsic by its extrinsicIndex and block height or hash.
        The pair blockId, extrinsicIndex is sometimes referred to as a Timepoint.
      description: Returns a single extrinsic.
      operationId: getExtrinsicByTimepoint
      parameters:
      - name: blockId
        in: path
        description: Block identifier, as the block height or block hash.
        required: true
        schema:
          pattern: '^0[xX][0-9a-fA-F]{1,64}$|[0-9]{1,12}'
          type: string
      - name: extrinsicIndex
        in: path
        description: The extrinsic's index within the block's body.
        required: true
        schema:
          type: string
      - name: eventDocs
        in: query
        description: When set to `true`, every event will have an extra `docs`
          property with a string of the events documentation.
        required: false
        schema:
          type: boolean
          default: false
      - name: extrinsicDocs
        in: query
        description: When set to `true`, every extrinsic will have an extra `docs`
          property with a string of the extrinsics documentation.
        required: false
        schema:
          type: boolean
          default: false
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtrinsicIndex'
        "400":
          description: Requested `extrinsicIndex` does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /blocks/head:
    get:
      tags:
      - blocks
      summary: Get the most recently finalized block.
      description: Returns the most recently finalized block. Replaces `/block`
        from versions < v1.0.0.
      operationId: getHeadBlock
      parameters:
      - name: finalized
        in: query
        description: Boolean representing whether or not to get the finalized head.
          If it is not set the value defaults to true. When set to false it will attempt
          to get the newest known block, which may not be finalized.
        required: false
        schema:
          type: boolean
          default: true
      - name: eventDocs
        in: query
        description: When set to `true`, every event will have an extra `docs`
          property with a string of the events documentation.
        required: false
        schema:
          type: boolean
          default: false
      - name: extrinsicDocs
        in: query
        description: When set to `true`, every extrinsic will have an extra `docs`
          property with a string of the extrinsics documentation.
        required: false
        schema:
          type: boolean
          default: false
      - name: noFees
        in: query
        description: When set to `true`, the fee won't be calculated for the extrinsics.
        required: false
        schema:
          type: boolean
          default: false
      - name: decodedXcmMsgs
        in: query
        description: When set to `true`, this will show the decoded XCM messages within
          the extrinsics of the requested block.
        required: false
        schema:
          type: boolean
          default: false
      - name: paraId
        in: query
        description: When it is set, this will return only the decoded XCM messages
          for the specified paraId/parachain Id. To activate this functionality,
          ensure that the `decodedXcmMsgs` parameter is set to true.
        required: false
        schema:
          type: string
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockWithDecodedXcmMsgs'
  /blocks/head/header:
    get:
      tags:
      - blocks
      summary: Get information about the header of the most recent finalized block.
      description: Returns the most recently finalized block's header.
      operationId: getLatestBlockHeader
      parameters:
      - name: finalized
        in: query
        description: Boolean representing whether or not to get the finalized head.
          If it is not set the value defaults to true. When set to false it will attempt
          to get the newest known block, which may not be finalized.
        required: false
        schema:
          type: boolean
          default: true
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockHeader'
        "400":
          description: invalid Block identifier supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /blocks/{blockId}/extrinsics-raw:
    get:
      tags:
      - blocks
      summary: Get a blocks header & its extrinsics as hex values.
      description: Returns a block & its extrinsics as hex values. BlockId can either be a block hash or a
        block height.
      operationId: getBlockRawExtrinsics
      parameters:
      - name: blockId
        in: path
        description: Block identifier, as the block height or block hash.
        required: true
        schema:
          pattern: '^0[xX][0-9a-fA-F]{1,64}$|[0-9]{1,12}'
          type: string
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockRaw'
        "400":
          description: invalid Block identifier supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'         
  /contracts/ink/{address}/query:
    post:
      tags:
      - contracts
      summary: Query an !Ink contract with a given message (method).
      description: Will return a valid or invalid result. 
      operationId: callContractQuery
      requestBody:
        $ref: '#/components/requestBodies/ContractMetadata'
      parameters:
      - name: address
        in: path
        description: SS58 or Hex address of the account associated with the contract.
        required: true
        schema:
          type: string
      - name: method
        in: query
        description: The message or method used to query.
        required: false
        schema:
          type: string
          default: 'get'
      - name: gasLimit
        in: query
        description: The gas limit to be used as an option for the queried message.
        required: false
        schema:
          default: -1
          type: number
      - name: storageDepositLimit
        in: query
        description: The storage deposit limit to be used as an option for the queried message.
        required: false
        schema:
          default: null
          type: number
      - name: args
        in: query
        description: Abi params used as args specified in the metadata to be passed into a query. 
          The format to use this query param is ?args[]=1&args[]=2&args[]=3.
        required: false
        schema:
          type: array
          items:
            type: string
          description: An array of Abi params.
      responses:
        "200":
          description: succesful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractsInkQuery'
        "400":
          description: Invalid Method
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /node/network:
    get:
      tags:
      - node
      summary: Get information about the Substrate node's activity in the peer-to-peer network.
      description: Returns network related information of the node.
      operationId: getNodeNetworking
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeNetwork'
  /node/transaction-pool:
    get:
      tags:
      - node
      summary: Get pending extrinsics from the Substrate node.
      description: Returns the extrinsics that the node knows of that have not
        been included in a block.
      operationId: getNodeTransactionPool
      parameters:
      - name: includeFee
        in: query
        description: Boolean representing whether or not to include tips, partialFee, and priority in each extrinsic.
        required: false
        schema:
          type: boolean
          default: false
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionPool'
  /node/version:
    get:
      tags:
      - node
      summary: Get information about the Substrates node's implementation and versioning.
      description: Returns versioning information of the node.
      operationId: getNodeVersion
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeVersion'
  /transaction:
    post:
      tags:
      - transaction
      summary: Submit a transaction to the node's transaction pool.
      description: Accepts a valid signed extrinsic. Replaces `/tx` from versions
        < v1.0.0.
      operationId: submitTransaction
      requestBody:
        $ref: '#/components/requestBodies/Transaction'
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionSuccess'
        "400":
            description: failed to parse or submit transaction
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/TransactionFailure'
  /transaction/dry-run:
    post:
      tags:
      - transaction
      summary: Dry run an extrinsic.
      description: Use the dryrun call to practice submission of a transaction.
      operationId: dryrunTransaction
      requestBody:
        $ref: '#/components/requestBodies/Transaction'
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionDryRun'
        "400":
          description: failed to dry-run transaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionFailure'
  /transaction/fee-estimate:
    post:
      tags:
      - transaction
      summary: Receive a fee estimate for a transaction.
      description: >-
        Send a serialized transaction and receive back a naive fee estimate.
        Note: `partialFee` does not include any tips that you may add to increase
        a transaction's priority. See the reference on `compute_fee`.
        Replaces `/tx/fee-estimate` from versions < v1.0.0.
        Substrate Reference:
        - `RuntimeDispatchInfo`: https://crates.parity.io/pallet_transaction_payment_rpc_runtime_api/struct.RuntimeDispatchInfo.html
        - `query_info`: https://crates.parity.io/pallet_transaction_payment/struct.Module.html#method.query_info
        - `compute_fee`: https://crates.parity.io/pallet_transaction_payment/struct.Module.html#method.compute_fee
      operationId: feeEstimateTransaction
      requestBody:
        $ref: '#/components/requestBodies/Transaction'
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionFeeEstimate'
        "400":
          description: fee estimation failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionFeeEstimateFailure'
  /transaction/material:
    get:
      tags:
      - transaction
      summary: Get all the network information needed to construct a transaction offline.
      description: Returns the material that is universal to constructing any
        signed transaction offline. Replaces `/tx/artifacts` from versions < v1.0.0.
      operationId: getTransactionMaterial
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve the transaction construction
          material.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: noMeta
        in: query
        description: DEPRECATED! This is no longer supported
        schema:
          type: boolean
          default: false
      - name: metadata
        in: query
        description: Specifies the format of the metadata to be returned. Accepted values are
          'json', and 'scale'. 'json' being the decoded metadata, and 'scale' being the SCALE encoded metadata.
          When `metadata` is not inputted, the `metadata` field will be absent.
        schema:
          type: string
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionMaterial'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pallets/assets/{assetId}/asset-info:
    get:
      tags:
        - pallets
      summary: Get information and metadata associated with an asset.
      description: Returns information associated with an asset which includes
        the assets `AssetDetails` and `AssetMetadata`.
      operationId: getAssetById
      parameters:
      - name: assetId
        in: path
        description: The unsignedInteger Id of an asset.
        required: true
        schema:
          type: string
          format: unsignedInteger
      - name: at
        in: query
        description: Block at which to retrieve the assetInfo.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletsAssetsInfo'
  /pallets/asset-conversion/liquidity-pools:
    get:
      tags:
      - pallets
      summary: Get information related to existing liquidity pools.
      description: Returns a list of the existing liquidity pools and its corresponding 
        tokens at a given block height. If no block is specified, it returns the latest list
        available.
      parameters:
        - name: at
          in: query
          description: Block at which to retrieve the liquidity pools information.
          required: false
          schema:
            type: string
            description: Block identifier, as the block height or block hash.
            format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LiquidityPools'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pallets/asset-conversion/next-available-id:
    get:
      tags:
      - pallets
      summary: Get the next available liquidity pool id.
      description: Returns the next available liquidity pool's id at a given 
        block height. If no block is specified, it returns the latest list
        available.
      parameters:
        - name: at
          in: query
          description: Block at which to retrieve the next liquidity pool's id.
          required: false
          schema:
            type: string
            description: Block identifier, as the block height or block hash.
            format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NextAvailableId'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pallets/foreign-assets:
    get:
      tags:
        - pallets
      summary: Get information and metadata associated with foreign assets.
      description: Returns information associated with every foreign asset which includes
        the assets `AssetDetails` and `AssetMetadata`.
      operationId: getForeignAssets
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve the foreign assets.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                description: An array of foreign assets.
                $ref: '#/components/schemas/PalletsForeignAssets'
  /pallets/nomination-pools/info:
    get:
      tags:
        - pallets
      summary: Get information associated with nomination pools.
      description: Returns information and metadata for nomination pools including pool counters and limits.
      operationId: getNominationPoolInfo
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve the nomination pool info.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletsNominationPoolsInfo'
  /pallets/nomination-pools/{poolId}:
    get:
      tags:
        - pallets
      summary: Get information and metadata associated with a nomination pool.
      description: Returns information associated with a nomination pool which includes
        the nomination pools' `bondedPool`, `rewardPool` and `metadata`.
      operationId: getNominationPoolById
      parameters:
      - name: poolId
        in: path
        description: The unsignedInteger Id of a nomination pool.
        required: true
        schema:
          type: string
          format: unsignedInteger
      - name: at
        in: query
        description: Block at which to retrieve the nomination pool.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletsNominationPool'
  /pallets/{palletId}/consts:
    get:
      tags:
      - pallets
      summary: Get a list of constants for a pallet.
      description: Returns a list of const item metadata for constant items of the
        specified palletId.
      parameters:
      - name: palletId
        in: path
        description: 'Name or index of the pallet to read constant metadata for. Note: the pallet name must match what is
          specified in the runtime metadata.'
        required: true
        schema:
          type: string
      - name: onlyIds
        in: query
        description: Only return the names (IDs) of the const items instead of every constant's metadata.
        required: false
        schema:
          type: boolean
      - name: at
        in: query
        description: Block at which to retrieve a list of
          the pallet's constant items.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                description: Pallet info and Array of constantItemIds.
                $ref: '#/components/schemas/PalletConstants'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: could not find pallet with palletId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pallets/{palletId}/consts/{constantItemId}:
    get:
      tags:
      - pallets
      summary: Get the value of a constant item.
      description: Returns the value stored under the constantItemId.
      parameters:
      - name: palletId
        in: path
        description: 'Name or index of the pallet to read constant metadata for. Note: the pallet name must match what is
          specified in the runtime metadata.'
        required: true
        schema:
          type: string
      - name: constantItemId
        in: path
        description: Id of the const item to query for.
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block at which to query the const item at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: metadata
        in: query
        description: Include the const items metadata (including documentation)
          if set to true.
        required: false
        schema:
          default: false
          type: boolean
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletConstantsItem'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: could not find resource with id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pallets/{palletId}/dispatchables:
    get:
      tags:
      - pallets
      summary: Get a list of dispatchables for a pallet.
      description: Returns a list of dispatchable item metadata for distpachable items of the
        specified palletId.
      parameters:
      - name: palletId
        in: path
        description: 'Name or index of the pallet to read dispatchable metadata for. Note: the pallet name must match what is
          specified in the runtime metadata.'
        required: true
        schema:
          type: string
      - name: onlyIds
        in: query
        description: Only return the names (IDs) of the dispatchable items instead of every dispatchable's metadata.
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                description: Pallet info and Array of dispatchableItemIds.
                $ref: '#/components/schemas/PalletDispatchables'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: could not find pallet with palletId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pallets/{palletId}/dispatchables/{dispatchableItemId}:
    get:
      tags:
      - pallets
      summary: Get the value of a dispatchable item.
      description: Returns the value stored under the dispatchableItemId.
      parameters:
      - name: palletId
        in: path
        description: 'Name or index of the pallet to read dispatchable metadata for. Note: the pallet name must match what is
          specified in the runtime metadata.'
        required: true
        schema:
          type: string
      - name: dispatchableItemId
        in: path
        description: Id of the dispatchable item to query for.
        required: true
        schema:
          type: string
      - name: metadata
        in: query
        description: Include the dispatchable items metadata (including documentation)
          if set to true.
        required: false
        schema:
          default: false
          type: boolean
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletDispatchablesItem'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: could not find resource with id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pallets/{palletId}/errors:
    get:
      tags:
      - pallets
      summary: Get a list of errors for a pallet.
      description: Returns a list of error item metadata for error items of the
        specified palletId.
      parameters:
      - name: palletId
        in: path
        description: 'Name or index of the pallet to read error metadata for. Note: the pallet name must match what is
          specified in the runtime metadata.'
        required: true
        schema:
          type: string
      - name: onlyIds
        in: query
        description: Only return the names (IDs) of the error items instead of every error's metadata.
        required: false
        schema:
          type: boolean
      - name: at
        in: query
        description: Block at which to retrieve a list of
          the pallet's error items.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                description: Pallet info and Array of errorItemIds.
                $ref: '#/components/schemas/PalletErrors'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: could not find pallet with palletId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pallets/{palletId}/errors/{errorItemId}:
    get:
      tags:
      - pallets
      summary: Get the value of an error item.
      description: Returns the value stored under the errorItemId.
      parameters:
      - name: palletId
        in: path
        description: 'Name or index of the pallet to read error metadata for. Note: the pallet name must match what is
          specified in the runtime metadata.'
        required: true
        schema:
          type: string
      - name: errorItemId
        in: path
        description: Id of the error item to query for.
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block at which to query the error item at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: metadata
        in: query
        description: Include the error items metadata (including documentation)
          if set to true.
        required: false
        schema:
          default: false
          type: boolean
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletErrorsItem'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: could not find resource with id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pallets/{palletId}/events:
    get:
      tags:
      - pallets
      summary: Get a list of events for a pallet.
      description: Returns a list of event item metadata for event items of the
        specified palletId.
      parameters:
      - name: palletId
        in: path
        description: 'Name or index of the pallet to read event metadata for. Note: the pallet name must match what is
          specified in the runtime metadata.'
        required: true
        schema:
          type: string
      - name: onlyIds
        in: query
        description: Only return the names (IDs) of the event items instead of every event's metadata.
        required: false
        schema:
          type: boolean
      - name: at
        in: query
        description: Block at which to retrieve a list of
          the pallet's event items.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                description: Pallet info and Array of eventItemIds.
                $ref: '#/components/schemas/PalletEvents'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: could not find pallet with palletId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pallets/{palletId}/events/{eventItemId}:
    get:
      tags:
      - pallets
      summary: Get the value of an event item.
      description: Returns the value stored under the eventItemId.
      parameters:
      - name: palletId
        in: path
        description: 'Name or index of the pallet to read event metadata for. Note: the pallet name must match what is
          specified in the runtime metadata.'
        required: true
        schema:
          type: string
      - name: eventItemId
        in: path
        description: Id of the event item to query for.
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block at which to query the event item at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: metadata
        in: query
        description: Include the event items metadata (including documentation)
          if set to true.
        required: false
        schema:
          default: false
          type: boolean
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletEventsItem'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: could not find resource with id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /runtime/metadata:
    get:
      tags:
      - runtime
      summary: Get the runtime metadata in decoded, JSON form.
      description: >-
       Returns the runtime metadata as a JSON object.
       Substrate Reference:
       - FRAME Support: https://crates.parity.io/frame_support/metadata/index.html
       - Knowledge Base: https://substrate.dev/docs/en/knowledgebase/runtime/metadata
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve the metadata at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                description: Response is dependent on the runtime metadata contents.
  /runtime/code:
    get:
      tags:
      - runtime
      summary: Get the runtime wasm blob.
      description: Returns the runtime Wasm blob in hex format.
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve the runtime wasm blob at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeCode'
  /runtime/spec:
    get:
      tags:
      - runtime
      summary: Get version information of the Substrate runtime.
      description: Returns version information related to the runtime.
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve runtime version information at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeSpec'
  /pallets/{palletId}/storage:
    get:
      tags:
      - pallets
      summary: Get a list of storage items for a pallet.
      description: Returns a list of storage item metadata for storage items of the
        specified palletId.
      parameters:
      - name: palletId
        in: path
        description: 'Name or index of the pallet to query the storage of. Note: the pallet name must match what is
          specified in the runtime metadata.'
        required: true
        schema:
          type: string
      - name: onlyIds
        in: query
        description: Only return the names (IDs) of the storage items instead of all of each storage
          item's metadata.
        required: false
        schema:
          type: boolean
      - name: at
        in: query
        description: Block at which to retrieve a list of
          the pallet's storage items.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                description: Pallet info and Array of storageItemIds.
                $ref: '#/components/schemas/PalletStorage'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: could not find pallet with palletId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pallets/{palletId}/storage/{storageItemId}:
    get:
      tags:
      - pallets
      summary: Get the value of a storage item.
      description: Returns the value stored under the storageItemId. If it is a
        map, query param key1 is required. If the storage item is double map
        query params key1 and key2 are required.
      parameters:
      - name: palletId
        in: path
        description: 'Name or index of the pallet to query the storage of. Note: pallet name aligns with
          pallet name as specified in runtime metadata.'
        required: true
        schema:
          type: string
      - name: storageItemId
        in: path
        description: Id of the storage item to query for.
        required: true
        schema:
          type: string
      - name: keys
        in: query
        description: Set of N keys used for querying a storage map. It should be queried using the 
          following format - ?keys[]=key1&keys[]=key2. Order matters, as it will determine the 
          order the keys are passed into the storage calls.
        required: false
        schema:
          type: array
          items:
            type: string
          description: An array of storage keys.
      - name: at
        in: query
        description: Block at which to query the storage item at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: metadata
        in: query
        description: Include the storage items metadata (including documentation)
          if set to true.
        required: false
        schema:
          default: false
          type: boolean
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletStorageItem'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        "404":
          description: could not find resource with id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pallets/pool-assets/{assetId}/asset-info:
    get:
      tags:
        - pallets
      summary: Get information and metadata associated with a pool asset.
      description: Returns information associated with a pool asset which includes
        the assets `AssetDetails` and `AssetMetadata`.
      operationId: getPoolAssetById
      parameters:
      - name: assetId
        in: path
        description: The unsignedInteger Id of a pool asset.
        required: true
        schema:
          type: string
          format: unsignedInteger
      - name: at
        in: query
        description: Block at which to retrieve the assetInfo.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletsPoolAssetsInfo'
  /pallets/staking/progress:
    get:
      tags:
      - staking
      - pallets
      summary: Get progress on the general Staking pallet system.
      description: Returns information on the progress of key components of the
        staking system and estimates of future points of interest. Replaces
        `/staking-info` from versions < v1.0.0.
      operationId: getStakingProgress
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve a staking progress report.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StakingProgress'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pallets/staking/validators:
    get:
      tags:
      - staking
      - pallets
      summary: Get all validators (active/waiting) of a specific chain.
      description: Returns a list of all validators addresses and their
        corresponding status which can be either active or waiting. It will also return 
        a list of active validators that will not be part of the next era for staking. They will
        be under the key "validatorsToBeChilled". It's important to note, that addresses can be present in both
        the "validators" key, and "validatorsToBeChilled".
      operationId: getStakingValidators
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve the list of validators.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:  
                $ref: '#/components/schemas/StakingValidators'
        "400":
          description: invalid blockId supplied for at query param
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /paras:
    get:
      tags:
      - paras
      summary: |
        List all registered paras (parathreads & parachains).
      description: Returns all registered parachains and parathreads with lifecycle info.
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve paras list at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Paras'
  /paras/leases/current:
    get:
      tags:
      - paras
      summary: |
        Get general information about the current lease period.
      description: |
        Returns an overview of the current lease period, including lease holders.
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve current lease period info at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: currentLeaseHolders
        in: query
        description: |
          Wether or not to include the `currentLeaseHolders` property. Inclusion
          of the property will likely result in a larger payload and increased
          response time.
        required: false
        schema:
          type: boolean
          default: true
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParasLeasesCurrent'
  /paras/auctions/current:
    get:
      tags:
      - paras
      summary: |
        Get the status of the current auction.
      description: |
        Returns an overview of the current auction. There is only one auction
        at a time. If there is no auction most fields will be `null`. If the current
        auction phase is in `vrfDelay` and you are looking to retrieve the latest winning
        bids, it is advised to query one block before `finishEnd` in the `endingPeriod` phase
        for that auction as there technically are no winners during the `vrfDelay` and thus
        the field is `null`.
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve auction progress at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParasAuctionsCurrent'
  /paras/crowdloans:
    get:
      tags:
      - paras
      summary: |
        List all stored crowdloans.
      description: |
        Returns a list of all the crowdloans and their associated paraIds.
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve the list of paraIds that have crowdloans at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParasCrowdloans'
  /paras/{paraId}/crowdloan-info:
    get:
      tags:
      - paras
      summary: |
        Get crowdloan information for a `paraId`.
      description: |
        Returns crowdloan's `fundInfo` and the set of `leasePeriods` the crowdloan`
        covers.
      parameters:
      - name: paraId
        in: path
        description: paraId to query the crowdloan information of.
        required: true
        schema:
          type: number
      - name: at
        in: query
        description: Block at which to retrieve info at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParasCrowdloanInfo'
  /paras/{paraId}/lease-info:
    get:
      tags:
      - paras
      summary: |
        Get current and future leases as well as the lifecycle stage for a given `paraId`.
      description: |
        Returns a list of leases that belong to the `paraId` as well as the
        `paraId`'s current lifecycle stage.
      parameters:
      - name: paraId
        in: path
        description: paraId to query the crowdloan information of.
        required: true
        schema:
          type: number
      - name: at
        in: query
        description: Block at which to retrieve para's leases at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParasLeaseInfo'
  /paras/head/included-candidates:
    get:
      tags:
      - paras
      summary: |
        Get the heads of the included (backed and considered available) parachain candidates at the 
        specified block height or at the most recent finalized head otherwise.
      description: |
        Returns an object with all the parachain id's as keys, and their headers as values.
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve para's heads at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParasHeaders'
  /paras/head/backed-candidates:
    get:
      tags:
      - paras
      summary: |
        Get the heads of the backed parachain candidates at the specified block height or at the most recent finalized head otherwise.
      description: |
        Returns an object with all the parachain id's as keys, and their headers as values.
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve para's heads at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParasHeaders'
  /experimental/blocks/head/traces:
    get:
      tags:
      - trace
      summary: |
        [Experimental - subject to breaking change.] Get traces for the most
        recently finalized block.
      description: |
        Returns traces (spans and events) of the most recently finalized block from
        RPC `state_straceBlock`. Consult the [RPC docs](https://github.com/paritytech/substrate/blob/aba876001651506f85c14baf26e006b36092e1a0/client/rpc-api/src/state/mod.rs#L140)
        for conceptual info.
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlocksTrace'
  /experimental/blocks/{blockId}/traces:
    get:
      tags:
      - trace
      summary: |
        [Experimental - subject to breaking change.] Get traces for the given `blockId`.
      description: |
        Returns traces (spans and events) of the specified block from
        RPC `state_straceBlock`. Consult the [RPC docs](https://github.com/paritytech/substrate/blob/aba876001651506f85c14baf26e006b36092e1a0/client/rpc-api/src/state/mod.rs#L140) for conceptual info.
      parameters:
      - name: blockId
        in: path
        description: Block identifier, as the block height or block hash.
        required: true
        schema:
          pattern: '^0[xX][0-9a-fA-F]{1,64}$|[0-9]{1,12}'
          type: string
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlocksTrace'
  /experimental/blocks/head/traces/operations:
    get:
      tags:
      - trace
      summary: |
        [Experimental - subject to breaking change.] Get the operations from the
        most recently finalized block.
      description: |
        Returns the operations from the most recently finalized block. Operations
        represent one side of a balance change. For example if Alice transfers
        100unit to Bob there will be two operations; 1) Alice - 100 2) Bob + 100.

        Given account A and A's balance at block k0 (Ak0), if we sum all the
        operations for A from block k1 through kn against Ak0, we will end up
        with A's balance at block kn (Akn). Thus, operations can be used to audit
        that balances change as expected.

        This is useful for Substrate based chains because the advanced business
        logic can make it difficult to ensure auditable balance reconciliation
        based purely on events. Instead of using events one can use the
        operations given from this endpoint.

        Note - each operation corresponds to a delta of a single field of the
        `system::AccountData` storage item (i.e `free`, `reserved`, `misc_frozen`
        and `fee_frozen`).
        Note - operations are assigned a block execution phase (and extrinsic index
        for those in the apply extrinsic phase) based on an "action group". For
        example all the operations for 1 extrinsic will be in the same action group.
        The action groups can optionally be fetched with the `action` query param
        for closer auditing.
        Note - There are no 0 value operations (e.g. a transfer of 0, or a
        transfer to itself)

        To learn more about operation and action group creation please consult
        [this diagram](https://docs.google.com/drawings/d/1vZoJo9jaXlz0LmrdTOgHck9_1LsfuQPRmTr-5g1tOis/edit?usp=sharing)
      parameters:
      - name: actions
        in: query
        description: Whether or not to include action groups.
        required: false
        schema:
          type: boolean
          default: false
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlocksTraceOperations'
  /experimental/blocks/{blockId}/traces/operations:
    get:
      tags:
      - trace
      summary: |
        [Experimental - subject to breaking change.] Get the operations from the
        specified block.
      description: |
        Returns the operations from the most recently finalized block. Operations
        represent one side of a balance change. For example if Alice transfers
        100unit to Bob there will be two operations; 1) Alice - 100 2) Bob + 100.

        Given account A and A's balance at block k0 (Ak0), if we sum all the
        operations for A from block k1 through kn against Ak0, we will end up
        with A's balance at block kn (Akn). Thus, operations can be used to audit
        that balances change as expected.

        This is useful for Substrate based chains because the advanced business
        logic can make it difficult to ensure auditable balance reconciliation
        based purely on events. Instead of using events one can use the
        operations given from this endpoint.

        Note - each operation corresponds to a delta of a single field of the
        `system::AccountData` storage item (i.e `free`, `reserved`, `misc_frozen`
        and `fee_frozen`).
        Note - operations are assigned a block execution phase (and extrinsic index
        for those in the apply extrinsic phase) based on an "action group". For
        example all the operations for 1 extrinsic will be in the same action group.
        The action groups can optionally be fetched with the `action` query param
        for closer auditing.
        Note - There are no 0 value operations (e.g. a transfer of 0, or a
        transfer to itself)

        To learn more about operation and action group creation please consult
        [this diagram](https://docs.google.com/drawings/d/1vZoJo9jaXlz0LmrdTOgHck9_1LsfuQPRmTr-5g1tOis/edit?usp=sharing)
      parameters:
      - name: blockId
        in: path
        description: Block identifier, as the block height or block hash.
        required: true
        schema:
          pattern: '^0[xX][0-9a-fA-F]{1,64}$|[0-9]{1,12}'
          type: string
      - name: actions
        in: query
        description: Whether or not to include action groups.
        required: false
        schema:
          type: boolean
          default: false
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlocksTraceOperations'
components:
  schemas:
    AccountAssetsApproval:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        amount:
          type: string
          description: The amount of funds approved for the balance transfer from the owner
            to some delegated target.
          format: unsignedInteger
        deposit:
          type: string
          description: The amount reserved on the owner's account to hold this item in storage.
          format: unsignedInteger
    AccountAssetsBalances:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        assets:
          type: array
          description: An array of queried assets.
          items:
            $ref: '#/components/schemas/AssetsBalance'
    AccountBalanceInfo:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        nonce:
          type: string
          description: Account nonce.
          format: unsignedInteger
        tokenSymbol:
          type: string
          description: Token symbol of the balances displayed in this response.
          format: unsignedInteger
        free:
          type: string
          description: Free balance of the account. Not equivalent to _spendable_
            balance. This is the only balance that matters in terms of most operations
            on tokens.
          format: unsignedInteger
        reserved:
          type: string
          description: Reserved balance of the account.
          format: unsignedInteger
        miscFrozen:
          type: string
          description: The amount that `free` may not drop below when withdrawing
            for anything except transaction fee payment. Note, that some runtimes may not have
            support for miscFrozen and if so the following will be returned `miscFrozen does not exist for this runtime`
          format: unsignedInteger
        feeFrozen:
          type: string
          description: The amount that `free` may not drop below when withdrawing
            specifically for transaction fee payment. Note, that some runtimes may not have
            support for feeFrozen and if so the following will be returned `feeFrozen does not exist for this runtime`
          format: unsignedInteger
        frozen:
          type: string
          description: The amount that `free` may not drop below when reducing the balance, except for actions
            where the account owner cannot reasonably benefit from the balance reduction, such as slashing.
            Note, that some runtimes may not have support for frozen and if so the following 
            will be returned `frozen does not exist for this runtime`
          format: unsignedInteger
        locks:
          type: array
          description: Array of locks on a balance. There can be many of these on
            an account and they "overlap", so the same balance is frozen by multiple
            locks
          items:
            $ref: '#/components/schemas/BalanceLock'
    AccountConvert:
      type: object
      properties:
        ss58Prefix:
          type: string
          description: SS58 prefix based on which the account ID or Public Key (hex) is converted to an SS58 address.
          format: unsignedInteger
        network:
          type: string
          description: The network based on which the returned address is encoded. It depends on the prefix
            that was given as a query param.
        address:
          type: string
          description: The returned SS58 address which is the result of the conversion
            of the account ID or Public Key (hex).
        accountId:
          type: string
          description: The given account ID or Public Key (hex) that is converted to an SS58 address.
        scheme:
          type: string
          description: The cryptographic scheme/algorithm used to encode the given account ID or Public Key (hex).
        publicKey:
          type: boolean
          description: Whether the given path parameter is a Public Key (hex) or not.
    AccountPoolAssetsBalances:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        poolAssets:
          type: array
          description: An array of queried assets.
          items:
            $ref: '#/components/schemas/AssetsBalance'
    AccountProxyInfo:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        delegatedAccounts:
          type: array
          items:
            type: object
            properties:
              delegate:
                type: string
                description: Delegate address for the given proxy.
                format: ss58
              delay:
                type: string
                description: The announcement period required of the initial proxy. Will generally be zero.
                format: unsignedInteger
              proxyType:
                type: string
                description: The permissions allowed for this proxy account.
        depositHeld:
          type: string
          format: unsignedInteger
          description: The held deposit.
    AccountStakingInfo:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        rewardDestination:
          type: string
          description: The account to which rewards will be paid. Can be 'Staked' (Stash
            account, adding to the amount at stake), 'Stash' (Stash address, not
            adding to the amount at stake), or 'Controller' (Controller address).
          format: ss58
          enum:
          - Staked
          - Stash
          - Controller
        controller:
          type: string
          description: Controller address for the given Stash.
          format: ss58
        numSlashingSpans:
          type: string
          description: Number of slashing spans on Stash account; `null` if provided address
            is not a Controller.
          format: unsignedInteger
        nominations:
          $ref: '#/components/schemas/Nominations'
        stakingLedger:
          $ref: '#/components/schemas/StakingLedger'
      description: >-
        Note: Runtime versions of Kusama less than 1062 will either have `lastReward` in place of
        `claimedRewards`, or no field at all. This is related to changes in reward distribution. See: [Lazy Payouts](https://github.com/paritytech/substrate/pull/4474), [Simple Payouts](https://github.com/paritytech/substrate/pull/5406)
    AccountStakingPayouts:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        erasPayouts:
          type: array
          items:
            type: object
            properties:
              era:
                type: string
                format: unsignedInteger
                description: Era this information is associated with.
              totalEraRewardPoints:
                type: string
                format: unsignedInteger
                description: Total reward points for the era. Equals the sum of
                  reward points for all the validators in the set.
              totalEraPayout:
                type: string
                format: unsignedInteger
                description: Total payout for the era. Validators split the payout
                  based on the portion of `totalEraRewardPoints` they have.
              payouts:
                $ref: '#/components/schemas/Payouts'
    AccountValidation:
      type: object
      properties:
        isValid:
          type: boolean
          description: Whether the given address is valid ss58 formatted.
        ss58Prefix:
          type: string
          description: SS58 prefix of the given address. If the address is a valid
            base58 format, but incorrect ss58, a prefix for the given address will still be returned.
          format: unsignedInteger
        network:
          type: string
          description: The network based on which the given address is encoded.
        accountId:
          type: string
          description: The account id of the given address.
    AccountVestingInfo:
      type: object
      description: Sidecar version's <= v10.0.0 have a`vesting` return value that defaults to an object for
        when there is no available vesting-info data. It also returns a `VestingInfo` as an object.
        For Sidecar >=11.0.0, that value will now default as an array when there is no value, and `Vec<PalletsPalletVestingInfo>`
        is returned when there is.
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        vesting:
          type: array
          items:
            $ref: '#/components/schemas/VestingSchedule'
    AssetsBalance:
      type: object
      properties:
        assetId:
          type: string
          description: The identifier of the asset.
          format: unsignedInteger
        balance:
          type: string
          description: The balance of the asset.
          format: unsignedInteger
        isFrozen:
          type: boolean
          description: Whether the asset is frozen for non-admin transfers. Note, that some runtimes may not have
            support for isFrozen and if so the following will be returned `isFrozen does not exist for this runtime`
        isSufficient:
          type: boolean
          description: Whether a non-zero balance of this asset is a deposit of sufficient
            value to account for the state bloat associated with its balance storage. If set to
            `true`, then non-zero balances may be stored without a `consumer` reference (and thus
            an ED in the Balances pallet or whatever else is used to control user-account state
            growth).
    AssetInfo:
      type: object
      properties:
        owner:
          type: string
          description: Owner of the assets privileges.
          format: SS58
        issuer:
          type: string
          description: The `AccountId` able to mint tokens.
          format: SS58
        admin:
          type: string
          description: The `AccountId` that can thaw tokens, force transfers and burn token from
            any account.
          format: SS58
        freezer:
          type: string
          description: The `AccountId` that can freeze tokens.
          format: SS58
        supply:
          type: string
          description: The total supply across accounts.
          format: unsignedInteger
        deposit:
          type: string
          description: The balance deposited for this. This pays for the data stored.
          format: unsignedInteger
        minBalance:
          type: string
          description: The ED for virtual accounts.
          format: unsignedInteger
        isSufficient:
          type: boolean
          description: If `true`, then any account with this asset is given a provider reference. Otherwise, it
            requires a consumer reference.
        accounts:
          type: string
          description: The total number of accounts.
          format: unsignedInteger
        sufficients:
          type: string
          description: The total number of accounts for which is placed a self-sufficient reference.
        approvals:
          type: string
          description: The total number of approvals.
          format: unsignedInteger
        status:
          type: string
          description: The status of the asset.
    AssetMetadata:
      type: object
      properties:
        deposit:
          type: string
          description: The balance deposited for this metadata. This pays for the data
            stored in this struct.
          format: unsignedInteger
        name:
          type: string
          description: The user friendly name of this asset.
          format: $hex
        symbol:
          type: string
          description: The ticker symbol for this asset.
          format: $hex
        decimals:
          type: string
          description: The number of decimals this asset uses to represent one unit.
          format: unsignedInteger
        isFrozen:
          type: boolean
          description: Whether the asset metadata may be changed by a non Force origin. Note, that some runtimes may not have
            support for isFrozen and if so the following will be returned `isFrozen does not exist for this runtime`
    BalanceLock:
      type: object
      properties:
        id:
          type: string
          description: An identifier for this lock. Only one lock may be in existence
            for each identifier.
        amount:
          type: string
          description: The amount below which the free balance may not drop with this
            lock in effect.
          format: unsignedInteger
        reasons:
          type: string
          description: Reasons for withdrawing balance.
          enum:
          - Fee = 0
          - Misc = 1
          - All = 2
    Block:
      type: object
      properties:
        number:
          type: string
          description: The block's height.
          format: unsignedInteger
        hash:
          type: string
          description: The block's hash.
          format: hex
        parentHash:
          type: string
          description: The hash of the parent block.
          format: hex
        stateRoot:
          type: string
          description: The state root after executing this block.
          format: hex
        extrinsicRoot:
          type: string
          description: The Merkle root of the extrinsics.
          format: hex
        authorId:
          type: string
          description: The account ID of the block author (may be undefined for some
            chains).
          format: ss58
        logs:
          type: array
          items:
            $ref: '#/components/schemas/DigestItem'
          description: Array of `DigestItem`s associated with the block.
        onInitialize:
          $ref: '#/components/schemas/BlockInitialize'
        extrinsics:
          type: array
          description: Array of extrinsics (inherents and transactions) within the
            block.
          items:
            $ref: '#/components/schemas/Extrinsic'
        onFinalize:
          $ref: '#/components/schemas/BlockFinalize'
        finalized:
          type: boolean
          description: >-
            A boolean identifying whether the block is finalized or not.
            Note: on chains that do not have deterministic finality this field is omitted.
      description: >-
        Note: Block finalization does not correspond to consensus, i.e. whether
        the block is in the canonical chain. It denotes the finalization of block
        _construction._
    BlockRaw:
      type: object
      properties:
        number:
          type: string
          description: The block's height.
          format: unsignedInteger
        parentHash:
          type: string
          description: The hash of the parent block.
          format: hex
        stateRoot:
          type: string
          description: The state root after executing this block.
          format: hex
        extrinsicRoot:
          type: string
          description: The Merkle root of the extrinsics.
          format: hex
        digest:
          type: object
          properties:
            logs:
              type: array
              items:
                $ref: '#/components/schemas/DigestItem'
              description: Array of `DigestItem`s associated with the block.
        extrinsics:
          type: array
          description: Array of raw extrinsics (inherents and transactions) within the
            block.
          items:
            type: string
    Blocks:
      type: array
      items: 
        $ref: '#/components/schemas/Block'
    BlockFinalize:
      type: object
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/SanitizedEvent'
      description: Object with an array of `SanitizedEvent`s that occurred during
        block construction finalization with the `method` and `data` for each.
    BlockHeader:
      type: object
      properties:
        parentHash:
          type: string
          description: The hash of the parent block.
          format: hex
        number:
          type: string
          description: The block's height.
          format: unsignedInteger
        stateRoot:
          type: string
          description: The state root after executing this block.
          format: hex
        extrinsicRoot:
          type: string
          description: The Merkle root of the extrinsics.
          format: hex
        digest:
          type: object
          properties:
            logs:
              type: array
              items:
                $ref: '#/components/schemas/DigestItem'
              description: Array of `DigestItem`s associated with the block.
    BlockIdentifiers:
      type: object
      properties:
        hash:
          type: string
          description: The block's hash.
          format: hex
        height:
          type: string
          description: The block's height.
          format: unsignedInteger
      description: Block number and hash at which the call was made.
    BlockInitialize:
      type: object
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/SanitizedEvent'
      description: Object with an array of `SanitizedEvent`s that occurred during
        block initialization with the `method` and `data` for each.
    BlocksTrace:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        blockHash:
          type: string
        events:
          type: array
          items:
            $ref: '#/components/schemas/TraceEvent'
        parentHash:
          type: string
        spans:
          type: array
          items:
            $ref: '#/components/schemas/TraceSpan'
        storageKeys:
          type: string
          description: Hex encoded storage keys used to filter events.
        tracingTargets:
          type: string
          description: Targets used to filter spans and events.
    BlocksTraceOperations:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        operations:
          type: array
          items:
            $ref: '#/components/schemas/Operation'
    BlockWithDecodedXcmMsgs:
      allOf:
        - $ref: "#/components/schemas/Block"
        - $ref: "#/components/schemas/DecodedXcmMsgs"
    BondedPool:
      type: object
      properties:
        points:
          type: number
        state:
          type: string
        memberCounter:
          type: number
        roles:
          type: object
          properties:
            depositor:
              type: string
            root:
              type: string
            nominator:
              type: string
            stateToggler:
              type: string
    ChainType:
      type: object
      description: Type of the chain. It will return one of the following enum variants as a key. Live, Development, Local, or Custom. Each variant will have a value as null except when the ChainType is Custom, it will return a string.
      properties:
        live:
          type: string
          nullable: true
          default: null
        development:
          type: string
          nullable: true
          default: null
        local:
          type: string
          nullable: true
          default: null
        custom:
          type: string
      example: "{\"live\": null}"
    ContractsInkQuery:
      type: object
      description: Result from calling a query to a Ink contract.
      properties:
        debugMessage:
          type: string
        gasConsumed:
          type: string
        gasRequired:
          type: string
        output:
          type: boolean
        result:
          type: object
          description: Will result in an Ok or Err object depending on the result of the query.
        storageDeposit:
          type: object
    ContractMetadata:
      type: object
      description: Metadata used to instantiate a ContractPromise. This metadata can be generated
        by compiling the contract you are querying.
    DecodedXcmMsgs:
      type: object
      properties:
        decodedXcmMsgs:
          type: object
          properties:
            horizontalMessages:
              type: array
              items:
                type: object
                properties:
                  sentAt:
                    type: string
                    format: unsignedInteger
                    description: Represents the block number that the XCM message was sent at on the relay chain.
                  paraId:
                    type: string
                    format: unsignedInteger
                    description: The paraId that the specific XCM message was sent from.
                  data:
                    type: object
                    description: The decoded instructions and their respective fields that are included in the XCM message.
            downwardMessages:
              type: array
              items:
                type: object
                properties:
                  sentAt:
                    type: string
                    format: unsignedInteger
                    description: Represents the block number that the XCM message was sent at on the relay chain.
                  msg:
                    type: string
                    description: Represents the XCM message.
                  data:
                    type: object
                    description: The decoded instructions and their respective fields that are included in the XCM message.
            upwardMessages:
              type: array
              items:
                type: object
                properties:
                  paraId:
                    type: string
                    format: unsignedInteger
                    description: The paraId that the specific XCM message was sent from.
                  data:
                    type: object
                    description: The decoded instructions and their respective fields that are included in the XCM message.
      description: Object with three arrays, one for every XCM direction. The arrays are populated or left
        empty based on the direction of the current XCM message that is being decoded.
    DigestItem:
      type: object
      properties:
        type:
          type: string
        index:
          type: string
          format: unsignedInteger
        value:
          type: array
          items:
            type: string
    ElectionStatus:
      type: object
      properties:
        status:
          type: object
          description: >-
            [Deprecated](Works for polkadot runtimes before v0.8.30).

            Era election status: either `Close: null` or `Open: <BlockNumber>`.
            A status of `Close` indicates that the submission window for solutions
            from off-chain Phragmen is not open. A status of `Open` indicates that the
            submission window for off-chain Phragmen solutions has been open since
            BlockNumber. N.B. when the submission window is open, certain
            extrinsics are not allowed because they would mutate the state that the
            off-chain Phragmen calculation relies on for calculating results.
        toggleEstimate:
          type: string
          description: Upper bound estimate of the block height at which the `status`
            will switch.
          format: unsignedInteger
      description: Information about the off-chain election. Not included in response when
        `forceEra.isForceNone`.
    Error:
      type: object
      properties:
        code:
          type: number
        message:
          type: string
        stack:
          type: string
        level:
          type: string
    ExtrinsicMethod:
      type: object
      properties:
        pallet:
          type: string
        method:
          type: string
      description: Extrinsic method
    Extrinsic:
      type: object
      properties:
        method:
          $ref: '#/components/schemas/ExtrinsicMethod'
        signature:
          $ref: '#/components/schemas/Signature'
        nonce:
          type: string
          description: Account nonce, if applicable.
          format: unsignedInteger
        args:
          type: object
          description: >-
            Object of arguments keyed by parameter name. Note: if you are expecting an [`OpaqueCall`](https://substrate.dev/rustdocs/v2.0.0/pallet_multisig/type.OpaqueCall.html)
            and it is not decoded in the response (i.e. it is just a hex string), then Sidecar was
            not able to decode it and likely that it is not a valid call for the runtime.
        tip:
          type: string
          description: Any tip added to the transaction.
          format: unsignedInteger
        hash:
          type: string
          description: The transaction's hash.
          format: hex
        info:
          $ref: '#/components/schemas/RuntimeDispatchInfo'
        era:
          $ref: '#/components/schemas/GenericExtrinsicEra'
        events:
          type: array
          description: An array of `SanitizedEvent`s that occurred during extrinsic
            execution.
          items:
            $ref: '#/components/schemas/SanitizedEvent'
        success:
          type: boolean
          description: Whether or not the extrinsic succeeded.
        paysFee:
          type: boolean
          description: Whether the extrinsic requires a fee. Careful! This field relates
            to whether or not the extrinsic requires a fee if called as a transaction.
            Block authors could insert the extrinsic as an inherent in the block
            and not pay a fee. Always check that `paysFee` is `true` and that the
            extrinsic is signed when reconciling old blocks.
    ExtrinsicIndex:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        extrinsic:
          $ref: '#/components/schemas/Extrinsic'
      description: A single extrinsic at a given block.
    FundInfo:
      type: object
      properties:
        depositor:
          type: string
        verifier:
          type: string
        deposit:
          type: string
          format: unsignedInteger
        raised:
          type: string
          format: unsignedInteger
        end:
          type: string
          format: unsignedInteger
        cap:
          type: string
          format: unsignedInteger
        lastConstribution:
          type: string
          enum:
          - preEnding
          - ending
        firstPeriod:
          type: string
          format: unsignedInteger
        lastPeriod:
          type: string
          format: unsignedInteger
        trieIndex:
          type: string
          format: unsignedInteger
    GenericExtrinsicEra:
      type: object
      description: |
        The return value for era can either be `mortalEra`, or `immortalEra` and is represented as an enum in substrate. `immortalEra` meaning
        the transaction is valid forever. `mortalEra` consists of a tuple containing a period and phase.
        ex: `"{"mortalEra": ["64", "11"]}"`. The Period is the period of validity from the block hash found in the signing material.
        The Phase is the period that this transaction's lifetime begins (and, importantly,
        implies which block hash is included in the signature material).
      properties:
        mortalEra:
          type: array
          items:
            type: string
          description: Tuple of a Phase, and Period. Each item in the array will be a string formatted as an integer.
        immortalEra:
          type: string
          description: Hardcoded constant '0x00'.
          format: hex
      example: "{\"mortalEra\":[\"64\", \"11\"]}"
    LiquidityPools:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        pools:
          type: array
          description: Array containing existent liquidity pool's token id.
          items:
            $ref: '#/components/schemas/LiquidityPool'
          example: "[{\"reserves\":[{\"parents\":\"1\",\"interior\":{\"here\":
            null}},{\"parents\":\"0\",\"interior\":{\"x2\":[{\"palletInstance\":
            \"50\"},{\"generalIndex\":\"2\"}]}}],\"lpToken\":{\"lpToken\":\"1\"}
            },{\"lpToken\":{\"lpToken\":\"0\"}}]"
    LiquidityPool:
      type: object
      properties:
        reserves:
          type: array
          items:
            type: object
            properties:
              parents:
                type: string
                format: unsignedInteger
              interior:
                type: object
        lpToken:
          type: string
          format: unsignedInteger
          description: Liquidity pool token ID.
    NextAvailableId:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        id:
          type: string
          description: Next availabe liquidity pool's id.
          example: "4"
    NodeNetwork:
      type: object
      properties:
        nodeRoles:
          $ref: '#/components/schemas/NodeRole'
        numPeers:
          type: string
          description: Number of peers the node is connected to.
          format: unsignedInteger
        isSyncing:
          type: boolean
          description: Whether or not the node is syncing. `False` indicates that the node is in sync.
        shouldHavePeers:
          type: boolean
          description: Whether or not the node should be connected to peers. Might be false
            for local chains or when running without discovery.
        localPeerId:
          type: string
          description: Local copy of the `PeerId`.
        localListenAddresses:
          type: array
          description: Multiaddresses that the local node is listening on. The addresses
            include a trailing `/p2p/` with the local PeerId, and are thus suitable
            to be passed to `system_addReservedPeer` or as a bootnode address for
            example.
          items:
            type: string
        peersInfo:
          type: array
          items:
            $ref: '#/components/schemas/PeerInfo'
    NodeRole:
      type: string
      description: Role of this node. (N.B. Sentry nodes are being deprecated.)
      enum:
      - Full
      - LightClient
      - Authority
      - Sentry
    NodeVersion:
      type: object
      properties:
        clientVersion:
          type: string
          description: Node's binary version.
        clientImplName:
          type: string
          description: Node's implementation name.
        chain:
          type: string
          description: Node's chain name.
      description: Version information of the node.
    Nominations:
      type: object
      properties:
        targets:
          type: array
          items:
            type: string
          description: The targets of the nomination.
        submittedIn:
          type: string
          format: unsignedInteger
          description: >-
             The era the nominations were submitted. (Except for initial
             nominations which are considered submitted at era 0.)
        suppressed:
          type: boolean
          description: Whether the nominations have been suppressed.
    OnboardingAs:
      type: string
      enum:
      - parachain
      - parathread
      description: |
        This property only shows up when `paraLifecycle=onboarding`. It
        describes if a particular para is onboarding as a `parachain` or a
        `parathread`.
    Operation:
      type: object
      properties:
        phase:
          $ref: '#/components/schemas/OperationPhase'
        parentSpanId:
          $ref: '#/components/schemas/SpanId'
        primarySpanId:
          $ref: '#/components/schemas/SpanId'
        eventIndex:
          type: string
          format: unsignedInteger
          description: Index of the underlying trace event.
        address:
          type: string
          description: |
           Account this operation affects. Note - this will be an object like
           `{ id: address }` if the network uses `MultiAddress`
        storage:
          type: object
          properties:
            pallet:
              type: string
            item:
              type: string
            field1:
              type: string
              description: |
                A field of the storage item. (i.e `system::Account::get(address).data`)
            field2:
              type: string
              description: |
                A field of the struct described by field1 (i.e
                `system::Account::get(address).data.free`)
        amount:
          $ref: '#/components/schemas/OperationAmount'
    OperationAmount:
      type: object
      properties:
        values:
          type: string
          format: unsignedInteger
        currency:
          $ref: '#/components/schemas/OperationAmountCurrency'
    OperationAmountCurrency:
      type: object
      properties:
        symbol:
          type: string
          example: KSM
    OperationPhase:
      type: object
      properties:
        variant:
          type: string
          enum:
          - onInitialize
          - initialChecks
          - applyExtrinsic
          - onFinalize
          - finalChecks
          description: Phase of block execution pipeline.
        extrinsicIndex:
          type: string
          format: unsignedInteger
          description: |
            If phase variant is `applyExtrinsic` this will be the index of
            the extrinsic. Otherwise this field will not be present.
    PalletsAssetsInfo:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        assetInfo:
          $ref: '#/components/schemas/AssetInfo'
        assetMetadata:
          $ref: '#/components/schemas/AssetMetadata'
    PalletConstants:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        pallet:
          type: string
          description: Name of the pallet.
          example: "democracy"
        palletIndex:
          type: string
          description: Index of the pallet for looking up constants.
          example: "14"
        items:
          type: array
          items:
            $ref: '#/components/schemas/PalletConstantsItemMetadata'
          description: Array containing metadata for each constant entry of the pallet.
    PalletConstantsItem:
      type: object
      properties:
        pallet:
          type: string
          description: Name of the pallet.
          example: "democracy"
        palletIndex:
          type: string
          description: Index of the pallet for looking up constants.
          example: "14"
        errorItem:
          type: string
          description: Name of the constant item.
          example: "EnactmentPeriod"
        metadata:
          $ref: '#/components/schemas/PalletConstantsItemMetadata'
    PalletConstantsItemMetadata:
      type: object
      properties:
        name:
          type: string
          example: "VotingPeriod"
          description: The constant item's name (which is the same as the constant item's ID).
        type:
          type: string
          example: "4"
        value:
         type: string
         example: "0x00270600"
         description: The hex value of the constant
        docs:
          type: string
          example: "Information concerning any given constant.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control."
      description: Metadata of an constant item from a FRAME pallet.
    PalletDispatchables:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        pallet:
          type: string
          description: Name of the pallet.
          example: "democracy"
        palletIndex:
          type: string
          description: Index of the pallet for looking up dispatchables.
          example: "14"
        items:
          type: array
          items:
            $ref: '#/components/schemas/PalletDispatchablesItemMetadata'
          description: Array containing metadata for each dispatchable entry of the pallet.
    PalletDispatchablesItem:
      type: object
      properties:
        pallet:
          type: string
          description: Name of the pallet.
          example: "democracy"
        palletIndex:
          type: string
          description: Index of the pallet for looking up dispatchables.
          example: "14"
        dispatchableItem:
          type: string
          description: Name of the dispatchable item.
          example: "vote"
        metadata:
          $ref: '#/components/schemas/PalletDispatchablesItemMetadata'
    PalletDispatchablesItemMetadata:
      type: object
      properties:
        name:
          type: string
          example: "propose"
          description: The dispatchable item's name (which is the same as the dispatchable item's ID).
        fields:
          type: array
          items:
            type: string
        index:
         type: string
         example: "0"
         description: The index of the dispatchable item in the lists of pallet dispatchables.
        docs:
          type: string
          example: "Information concerning any given dispatchable.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control."
        args:
          type: array
          items:
            type: string
      description: Metadata of a dispatchable item from a FRAME pallet.
    PalletErrors:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        pallet:
          type: string
          description: Name of the pallet.
          example: "democracy"
        palletIndex:
          type: string
          description: Index of the pallet for looking up errors.
          example: "14"
        items:
          type: array
          items:
            $ref: '#/components/schemas/PalletErrorsItemMetadata'
          description: Array containing metadata for each error entry of the pallet.
    PalletErrorsItem:
      type: object
      properties:
        pallet:
          type: string
          description: Name of the pallet.
          example: "democracy"
        palletIndex:
          type: string
          description: Index of the pallet for looking up errors.
          example: "14"
        errorItem:
          type: string
          description: Name of the error item.
          example: "ValueLow"
        metadata:
          $ref: '#/components/schemas/PalletErrorsItemMetadata'
    PalletErrorsItemMetadata:
      type: object
      properties:
        name:
          type: string
          example: "InsufficientFunds"
          description: The error item's name (which is the same as the error item's ID).
        fields:
          type: array
          items:
            type: string
        index:
         type: string
         example: "0"
         description: The index of the error item in the lists of pallet errors
        docs:
          type: string
          example: " Information concerning any given error.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control."
        args:
          type: array
          items:
            type: string
      description: Metadata of an error item from a FRAME pallet.
    PalletEvents:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        pallet:
          type: string
          description: Name of the pallet.
          example: "democracy"
        palletIndex:
          type: string
          description: Index of the pallet for looking up events.
          example: "14"
        items:
          type: array
          items:
            $ref: '#/components/schemas/PalletEventsItemMetadata'
    PalletEventsItem:
      type: object
      properties:
        pallet:
          type: string
          description: Name of the pallet.
          example: "democracy"
        palletIndex:
          type: string
          description: Index of the pallet for looking up events.
          example: "14"
        eventItem:
          type: string
          description: Name of the events item.
          example: "Proposed"
        metadata:
          $ref: '#/components/schemas/PalletEventsItemMetadata'
    PalletEventsItemMetadata:
      type: object
      properties:
        name:
          type: string
          example: "Tabled"
          description: The event item's name (which is the same as the event item's ID).
        fields:
          type: array
          items:
            type: string
        index:
         type: string
         example: "0"
         description: The index of the error item in the lists of pallet events
        docs:
          type: string
          example: " Information concerning any given event.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control."
        args:
          type: array
          items:
            type: string
      description: Metadata of an event item from a FRAME pallet.
    PalletsForeignAssets:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        items:
          type: array
          items:
            $ref: '#/components/schemas/PalletsForeignAssetsInfo'
          description: Array containing the `AssetDetails` and `AssetMetadata` of every foreign asset.
    PalletsForeignAssetsInfo:
      type: object
      properties:
        foreignAssetInfo:
          $ref: '#/components/schemas/AssetInfo'
        foreignAssetMetadata:
          $ref: '#/components/schemas/AssetMetadata'
    PalletsNominationPool:
      type: object
      properties:
        bondedPool:
          $ref: '#/components/schemas/BondedPool'
        rewardPool:
          $ref: '#/components/schemas/RewardPool'
    PalletsNominationPoolsInfo:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        counterForBondedPools: 
            type: number
        counterForMetadata:
            type: number
        counterForPoolMembers:
            type: number
        counterForReversePoolIdLookup:
            type: number
        counterForRewardPools:
            type: number
        counterForSubPoolsStorage:
            type: number
        lastPoolId:
            type: number
        maxPoolMembers:
            type: number
        maxPoolMembersPerPool:
            type: number
            nullable: true
        maxPools:
            type: number
        minCreateBond:
            type: number
        minJoinBond:
            type: number
    PalletsPoolAssetsInfo:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        poolAssetInfo:
          $ref: '#/components/schemas/AssetInfo'
        poolAssetMetadata:
          $ref: '#/components/schemas/AssetMetadata'
    PalletStorage:
      type: object
      properties:
        pallet:
          type: string
          description: Name of the pallet.
          example: "democracy"
        palletIndex:
          type: string
          description: Index of the pallet for looking up storage.
          example: "15"
        items:
          type: array
          items:
            $ref: '#/components/schemas/PalletStorageItemMetadata'
          description: Array containing metadata for each storage entry of the pallet.
    PalletStorageItem:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        pallet:
          type: string
          description: Name of the pallet.
          example: "democracy"
        palletIndex:
          type: string
          description: Index of the pallet for looking up storage.
          example: "15"
        storageItem:
          type: string
          description: Name of the storage item.
          example: "referendumInfoOf"
        keys:
          type: array
          items:
            type: string
          description: N Storage keys passed in as the `keys` query param. 
          example: ["0x00", "0x01"]
        value:
          type: object
          description: Value returned by this storage query.
          example:
            Ongoing:
              end: "1612800"
              proposalHash: "0x7de70fc8be782076d0b5772be77153d172a5381c72dd56d3385e25f62abf507e"
              threshold: "Supermajorityapproval"
              delay: "403200"
              tally:
                ayes: "41925212461400000"
                nays: "214535586500000"
                turnout: "34485320658000000"
        metadata:
          $ref: '#/components/schemas/PalletStorageItemMetadata'
    PalletStorageItemMetadata:
      type: object
      properties:
        name:
          type: string
          example: "ReferendumInfoOf"
          description: The storage item's name (which is the same as the storage item's ID).
        modifier:
          type: string
          example: "Optional"
        type:
          $ref: '#/components/schemas/PalletStorageType'
        fallback:
          type: string
          example: "0x00"
        docs:
          type: string
          example: " Information concerning any given referendum.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control."
      description: Metadata of a storage item from a FRAME pallet.
    PalletStorageType:
      type: object
      description: This is going to be formatted to the type of StorageEntryTypeV14.
    Para:
      type: object
      properties:
        paraId:
          type: string
          format: unsignedInteger
        paraLifecycle:
          $ref: '#/components/schemas/ParaLifecycle'
        onboardingAs:
          $ref: '#/components/schemas/OnboardingAs'
    Paras:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        paras:
          type: array
          items:
            $ref: '#/components/schemas/Para'
    ParasAuctionsCurrent:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        beginEnd:
          type: string
          format: unisgnedInteger or $null
          description: |
            Fist block (number) of the auction ending phase. `null` if there is no ongoing
            auction.
        finishEnd:
          type: string
          format: unisgnedInteger or $null
          description: |
            Last block (number) of the auction ending phase. `null` if there is no ongoing
            auction.
        phase:
          type: string
          enum:
          - startPeriod
          - endPeriod
          - vrfDelay
          description: |
            An auction can be in one of 4 phases. Both `startingPeriod` () and `endingPeriod` indicate
            an ongoing auction, while `vrfDelay` lines up with the `AuctionStatus::VrfDelay` . Finally, a value of `null`
            indicates there is no ongoing auction. Keep in mind the that the `finishEnd` field is the block number the
            `endingPeriod` finishes and the `vrfDelay` period begins. The `vrfDelay` period is typically about an
            epoch long and no crowdloan contributions are accepted.
        auctionIndex:
          type: string
          format: unsignedInteger
          description: |
            The auction number. If there is no current auction this will be the number
            of the previous auction.
        leasePeriods:
          type: array
          items:
            type: string
            format: unsignedInteger
          description: |
            Lease period indexes that may be bid on in this auction. `null` if
            there is no ongoing auction.
        winning:
          type: array
          items:
            $ref: '#/components/schemas/WinningData'
    ParasCrowdloans:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        funds:
          type: array
          items:
            type: object
            properties:
              paraId:
                type: string
                format: unsignedInteger
              fundInfo:
                $ref: '#/components/schemas/FundInfo'
          description: |
            List of paras that have crowdloans.
    ParasCrowdloanInfo:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        fundInfo:
          $ref: '#/components/schemas/FundInfo'
        leasePeriods:
          type: array
          items:
            type: string
            format: unsignedInteger
          description: Lease periods the crowdloan can bid on.
    ParasHeaders:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        paraId:
          type: object
          description: |
            The key is not named `paraId` and will be the number of the parachain. There is technically no limit to the number of paraId keys there can be. 
          properties:
            hash:
              type: string
              description: The block's hash.
              format: hex
            number:
              type: string
              description: The block's height.
              format: unsignedInteger
            parentHash:
              type: string
              description: The hash of the parent block.
              format: hex
            stateRoot:
              type: string
              description: The state root after executing this block.
              format: hex
            extrinsicsRoot:
              type: string
              description: The Merkle root of the extrinsics.
              format: hex
            digest:
              type: object
              properties:
                logs:
                  type: array
                  items:
                    $ref: '#/components/schemas/DigestItem'
                  description: Array of `DigestItem`s associated with the block.
    ParasLeasesCurrent:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        leasePeriodIndex:
          type: string
          format: unsignedInteger
          description: Current lease period index. This value may be null when the current block now,
            substracted by the leaseOffset is less then zero.
        endOfLeasePeriod:
          type: string
          format: unsignedInteger
          description: Last block (number) of the current lease period. This value may be null when
            `leasePeriodIndex` is null.
        currentLeaseHolders:
          type: array
          items:
            type: string
            format: unsignedInteger
          description: List of `paraId`s that currently hold a lease.
    ParasLeaseInfo:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        paraLifecycle:
          $ref: '#/components/schemas/ParaLifecycle'
        onboardingAs:
          $ref: '#/components/schemas/OnboardingAs'
        leases:
          type: array
          items:
            type: object
            properties:
              leasePeriodIndex:
                type: string
                format: unsignedInteger
              account:
                type: string
              deposit:
                type: string
                format: unsignedInteger
          description: |
            List of lease periods for which the `paraId` holds a lease along with
            the deposit held and the associated `accountId`.
    ParaLifecycle:
      type: string
      enum:
      - onboarding
      - parathread
      - parachain
      - upgradingParathread
      - downgradingParachain
      - offboardingParathread
      - offboardingParachain
      description: |
        The possible states of a para, to take into account delayed lifecycle
        changes.
    Payouts:
      type: array
      items:
        type: object
        properties:
          validatorId:
            type: string
            description: AccountId of the validator the payout is coming from.
          nominatorStakingPayout:
            type: string
            format: unsignedInteger
            description: Payout for the reward destination associated with the
              accountId the query was made for.
          claimed:
            type: boolean
            description: Whether or not the reward has been claimed.
          totalValidatorRewardPoints:
            type: string
            format: unsignedInteger
            description: Number of reward points earned by the validator.
          validatorCommission:
            type: string
            format: unsignedInteger
            description: The percentage of the total payout that the validator takes as commission,
              expressed as a Perbill.
          totalValidatorExposure:
            type: string
            format: unsignedInteger
            description: The sum of the validator's and its nominators' stake.
          nominatorExposure:
            type: string
            format: unsignedInteger
            description: The amount of stake the nominator has behind the validator.
        description: Payout for a nominating _Stash_ address and
          information about the validator they were nominating.
    PeerInfo:
      type: object
      properties:
        peerId:
          type: string
          description: Peer ID.
        roles:
          type: string
          description: Roles the peer is running
        protocolVersion:
          type: string
          description: Peer's protocol version.
          format: unsignedInteger
        bestHash:
          type: string
          description: Hash of the best block on the peer's canon chain.
          format: hex
        bestNumber:
          type: string
          description: Height of the best block on the peer's canon chain.
          format: unsignedInteger
    RewardPool:
      type: object
      properties:
        lastRecordedRewardCounter: 
          type: number
        lastRecordedTotalPayouts:
          type: number
        totalRewardsClaimed:
          type: number
    RuntimeCode:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        code:
          type: string
          format: hex
    RuntimeDispatchInfo:
      type: object
      properties:
        weight:
          $ref: '#/components/schemas/WeightsV2'
          description: Weights represented as WeightsV2 (two dimensional weights). When querying historical blocks that use WeightsV1, the weight will be returned as a weight key that points to a number represented as a string.
        class:
          type: string
          description: Extrinsic class.
          enum:
          - Normal
          - Operational
          - Mandatory
        partialFee:
          type: string
          description: The _inclusion fee_ of a transaction, i.e. the minimum fee required for a transaction. Includes weight and encoded length fees, but does not have access to any signed extensions, e.g. the `tip`.
          format: unsignedInteger
        kind:
          type: string
          description: Information on the partialFee that is collected. Can be either `preDispatch`, `postDispatch` or `fromEvent`.
            `preDispatch` means the information used to collect the fee was from `payment_queryInfo`, `postDispatch` means
            the information used to calculate the fee was from finalized weights for the extrinsic, and `fromEvent` means that the partialFee was
            abstracted from the `TransactionPayment::TransactionPaidFee` event. 
      description: RuntimeDispatchInfo for the transaction. Includes the `partialFee`.
    RuntimeSpec:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        authoringVersion:
          type: string
          description: The version of the authorship interface. An authoring node
            will not attempt to author blocks unless this is equal to its native runtime.
        chainType:
          $ref: '#/components/schemas/ChainType'
        implVersion:
          type: string
          description: Version of the implementation specification. Non-consensus-breaking
            optimizations are about the only changes that could be made which would
            result in only the `impl_version` changing. The `impl_version` is set to 0
            when `spec_version` is incremented.
        specName:
          type: string
          description: Identifies the different Substrate runtimes.
        specVersion:
          type: string
          description: Version of the runtime specification.
        transactionVersion:
          type: string
          description: All existing dispatches are fully compatible when this number
            doesn't change. This number must change when an existing dispatchable
            (module ID, dispatch ID) is changed, either through an alteration in its
            user-level semantics, a parameter added/removed/changed, a dispatchable
            being removed, a module being removed, or a dispatchable/module changing
            its index.
        properties:
          type: object
          description: Arbitrary properties defined in the chain spec.
      description: Version information related to the runtime.
    SanitizedEvent:
      type: object
      properties:
        method:
          type: string
        data:
          type: array
          items:
            type: string
    Signature:
      type: object
      properties:
        signature:
          type: string
          format: hex
        signer:
          type: string
          format: ss58
      description: Object with `signature` and `signer`, or `null` if unsigned.
    SpanId:
      type: object
      properties:
        name:
          type: string
        target:
          type: string
        id:
          type: string
          format: unsignedInteger
    StakingLedger:
      type: object
      properties:
        stash:
          type: string
          description: The _Stash_ account whose balance is actually locked and at stake.
          format: ss58
        total:
          type: string
          description: The total amount of the _Stash_'s balance that we are currently accounting
            for. Simply `active + unlocking`.
          format: unsignedInteger
        active:
          type: string
          description: The total amount of the _Stash_'s balance that will be at stake
            in any forthcoming eras.
          format: unsignedInteger
        unlocking:
          type: string
          description: Any balance that is becoming free, which may eventually be
            transferred out of the _Stash_ (assuming it doesn't get slashed first).
            Represented as an array of objects, each with an `era` at which `value`
            will be unlocked.
          format: unsignedInteger
        claimedRewards:
          type: array
          description: Array of eras for which the stakers behind a validator have
            claimed rewards. Only updated for _validators._
          items:
            type: string
            format: unsignedInteger
      description: The staking ledger.
    StakingProgress:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        activeEra:
          type: string
          description: |
            `EraIndex` of the era being rewarded.
          format: unsignedInteger
        forceEra:
          type: string
          description: Current status of era forcing.
          enum:
          - ForceNone
          - NotForcing
          - ForceAlways
          - ForceNew
        nextActiveEraEstimate:
          type: string
          description: Upper bound estimate of the block height at which the next
            active era will start. Not included in response when `forceEra.isForceNone`.
          format: unsignedInteger
        nextSessionEstimate:
          type: string
          description: Upper bound estimate of the block height at which the next
            session will start.
          format: unsignedInteger
        unappliedSlashes:
          type: array
          items:
            $ref: '#/components/schemas/UnappliedSlash'
          description: Array of upcoming `UnappliedSlash` indexed by era.
        electionStatus:
          $ref: '#/components/schemas/ElectionStatus'
        idealValidatorCount:
          type: string
          description: Upper bound of validator set size; considered the ideal size.
            Not included in response when `forceEra.isForceNone`.
          format: unsignedInteger
        validatorSet:
          type: array
          description: Stash account IDs of the validators for the current session.
            Not included in response when `forceEra.isForceNone`.
          items:
            type: string
            format: ss58
    StakingValidators:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        validators:
          type: array
          items:
            type: object
            properties:
              address:
                type: string
                description: Address of validator.
              status:
                type: string
                description: Status of individual validator (active/waiting).
        validatorsToBeChilled:
          description: Validators that will not be participating in the next era.
          type: array
          items:
            type: object
            properties:
              address:
                type: string
                description: Address of validator.
              status:
                type: string
                description: Status of individual validator (active/waiting).
    StorageEntryTypeV13:
      type: object
      properties:
        hasher:
          type: string
          description: Returns a string deonting the storage hasher.
        key:
          type: string
          description: Key of the queried pallet storageId.
        value:
          type: string
          description: Value of the queried pallet storageId.
        linked:
          type: boolean
    StorageEntryTypeV14:
      type: object
      properties:
        hasher:
          type: array
          items:
            type: string
          description: Returns a string denoting the storage
            hasher inside of an array.
        key:
          type: string
          description: The SiLookupTypeId to identify the type.
        value:
          type: string
          description: The SiLookupTypeId to identify the type.
    TraceEvent:
      type: object
      properties:
        data:
          type: object
          properties:
              stringValues:
                $ref: '#/components/schemas/TraceEventDataStringValues'
        parentId:
          type: string
          format: unsignedInteger
        target:
          type: string
    TraceEventDataStringValues:
      type: object
      properties:
        key:
          type: string
          format: hex
          description: The complete storage key for the entry.
        method:
          type: string
          description: Normally one of Put or Get.
        result:
          type: string
          format: hex
          description: Hex scale encoded storage value.
      description: Note these exact values will only be present for storage events.
    TraceSpan:
      type: object
      properties:
        id:
          type: string
          format: unsignedInteger
        name:
          type: string
        parentId:
          type: string
          format: unsignedInteger
        target:
            type: string
        wasm:
          type: boolean
    Transaction:
      type: object
      properties:
        tx:
          type: string
          format: hex
    TransactionDryRun:
      type: object
      properties:
        resultType:
          type: string
          enum:
          - DispatchOutcome
          - TransactionValidityError
          description: Either `DispatchOutcome` if the transaction is valid or `TransactionValidityError` if the result is invalid.
        result:
          type: string
          enum:
          - Ok
          - CannotLookup
          - NoUnsignedValidator
          - Custom(u8)
          - Call
          - Payment
          - Future
          - Stale
          - BadProof
          - AncientBirthBlock
          - ExhaustsResources
          - BadMandatory
          - MandatoryDispatch
          description: 'If there was an error it will be the cause of the error. If the
            transaction executed correctly it will be `Ok: []`'
        validityErrorType:
          type: string
          enum:
          - InvalidTransaction
          - UnknownTransaction
      description: >-
        References:
        - `UnknownTransaction`: https://crates.parity.io/sp_runtime/transaction_validity/enum.UnknownTransaction.html
        - `InvalidTransaction`: https://crates.parity.io/sp_runtime/transaction_validity/enum.InvalidTransaction.html
    TransactionFailedToParse:
      type: object
      properties:
        code:
          type: number
        error:
          type: string
          description: >-
            `Failed to parse a tx.`
        transaction:
          type: string
          format: hex
        cause:
          type: string
        stack:
          type: string
      description: Error message when Sidecar fails to parse the transaction.
    TransactionFailedToSubmit:
      type: object
      properties:
        code:
          type: number
        error:
          type: string
          description: Failed to submit transaction.
        transaction:
          type: string
          format: hex
        cause:
          type: string
        stack:
          type: string
      description: >-
        Error message when the node rejects the submitted transaction.
    TransactionFailure:
      oneOf:
        - $ref: '#/components/schemas/TransactionFailedToSubmit'
        - $ref: '#/components/schemas/TransactionFailedToParse'
    TransactionFeeEstimate:
      type: object
      properties:
        weight:
          $ref: '#/components/schemas/WeightsV2'
          description: Weights represented as WeightsV2 (two dimensional weights). When querying historical blocks that use WeightsV1, the weight will be returned as a weight key that points to a number represented as a string.
        class:
          type: string
          description: Extrinsic class.
          enum:
          - Normal
          - Operational
          - Mandatory
        partialFee:
          type: string
          description: Expected inclusion fee for the transaction. Note that the fee
            rate changes up to 30% in a 24 hour period and this will not be the exact
            fee.
          format: unsignedInteger
      description: >-
        Note: `partialFee` does not include any tips that you may add to increase a transaction's
        priority. See [compute_fee](https://crates.parity.io/pallet_transaction_payment/struct.Module.html#method.compute_fee).
    TransactionFeeEstimateFailure:
      type: object
      properties:
        code:
          type: number
        at:
            type: object
            properties:
              hash:
                type: string
        error:
          type: string
          description:  Error description.
        transaction:
          type: string
          format: hex
        block:
          type: string
          description: Block hash of the block fee estimation was attempted at.
        cause:
          type: string
          description: Error message from the client.
        stack:
          type: string
    TransactionMaterial:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        genesisHash:
          type: string
          description: The hash of the chain's genesis block.
          format: blockHash
        chainName:
          type: string
          description: The chain's name.
        specName:
          type: string
          description: The chain's spec.
        specVersion:
          type: string
          description: The spec version. Always increased in a runtime upgrade.
        txVersion:
          type: string
          description: The transaction version. Common `txVersion` numbers indicate
            that the transaction encoding format and method indices are the same.
            Needed for decoding in an offline environment. Adding new transactions
            does not change `txVersion`.
        metadata:
          type: string
          description: The chain's metadata. It will only be present when the metadata query param is used.
      description: >-
        Note: `chainName`, `specName`, and `specVersion` are used to define a type registry with a set
        of signed extensions and types. For Polkadot and Kusama, `chainName` is not used in defining
        this registry, but in other Substrate-based chains that re-launch their network without
        changing the `specName`, the `chainName` would be needed to create the correct registry.
        Substrate Reference:
        - `RuntimeVersion`: https://crates.parity.io/sp_version/struct.RuntimeVersion.html
        - `SignedExtension`: https://crates.parity.io/sp_runtime/traits/trait.SignedExtension.html
        -  FRAME Support: https://crates.parity.io/frame_support/metadata/index.html
    TransactionPool:
      type: object
      properties:
        pool:
          type: array
          items:
            type: object
            properties:
                hash:
                  type: string
                  format: hex
                  description: H256 hash of the extrinsic.
                encodedExtrinsic:
                  type: string
                  format: hex
                  description: Scale encoded extrinsic.
                tip:
                  type: string
                  format: unsignedInteger
                  description: The tip included in the extrinsic. Only included if the query param `includeFee` is set to true.
                priority:
                  type: string
                  format: unsignedInteger
                  description: Computed priority of an extrinsic. Only included if the query param `includeFee` is set to true.
                partialFee:
                  type: string
                  format: unsignedInteger
                  description: Provided `partialFee` of an extrinsic. Only included if the query param `includeFee` is set to true.
    TransactionSuccess:
      type: object
      properties:
        hash:
          type: string
          description: The hash of the encoded transaction.
    UnappliedSlash:
      type: object
      properties:
        validator:
          type: string
          description: Stash account ID of the offending validator.
          format: ss58
        own:
          type: string
          description: The amount the validator will be slashed.
          format: unsignedInteger
        others:
          type: array
          description: Array of tuples(`[accountId, amount]`) representing all the
            stashes of other slashed stakers and the amount they will be slashed.
          items:
            type: string
            format: tuple[ss58, unsignedInteger]
        reporters:
          type: array
          description: Array of account IDs of the reporters of the offense.
          items:
            type: string
            format: ss58
        payout:
          type: string
          description: Amount of bounty payout to reporters.
          format: unsignedInteger
    VestingSchedule:
      type: object
      properties:
        locked:
          type: string
          description: Number of tokens locked at start.
          format: unsignedInteger
        perBlock:
          type: string
          description: Number of tokens that gets unlocked every block after `startingBlock`.
          format: unsignedInteger
        startingBlock:
          type: string
          description: Starting block for unlocking (vesting).
          format: unsignedInteger
      description: Vesting schedule for an account.
    WeightsV2:
      type: object
      properties:
        refTime:
          type: string
          description: The weight of computational time used based on some reference hardware.
        proofSize:
          type: string
          description: The weight of storage space used by proof of validity.
    WinningData:
      type: object
      properties:
        bid:
          type: object
          properties:
            accountId:
              type: string
            paraId:
              type: string
              format: unsignedInteger
            amount:
              type: string
              format: unsignedInteger
        leaseSet:
          type: array
          items:
            type: string
            format: unsignedInteger
      description: |
        A currently winning bid and the set of lease periods the bid is for. The
        `amount` of the bid is per lease period. The `bid` property will be `null`
        if no bid has been made for the corresponding `leaseSet`.
  requestBodies:
    Transaction:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Transaction'
      required: true
    ContractMetadata:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ContractMetadata'

