Skip to content

Latest commit

 

History

History
103 lines (52 loc) · 1.36 KB

File metadata and controls

103 lines (52 loc) · 1.36 KB

@cyberchain/smart-contract-wrapper


@cyberchain/smart-contract-wrapper / RPC_HTTP_Provider

Class: RPC_HTTP_Provider

Defined in: src/rpc-provider-http.ts:27

HTTP provider for JSON-RPC requests

Implements

Constructors

Constructor

new RPC_HTTP_Provider(url, options?): RPC_HTTP_Provider

Defined in: src/rpc-provider-http.ts:41

Parameters

url

The HTTP or HTTPS url to connect to the node

string | URL

options?

RPC_HTTP_Provider_Options

Options

Returns

RPC_HTTP_Provider

Properties

url

url: URL

Defined in: src/rpc-provider-http.ts:28

Methods

destroy()

destroy(): void

Defined in: src/rpc-provider-http.ts:148

Closes all the active connections

Returns

void


rpcRequest()

rpcRequest(method, params, timeout): Promise<any>

Defined in: src/rpc-provider-http.ts:79

Performs a JSON-RPC request

Parameters

method

string

RPC Method

params

any[]

Method parameters

timeout

number

Timeout in ms

Returns

Promise<any>

The JSON RPC result

Implementation of

RPCProvider.rpcRequest