Functions
isJsonRpcPayload
isJsonRpcPayload(
payload
):payload is Readonly<{ jsonrpc: "2.0"; method: string; params: unknown }>
Returns true
if the given payload is a JSON RPC v2 payload.
This means, the payload is an object such that:
- It has a
jsonrpc
property with a value of'2.0'
. - It has a
method
property that is a string. - It has a
params
property of any type.
Parameters
Parameter | Type |
---|---|
payload | unknown |
Returns
payload is Readonly<{ jsonrpc: "2.0"; method: string; params: unknown }>