Sigil documentation
ReferenceRust referencesigil-core

sigil-core · chain

Source declarations, signatures and documentation for chain.

Source: sigil/node/sigil-core/src/chain.rs. SHA-256: 378285946e54e679832127450aab3df687ab160a5c1deb8c4f6c401dad08e08d.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

chain::ChainId

A chain identifier for distinguishing networks.

#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct ChainId(String);

Source line: 8.

chain::ChainId::mainnet

Sigil mainnet chain ID.

pub fn mainnet() -> Self;

Source line: 12.

chain::ChainId::testnet

Sigil testnet chain ID.

pub fn testnet() -> Self;

Source line: 17.

chain::ChainId::devnet

Sigil devnet chain ID.

pub fn devnet() -> Self;

Source line: 22.

chain::ChainId::custom

Custom chain ID.

pub fn custom(id: impl Into<String>) -> Self;

Source line: 27.

chain::ChainId::as_str

Returns the chain ID string.

pub fn as_str(&self) -> &str;

Source line: 32.

On this page