## RPC Client

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

### Hierarchy

- Client

## Index

### Constructors

- constructor

### Properties

- address
- addressPrefix
- backoff
- blockchain
- broadcast
- chainId
- consoleOnFailover
- currentAddress
- database
- failoverThreshold
- hivemind
- keys
- options
- rc
- timeout

### Methods

- call
- updateOperations
- testnet

## Constructors

### constructor

- new Client(address: string | string[], options?: ClientOptions): Client

- - Defined in client.ts:234

  #### 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[]

- Defined in client.ts:185

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

### addressPrefix

addressPrefix: string

- Defined in client.ts:225

Address prefix for current network.

### Private backoff

backoff: typeof defaultBackoff

- Defined in client.ts:228

### blockchain

blockchain: Blockchain

- Defined in client.ts:205

Blockchain helper.

### broadcast

broadcast: BroadcastAPI

- Defined in client.ts:200

Broadcast API helper.

### chainId

chainId: Buffer

- Defined in client.ts:220

Chain ID for current network.

### Private consoleOnFailover

consoleOnFailover: boolean

- Defined in client.ts:232

### Private currentAddress

currentAddress: string

- Defined in client.ts:234

### database

database: DatabaseAPI

- Defined in client.ts:190

Database API helper.

### Private failoverThreshold

failoverThreshold: number

- Defined in client.ts:230

### hivemind

hivemind: HivemindAPI

- Defined in client.ts:210

Hivemind helper.

### keys

keys: AccountByKeyAPI

- Defined in client.ts:215

Accounts by key API helper.

### options

options: ClientOptions

- Defined in client.ts:179

Client options, read-only.

### rc

rc: RCAPI

- Defined in client.ts:195

RC API helper.

### Private timeout

timeout: number

- Defined in client.ts:227

## Methods

### call

- call(api: string, method: string, params?: any): Promise<any>

- - Defined in client.ts:292

  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

- - Defined in client.ts:395

  #### Parameters

  - ##### rebrandedApi: any

  #### Returns void

### Static testnet

- testnet(options?: ClientOptions): Client

- - Defined in client.ts:272

  Create a new client instance configured for the testnet.

  #### Parameters

  - ##### Optional options: ClientOptions

  #### Returns Client

Generated using TypeDoc