Class Client

RPC Client

Can be used in both node.js and the browser. Also see ClientOptions.

Hierarchy

  • Client

Constructors

  • Parameters

    • address: string | string[]

      The address to the Hive RPC server, e.g. https://api.hive.blog. or [https://api.hive.blog, https://another.api.com]

    • options: ClientOptions = {}

      Client options.

    Returns Client

Properties

address: string | string[]

Address to Hive RPC server. String or String[] read-only

addressPrefix: string

Address prefix for current network.

backoff: ((tries: number) => number)

Type declaration

    • (tries: number): number
    • Default backoff function. min(tries*10^2, 10 seconds)

      Parameters

      • tries: number

      Returns number

blockchain: Blockchain

Blockchain helper.

broadcast: BroadcastAPI

Broadcast API helper.

chainId: Buffer

Chain ID for current network.

consoleOnFailover: boolean
currentAddress: string
database: DatabaseAPI

Database API helper.

failoverThreshold: number
hivemind: HivemindAPI

Hivemind helper.

Accounts by key API helper.

options: ClientOptions

Client options, read-only.

rc: RCAPI

RC API helper.

timeout: number
transaction: TransactionStatusAPI

Transaction status API helper.

Methods

  • Make a RPC call to the server.

    Type Parameters

    Type Parameters

    • T = any

    Parameters

    • api: string

      The API to call, e.g. database_api.

    • method: string

      The API method, e.g. get_dynamic_global_properties.

    • params: any = []

      Array of parameters to pass to the method, optional.

    Returns Promise<T>

  • Parameters

    • _rebrandedApi: boolean

    Returns void

Generated using TypeDoc