@somnia-chain/markets-sdk / chains / getBridgeToken
Function: getBridgeToken()
getBridgeToken(
token,chainId):BridgeTokenDetails|null
Defined in: packages/sdk/src/chains/bridge/registry.ts:271
Token details for one token on one network — the router to call, what the sender holds, its decimals, and where it can go.
Details
token: Token symbol.chainId: Chain id of the network (also the Hyperlane domain id).- Returns: The details, or
nullwhen that token has no route on that network.
Example (Resolving a bridged token)
ts
import { BridgeToken, ChainId, getBridgeToken } from "@somnia-chain/markets-sdk/chains";
const wbtc = getBridgeToken(BridgeToken.WBTC, ChainId.somniaShannon);
wbtc?.model; // "collateral" — approve `wbtc.address` to `wbtc.router` first
wbtc?.decimals; // 8, NOT 18
Parameters
token
chainId
number
Returns
BridgeTokenDetails | null