Polkadot rc node API

The rc node API from Polkadot — 3 operation(s) for rc node.

OpenAPI Specification

polkadot-rc-node-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Polkadot REST Account rc node API
  description: High-performance Rust REST API for Substrate/Polkadot blockchain data. Drop-in replacement for substrate-api-sidecar.
  contact:
    url: https://github.com/paritytech/polkadot-rest-api
  license:
    name: GPL-3.0-or-later
  version: 0.1.3
servers:
- url: http://localhost:8080/v1
  description: Localhost
tags:
- name: rc node
paths:
  /rc/node/network:
    get:
      tags:
      - rc node
      summary: Get relay chain node network information from Asset Hub.
      description: Returns network related information of the relay chain node. This endpoint is specifically for Asset Hub instances to query relay chain node networking details.
      operationId: getRcNodeNetworking
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeNetwork'
  /rc/node/transaction-pool:
    get:
      tags:
      - rc node
      summary: Get relay chain pending extrinsics from Asset Hub.
      description: Returns pending extrinsics from the relay chain transaction pool. This endpoint is specifically for Asset Hub instances to query relay chain pending transactions.
      operationId: getRcNodeTransactionPool
      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'
  /rc/node/version:
    get:
      tags:
      - rc node
      summary: Get relay chain node version information from Asset Hub.
      description: Returns versioning information of the relay chain node. This endpoint is specifically for Asset Hub instances to query relay chain node version details.
      operationId: getRcNodeVersion
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeVersion'
components:
  schemas:
    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.
    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.
    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
    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