@eternl/network-id
Network identifiers and network-level metadata for Eternl packages.
Install
npm install @eternl/network-id
Usage
import {
NETWORK_ID,
type NetworkId,
isSupportedNetworkId,
isTestnetNetwork,
getNetworkCurrencyCode
} from '@eternl/network-id'
const id: NetworkId = NETWORK_ID.MAINNET
if (isSupportedNetworkId(id)) {
console.log(isTestnetNetwork(id))
console.log(getNetworkCurrencyCode(id))
}
Caller-supplied slot timelines
@eternl/network-id/timeline provides createSlotTimeline for a caller's explicit
era boundaries. It snapshots and freezes the supplied data, checks continuity,
and rejects unsafe integers. It does not register networks or select endpoints.
import { createSlotTimeline } from '@eternl/network-id/timeline'
const timeline = createSlotTimeline([
{ firstSlot: 0, startTimeMs: Date.UTC(2026, 0, 1), slotLengthMs: 1000 }
])
const time = timeline.timestampAtSlot(42)
const firstSlot = timeline.slotAtOrAfter(time + 1) // 43
Times are nonnegative Unix milliseconds. slotAtOrAfter clamps timestamps before
genesis to slot zero; it rounds up, so the inclusive last slot in [start, end)
is slotAtOrAfter(end) - 1. Results beyond the safe integer range throw.
The timeline utility does not change registered-network helpers or select frontend networks.
Musashi development network
NETWORK_ID.MUSASHI is the canonical musashi ID, with magic 164,
testnet address bit 0 and genesis at 2026-10-18T00:00:00Z. Slots last one second
and epochs contain 21,600 slots. Normal availability follows the backend's
advertised network map. isDevelopmentNetwork is a descriptive classification,
not an extra opt-in gate. Musashi has its own wallet/cache namespace.
@eternl/network-id/network/musashi/profile exports immutable MUSASHI genesis
pins, decoder family and timeline. Current rc-2026w44 configuration retains
those genesis bytes; decoderProfile is dijkstra. A future
chain reset must change its pinned identity and rebuild affected state, without
renaming the public network ID. See provenance.
This public package contains no API, explorer or faucet URLs. Feature availability
belongs to @eternl/network-feature and the consuming application's host discovery.
Exports
NETWORK_IDNetworkIdnetworkIdListnetworkIdxnetworkGroupsnetworkAddressPrefixnetworkStakeAddressPrefixnetworkCurrencyCodenetworkCurrencySymbolisSupportedNetworkIdgetNetworkIdgetNetworkDecimalsisTestnetNetworkisDevelopmentNetworkisCustomNetworkgetNetworkCurrencyCodegetNetworkCurrencySymbol
License
Business Source License 1.1 (BUSL-1.1).
Additional Use Grant: None.
Commercial use requires a separate license from Tastenkunst.
Contact: https://tastenkunst.com/