Skip to main content

DefaultConfig

Trait DefaultConfig 

Source
pub trait DefaultConfig {
    // Required method
    fn from_environment(
        environment: &Environment,
        rpc_url: Option<String>,
        region: Option<Region>,
    ) -> Result<Self, WalletKitError>
       where Self: Sized;
}
Expand description

Build a Config from well-known defaults for a given Environment.

Required Methods§

Source

fn from_environment( environment: &Environment, rpc_url: Option<String>, region: Option<Region>, ) -> Result<Self, WalletKitError>
where Self: Sized,

Returns a config populated with the default URLs and addresses for the given environment.

§Errors

Returns WalletKitError if the configuration cannot be constructed (e.g. invalid RPC URL).

Implementations on Foreign Types§

Source§

impl DefaultConfig for Config

Source§

fn from_environment( environment: &Environment, rpc_url: Option<String>, region: Option<Region>, ) -> Result<Self, WalletKitError>

Implementors§