pub struct LoadParams { /* private fields */ }Expand description
Parameters for Wallet::load or PersistedWallet::load.
Implementations§
Source§impl LoadParams
impl LoadParams
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct parameters with default values.
Default values: 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 descriptor<D>(
self,
keychain: KeychainKind,
expected_descriptor: Option<D>,
) -> Selfwhere
D: IntoWalletDescriptor + Send + 'static,
pub fn descriptor<D>(
self,
keychain: KeychainKind,
expected_descriptor: Option<D>,
) -> Selfwhere
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.
Sourcepub fn check_network(self, network: Network) -> Self
pub fn check_network(self, network: Network) -> Self
Checks that the given network matches the one loaded from persistence.
Sourcepub fn check_genesis_hash(self, genesis_hash: BlockHash) -> Self
pub fn check_genesis_hash(self, genesis_hash: BlockHash) -> Self
Checks that the given genesis_hash matches the one loaded from persistence.
Sourcepub fn lookahead(self, lookahead: u32) -> Self
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.
Sourcepub fn extract_keys(self) -> Self
pub fn extract_keys(self) -> Self
Whether to try extracting private keys from the provided descriptors upon loading.
See also LoadParams::descriptor.
Sourcepub fn load_wallet<P>(
self,
persister: &mut P,
) -> Result<Option<PersistedWallet<P>>, LoadWithPersistError<P::Error>>where
P: WalletPersister,
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.
Sourcepub async fn load_wallet_async<P>(
self,
persister: &mut P,
) -> Result<Option<PersistedWallet<P>>, LoadWithPersistError<P::Error>>where
P: AsyncWalletPersister,
pub async fn load_wallet_async<P>(
self,
persister: &mut P,
) -> Result<Option<PersistedWallet<P>>, LoadWithPersistError<P::Error>>where
P: AsyncWalletPersister,
Load PersistedWallet with the given AsyncWalletPersister.