TriportRPC

Proxy a JSON-RPC call through a specific mesh host

POSThttps://api.triport.io/v1/eth/leak-mesh/proxy/el-host-7

Forwards 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.

Ethereumeth_leak_meshpro+ · RPS-per-tier for the eth_leak_mesh category, burst ×2

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

hoststringrequired
Identifier of the target mesh host, e.g. el-host-7. Must be one of the hosts returned by GET /v1/eth/leak-mesh/hosts.
Request bodyobject
jsonrpcstringrequired
Protocol version. Must be the constant "2.0".
methodstringrequired
The JSON-RPC method to invoke on the target host, e.g. eth_blockNumber.
paramsarray | objectoptional
Positional (array) or named (object) parameters for the method. Omit when the method takes none.
idinteger | stringrequired
Client-chosen correlation id. Echoed back in the response.

Response

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
JSON-RPC version, always "2.0".
idinteger | string
Echoes the request id.
resultany
Method result, present on success. Shape depends on the proxied method.
errorobject
Present instead of result 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).

CodeMeaningWhen it happens
400invalid_paramsMalformed JSON, a missing required field (jsonrpc, method, id), or an unknown/unreachable {host}.
401unauthorized / trial_expired / subscription_expiredMissing or invalid API key, or a lapsed trial/subscription.
403tier_insufficient / method_unknownThe 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.
429rate_limitedSustained 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 200 response with an error member means the call reached the host and the host rejected it — inspect error.code / error.message. A 4xx status means the request never made it to a host.
  • Always source {host} from GET /v1/eth/leak-mesh/hosts; targeting an unknown host yields 400. Check GET /v1/eth/leak-mesh/health to avoid pinning traffic to a degraded host.
  • Rate limiting is RPS-per-tier with a ×2 burst allowance for the eth_leak_mesh category; there is no daily quota. See rate-limits-and-tiers.md.