bitcoindevkit / bitcoindevkit/bdk_wallet

Remove warning on private multipath descriptors (4.0)

Open Beginner friendly
#511 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
59
Forks
105
Avg merge
10d 9h
Merged PRs (30d)
1

Description

This is related to #306, #418, #506, #510.

As of miniscript 13.1.0, this is no longer true, and using private multipath descriptors in our constructors should work well. This will therefore ship with the 4.0 version of bdk_wallet. I'm opening this just to keep track and not forget to fix the docs!

### Examples

_miniscript 12.X_

```rust
let secp = Secp256k1::new();
// Public two-path multipath descriptor
let desc_public = "wpkh(tpubDDks68wKK1xKaVVVbNmXUAx68K1K817M6KwjvjEyCrjdU7xMvjKnfYAtZjfZcrfPfGFzqmibuVqMzKJGbBnK7mo7WSJri8Y9QgM7aNQ3fCp/1'/2'/0/<0;1>/*)";
// Private two-path multipath descriptor
let desc_private = "tr(tprv8ZgxMBicQKsPdfqH2fGKQkBAMXpqCpC6v6WhYnEZC7TbpcEavC1N27tHbFP16eLm9XdFDW6cqnGChit8gWXyyT1zQ3xFqUWgHTS9XBQw3j5/1'/2'/0/<0;1>/*)";

let res_public = Descriptor::::parse_descriptor(&secp, desc_public);
let res_private = Descriptor::::parse_descriptor(&secp, desc_private);
println!("{:?}", res_public);
println!("{:?}", res_private);

// Ok((wpkh(MultiXPub(...)))
// Err(Unexpected("can't make a multi-xpriv with hardened derivation steps that are not shared among all paths into a public key"))
```

_miniscript 13.1.0_

```rust
let secp = Secp256k1::new();
// Public two-path multipath descriptor
let desc_public = "wpkh(tpubDDks68wKK1xKaVVVbNmXUAx68K1K817M6KwjvjEyCrjdU7xMvjKnfYAtZjfZcrfPfGFzqmibuVqMzKJGbBnK7mo7WSJri8Y9QgM7aNQ3fCp/1'/2'/0/<0;1>/*)";
// Private two-path multipath descriptor
let desc_private = "tr(tprv8ZgxMBicQKsPdfqH2fGKQkBAMXpqCpC6v6WhYnEZC7TbpcEavC1N27tHbFP16eLm9XdFDW6cqnGChit8gWXyyT1zQ3xFqUWgHTS9XBQw3j5/1'/2'/0/<0;1>/*)";

let res_public = Descriptor::::parse_descriptor(&secp, desc_public);
let res_private = Descriptor::::parse_descriptor(&secp, desc_private);
println!("{:?}", res_public);
println!("{:?}", res_private);

// Ok((wpkh(MultiXPub(...))))
// Ok((tr(MultiXPub(...))))
```

Contributor guide

Open the contributing guide

Research direction

Start by searching the documentation for warnings or guidance about private multipath descriptors and the constructors shown in the issue. Compare the miniscript 12.X and 13.1.0 behavior described here, then update the affected guidance so it no longer warns that private multipath descriptors fail. Done means the docs reflect miniscript 13.1.0 and bdk_wallet 4.0 behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
67/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.