Wallet module of the Bisq-musig protocol. This crate has the primitives for interacting with a wallet.
It currently provides the following features:
ProtocolWalletApi: the trait through which the
protocol crate uses a wallet, implemented by a plain
bdk_wallet::Wallet, the in-memory MemWallet
and the persistent BMPWalletBMPWallet: a persistent HD wallet on top of BDK
<dbname>.saltPassword
(wallet::password), which can only be built from a string
that follows the password rules (at least 8 characters, with a lowercase
letter, an uppercase letter, a number and a special character; a letter
of a script without case, such as Chinese or Arabic, counts as both
lowercase and uppercase); a rejected password’s error states the rules
in plain EnglishMemWallet: an in-memory wallet synced via BDK Electrum,
mainly used in testsbdk_kyoto, behind the ChainDataSource
traitAn imported key is identified by its internal Taproot key
P, independently of its output template. Therefore
tr(P) and tr(P, tap_tree) represent the same
imported key: once either form is imported, another import with the same
P is a duplicate and must not create a second wallet
entry.
cargo test -p wallet
The tests spin up bitcoind + electrs via
the testenv
crate.
In order to run the integration tests:
cargo test -p wallet --test wallet_integration_test
If you want to display the tests stdout, add the option
--show-output as follows:
cargo test -p wallet --test wallet_integration_test -- --show-output