Expand description
Wallet export
This modules implements the wallet export format used by FullyNoded.
Examples
Import from JSON
let import = r#"{
"descriptor": "wpkh([c258d2e4\/84h\/1h\/0h]tpubDD3ynpHgJQW8VvWRzQ5WFDCrs4jqVFGHB3vLC3r49XHJSqP8bHKdK4AriuUKLccK68zfzowx7YhmDN8SiSkgCDENUFx9qVw65YyqM78vyVe\/0\/*)",
"blockheight":1782088,
"label":"testnet"
}"#;
let import = FullyNodedExport::from_str(import)?;
let wallet = Wallet::new_no_persist(
&import.descriptor(),
import.change_descriptor().as_ref(),
Network::Testnet,
)?;
Export a Wallet
let wallet = Wallet::new_no_persist(
"wpkh([c258d2e4/84h/1h/0h]tpubDD3ynpHgJQW8VvWRzQ5WFDCrs4jqVFGHB3vLC3r49XHJSqP8bHKdK4AriuUKLccK68zfzowx7YhmDN8SiSkgCDENUFx9qVw65YyqM78vyVe/0/*)",
Some("wpkh([c258d2e4/84h/1h/0h]tpubDD3ynpHgJQW8VvWRzQ5WFDCrs4jqVFGHB3vLC3r49XHJSqP8bHKdK4AriuUKLccK68zfzowx7YhmDN8SiSkgCDENUFx9qVw65YyqM78vyVe/1/*)"),
Network::Testnet,
)?;
let export = FullyNodedExport::export_wallet(&wallet, "exported wallet", true).unwrap();
println!("Exported: {}", export.to_string());
Structs
Structure that contains the export of a wallet
Type Definitions
WalletExportDeprecated
Alias for
FullyNodedExport