Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Client

RPC Client

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

Hierarchy

  • Client

Index

Constructors

constructor

  • 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]

    • Default value options: ClientOptions = {}

      Client options.

    Returns Client

Properties

address

address: string | string[]

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

addressPrefix

addressPrefix: string

Address prefix for current network.

Private backoff

backoff: typeof defaultBackoff

blockchain

blockchain: Blockchain

Blockchain helper.

broadcast

broadcast: BroadcastAPI

Broadcast API helper.

chainId

chainId: Buffer

Chain ID for current network.

Private consoleOnFailover

consoleOnFailover: boolean

currentAddress

currentAddress: string

database

database: DatabaseAPI

Database API helper.

Private failoverThreshold

failoverThreshold: number

hivemind

hivemind: HivemindAPI

Hivemind helper.

keys

Accounts by key API helper.

options

options: ClientOptions

Client options, read-only.

rc

rc: RCAPI

RC API helper.

Private timeout

timeout: number

transaction

Transaction status API helper.

Methods

call

  • call(api: string, method: string, params?: any): Promise<any>
  • Make a RPC call to the server.

    Parameters

    • api: string

      The API to call, e.g. database_api.

    • method: string

      The API method, e.g. get_dynamic_global_properties.

    • Default value params: any = []

      Array of parameters to pass to the method, optional.

    Returns Promise<any>

updateOperations

  • updateOperations(rebrandedApi: any): void
  • Parameters

    • rebrandedApi: any

    Returns void

Static testnet

  • Create a new client instance configured for the testnet.

    Parameters

    Returns Client

Generated using TypeDoc