pub struct WalletEnv {
pub deploy_env: DeployEnv,
pub network: LxNetwork,
pub use_sgx: bool,
}Expand description
A wallet environment, e.g. “prod-mainnet-true”.
We use this to disambiguate persisted state and secrets so we don’t accidentally clobber state when testing across e.g. testnet vs regtest.
Fields§
§deploy_env: DeployEnvProd, staging, or dev.
network: LxNetworkThe Bitcoin network: mainnet, testnet, or regtest.
use_sgx: boolWhether our node should be running in a real SGX enclave.
Set to true for prod and staging.
Implementations§
Source§impl WalletEnv
impl WalletEnv
Sourcepub fn seedphrase_path(&self, data_dir: &Path) -> PathBuf
pub fn seedphrase_path(&self, data_dir: &Path) -> PathBuf
Returns the path to the seedphrase file for this environment.
- Mainnet (prod):
<data_dir>/seedphrase.txt - Other environments:
<data_dir>/seedphrase.<wallet_env>.txt
Trait Implementations§
impl Copy for WalletEnv
impl Eq for WalletEnv
impl StructuralPartialEq for WalletEnv
Auto Trait Implementations§
impl Freeze for WalletEnv
impl RefUnwindSafe for WalletEnv
impl Send for WalletEnv
impl Sync for WalletEnv
impl Unpin for WalletEnv
impl UnwindSafe for WalletEnv
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.