Skip to content

feat: Implement BIP-0329 wallet labels#383

Draft
Leeyah-123 wants to merge 3 commits intobitcoindevkit:masterfrom
Leeyah-123:feat/wallet-labels-support
Draft

feat: Implement BIP-0329 wallet labels#383
Leeyah-123 wants to merge 3 commits intobitcoindevkit:masterfrom
Leeyah-123:feat/wallet-labels-support

Conversation

@Leeyah-123
Copy link

@Leeyah-123 Leeyah-123 commented Feb 9, 2026

Description

This PR implements wallet label import/export support, based on the BIP 0329 specification.
Closes #168.

Changelog notice

  • feat(bdk_wallet): BIP 329 label import/export support

Checklists

All Submissions:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

@Leeyah-123 Leeyah-123 force-pushed the feat/wallet-labels-support branch from 90dcc91 to df89452 Compare February 9, 2026 22:26
@Leeyah-123 Leeyah-123 changed the title feat: Implement BIP-0329 wallet labels with serialization, truncation. feat: Implement BIP-0329 wallet labels Feb 9, 2026
@Leeyah-123 Leeyah-123 force-pushed the feat/wallet-labels-support branch 2 times, most recently from 8bd2c04 to 948b383 Compare February 10, 2026 09:43
- Add LabelRecord::validate() for ISO8601 timestamps and rate maps
- Add lenient boolean deserialization for OutputLabel.spendable field
- Add ValidationError variant to LabelImportError with line numbers
- Add utility functions: validate_iso8601, validate_rate_map, deserialize_option_boolsy
- Add tests for label persistence and deletion across reloads
- Add import/export tests for JSONL format
- Add encryption/decryption roundtrip tests
- Add validation tests for timestamps, rates, and field types
- Cover all label types: tx, addr, pubkey, input, output, xpub
- Add error handling tests for invalid JSON and missing fields
@Leeyah-123 Leeyah-123 force-pushed the feat/wallet-labels-support branch from 948b383 to 60b02c7 Compare February 10, 2026 09:51
@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 76.02862% with 134 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.19%. Comparing base (35502e0) to head (60b02c7).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
src/wallet/labels.rs 75.34% 71 Missing ⚠️
src/wallet/mod.rs 76.85% 28 Missing ⚠️
src/wallet/utils.rs 69.23% 28 Missing ⚠️
src/wallet/changeset.rs 87.71% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #383      +/-   ##
==========================================
- Coverage   86.46%   86.19%   -0.28%     
==========================================
  Files          25       26       +1     
  Lines        8527     9052     +525     
==========================================
+ Hits         7373     7802     +429     
- Misses       1154     1250      +96     
Flag Coverage Δ
rust 86.19% <76.02%> (-0.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ValuedMammal ValuedMammal added the BOSS Bitcoin Open Source project ideas label Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BOSS Bitcoin Open Source project ideas

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

BIP 329 "Wallet Labels Export Format" Support

2 participants