pub struct WalletBuilder<S: SecretManage = SecretManager> { /* private fields */ }
Available on crate feature
wallet
only.Expand description
Builder for the wallet.
Implementations§
Source§impl<S: 'static + SecretManage> WalletBuilder<S>
impl<S: 'static + SecretManage> WalletBuilder<S>
Sourcepub fn new() -> Self
pub fn new() -> Self
Initialises a new instance of the wallet builder with the default storage adapter.
Sourcepub fn with_client_options(
self,
client_options: impl Into<Option<ClientOptions>>,
) -> Self
pub fn with_client_options( self, client_options: impl Into<Option<ClientOptions>>, ) -> Self
Set the client options for the core nodes.
Sourcepub fn with_coin_type(self, coin_type: impl Into<Option<u32>>) -> Self
pub fn with_coin_type(self, coin_type: impl Into<Option<u32>>) -> Self
Set the coin type for the wallet. Registered coin types can be found at https://github.com/satoshilabs/slips/blob/master/slip-0044.md.
Sourcepub fn with_storage_options(
self,
storage_options: impl Into<Option<StorageOptions>>,
) -> Self
Available on crate feature storage
only.
pub fn with_storage_options( self, storage_options: impl Into<Option<StorageOptions>>, ) -> Self
storage
only.Set the storage options to be used.
Sourcepub fn with_secret_manager(self, secret_manager: impl Into<Option<S>>) -> Self
pub fn with_secret_manager(self, secret_manager: impl Into<Option<S>>) -> Self
Set the secret_manager to be used.
Sourcepub fn with_secret_manager_arc(
self,
secret_manager: impl Into<Option<Arc<RwLock<S>>>>,
) -> Self
pub fn with_secret_manager_arc( self, secret_manager: impl Into<Option<Arc<RwLock<S>>>>, ) -> Self
Set the secret_manager to be used wrapped in an Arc<RwLock<>> so it can be cloned and mutated also outside of the Wallet.
Sourcepub fn with_storage_path(self, path: impl Into<PathBuf>) -> Self
Available on crate feature storage
only.
pub fn with_storage_path(self, path: impl Into<PathBuf>) -> Self
storage
only.Set the storage path to be used.
Trait Implementations§
Source§impl<S: Debug + SecretManage> Debug for WalletBuilder<S>
impl<S: Debug + SecretManage> Debug for WalletBuilder<S>
Source§impl<S: SecretManage> Default for WalletBuilder<S>
impl<S: SecretManage> Default for WalletBuilder<S>
Source§impl<'de, S: SecretManage> Deserialize<'de> for WalletBuilder<S>
impl<'de, S: SecretManage> Deserialize<'de> for WalletBuilder<S>
Source§fn deserialize<D>(d: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<S: SecretManage> Serialize for WalletBuilder<S>
impl<S: SecretManage> Serialize for WalletBuilder<S>
Auto Trait Implementations§
impl<S> Freeze for WalletBuilder<S>
impl<S = SecretManager> !RefUnwindSafe for WalletBuilder<S>
impl<S> Send for WalletBuilder<S>
impl<S> Sync for WalletBuilder<S>
impl<S> Unpin for WalletBuilder<S>
impl<S = SecretManager> !UnwindSafe for WalletBuilder<S>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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