|
Ran
|
Jobs
1
|
Files
22
|
Run time
1min
|
Badge
README BADGES
|
push
github
Merge bitcoindevkit/bdk_wallet#306: Add docs + test on required use of xpub for multipath constructor <a class=hub.com/bitcoindevkit/bdk_wallet/commit/e647ed2692cfb9234801d72a88f690dbd73d5777">e647ed269 docs: add wording on required use of xpub for multipath constructor (thunderbiscuit) Pull request description: This PR makes explicit a limitation of the `Wallet::create_from_two_path_descriptor` method, in that you must use public descriptors to build the wallet using this constructor, meaning you can only build watch-only wallets. I also added a test to showcase this and the error returned. See [my comment here](https://github.com/bitcoindevkit/bdk_wallet/pull/275#issuecomment-3251334629) for more: From what I can tell the issue is that miniscript cannot parse an xprv (I saw a comment from Sanket about this somewhere but now I can't find it anymore) if the multipath contains hardened derivation paths, and therefore miniscipt cannot ensure the xprv will be parsable into public keys in all cases? Something like that. But our arguments for bdk wallet constructors require the `IntoWalletDescriptor` trait: ```rust pub trait IntoWalletDescriptor { /// Convert to wallet descriptor fn into_wallet_descriptor( self, secp: &SecpCtx, network: Network, ) -> Result<(ExtendedDescriptor, KeyMap), DescriptorError>; } pub type ExtendedDescriptor = Descriptor<DescriptorPublicKey>; ``` In other words, upon creation, the wallet will always try to parse the descriptor string into its public form, and here since it cannot be done by miniscript we fail to build. ### Changelog notice No changelog notice. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `just p` before pushing ACKs for top commit: ValuedMammal: ACK e647ed2692cfb9234801d72a88f690dbd73d5777 oleonardolima: utACK e647ed26... (continued)
5 of 5 new or added lines in 1 file covered. (100.0%)
6674 of 7859 relevant lines covered (84.92%)
3479.41 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 17499737921.1 | 22 |
84.92 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|