Proxy a JSON-RPC call through a specific mesh host
https://api.triport.io/v1/eth/leak-mesh/proxy/el-host-7Forwards a single JSON-RPC 2.0 request to a named Ethereum execution-layer host in the leak-mesh and returns that host's upstream response verbatim.
This endpoint takes a single ("one-shot") JSON-RPC 2.0 payload and forwards it to
one specific execution-layer host in the leak-mesh, identified by the {host}
path segment. The host's reply is mirrored back to you unchanged — the response
body is the upstream JSON-RPC envelope (jsonrpc, id, and either result or
error).
Use it when you need to pin a call to a known host rather than letting the
platform pick one for you. The two main patterns are multi-IP strategies —
spreading reads across distinct hosts so no single host carries all your
traffic — and per-host load distribution, where your client round-robins or
shards requests across the mesh on its own schedule. Discover the set of
addressable hosts and their health with
GET /v1/eth/leak-mesh/hosts and
GET /v1/eth/leak-mesh/health before targeting one
here.
This is a pro-tier feature. If you only need a JSON-RPC call to land on a good host and don't care which, use the standard JSON-RPC transport instead — proxying to a named host is only worthwhile when host selection is part of your strategy. Each request forwards exactly one JSON-RPC call; batch arrays are not part of this contract.
Parameters
Path parameters
hoststringrequiredel-host-7. Must be one of the hosts returned by GET /v1/eth/leak-mesh/hosts.Request bodyobjectjsonrpcstringrequired"2.0".methodstringrequiredeth_blockNumber.paramsarray | objectoptionalarray) or named (object) parameters for the method. Omit when the method takes none.idinteger | stringrequiredResponse
The body is the JSON-RPC envelope as returned by the targeted host:
If the upstream method itself fails, the mirrored envelope carries a JSON-RPC
error member instead of result (the HTTP status is still 200 — the call
reached the host, the host declined it):
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"message": "invalid argument 0: hex string has odd length"
}
}jsonrpcstring"2.0".idinteger | stringid.resultanymethod.errorobjectresult when the host rejects the call. Contains code (integer) and message (string).Errors
These are transport/gateway errors returned by Triport (distinct from a
JSON-RPC error member in a 200 body, which comes from the host).
| Code | Meaning | When it happens |
|---|---|---|
400 | invalid_params | Malformed JSON, a missing required field (jsonrpc, method, id), or an unknown/unreachable {host}. |
401 | unauthorized / trial_expired / subscription_expired | Missing or invalid API key, or a lapsed trial/subscription. |
403 | tier_insufficient / method_unknown | The key's tier is below pro, or the method is not part of your product. The 403 body includes current_tier and required_tier; the X-Required-Tier header is also set. |
429 | rate_limited | Sustained RPS for the eth_leak_mesh category exceeded. Honour the Retry-After / X-RateLimit-Reset headers and back off. |
See errors.md for the full error envelope (error,
message, request_id) and handling guidance.
Examples
JavaScript (fetch)
const host = "el-host-7";
const res = await fetch(
`https://api.triport.io/v1/eth/leak-mesh/proxy/${host}`,
{
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "eth_blockNumber",
params: [],
}),
},
);
const envelope = await res.json();
if (envelope.error) throw new Error(envelope.error.message);
console.log(`${host} head:`, parseInt(envelope.result, 16));TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const client = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });
// Pin a JSON-RPC call to a specific leak-mesh host.
const result = await client.ethereum.leakMesh.proxy<string>("el-host-7", {
method: "eth_blockNumber",
params: [],
});
console.log("head:", parseInt(result, 16));Python (triport-sdk)
import os
from triport import Triport
client = Triport(api_key=os.environ["TRIPORT_API_KEY"])
# Pin a JSON-RPC call to a specific leak-mesh host.
result = client.ethereum.leak_mesh.proxy(
"el-host-7",
method="eth_blockNumber",
params=[],
)
print("head:", int(result, 16))Notes
- One request forwards exactly one JSON-RPC call. To spread load, send several
requests to different
{host}values rather than batching into one call. - A
200response with anerrormember means the call reached the host and the host rejected it — inspecterror.code/error.message. A4xxstatus means the request never made it to a host. - Always source
{host}fromGET /v1/eth/leak-mesh/hosts; targeting an unknown host yields400. CheckGET /v1/eth/leak-mesh/healthto avoid pinning traffic to a degraded host. - Rate limiting is RPS-per-tier with a ×2 burst allowance for the
eth_leak_meshcategory; there is no daily quota. See rate-limits-and-tiers.md.