Options
All
  • Public
  • Public/Protected
  • All
Menu

@iov/tendermint-rpc Documentation

Index

Enumerations

Classes

Interfaces

Type aliases

Functions

Object literals

Type aliases

Base64String

Base64String: string & As<"base64">

BlockHash

BlockHash: Uint8Array & As<"block-hash">

Merkle root

DateTimeString

DateTimeString: string & As<"datetime">

Decoder

Decoder<T>: function

Type parameters

  • T: responses.Response

Type declaration

    • (res: JsonRpcSuccessResponse): T
    • Parameters

      • res: JsonRpcSuccessResponse

      Returns T

Encoder

Encoder<T>: function

Type parameters

  • T: requests.Request

Type declaration

    • (req: T): JsonRpcRequest
    • Parameters

      • req: T

      Returns JsonRpcRequest

HealthResponse

HealthResponse: null

HexString

HexString: string & As<"hex">

IntegerString

IntegerString: string & As<"integer">

IpPortString

IpPortString: string & As<"ipport">

QueryString

QueryString: string & As<"query">

Request

Response

TxBytes

TxBytes: Uint8Array & As<"tx-bytes">

Raw transaction bytes

TxHash

TxHash: Uint8Array & As<"tx-hash">

A raw tendermint transaction hash, currently 20 bytes

ValidatorPubkey

ValidatorPubkey: ValidatorEd25519Pubkey

Union type for different possible pubkeys. Currently only Ed25519 supported.

ValidatorSignature

ValidatorSignature: ValidatorEd25519Signature

Union type for different possible voting signatures. Currently only Ed25519 supported.

Functions

adaptorForVersion

  • adaptorForVersion(version: string): Adaptor
  • Returns an Adaptor implementation for a given tendermint version. Throws when version is not supported.

    Parameters

    • version: string

      full Tendermint version string, e.g. "0.20.1"

    Returns Adaptor

assertArray

  • assertArray<T>(value: keyof T[]): keyof T[]
  • A runtime checker that ensures a given value is an array

    This is used when you want to verify that data at runtime matches the expected type. This implies assertSet.

    Type parameters

    • T

    Parameters

    • value: keyof T[]

    Returns keyof T[]

assertBoolean

  • assertBoolean(value: boolean): boolean
  • A runtime checker that ensures a given value is a boolean

    This is used when you want to verify that data at runtime matches the expected type. This implies assertSet.

    Parameters

    • value: boolean

    Returns boolean

assertNotEmpty

  • assertNotEmpty<T>(value: T): T
  • Throws an error if value matches the empty value for the given type (array/string of length 0, number of value 0, ...)

    Otherwise returns the value.

    This implies assertSet

    Type parameters

    • T

    Parameters

    • value: T

    Returns T

assertNumber

  • assertNumber(value: number): number
  • A runtime checker that ensures a given value is a number

    This is used when you want to verify that data at runtime matches the expected type. This implies assertSet.

    Parameters

    • value: number

    Returns number

assertObject

  • assertObject<T>(value: T): T
  • A runtime checker that ensures a given value is an object in the sense of JSON (an unordered collection of key–value pairs where the keys are strings)

    This is used when you want to verify that data at runtime matches the expected type. This implies assertSet.

    Type parameters

    • T

    Parameters

    • value: T

    Returns T

assertSet

  • assertSet<T>(value: T): T
  • A runtime checker that ensures a given value is set (i.e. not undefined or null)

    This is used when you want to verify that data at runtime matches the expected type.

    Type parameters

    • T

    Parameters

    • value: T

    Returns T

broadcastTxCommitSuccess

broadcastTxSyncSuccess

buildQuery

createJsonRpcRequest

  • createJsonRpcRequest(method: string, params?: undefined | __type): JsonRpcRequest
  • Creates a JSON-RPC request with random ID

    Parameters

    • method: string
    • Optional params: undefined | __type

    Returns JsonRpcRequest

dictionaryToStringMap

  • dictionaryToStringMap(obj: any): Map<string, string>

encodeBlockId

  • encodeBlockId(blockId: BlockId): Uint8Array

encodeBytes

  • encodeBytes(bytes: Uint8Array): Uint8Array

encodeInt

  • encodeInt(n: number): Uint8Array

encodeString

  • encodeString(s: string): Uint8Array

encodeTime

encodeVersion

  • encodeVersion(version: Version): Uint8Array

Const getBlockEventHeight

Const getHeaderEventHeight

Const getTxEventHeight

  • getTxEventHeight(event: TxEvent): number

hasProtocol

  • hasProtocol(url: string): boolean

hashBlock

hashTx

instanceOfRpcStreamingClient

  • instanceOfRpcStreamingClient(client: RpcClient): boolean

may

  • may<T, U>(transform: function, value: T | null | undefined): U | undefined
  • Type parameters

    • T

    • U

    Parameters

    • transform: function
        • (val: T): U
        • Parameters

          • val: T

          Returns U

    • value: T | null | undefined

    Returns U | undefined

optional

  • optional<T>(value: T | null | undefined, fallback: T): T
  • Type parameters

    • T

    Parameters

    • value: T | null | undefined
    • fallback: T

    Returns T

Object literals

Const v0_31

v0_31: object

hashBlock

hashBlock: hashBlock = hashBlock

hashTx

hashTx: hashTx = hashTx

params

params: Params = Params

responses

responses: Responses = Responses

Const v0_32

v0_32: object

hashBlock

hashBlock: hashBlock = hashBlock

hashTx

hashTx: hashTx = hashTx

params

params: Params = Params

responses

responses: Responses = Responses

Generated using TypeDoc