Skip to content

Commit c1f052e

Browse files
committed
Merge bitcoindevkit#205: feature: Add Caravan wallet format import/export support
1dbe85a docs: add round-trip limitation notice for Caravan export/import (vkprogrammer-001) d8596e6 Fix: improve derivation path handling and add tests (vkprogrammer-001) 1068afd Fix: Replace string manipulation with stronger Bitcoin types in Caravan export (vkprogrammer-001) 2e920a2 Add Caravan wallet format support (vkprogrammer-001) Pull request description: ### Description This PR implements support for importing and exporting wallets in the Caravan wallet format as requested in issue bitcoindevkit#5. ### Changes - Added `CaravanExport` struct to handle Caravan wallet format - Implemented methods to export a wallet to Caravan JSON format - Added functionality to import Caravan wallet configs and convert to BDK descriptors - Added documentation with usage examples - Added comprehensive test coverage for all supported multisig types (P2SH, P2WSH, P2SH-P2WSH) ### Implementation Details - All code is contained in the wallet/export.rs module alongside the existing FullyNoded export functionality - Support for different address types required by Caravan (P2SH, P2WSH, P2SH-P2WSH) - Handles the mapping between BDK descriptor format and Caravan's JSON configuration format ### Testing The implementation includes tests for: - Exporting BDK wallets to Caravan format - Importing Caravan configurations to BDK wallets - All supported address types (P2SH, P2WSH, P2SH-P2WSH) - Network detection (mainnet/testnet) ### 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 `cargo fmt` and `cargo clippy` before committing Closes bitcoindevkit#5 ACKs for top commit: ValuedMammal: reACK 1dbe85a Tree-SHA512: ef144089f8b1b3de18d1c6c518259f6ad7132b88cf52573befba557221b3302f01d9197a79c7918411806d9b59047ca24ec03f617acbad3980de3c185905c38f
2 parents 7df3598 + 1dbe85a commit c1f052e

2 files changed

Lines changed: 785 additions & 6 deletions

File tree

0 commit comments

Comments
 (0)