Skip to main content
Lasso returns all responses in standard JSON-RPC 2.0 format with optional observability metadata.

Standard Response Format

All successful responses follow the JSON-RPC 2.0 specification:

Response Fields

The id field exactly echoes the request ID’s type and value. If you send {"id": "abc"}, you receive {"id": "abc"} in the response.

Common Response Types

Block Number

Request:
Response:

Block by Number

Request:
Response:

Transaction Receipt

Request:
Response:

Logs Query

Request:
Response:

Batch Response Format

Batch requests return an array of responses in the same order as requests: Request:
Response:
Batch requests are limited to 50 requests by default. Exceeding this limit returns a -32600 Invalid Request error.

WebSocket Responses

Subscription Confirmation

Client sends:
Server responds:

Subscription Events

Server pushes:

Unsubscribe Confirmation

Client sends:
Server responds:

Observability Metadata

Lasso provides routing and performance metadata in two modes: headers and body.

Headers Mode

Request metadata in response headers:
Response headers:
The X-Lasso-Meta header contains base64url-encoded JSON. Decoded:

Body Mode

Request metadata in response body:
Response:

Metadata Fields

Use headers mode for production monitoring to avoid modifying the response body. Use body mode for debugging and development.

WebSocket Metadata

Add "lasso_meta": "notify" to your WebSocket request:
The server sends two frames: 1. RPC Response (unmodified):
2. Metadata Notification:

Response Headers

Standard Headers

All responses include:

Metadata Headers

With include_meta=headers:

CORS Headers

All origins are allowed:

Null Results

Some methods may return null as a valid result:
Common cases:
  • eth_getTransactionReceipt for pending/unknown transaction
  • eth_getBlockByNumber for future block number
  • eth_getCode for EOA (non-contract) address returns "0x"
A null result is different from an error. null is a valid response indicating “not found” or “not applicable”.

Binary Data Encoding

All binary data (hashes, addresses, bytecode) is hex-encoded with 0x prefix:

Block Parameter Format

Methods that accept block parameters support multiple formats:

Block Tags (Strings)

Block Number (Hex String)

Block Parameter Object (EIP-1898)

See Also