Kusama rc runtime API

The rc runtime API from Kusama — 5 operation(s) for rc runtime.

OpenAPI Specification

kusama-rc-runtime-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Substrate API Sidecar accounts rc runtime API
  description: '> ⚠️ **Deprecation Notice** — `substrate-api-sidecar` is deprecated in favor of

    > [`polkadot-rest-api`](https://github.com/paritytech/polkadot-rest-api), a ground-up Rust rewrite

    > built on [`subxt`](https://github.com/paritytech/subxt) with 1:1 API compatibility (endpoints

    > served under `/v1/`, e.g. `/v1/blocks/head`), stable memory under sustained load, significantly

    > lower latency and higher throughput, and native SCALE decoding via `parity-scale-codec`.

    >

    > **Migrate today:** Docker `paritytech/polkadot-rest-api:v0.1.0` ·

    > [crate](https://crates.io/crates/polkadot-rest-api) ·

    > [migration guide](https://github.com/paritytech/polkadot-rest-api/blob/main/docs/guides/MIGRATION.md) ·

    > [docs](https://paritytech.github.io/polkadot-rest-api/) ·

    > [issues](https://github.com/paritytech/polkadot-rest-api/issues)


    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: 20.14.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
- url: http://localhost:8080
  description: Localhost
tags:
- name: rc runtime
paths:
  /rc/runtime/spec:
    get:
      tags:
      - rc runtime
      summary: Get version information of the relay chain Substrate runtime.
      description: Returns version information related to the relay chain runtime. This endpoint is specifically for Asset Hub and queries the relay chain (Polkadot/Kusama) for runtime specification.
      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'
  /rc/runtime/metadata:
    get:
      tags:
      - rc runtime
      summary: Get the relay chain's metadata.
      description: Returns the relay chain's runtime metadata in decoded JSON format. This endpoint is specifically for Asset Hub and queries the relay chain (Polkadot/Kusama) for metadata.
      parameters:
      - name: at
        in: query
        description: Block hash or height at which to query. If not provided, queries finalized head.
        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/RuntimeMetadata'
  /rc/runtime/metadata/versions:
    get:
      tags:
      - rc runtime
      summary: Get the available versions of relay chain's metadata.
      description: Returns the available versions of the relay chain's metadata. This endpoint is specifically for Asset Hub and queries the relay chain (Polkadot/Kusama) for metadata versions.
      parameters:
      - name: at
        in: query
        description: Block hash or height at which to query. If not provided, queries finalized head.
        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: array
                items:
                  type: string
  /rc/runtime/metadata/{metadataVersion}:
    get:
      tags:
      - rc runtime
      summary: Get the relay chain's metadata at a specific version.
      description: Returns the relay chain's runtime metadata at a specific version in decoded JSON format. This endpoint is specifically for Asset Hub and queries the relay chain (Polkadot/Kusama) for versioned metadata.
      parameters:
      - name: metadataVersion
        in: path
        description: The specific version of the Metadata to query. The input must conform to the 'vX' format, where 'X' represents the version number (examples 'v14', 'v15').
        required: true
        schema:
          type: string
          pattern: ^v[0-9]+$
      - name: at
        in: query
        description: Block hash or height at which to query. If not provided, queries finalized head.
        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/RuntimeMetadata'
        '400':
          description: Invalid version format or version not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /rc/runtime/code:
    get:
      tags:
      - rc runtime
      summary: Get the Wasm code blob of the relay chain Substrate runtime.
      description: Returns the relay chain's runtime code in Wasm format. This endpoint is specifically for Asset Hub and queries the relay chain (Polkadot/Kusama) for runtime code.
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve runtime code 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/RuntimeCode'
components:
  schemas:
    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.
    RuntimeMetadata:
      type: object
      description: 'Substrate runtime metadata containing pallet information, types registry, and API specifications.

        The structure varies significantly between different runtime versions (V9-V16) and different chains.

        This is a generic container that preserves the actual metadata structure as returned by the runtime.

        '
      properties:
        magicNumber:
          type: string
          description: The magic number identifying this as Substrate metadata (typically "1635018093")
          example: '1635018093'
        metadata:
          type: object
          description: 'Version-specific metadata content. The structure depends entirely on the runtime metadata version

            and can include various combinations of pallets, lookup registries, extrinsics, APIs, and other

            runtime-specific information.

            '
      required:
      - magicNumber
      - metadata
    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}'
    BlockIdentifiers:
      type: object
      properties:
        hash:
          type: string
          description: The block's hash.
          format: hex
        height:
          type: string
          description: The block's height.
          format: unsignedInteger
    Error:
      type: object
      properties:
        code:
          type: number
        message:
          type: string
        stack:
          type: string
        level:
          type: string
    RuntimeCode:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        code:
          type: string
          format: hex