@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / chains / somniaLocal

Variable: somniaLocal

const somniaLocal: object

Defined in: packages/sdk/src/chains/definitions/somniaLocal.ts:21

The local Somnia dev chain (chain id 31337) — an Anvil node, as brought up by demo-clob.sh up / DEPLOY_ENV=local. Anvil is a first-class environment for this protocol: the deploy scripts, the indexer, the deployments hub and the explorer all run against it, so it gets a definition here instead of borrowing viem's foundry.

Deliberately presented as Somnia with STT rather than "Foundry"/"Ether": the agent-facing docs read the chain name and native symbol straight out of this object, and a local stack should still read as Somnia there.

Two things a local chain does not have: the Somnia reactivity precompile at 0x…0100 (isLocalPrecompileUnavailable returns true here — anything that pings it, such as enableReactivity or triggerRoll, is testnet/mainnet only) and a Multicall3 deployment, unless you deployed one yourself.

Type Declaration

id

id: 31337

ID in number form

name

name: "Somnia Local"

Human-readable name

nativeCurrency

nativeCurrency: object

Currency used by chain

nativeCurrency.name

readonly name: "STT" = "STT"

nativeCurrency.symbol

readonly symbol: "STT" = "STT"

nativeCurrency.decimals

readonly decimals: 18 = 18

rpcUrls

rpcUrls: object

Collection of RPC endpoints

rpcUrls.default

readonly default: object

rpcUrls.default.http

readonly http: readonly ["http://127.0.0.1:8545"]

rpcUrls.default.webSocket

readonly webSocket: readonly ["ws://127.0.0.1:8545"]

testnet

testnet: true

Flag for test networks