@somnia-chain/markets-sdk / chains / ChainId
Variable: ChainId
constChainId:object
Defined in: packages/sdk/src/chains/chainId.ts:39
Every Somnia network's chain id, keyed by its chain definition's export
name — ChainId.somniaShannon === somniaShannon.id by construction, so the
constant and the definition can never disagree. The id is the value because
that is what wallets, deployment manifests and viem all speak — and on the
bridge the Hyperlane domain id equals the chain id, so one number
identifies a network everywhere.
A const object with a matching type, not a TS enum — the pattern this
package uses everywhere (BridgeToken, BinarySide, …): ChainId.somniaShannon
is the value, ChainId is also the type of every such value, and plain
number literals still assign.
Not every network is bridged — listBridgeNetworks() is the live set.
Example (Indexing a chain definition)
import { ChainId, somniaChains } from "@somnia-chain/markets-sdk/chains";
somniaChains[ChainId.hidekiTestnet].name; // "Hideki Testnet"
Type Declaration
somniaMainnet
readonlysomniaMainnet:5031=somniaMainnet.id
Somnia mainnet (5031). Not bridged yet.
somniaShannon
readonlysomniaShannon:50312=somniaShannon.id
Somnia Testnet — Shannon (50312), the general-purpose testnet. Bridged.
somniaElwood
readonlysomniaElwood:50313=somniaElwood.id
Somnia Testnet — Elwood (50313), the testnet regenesis. Not bridged yet.
hidekiTestnet
readonlyhidekiTestnet:50383=hidekiTestnet.id
Hideki Testnet (50383) — the low-latency Tokyo network. Bridged.
somniaLocal
readonlysomniaLocal:31337=somniaLocal.id
The local anvil stack (31337). Never bridged.