diff --git a/Cargo.lock b/Cargo.lock index 13bc85f..73ee441 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -549,8 +549,8 @@ dependencies = [ [[package]] name = "bdk" -version = "1.0.0-alpha.6" -source = "git+https://github.com/bitcoindevkit/bdk?rev=50c549b5aca3c58bcffce359f4937a8c3eb57a35#50c549b5aca3c58bcffce359f4937a8c3eb57a35" +version = "1.0.0-alpha.7" +source = "git+https://github.com/bitcoindevkit/bdk?rev=e5aa4fe9e6dc9448b565b6549225558d42dbae8f#e5aa4fe9e6dc9448b565b6549225558d42dbae8f" dependencies = [ "bdk_chain", "bitcoin", @@ -564,8 +564,8 @@ dependencies = [ [[package]] name = "bdk_chain" -version = "0.10.0" -source = "git+https://github.com/bitcoindevkit/bdk?rev=50c549b5aca3c58bcffce359f4937a8c3eb57a35#50c549b5aca3c58bcffce359f4937a8c3eb57a35" +version = "0.11.0" +source = "git+https://github.com/bitcoindevkit/bdk?rev=e5aa4fe9e6dc9448b565b6549225558d42dbae8f#e5aa4fe9e6dc9448b565b6549225558d42dbae8f" dependencies = [ "bitcoin", "miniscript", diff --git a/keechain-core/Cargo.toml b/keechain-core/Cargo.toml index a2ce980..b518de4 100644 --- a/keechain-core/Cargo.toml +++ b/keechain-core/Cargo.toml @@ -15,7 +15,7 @@ default = ["sysinfo"] [dependencies] aes = "0.8" -bdk = { git = "https://github.com/bitcoindevkit/bdk", rev = "50c549b5aca3c58bcffce359f4937a8c3eb57a35", default-features = false, features = ["std"] } +bdk = { git = "https://github.com/bitcoindevkit/bdk", rev = "e5aa4fe9e6dc9448b565b6549225558d42dbae8f", default-features = false, features = ["std"] } bip39 = { version = "2.0", default-features = false, features = ["std", "zeroize"] } cbc = { version = "0.1", features = ["alloc"] } chacha20poly1305 = "0.10" diff --git a/keechain-core/src/psbt.rs b/keechain-core/src/psbt.rs index b00970d..b0053ac 100644 --- a/keechain-core/src/psbt.rs +++ b/keechain-core/src/psbt.rs @@ -346,7 +346,6 @@ mod tests { use std::str::FromStr; use bdk::bitcoin::Network; - use bdk::miniscript::psbt::PsbtExt; use bip39::Mnemonic; use super::*; @@ -372,10 +371,15 @@ mod tests { let seed = Seed::new::<&str>(mnemonic, None); let mut psbt = PartiallySignedTransaction::from_base64("cHNidP8BAIABAAAAAQiqsV3pVy3i3mOXb44eSY6YXfyBJJquLJUFOQgKxqogAQAAAAD9////ApcWAAAAAAAAGXapFFnK2lAxTIKeGfWneG+O4NSYf0KdiKysDAAAAAAAACJRIDah9WL9RrG8cBtYLPY/dqsOd9+Ysh7+hNnInepPfCUoKTclAAABASvmIwAAAAAAACJRIIFkFWTG5s8O4M/FVct0eYcA0ayNYYMfdUK3VDHm3PNNIhXAAMzzAr/xU1CxCRn2xLf6Vk7deJJ1P2IphMFQkGwGZNwjIFSh53RXgXULuDjlB82aLiF9LkqzhtrTHbwF5MJP9JNyrMAhFlSh53RXgXULuDjlB82aLiF9LkqzhtrTHbwF5MJP9JNyOQETYY0ojn8xo/xlOd4vxPBtGqXOW/RgxpD1azdzLllueXNW5FdWAACAAQAAgBv6C4AAAAAAAAAAACEWAMzzAr/xU1CxCRn2xLf6Vk7deJJ1P2IphMFQkGwGZNwZAJv0NUtWAACAAQAAgBv6C4AAAAAAAAAAAAEXIADM8wK/8VNQsQkZ9sS3+lZO3XiSdT9iKYTBUJBsBmTcARggE2GNKI5/MaP8ZTneL8TwbRqlzlv0YMaQ9Ws3cy5ZbnkAAAEFIMyrxjur6FZA49b3vxbW2gGoFCVIDqhp4WQ8eJq6uV9EAQYlAMAiIFQ0gIXoLoC1Uk+d9i2t+6KirZ4znJISAZS7NkP7DSBbrCEHzKvGO6voVkDj1ve/FtbaAagUJUgOqGnhZDx4mrq5X0QZAJv0NUtWAACAAQAAgBv6C4AAAAAAAQAAACEHVDSAhegugLVST532La37oqKtnjOckhIBlLs2Q/sNIFs5ARpaIl7upiRp2Mj47BtMoV8ZSitR752q1zy5u5ZgWQ7Lc1bkV1YAAIABAACAG/oLgAAAAAABAAAAAA==").unwrap(); let finalized = psbt - .sign_custom(&seed, Some(descriptor), Vec::new(), NETWORK, &secp) + .sign_custom(&seed, Some(descriptor.clone()), Vec::new(), NETWORK, &secp) .unwrap(); assert!(finalized); - psbt.finalize_mut(&secp).unwrap(); + + // TODO: psbt.finalize_mut(&secp).unwrap(); + + let wallet = Wallet::new_no_persist(&descriptor.to_string(), None, NETWORK).unwrap(); + let signopts = SignOptions::default(); + wallet.finalize_psbt(&mut psbt, signopts).unwrap(); } #[test] @@ -404,7 +408,12 @@ mod tests { .sign_with_descriptor(&seed, descriptor.clone(), Network::Testnet, &secp) .unwrap(); assert!(finalized); - psbt.finalize_mut(&secp).unwrap(); + + // TODO: psbt.finalize_mut(&secp).unwrap(); + + let wallet = Wallet::new_no_persist(&descriptor.to_string(), None, NETWORK).unwrap(); + let signopts = SignOptions::default(); + wallet.finalize_psbt(&mut psbt, signopts).unwrap(); } } }