Throws if data is not a JsonRpcErrorResponse
Extracts ID field from request or response object.
Returns null
when no valid ID was found.
Returns a JsonRpcErrorResponse if input can be parsed as a JSON-RPC error. Otherwise parses input as JsonRpcSuccessResponse. Throws if input is neither a valid error nor success response.
Throws if data is not a JsonRpcSuccessResponse
Error codes as specified in JSON-RPC 2.0
Generated using TypeDoc
Creates a new ID to be used for creating a JSON-RPC request.
Multiple calls of this produce unique values.
The output may be any value compatible to JSON-RPC request IDs with an undefined output format and generation logic.