Skip to content
openapi-v1.yaml 119 KiB
Newer Older
          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
    StakingValidators:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        address:
          type: string
          description: Address of validator.
        status:
          type: string
          description: Status of individual validator (active/waiting).
    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
          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:
        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:
          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:
          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's default return value is hex, but may be returned in
David's avatar
David committed
            decoded json format.
          format: hex
      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: 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:
          description: The hash of the encoded transaction.
    UnappliedSlash:
      type: object
      properties:
        validator:
          description: Stash account ID of the offending validator.
          format: ss58
        own:
          type: string
          description: The amount the validator will be slashed.
        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:
          description: Amount of bounty payout to reporters.
          format: unsignedInteger
    VestingSchedule:
      type: object
      properties:
        locked:
          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:
          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:
            $ref: '#/components/schemas/ContractMetadata'