RPC Proxy
Direct proxy to the Midnight node with method whitelisting. Forwards standard Substrate JSON-RPC calls without wrapping them in the Shroud tool format.
Endpoint
Authentication
How It Works
The RPC proxy forwards JSON-RPC calls directly to the underlying Midnight node. Only methods explicitly whitelisted by the server operator are accessible — calls to non-whitelisted methods return an error.
This is useful when you need raw Substrate RPC access without the Shroud tool abstraction.
Request Format
Standard Substrate JSON-RPC format:
Batch Requests
The proxy supports JSON-RPC batch requests — send an array of up to 50 requests in a single call:
Each request in the batch is validated independently. Responses are returned as a JSON array in the same order.
Whitelisted Methods
The whitelist is operator-configured. The list below is a representative subset; for the live list of methods exposed by a given deployment, call the midnight_listMethods tool via the JSON-RPC API (also shown in Listing available methods below).
System
Method | Description | CU Cost |
|---|---|---|
| Chain name (e.g. | 0.1 |
| Chain type ( | 0.1 |
| Node software name | 0.1 |
| Node software version string | 0.1 |
| Chain properties (token decimals, token symbol, SS58 prefix) | 0.1 |
| Next valid nonce for an account. Params: | 0.5 |
| Dry-run an extrinsic without submitting (full WASM execution; heavy). Params: | 10.0 |
| Dry-run at a specific block. Params: | 10.0 |
| Alias for | 0.5 |
Chain
Method | Description | CU Cost |
|---|---|---|
| Full signed block. Params: | 1.0 |
| Block hash by number. Params: | 0.2 |
| Block header only. Params: | 0.2 |
| Hash of the last finalized block | 0.1 |
| Hash of the best (latest) block | 0.1 |
| Runtime version at the best block. Params: | 0.2 |
State
Method | Description | CU Cost |
|---|---|---|
| Full runtime metadata (300-600 KB). Params: | 2.0 |
| Runtime version info. Params: | 0.2 |
| Single storage value by key. Params: | 0.5 |
| Blake2-256 hash of a storage value. Params: | 0.2 |
| Paginated storage keys. Params: | 1.0 |
| Query multiple storage values at a single block. Params: | 1.5 |
| Execute a runtime API function via WASM. Params: | 5.0 |
*At variants (e.g. state_getStorageAt, state_queryStorage) are also whitelisted; see the live midnight_listMethods output for the complete list.
Transaction pool
Method | Description | CU Cost |
|---|---|---|
| List pending extrinsics in the pool | 1.0 |
Midnight-specific
Method | Description | CU Cost |
|---|---|---|
| Midnight API versions supported by this node | 0.1 |
| Full contract state by address. Reads entire contract storage including verification keys, state vars, coin holdings. Size proportional to contract complexity. Params: | 2.5 |
| Midnight ledger version | 0.1 |
| ZSwap protocol state root (Merkle commitment root, 33 bytes). Params: | 1.0 |
Sidechain, GRANDPA, BEEFY, MMR
sidechain_*, grandpa_*, beefy_*, and mmr_* read methods are also whitelisted. Use midnight_listMethods to enumerate them per deployment.
Examples
Get the finalized head
Response:
Get block by number
Identify the chain
Listing available methods
To see which methods the server allows, use the midnight_listMethods tool via JSON-RPC:
Differences from Shroud Tools
Feature | RPC Proxy ( | Shroud Tools ( |
|---|---|---|
Format | Raw Substrate JSON-RPC | Wrapped in |
Methods | Only whitelisted Substrate methods | Shroud tool catalog |
Decoding | Raw responses from node | Decoded extrinsics, events |
Billing | Per-request CU | Per-tool CU |
Use case | Low-level node access | High-level blockchain queries |