Kit
Functions

createRpcMessage

createRpcMessage<TParams>(request): object

Returns a spec-compliant JSON RPC 2.0 message, given a method name and some params.

Generates a new id on each call by incrementing a bigint and casting it to a string.

Type Parameters

Type Parameter
TParams

Parameters

ParameterType
requestRpcRequest<TParams>

Returns

object

NameTypeDefault value
idstring-
jsonrpcstring'2.0'
methodstringrequest.methodName
paramsTParamsrequest.params

On this page