## 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
- currentAddress
- database
- failoverThreshold
- hivemind
- options
- rc
- timeout

### Methods

- call
- updateOperations
- testnet

## Constructors

### constructor

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

- - Defined in client.ts:225

  #### 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:183

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

### addressPrefix

addressPrefix: string

- Defined in client.ts:218

Address prefix for current network.

### Private backoff

backoff: typeof defaultBackoff

- Defined in client.ts:221

### blockchain

blockchain: Blockchain

- Defined in client.ts:203

Blockchain helper.

### broadcast

broadcast: BroadcastAPI

- Defined in client.ts:198

Broadcast API helper.

### chainId

chainId: Buffer

- Defined in client.ts:213

Chain ID for current network.

### Private currentAddress

currentAddress: string

- Defined in client.ts:225

### database

database: DatabaseAPI

- Defined in client.ts:188

Database API helper.

### Private failoverThreshold

failoverThreshold: number

- Defined in client.ts:223

### hivemind

hivemind: HivemindAPI

- Defined in client.ts:208

Blockchain helper.

### options

options: ClientOptions

- Defined in client.ts:177

Client options, read-only.

### rc

rc: RCAPI

- Defined in client.ts:193

RC API helper.

### Private timeout

timeout: number

- Defined in client.ts:220

## Methods

### call

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

- - Defined in client.ts:281

  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:389

  #### Parameters

  - ##### rebrandedApi: any

  #### Returns void

### Static testnet

- testnet(options?: ClientOptions): Client

- - Defined in client.ts:259

  Create a new client instance configured for the testnet.

  #### Parameters

  - ##### Optional options: ClientOptions

  #### Returns Client

Generated using TypeDoc