Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RpcClient

Tendermint JSON RPC Client

since

v0.17

Hierarchy

  • RpcClient

Index

Constructors

constructor

  • new RpcClient(config: AxiosRequestConfig): RpcClient
  • Initialize Tendermint JSON RPC Client

    since

    v0.17

    Parameters

    • config: AxiosRequestConfig

      The other configurations, refer to { [[AxiosRequestConfig]] }

    Returns RpcClient

Methods

abciQuery

  • abciQuery<T>(path: string, data?: undefined | object, height?: undefined | number): Promise<T>
  • Tendermint ABCI Query

    since

    v0.17

    Type parameters

    • T

    Parameters

    • path: string

      Querier path

    • Optional data: undefined | object

      Input params

    • Optional height: undefined | number

      Use a specific height to query state at (this can error if the node is pruning state)

    Returns Promise<T>

protoQuery

  • protoQuery(path: string, protoRequest?: any, protoResponse?: any): Promise<any>
  • Tendermint ABCI protobuf Query

    since

    v0.17

    Parameters

    • path: string

      Querier path

    • Optional protoRequest: any

      protobuf Request

    • Optional protoResponse: any

      protobuf Response so if "protoResponse" exists, well deserialize "ABCI Response" with "protoResponse" and return json object, else return base64 string

    Returns Promise<any>

queryStore

  • queryStore<T>(key: Uint8Array, storeName: string, height?: undefined | number): Promise<T>
  • since

    v0.17

    Type parameters

    • T

    Parameters

    • key: Uint8Array

      The store key

    • storeName: string

      The store name

    • Optional height: undefined | number

      Block height to query, omit to get most recent provable block

    Returns Promise<T>

request

  • request<T>(method: string, params?: object): Promise<T>
  • Post Tendermint JSON RPC Request

    since

    v0.17

    Type parameters

    • T

    Parameters

    • method: string

      Tendermint RPC method

    • Default value params: object = {}

      Request params

    Returns Promise<T>

Generated using TypeDoc