sdk/client/Chain.ts
Chain overview
Chain descriptor — bundles all network context needed by clients and builders.
Replaces the stringly-typed NetworkId and the separate slotConfig parameter.
Pass a chain preset (mainnet, preprod, preview) or define a custom one for
private networks and devnets.
Added in v2.1.0
Table of contents
model
Chain (interface)
Describes a Cardano network — its identity, consensus parameters, and slot timing.
Signature
export interface Chain {
/** Numeric network id: 1 = mainnet, 0 = testnet. Used for address encoding. */
readonly id: number
/** Human-readable name, e.g. "Cardano Mainnet". */
readonly name: string
/** Network magic — uniquely identifies the network for peer-to-peer communication. */
readonly networkMagic: number
/** Epoch length in seconds. */
readonly epochLength: number
/** Slot timing parameters required for validity interval conversion. */
readonly slotConfig: SlotConfig
}Added in v2.1.0
presets
mainnet
Cardano mainnet.
Signature
export declare const mainnet: ChainAdded in v2.1.0
preprod
Cardano pre-production testnet.
Signature
export declare const preprod: ChainAdded in v2.1.0
preview
Cardano preview testnet.
Signature
export declare const preview: ChainAdded in v2.1.0