@xyzblocks/rpc
v1.0.8
Published
Remote Procedure Call
Downloads
15
Readme
RPC
Remote Procedure Call
Installation
npm install @xyzblocks/rpc --save
API
InMemoryRpc extends Rpc
Methods
close(): Promise<void>
connect(rpc: InMemoryRPC): Promise<void>
handleIncomingData(data: IRequest | IResponse): Promise<void>
send(method: string, params: Array<any>): Promise<any>
sendNotification(method: string, params: Array<any>): Promise<void>
IRequest
Properties
id: string;
jsonrpc: string
method: string
params: Array<any>
IResponse
Properties
error: { code: number; data: any; message: string }
id: string
jsonrpc: string
result: any
Rpc
Methods
close(): Promise<void>
send(method: string, params: Array<any>): Promise<any>
sendNotification(method: string, params: Array<any>): Promise<void>