Struct bdk_wallet::LoadParams

source ·
pub struct LoadParams { /* private fields */ }
Expand description

Implementations§

source§

impl LoadParams

source

pub fn new() -> Self

Construct parameters with default values.

Default values: lookahead = [DEFAULT_LOOKAHEAD]

source

pub fn keymap(self, keychain: KeychainKind, keymap: KeyMap) -> Self

Extend the given keychain’s keymap.

source

pub fn descriptor<D>( self, keychain: KeychainKind, expected_descriptor: Option<D> ) -> Self
where D: IntoWalletDescriptor + Send + 'static,

Checks the expected_descriptor matches exactly what is loaded for keychain.

§Note

You must also specify extract_keys if you wish to add a signer for an expected descriptor containing secrets.

source

pub fn check_network(self, network: Network) -> Self

Checks that the given network matches the one loaded from persistence.

source

pub fn check_genesis_hash(self, genesis_hash: BlockHash) -> Self

Checks that the given genesis_hash matches the one loaded from persistence.

source

pub fn lookahead(self, lookahead: u32) -> Self

Use custom lookahead value.

source

pub fn extract_keys(self) -> Self

Whether to try extracting private keys from the provided descriptors upon loading. See also LoadParams::descriptor.

source

pub fn load_wallet<P>( self, persister: &mut P ) -> Result<Option<PersistedWallet<P>>, LoadWithPersistError<P::Error>>
where P: WalletPersister,

Load PersistedWallet with the given WalletPersister.

source

pub async fn load_wallet_async<P>( self, persister: &mut P ) -> Result<Option<PersistedWallet<P>>, LoadWithPersistError<P::Error>>

source

pub fn load_wallet_no_persist( self, changeset: ChangeSet ) -> Result<Option<Wallet>, LoadError>

Load Wallet without persistence.

Trait Implementations§

source§

impl Default for LoadParams

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V