List chains
Return the Triport network catalogue — every chain the platform supports, with its identity, protocol surfaces, required scope, and UI presentation hints.
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_scopeis 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)cookieoptionalResponse
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[]Errors
The endpoint returns a flat {"error": "<code>"} envelope (this differs from
the JSON-RPC error object used by the RPC methods).
| Code | HTTP | Meaning | When it happens |
|---|---|---|---|
method_not_allowed | 405 | Wrong HTTP method | A non-GET request was made to /v1/chains. |
internal | 500 | Server error | Session-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 toGET /v1/chains/events. scope_missingis a UI concept, not a field here. Chains whoserequired_scopeno 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[].pathvalues are internal backend paths. To get a ready-to-use endpoint URL for a chain, callGET /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}.