bdk_wallet

Struct CreateParams

Source
pub struct CreateParams { /* private fields */ }
Expand description

Implementations§

Source§

impl CreateParams

Source

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.

Source

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]
Source

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

Extend the given keychain’s keymap.

Source

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

Set network.

Source

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

Use a custom genesis_hash.

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 create_wallet<P>( self, persister: &mut P, ) -> Result<PersistedWallet<P>, CreateWithPersistError<P::Error>>
where P: WalletPersister,

Create PersistedWallet with the given WalletPersister.

Source

pub async fn create_wallet_async<P>( self, persister: &mut P, ) -> Result<PersistedWallet<P>, CreateWithPersistError<P::Error>>

Create PersistedWallet with the given AsyncWalletPersister.

Source

pub fn create_wallet_no_persist(self) -> Result<Wallet, DescriptorError>

Create Wallet without persistence.

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