rustywallet-export
Export private keys to various formats.
Supported Formats
| Format | Description | Example Output |
|---|---|---|
| WIF | Wallet Import Format | KwdMAjG... or 5HueCGU... |
| Hex | Raw hex string | 0c28fca3... |
| JSON | Structured JSON | {"address": "1...", "wif": "K..."} |
| CSV | Comma-separated | address,wif,hex |
| Paper Wallet | Address + WIF pair | For cold storage |
| BIP38 | Encrypted key | 6PRVWUbk... |
| BIP21 | Bitcoin URI | bitcoin:1...?amount=1.5 |
Quick Start
use *;
use PrivateKey;
let key = random;
// Export to WIF
let wif = export_wif;
// Export to hex
let hex = export_hex;
// Export to JSON
let json = export_json?;
// Generate paper wallet
let paper = to_paper_wallet?;
println!;
println!;
Batch Export
use *;
use PrivateKey;
let keys: = .map.collect;
// Export to CSV
let csv = export_csv?;
// Export to JSON array
let json = export_json_batch?;
BIP38 Encryption
use ;
use PrivateKey;
let key = random;
let encrypted = export_bip38?;
// Returns: 6PRVWUbk...
BIP21 URI (for QR codes)
use ;
let uri = to_bip21_uri;
// Returns: bitcoin:1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?amount=0.001&label=Donation
License
MIT