Skip to content
openapi-v1.yaml 112 KiB
Newer Older
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        blockHash:
        events:
          type: array
          items:
            $ref: '#/components/schemas/TraceEvent'
        parentHash:
            $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:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        operations:
            $ref: '#/components/schemas/Operation'
    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
David's avatar
David committed
      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.
David's avatar
David committed
        live:
          type: string
          nullable: true
          default: null
        development:
          type: string
          nullable: true
          default: null
David's avatar
David committed
        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
    ContractMetata:
      type: object
      description: Metadata used to instantiate a ContractPromise. This metadata can be generated
        by compiling the contract you are querying.
          format: unsignedInteger
        value:
          type: array
          items:
            type: string
    ElectionStatus:
        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:
          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
    ExtrinsicMethod:
      type: object
      properties:
        pallet:
          type: string
          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.
        verifier:
          type: string
        deposit:
          type: string
          format: unsignedInteger
          format: unsignedInteger
        end:
          format: unsignedInteger
        cap:
          format: unsignedInteger
        lastConstribution:
          enum:
          - preEnding
          - ending
        firstPeriod:
          type: string
          format: unsignedInteger
          format: unsignedInteger
        trieIndex:
          type: string
          format: unsignedInteger
    GenericExtrinsicEra:
      type: object
      description: |
David's avatar
David committed
        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.
David's avatar
David committed
        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:
David's avatar
David committed
        mortalEra:
David's avatar
David committed
          items:
            type: string
David's avatar
David committed
          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\"]}"
    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:
          description: Node's binary version.
        clientImplName:
          description: Node's implementation name.
        chain:
          description: Node's chain name.
      description: Version information of the node.
    Nominations:
          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:
        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: string
          format: unsignedInteger
        currency:
          $ref: '#/components/schemas/OperationAmountCurrency'
    OperationAmountCurrency:
      type: object
      properties:
        symbol:
          type: string
          example: KSM
    OperationPhase:
      type: object
      properties:
        variant:
          - 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'
David's avatar
David committed
        assetMetadata:
          $ref: '#/components/schemas/AssetMetadata'
    PalletsNominationPool:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        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
    PalletStorage:
      type: object
      properties:
        pallet:
          description: Name of the pallet.
          example: "democracy"
        palletIndex:
          type: string
          description: Index of the pallet for looking up storage.
          example: "15"
        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:
          example: "ReferendumInfoOf"
          description: The storage item's name (which is the same as the storage item's ID).
        modifier:
          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
David's avatar
David committed
      description: If the query parameter 'adjustMetadataV13' is set to true, all historic blocks that are
        pre v9110 will have the return type `StorageEntryTypeV13`, and all present and post v9110 blocks will
Tarik Gul's avatar
Tarik Gul committed
        have a return type of `StorageEntryTypeV14`. Please check those types to see potential responses. This
        will be deprecated and removed in the future, and will only live as `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:
          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`
David's avatar
David committed
            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
David's avatar
David committed
          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
David's avatar
David committed
          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:
          description: Peer ID.
        roles:
          description: Roles the peer is running
        protocolVersion:
          description: Peer's protocol version.
          format: unsignedInteger
          description: Hash of the best block on the peer's canon chain.
          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:
    RuntimeDispatchInfo:
          $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.
          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
          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:
          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: string
    Signature:
      type: object
      properties:
        signature:
          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
          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:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        activeEra:
          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
    StorageEntryTypeV13:
      type: object
David's avatar
David committed
      properties:
        hasher:
          type: string
David's avatar
David committed
          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
David's avatar
David committed
      properties:
        hasher:
          type: array
          items:
            type: string
          description: Returns a string denoting the storage
David's avatar
David committed
            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.
        data:
          type: object
          properties:
              stringValues:
                $ref: '#/components/schemas/TraceEventDataStringValues'
        parentId:
          format: unsignedInteger
        target:
          type: string
    TraceEventDataStringValues:
      type: object
      properties:
        key:
          type: string