chains

Retrieves supported Universal Bridge chains.

Example

import { Bridge } from "thirdweb";
const chains = await Bridge.chains({
client: thirdwebClient,
});

Returned chains might look something like:

[
{
chainId: 1,
name: "Ethereum",
icon: "https://assets.thirdweb.com/chains/1.png",
nativeCurrency: {
name: "Ether",
symbol: "ETH",
decimals: 18,
},
},
{
chainId: 137,
name: "Polygon",
icon: "https://assets.thirdweb.com/chains/137.png",
nativeCurrency: {
name: "MATIC",
symbol: "MATIC",
decimals: 18,
},
},
];
function chains(options: Options): Promise<Result>;

Parameters

The options for fetching chains.

Type

let options: Options;

Returns

let returnType: Promise<Result>;

A promise that resolves to an array of chains.