bdk_wallet

Struct 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 a custom lookahead value.

The lookahead defines a number of script pubkeys to derive over and above the last revealed index. Without a lookahead the indexer will miss outputs you own when processing transactions whose output script pubkeys lie beyond the last revealed index. In most cases the default value [DEFAULT_LOOKAHEAD] is sufficient.

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>,

Source§

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>,

Source§

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