Built-in Networks

The 14 preloaded networks and the BUILTIN_NETWORKS registry (NetworkConfig type) — Ethereum, Base, BNB Chain, Arbitrum, Optimism, HyperEVM, Robinhood Chain, their testnets, and the three Solana clusters.

Every workspace opens with 14 networks already loaded — eleven EVM networks and three Solana clusters. The same set is reachable two ways: as typed static constants on the Network class (Network.Ethereum, Network.Base, …), and as the BUILTIN_NETWORKS registry keyed by slug. Both come from the main entry:

import.ts
import { Network, BUILTIN_NETWORKS } from "wative-core";
import type { NetworkConfig } from "wative-core";

Network.<Name> statics

Each accessor is a shared, read-only Network instance. They are the same objects a fresh workspace loads, so ws.networks.bySlug("base") and Network.Base describe the same chain (though a workspace may override any of them locally with update()).

StaticSlugNameChain idVMSymbol
Network.EthereumethereumEthereum1evmETH
Network.BasebaseBase8453evmETH
Network.BnbChainbnbchainBNB Chain56evmBNB
Network.ArbitrumarbitrumArbitrum42161evmETH
Network.ArbitrumSepoliaarbitrum-sepoliaArbitrum Sepolia421614evmETH
Network.OptimismoptimismOP Mainnet10evmETH
Network.SepoliasepoliaSepolia11155111evmETH
Network.HyperEVMhyperevmHyperEVM999evmHYPE
Network.HyperEVMTestnethyperevm-testnetHyperEVM Testnet998evmHYPE
Network.RobinhoodrobinhoodRobinhood Chain4663evmETH
Network.RobinhoodTestnetrobinhood-testnetRobinhood Chain Testnet46630evmETH
Network.SolanasolanaSolana7565164svmSOL
Network.SolanaTestnetsolana-testnetSolana Testnet7565166svmSOL
Network.SolanaDevnetsolana-devnetSolana Devnet7565165svmSOL
statics.ts
Network.Ethereum.chainId;        // 1
Network.ArbitrumSepolia.chainId; // 421614
Network.Solana.vm;               // "svm"
Network.Base.symbol;             // "ETH"

The Network class also exposes a few helpers over this set:

MemberSignatureReturns
Network.builtinbuiltin(slug: Slug)The built-in Network for that slug, or null.
Network.allall()readonly Network[] — every built-in.
Network.isBuiltinSlugisBuiltinSlug(slug: Slug)boolean — whether the slug names a built-in.

BUILTIN_NETWORKS

BUILTIN_NETWORKS is a frozen Record<string, NetworkConfig> keyed by slug — the plain-data source the static constants are built from. Use it when you want the configuration values without constructing a Network:

registry.ts
BUILTIN_NETWORKS["base"].chainId;   // 8453
BUILTIN_NETWORKS["solana"].vm;      // "svm"
Object.keys(BUILTIN_NETWORKS).length; // 14

NetworkConfig

network-config.ts
interface NetworkConfig {
  readonly slug: string;
  readonly name: string;
  readonly chainId: number;
  readonly vm: ChainVM;
  readonly rpcUrl: string;
  readonly nativeCurrency: {
    readonly name: string;
    readonly symbol: string;
    readonly decimals: number;
  };
}

Solana chain ids (changed in 2.4.7)

Solana has no EIP-155-style chain-id space, so the library assigns each cluster a stable numeric id for lookups such as byChainId:

ClusterSlugChain id
Solanasolana7565164
Solana Testnetsolana-testnet7565166
Solana Devnetsolana-devnet7565165

Last updated on