• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bitcoindevkit / bdk_wallet / 16656352974
85%

Build:
DEFAULT BRANCH: master
Ran 31 Jul 2025 05:59PM UTC
Jobs 1
Files 22
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Jul 2025 05:57PM UTC coverage: 84.874% (+0.1%) from 84.733%
16656352974

push

github

notmandatory
Merge bitcoindevkit/bdk_wallet#275: Multipath descriptor support (BIP 389)

da0b57713 Update wallet/src/wallet/params.rs (Andreas Schjønhaug)
9e3adf229 feat(wallet): add multipath descriptor support for two-path descriptors (Andreas Schjønhaug)

Pull request description:

  ### Description

  #### Key Features:
    - New API: `Wallet::create_multipath(descriptor)` following the same pattern as `create()` and `create_single()`
    - [BIP 389](https://github.com/bitcoin/bips/blob/master/bip-0389.mediawiki) compliance with exactly 2-path validation (receive and change)
    - Robust validation with clear error messages
    - Pattern consistency with existing wallet creation methods

   #### Usage Example:

  ```rust
  let multipath_desc = "wpkh([9a6a2580/84'/1'/0']tpub.../‹0;1›/*)";
  let wallet = Wallet::create_multipath(multipath_desc)
        .network(Network::Testnet)
        .create_wallet_no_persist()?;

  // Automatically creates separate receive and change descriptors
  let receive_addr = wallet.peek_address(KeychainKind::External, 0);  // Uses path /0/*
  let change_addr = wallet.peek_address(KeychainKind::Internal, 0);   // Uses path /1/*
  ```

  ### Notes to the reviewers

  #### Design Decisions:
    1. Pattern Consistency: Uses `make_multipath_descriptor_to_extract()` helper following the same pattern as existing `make_descriptor_to_extract()` function
    2. Lazy Evaluation: Descriptor parsing only happens when needed during wallet creation, not during parameter setup - this maintains performance and follows Rust's lazy evaluation patterns
    3. Strict Validation: Only allows exactly 2-path multipath descriptors to ensure proper receive/change separation
    4. API Consistency: The `create_multipath()` method returns `CreateParams` just like `create()` and `create_single()`, maintaining the fluent builder pattern

  #### Implementation Notes:
    - The function calls `make_multi... (continued)

80 of 82 new or added lines in 4 files covered. (97.56%)

6655 of 7841 relevant lines covered (84.87%)

3496.34 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
6.67
0.0% wallet/src/descriptor/error.rs
1
88.36
-0.08% wallet/src/descriptor/mod.rs
Jobs
ID Job ID Ran Files Coverage
1 16656352974.1 31 Jul 2025 05:59PM UTC 22
84.87
GitHub Action Run
Source Files on build 16656352974
  • Tree
  • List 22
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 2692684c on github
  • Prev Build on master (#16389875164)
  • Next Build on master (#16660250657)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc