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