Struct bdk_wallet::CreateParams
source · pub struct CreateParams { /* private fields */ }
Expand description
Parameters for Wallet::create
or PersistedWallet::create
.
Implementations§
source§impl CreateParams
impl CreateParams
sourcepub fn new_single<D: IntoWalletDescriptor + Send + 'static>(
descriptor: D
) -> Self
pub fn new_single<D: IntoWalletDescriptor + Send + 'static>( descriptor: D ) -> Self
Construct parameters with provided descriptor
.
Default values:
change_descriptor
=None
network
= [Network::Bitcoin
]genesis_hash
=None
lookahead
= [DEFAULT_LOOKAHEAD
]
Use this method only when building a wallet with a single descriptor. See
also Wallet::create_single
.
sourcepub fn new<D: IntoWalletDescriptor + Send + 'static>(
descriptor: D,
change_descriptor: D
) -> Self
pub fn new<D: IntoWalletDescriptor + Send + 'static>( descriptor: D, change_descriptor: D ) -> Self
Construct parameters with provided descriptor
and change_descriptor
.
Default values:
network
= [Network::Bitcoin
]genesis_hash
=None
lookahead
= [DEFAULT_LOOKAHEAD
]
sourcepub fn keymap(self, keychain: KeychainKind, keymap: KeyMap) -> Self
pub fn keymap(self, keychain: KeychainKind, keymap: KeyMap) -> Self
Extend the given keychain
’s keymap
.
sourcepub fn genesis_hash(self, genesis_hash: BlockHash) -> Self
pub fn genesis_hash(self, genesis_hash: BlockHash) -> Self
Use a custom genesis_hash
.
sourcepub fn create_wallet<P>(
self,
persister: &mut P
) -> Result<PersistedWallet<P>, CreateWithPersistError<P::Error>>where
P: WalletPersister,
pub fn create_wallet<P>(
self,
persister: &mut P
) -> Result<PersistedWallet<P>, CreateWithPersistError<P::Error>>where
P: WalletPersister,
Create PersistedWallet
with the given WalletPersister
.
sourcepub async fn create_wallet_async<P>(
self,
persister: &mut P
) -> Result<PersistedWallet<P>, CreateWithPersistError<P::Error>>where
P: AsyncWalletPersister,
pub async fn create_wallet_async<P>(
self,
persister: &mut P
) -> Result<PersistedWallet<P>, CreateWithPersistError<P::Error>>where
P: AsyncWalletPersister,
Create PersistedWallet
with the given AsyncWalletPersister
.
sourcepub fn create_wallet_no_persist(self) -> Result<Wallet, DescriptorError>
pub fn create_wallet_no_persist(self) -> Result<Wallet, DescriptorError>
Create Wallet
without persistence.
Auto Trait Implementations§
impl Freeze for CreateParams
impl !RefUnwindSafe for CreateParams
impl Send for CreateParams
impl !Sync for CreateParams
impl Unpin for CreateParams
impl !UnwindSafe for CreateParams
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