pub enum ChainId {
PolkadotAssetHub,
PaseoAssetHub,
PolkadotPeople,
PaseoPeople,
Previewnet,
Individuality,
Ethereum,
EthereumSepolia,
Bitcoin,
BitcoinSignet,
}Expand description
Chain identifier — all supported chains in the host ecosystem.
Variants§
PolkadotAssetHub
PaseoAssetHub
PolkadotPeople
PaseoPeople
Previewnet
Individuality
Individuality parachain — hosts the Resources pallet with lite usernames.
Ethereum
EthereumSepolia
Bitcoin
BitcoinSignet
Implementations§
Source§impl ChainId
impl ChainId
pub fn endpoint(self) -> &'static str
pub fn display_name(self) -> &'static str
Sourcepub fn all() -> &'static [ChainId]
pub fn all() -> &'static [ChainId]
All chain IDs including ETH/BTC. UI should gate display on settings flags.
Sourcepub fn substrate_chains() -> &'static [ChainId]
pub fn substrate_chains() -> &'static [ChainId]
Substrate/Polkadot chains only (for existing chain settings UI).
Sourcepub fn backend(self) -> ConnectionBackend
pub fn backend(self) -> ConnectionBackend
Determine the connection backend for this chain.
Sourcepub fn chain_specs(self) -> Option<(&'static str, &'static str)>
pub fn chain_specs(self) -> Option<(&'static str, &'static str)>
Return (relay_chain_spec, parachain_spec) for smoldot-backed chains.
Sourcepub fn relay_db_key(self) -> &'static str
pub fn relay_db_key(self) -> &'static str
Database key for the relay chain of this chain.
Sourcepub fn para_db_key(self) -> String
pub fn para_db_key(self) -> String
Database key for this chain’s parachain database.
Sourcepub fn genesis_hash(self) -> Option<GenesisHash>
pub fn genesis_hash(self) -> Option<GenesisHash>
Return the 32-byte genesis block hash for this chain, or None for
chains where the genesis hash is not known at compile time (e.g. testnets
that may fork).
Sources: Subscan / Polkadot.js Apps
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ChainId
impl<'de> Deserialize<'de> for ChainId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for ChainId
impl Eq for ChainId
impl StructuralPartialEq for ChainId
Auto Trait Implementations§
impl Freeze for ChainId
impl RefUnwindSafe for ChainId
impl Send for ChainId
impl Sync for ChainId
impl Unpin for ChainId
impl UnsafeUnpin for ChainId
impl UnwindSafe for ChainId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more