Skip to main content

Class: RpcNode<TSHandlers, TCHandlers>

Type parameters

Name
TSHandlers
TCHandlers

Hierarchy

Constructors

constructor

new RpcNode<TSHandlers, TCHandlers>(transport, requestHandlers)

Type parameters

Name
TSHandlers
TCHandlers

Parameters

NameType
transportTransport
requestHandlersTSHandlers

Defined in

packages/core/lib/JSONRPC/RpcNode.d.ts:11

Properties

_notify

Private _notify: any

Defined in

packages/core/lib/JSONRPC/RpcNode.d.ts:13


_request

Private _request: any

Defined in

packages/core/lib/JSONRPC/RpcNode.d.ts:12


handleMessage

Private handleMessage: any

Defined in

packages/core/lib/JSONRPC/RpcNode.d.ts:17


handleRpcRequest

Private handleRpcRequest: any

Defined in

packages/core/lib/JSONRPC/RpcNode.d.ts:16


handleRpcResponse

Private handleRpcResponse: any

Defined in

packages/core/lib/JSONRPC/RpcNode.d.ts:19


ongoingRequests

Private ongoingRequests: any

Defined in

packages/core/lib/JSONRPC/RpcNode.d.ts:10


requestHandlers

Protected requestHandlers: TSHandlers

Defined in

packages/core/lib/JSONRPC/RpcNode.d.ts:9


transport

Private transport: any

Defined in

packages/core/lib/JSONRPC/RpcNode.d.ts:8

Methods

notify

notify<K>(method, params): void

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
methodK
paramsMethodParamsIfExists<TCHandlers, K>

Returns

void

Defined in

packages/core/lib/JSONRPC/RpcNode.d.ts:15


onRequest

Protected Abstract onRequest(request): Promise<unknown>

Parameters

NameType
requestRpcRequest<string, unknown>

Returns

Promise<unknown>

Defined in

packages/core/lib/JSONRPC/RpcNode.d.ts:18


request

request<K>(method, params): Promise<ReturnTypeOfMethodIfExists<TCHandlers, K>>

Type parameters

NameType
Kextends string | number | symbol

Parameters

NameType
methodK
paramsMethodParamsIfExists<TCHandlers, K>

Returns

Promise<ReturnTypeOfMethodIfExists<TCHandlers, K>>

Defined in

packages/core/lib/JSONRPC/RpcNode.d.ts:14