Options
All
  • Public
  • Public/Protected
  • All
Menu

@cosmjs/tendermint-rpc Documentation

Index

References

Re-exports Tendermint34Client

Type Aliases

Evidence: any

We lost track on how the evidence structure actually looks like. This is any now and passed to the caller untouched.

HealthResponse: null

Union type for different possible pubkeys.

Functions

  • fromRfc3339WithNanoseconds(dateTimeString: string): DateWithNanoseconds
  • Parameters

    • dateTimeString: string

    Returns DateWithNanoseconds

  • fromSeconds(seconds: number, nanos?: number): DateWithNanoseconds
  • Parameters

    • seconds: number
    • nanos: number = 0

    Returns DateWithNanoseconds

  • pubkeyToAddress(type: "ed25519" | "secp256k1", data: Uint8Array): string
  • Returns Tendermint address in uppercase hex format.

    This is for addresses that are derived by the Tendermint keypair (typically Ed25519). Sometimes those addresses are bech32-encoded and contain the term "cons" in the presix ("cosmosvalcons1...").

    For secp256k1 this assumes we already have a compressed pubkey, which is the default in Cosmos.

    Parameters

    • type: "ed25519" | "secp256k1"
    • data: Uint8Array

    Returns string

  • pubkeyToRawAddress(type: "ed25519" | "secp256k1", data: Uint8Array): Uint8Array
  • Returns Tendermint address as bytes.

    This is for addresses that are derived by the Tendermint keypair (typically Ed25519). Sometimes those addresses are bech32-encoded and contain the term "cons" in the presix ("cosmosvalcons1...").

    For secp256k1 this assumes we already have a compressed pubkey, which is the default in Cosmos.

    Parameters

    • type: "ed25519" | "secp256k1"
    • data: Uint8Array

    Returns Uint8Array

  • rawEd25519PubkeyToRawAddress(pubkeyData: Uint8Array): Uint8Array
  • Parameters

    • pubkeyData: Uint8Array

    Returns Uint8Array

  • rawSecp256k1PubkeyToRawAddress(pubkeyData: Uint8Array): Uint8Array
  • Parameters

    • pubkeyData: Uint8Array

    Returns Uint8Array

  • Calculates the UNIX timestamp in seconds as well as the nanoseconds after the given second.

    This is useful when dealing with external systems like the protobuf type .google.protobuf.Timestamp or any other system that does not use millisecond precision.

    Parameters

    Returns { nanos: number; seconds: number }

    • nanos: number
    • seconds: number

Generated using TypeDoc