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§
Sourcefn from_environment(
environment: &Environment,
rpc_url: Option<String>,
region: Option<Region>,
) -> Result<Self, WalletKitError>where
Self: Sized,
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).