List supported chains
Lists the chains supported by Glide. Useful for building chain pickers in deposit and withdrawal UIs.
Import
import { listSupportedChains } from "@paywithglide/glide-js";Usage
index.ts
import { listSupportedChains } from "@paywithglide/glide-js";
import { config } from "./config";
const chains = await listSupportedChains(config);
const evmChains = chains.filter((chain) => chain.id.startsWith("eip155:"));Parameters
all
nullable boolean
When set to true, all supported chains are returned, including testnets. Defaults to false.
Return Type
Returns an array of chain objects:
id*
CAIP2
The CAIP-2 chain ID (e.g., eip155:8453 for Base).
name*
string
The name of the chain.
logoUrl*
string
The URL of the chain's logo.
isTestnet*
boolean
Whether the chain is a testnet.