Besu JSON-RPC API
POST/ledger/v4/blockchains/besu
Hyperledger Besu Ethereum Enterprise Client JSON-RPC API.
This endpoint does not proxy arbitrary Besu JSON-RPC methods. Only the following read-only
methods are forwarded to Besu without any authorisation check:
eth_blockNumber, eth_call, eth_chainId, eth_estimateGas, eth_getBlockByHash,
eth_getBlockByNumber, eth_getBlockReceipts, eth_getBlockTransactionCountByHash,
eth_getBlockTransactionCountByNumber, eth_getCode, eth_getLogs,
eth_getTransactionByBlockHashAndIndex, eth_getTransactionByBlockNumberAndIndex,
eth_getTransactionByHash, eth_getTransactionCount, eth_getTransactionReceipt,
eth_getUncleByBlockHashAndIndex, eth_getUncleByBlockNumberAndIndex,
eth_getUncleCountByBlockHash, eth_getUncleCountByBlockNumber, net_version.
eth_sendRawTransaction is also accepted, but is subject to an authorisation check (see
below). Any other method returns a -32601 (Method not found) JSON-RPC error.
Authorisation for eth_sendRawTransaction:
- The raw transaction must decode to a transaction with both a
fromand atoaddress. - If
tois the EBSI proxy factory contract address, the sender (from) must hold theTCR:deployProxypolicy in the Trusted Policies Registry — no access token is required in this case. - Otherwise (a regular contract call), the request must carry an
Authorization: Bearer <access_token>header with a valid access token issued by Authorisation API v4 for theopenid ledger_invokescope. The token'sauthorization_details.addressesmust include the transaction'stoaddress, and the token'ssub(adid:keyordid:ebsi) must control the transaction'sfromaddress.
Batching: a JSON array of request objects is processed as a
JSON-RPC batch. Batches are capped at 1024
requests; larger batches are rejected with a -32005 error.
Notifications: a request object with no id is treated as a JSON-RPC notification and
is never given a response. For a single (non-batch) notification, this endpoint returns an
empty 200 body.
Error handling: all JSON-RPC-level errors (invalid request, method not found, internal
errors while querying Besu, etc.) are returned with HTTP status 200, wrapped in a
JSON-RPC error object, per the JSON-RPC 2.0 convention of using the transport layer only for
transport-level failures. The only condition returned with a non-200 HTTP status is a
request body that isn't valid JSON (400).
Request
Responses
- 200
- 400
- 405
- 406
- 500
JSON-RPC Response. Returned both for successful calls and for JSON-RPC-level errors
(invalid request, method not found, batch too large, internal errors while querying
Besu, etc.) — see the endpoint description. A single-request notification (no id in
the request) returns an empty body.
The request body could not be parsed as JSON (missing body or invalid JSON). Note this
is the only case where a JSON-RPC error is returned with a non-200 HTTP status, and the
body is plain application/json (not application/problem+json).
Method Not Allowed
Not Acceptable
Internal Server Error. Not part of normal JSON-RPC error handling (which always
responds with 200, see above) — only returned for unexpected errors outside of the
Besu request-processing pipeline.