A Rust-based Bitcoin wallet implementation using the Bitcoin Development Kit (BDK) that demonstrates interaction with a Bitcoin Core node through RPC.
This project showcases how to create a Bitcoin wallet using BDK that can interact with a Bitcoin Core node. It demonstrates various wallet operations including:
- Creating and managing wallets
- Generating addresses
- Sending and receiving transactions
- Working with PSBTs (Partially Signed Bitcoin Transactions)
- Blockchain synchronization
- Rust (latest stable version)
- Bitcoin Core node running in regtest mode
- Basic understanding of Bitcoin transactions and wallet operations
- bdk v0.10.0 (with features: all-keys, key-value-db, rpc)
- anyhow v1.0.94
- dirs-next v2.0.0
- Clone the repository:
git clone https://github.com/yourusername/bdk-core-wallet.git
cd bdk-core-wallet
- Build the project:
cargo build
The application expects a Bitcoin Core node running locally with the following default configuration:
- RPC URL: http://127.0.0.1:18443
- Network: Regtest
- Username: admin
- Password: password
-
Start your Bitcoin Core node in regtest mode.
-
Run the application:
cargo run
The application will:
- Create a test wallet in Bitcoin Core
- Generate initial blocks for testing
- Create a BDK wallet with deterministic descriptors
- Perform a test transaction
- Sign and broadcast the transaction
- Wallet Creation: Generates deterministic wallets
- Address Management: Creates and manages addresses using descriptor-based wallet structure
- Transaction Handling: Demonstrates complete transaction lifecycle including:
- Creating transactions
- Signing with PSBTs
- Broadcasting to the network
- Blockchain Synchronization: Syncs wallet state with the Bitcoin network (regtest)
- Secure Key Management: Uses BIP32 derivation paths for key management
src/main.rs
: Main application logic and wallet operationsCargo.toml
: Project dependencies and configuration
This project is open source and is intended for educational purposes.
- Bitcoin Development Kit (BDK) team
- Bitcoin Core developers
- Rajarshi Maitra
This Readme was generated in first draft by Windsurf (https://codeium.com/windsurf)