pub struct ChainConfigs {
pub cosmos: BTreeMap<ChainKeyId, CosmosChainConfigBuilder>,
pub evm: BTreeMap<ChainKeyId, EvmChainConfigBuilder>,
pub dev: BTreeMap<ChainKeyId, AnyChainConfig>,
}Expand description
Chains are identified by ChainKey, which is a combination of a namespace and id
for now - we natively support 3 namespaces: cosmos, evm, and dev
Fields§
§cosmos: BTreeMap<ChainKeyId, CosmosChainConfigBuilder>Cosmos-style chains (including Layer-SDK)
evm: BTreeMap<ChainKeyId, EvmChainConfigBuilder>EVM-style chains
dev: BTreeMap<ChainKeyId, AnyChainConfig>DEV-only chains The key here can be different than the chain_id inside the config
Implementations§
Source§impl ChainConfigs
impl ChainConfigs
pub fn get_chain(&self, key: &ChainKey) -> Option<AnyChainConfig>
pub fn cosmos_iter(&self) -> impl Iterator<Item = CosmosChainConfig> + '_
pub fn evm_iter(&self) -> impl Iterator<Item = EvmChainConfig> + '_
pub fn dev_iter(&self) -> impl Iterator<Item = AnyChainConfig> + '_
pub fn all_chain_keys(&self) -> Result<Vec<ChainKey>, Error>
pub fn chain_keys(&self, namespace: ChainKeyNamespace) -> Vec<ChainKey>
pub fn add_chain( &mut self, key: ChainKey, config: AnyChainConfig, ) -> Result<(), ChainConfigError>
Trait Implementations§
Source§impl Clone for ChainConfigs
impl Clone for ChainConfigs
Source§fn clone(&self) -> ChainConfigs
fn clone(&self) -> ChainConfigs
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComposeSchema for ChainConfigs
impl ComposeSchema for ChainConfigs
Source§impl Debug for ChainConfigs
impl Debug for ChainConfigs
Source§impl Default for ChainConfigs
impl Default for ChainConfigs
Source§fn default() -> ChainConfigs
fn default() -> ChainConfigs
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ChainConfigs
impl<'de> Deserialize<'de> for ChainConfigs
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
Source§impl Serialize for ChainConfigs
impl Serialize for ChainConfigs
Auto Trait Implementations§
impl Freeze for ChainConfigs
impl RefUnwindSafe for ChainConfigs
impl Send for ChainConfigs
impl Sync for ChainConfigs
impl Unpin for ChainConfigs
impl UnsafeUnpin for ChainConfigs
impl UnwindSafe for ChainConfigs
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more