TriportRPC

List chains

Return the Triport network catalogue — every chain the platform supports, with its identity, protocol surfaces, required scope, and UI presentation hints.

— (catalogue spans Ethereum, Polygon, Solana, and L2s)— (none to call; results are scope-filtered when a session is present)— (discovery endpoint; not metered per tier)

GET /v1/chains is the discovery endpoint for the Triport network catalogue. It returns a list of ChainDescriptor objects — the static, immutable description of every chain Triport supports: identity (id, name, chain_id, net, kind, symbol), the protocol surfaces clients can reach (protocols), the auth scope a key must hold to use the chain (required_scope), presentation hints for the UI (ui), and an optional list of feature badges (capabilities).

The endpoint serves two modes depending on whether a valid session cookie is present on the request:

  • Anonymous (no cookie, or an invalid/expired one) → the full active registry, in registration order. This is effectively public catalogue data, so it is safe to call unauthenticated for a "browse all chains" view.
  • Authenticated (valid session cookie) → the registry filtered to the union of scopes across the user's active API keys. A descriptor is included only if its required_scope is held by the session. A session with a wildcard (*) scope receives the full list; a session with no scopes receives an empty list ({"chains": []}) — "we know who you are, you just have no access yet."

Descriptors are immutable for the lifetime of a build. Runtime data such as status, latency, and block height is not part of this response — fetch it from GET /v1/chains/{id}/metrics or subscribe to the GET /v1/chains/events SSE stream.

Parameters

This endpoint takes no path, query, or body parameters. The only input that changes the response is the optional session cookie, which the browser sends automatically when the request is made with credentials included.

(session cookie)cookieoptional
When present and valid, narrows the result to chains the session has scope for. Absent → full registry.

Response

The example is trimmed to three entries. A real anonymous response returns the full registry (Ethereum, Polygon, Solana, Base, BNB Smart Chain, Arbitrum One, Optimism, Bitcoin, Solana Devnet, …) in registration order.

chainsChainDescriptor[]
The catalogue, filtered by session scope when authenticated.

Errors

The endpoint returns a flat {"error": "<code>"} envelope (this differs from the JSON-RPC error object used by the RPC methods).

CodeHTTPMeaningWhen it happens
method_not_allowed405Wrong HTTP methodA non-GET request was made to /v1/chains.
internal500Server errorSession-scope resolution failed against the auth backend.

A valid request always returns 200 — even when the scope-filtered list is empty ({"chains": []}). See the shared Errors page for the full error envelope and conventions.

Examples

JavaScript (fetch)

// Anonymous or session-aware: include credentials so the browser attaches
// the session cookie when the user is signed in.
const res = await fetch("https://api.triport.io/v1/chains", {
  credentials: "include",
});
if (!res.ok) throw new Error(`http_${res.status}`);


const { chains } = await res.json();
for (const c of chains) {
  console.log(`${c.name} (${c.id}) — scope: ${c.required_scope}`);
}

TypeScript SDK (@triport/sdk)

import { TriportClient } from "@triport/sdk";


const client = new TriportClient({ apiKey: process.env.TRIPORT_API_KEY });


// Returns the bare ChainDescriptor[] — the { chains } envelope is unwrapped.
const chains = await client.chains.list();


const evm = chains.filter((c) => c.kind === "evm" || c.kind === "l2");
console.log(`${evm.length} EVM-compatible chains available`);

Python (triport-sdk)

from triport import TriportClient


client = TriportClient(api_key="$TRIPORT_API_KEY")


chains = client.chains.list()  # list[ChainDescriptor]
for c in chains:
    proto = ", ".join(p["kind"] for p in c["protocols"])
    print(f"{c['name']} ({c['id']}): {proto}")

Notes

  • Anonymous vs. authenticated. The same URL returns different results based on the session cookie. There is no query parameter to force one mode — drop the cookie to browse the full catalogue, send it to get the scope-filtered subset.
  • Descriptors are static. The list does not carry health/status. For a chain's live status, latency, and block height use GET /v1/chains/{id}/metrics, and for live updates subscribe to GET /v1/chains/events.
  • scope_missing is a UI concept, not a field here. Chains whose required_scope no key holds simply never appear in an authenticated list; the UI reconciles the anonymous full list against the authenticated subset to render them as "scope missing" rather than hiding them.
  • Building a callable URL. The protocols[].path values are internal backend paths. To get a ready-to-use endpoint URL for a chain, call GET /v1/keys/{id}/endpoints, which returns per-key URL templates (and never the raw key in the body).
  • Single descriptor. To fetch one chain plus its latest metrics in a single call, use GET /v1/chains/{id}.