pub struct WalletBuilder { /* private fields */ }Expand description
Builder for constructing a ZincWallet from seed, network, and options.
Implementations§
Source§impl WalletBuilder
impl WalletBuilder
Sourcepub fn from_seed(network: Network, seed: Seed64) -> Self
pub fn from_seed(network: Network, seed: Seed64) -> Self
Create a new builder from network and a strongly typed 64-byte seed.
Sourcepub fn from_mnemonic(network: Network, mnemonic: &ZincMnemonic) -> Self
pub fn from_mnemonic(network: Network, mnemonic: &ZincMnemonic) -> Self
Create a new builder from network and mnemonic material.
Sourcepub fn with_scheme(self, scheme: AddressScheme) -> Self
pub fn with_scheme(self, scheme: AddressScheme) -> Self
Set wallet address scheme (Unified or Dual).
Sourcepub fn with_account_index(self, account_index: u32) -> Self
pub fn with_account_index(self, account_index: u32) -> Self
Set active account index used for descriptor derivation.
Sourcepub fn with_persistence_state(self, persistence: ZincPersistence) -> Self
pub fn with_persistence_state(self, persistence: ZincPersistence) -> Self
Attach typed persistence state to hydrate wallet state.
Sourcepub fn with_persistence(self, json: &str) -> Result<Self, String>
pub fn with_persistence(self, json: &str) -> Result<Self, String>
Attach serialized persistence JSON to hydrate wallet state.
Sourcepub fn build(self) -> Result<ZincWallet, String>
pub fn build(self) -> Result<ZincWallet, String>
Build a fully initialized ZincWallet.
Auto Trait Implementations§
impl !Freeze for WalletBuilder
impl RefUnwindSafe for WalletBuilder
impl Send for WalletBuilder
impl Sync for WalletBuilder
impl Unpin for WalletBuilder
impl UnsafeUnpin for WalletBuilder
impl UnwindSafe for WalletBuilder
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