[][src]Struct lnpbp::bp::chain::ChainParams

pub struct ChainParams {
    pub genesis_hash: BlockHash,
    pub name: String,
    pub p2p_magic: P2pNetworkId,
    pub bip70_name: String,
    pub bip173_prefix: String,
    pub p2p_port: u16,
    pub rpc_port: u16,
    pub ln_height: u32,
    pub rgb_height: u32,
    pub format: ChainFormat,
    pub dust_limit: u64,
    pub native_asset: AssetParams,
    pub is_testnet: bool,
    pub is_pow: bool,
}

Full set of parameters which uniquely define given blockchain, corresponding P2P network and RPC interface of fully validating nodes

Fields

genesis_hash: BlockHash

Hash of the genesis block, uniquely defining chain

name: String

Blockchain name, including version:

  • mainnet for Bitcoin mainnet
  • testnet3 for Bitcoin testnet version 3
  • regtest for Bitcoin regtest networks
  • signet for Bitcoin signet and private signet networks
  • liquidv1 for Liquid network v1
p2p_magic: P2pNetworkId

Magic number used as prefix in P2P network API

bip70_name: String

Network name according to BIP 70, which may be different from ChainParams::name. Not widely used these days, but we still have to account for standard.

bip173_prefix: String

HRP bech32 address prefix as defined in BIP 173

p2p_port: u16

Default port for P2P network

rpc_port: u16

Default port for full validating node RPC interface

ln_height: u32

Block number from which Lightning network support had started using the given chain

rgb_height: u32

Block number from which RGB had started using the given chain

format: ChainFormat

Format of chain-specific data. See ChainFormat for more information

dust_limit: u64

Dust limit for the given chain; 0 if none dust limit applies

native_asset: AssetParams

Parameters of the native chain asset (can be only one; it is the asset in which miners are got paid).

is_testnet: bool

Flag indicating any kind of testnet network that do not operate with real economic values

is_pow: bool

Flag indicating blockchains that use PoW consensus algorithm

Trait Implementations

impl Clone for ChainParams[src]

impl Debug for ChainParams[src]

impl Display for ChainParams[src]

impl Eq for ChainParams[src]

impl From<ChainParams> for Chain[src]

impl Hash for ChainParams[src]

impl Ord for ChainParams[src]

impl PartialEq<ChainParams> for ChainParams[src]

impl PartialOrd<ChainParams> for ChainParams[src]

impl StrictDecode for ChainParams[src]

type Error = Error

Implementation-dependent error type

impl StrictEncode for ChainParams[src]

type Error = Error

Implementation-dependent error type

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,