refactor(persist): update file_store, sqlite, wallet to use bdk_chain::persist

Also update examples and remove bdk_persist crate.
This commit is contained in:
Steve Myers
2024-06-01 00:06:20 -05:00
parent 54b0c11cbe
commit 9e97ac0330
39 changed files with 542 additions and 1086 deletions

View File

@@ -77,11 +77,11 @@ fn main() -> Result<(), Box<dyn Error>> {
);
// Create a new wallet from descriptors
let mut wallet = Wallet::new_no_persist(&descriptor, &internal_descriptor, Network::Regtest)?;
let mut wallet = Wallet::new(&descriptor, &internal_descriptor, Network::Regtest)?;
println!(
"First derived address from the descriptor: \n{}",
wallet.next_unused_address(KeychainKind::External)?,
wallet.next_unused_address(KeychainKind::External),
);
// BDK also has it's own `Policy` structure to represent the spending condition in a more