Skip to main content
JSON-RPC 2.0 protocol implementation used by @cosmjs/tendermint-rpc for HTTP and WebSocket RPC communication.

JsonRpcClient

Sends JSON-RPC requests over a generic messaging connection.
JsonRpcClient uses the instantiation SimpleMessagingConnection<JsonRpcRequest, JsonRpcResponse>: the stream emits already-parsed responses, and sendRequest receives structured request objects (not strings).

Parsing Functions

Type Guards

ID Generation

Key Types

JsonRpcRequest

JsonRpcSuccessResponse

JsonRpcErrorResponse

JsonRpcError

JsonRpcId

JsonRpcResponse

Error Codes

The jsonRpcCode object provides standard JSON-RPC 2.0 error codes: