From: Vihiga Tyonum Date: Thu, 9 Jul 2026 05:50:06 +0000 (+0100) Subject: Merge branch 'master' into feat/utxo-locking X-Git-Url: http://internal-gitweb-vhost/blockdata/script/encode/-script/display/DatabaseConfig.html?a=commitdiff_plain;h=73c3b9dfbc06e7745f733581d283830a9b579e0e;p=bdk-cli Merge branch 'master' into feat/utxo-locking --- 73c3b9dfbc06e7745f733581d283830a9b579e0e diff --cc Cargo.lock index 1031c69,e0933ef..5557be1 --- a/Cargo.lock +++ b/Cargo.lock @@@ -255,7 -255,9 +255,8 @@@ dependencies = "bdk_redb", "bdk_sp", "bdk_testenv", - "bdk_wallet", + "bdk_wallet 3.1.0", + "bitcoin-payment-instructions", - "claims", "clap", "clap_complete", "cli-table", @@@ -283,7 -286,7 +285,7 @@@ version = "0.1.0 source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "262ee5f0c1056400b354391cabc541cb732c10488679de6389641e37f7e6c698" dependencies = [ - "bdk_wallet 2.1.0", - "bdk_wallet", ++ "bdk_wallet 2.4.0", "bitcoin", ] @@@ -387,23 -390,9 +389,23 @@@ dependencies = [[package]] name = "bdk_wallet" - version = "2.1.0" + version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "d30b5dba770184863b5d966ccbc6a11d12c145450be3b6a4435308297e6a12dc" + checksum = "c99821af39c7df004bd411ece2ef22d9fba5a631b4489f3d9a0ac0d19637e2d0" +dependencies = [ + "bdk_chain", + "bitcoin", + "miniscript", + "rand_core 0.6.4", + "serde", + "serde_json", +] + +[[package]] +name = "bdk_wallet" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1284fb23acc3e3022673712b55f4d5ce7e38aadc2c49bbef830dc3935f0a3289" dependencies = [ "bdk_chain", "bip39", @@@ -475,10 -463,9 +477,10 @@@ dependencies = "base58ck", "base64 0.21.7", "bech32", + "bitcoin-internals 0.3.0", - "bitcoin-io 0.1.4", + "bitcoin-io 0.1.101", "bitcoin-units", - "bitcoin_hashes 0.14.1", + "bitcoin_hashes 0.14.101", "hex-conservative 0.2.2", "hex_lit", "secp256k1", @@@ -494,15 -481,15 +496,24 @@@ dependencies = "bitcoin", ] +[[package]] +name = "bitcoin-consensus-encoding" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8d7ca3dc8ff835693ad73bf1596240c06f974a31eeb3f611aaedf855f1f2725" +dependencies = [ + "bitcoin-internals 0.5.0", +] + + [[package]] + name = "bitcoin-consensus-encoding" + version = "1.0.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b2d6094e2a1ba3c93b5a596fe5a10d1a10c3c6e06785cde89f693a044c01aa40" + dependencies = [ + "bitcoin-internals 0.5.0", + ] + [[package]] name = "bitcoin-hpke" version = "0.13.0" @@@ -545,9 -526,12 +559,12 @@@ dependencies = [[package]] name = "bitcoin-io" - version = "0.1.4" + version = "0.1.101" source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "2dee39a0ee5b4095224a0cfc6bf4cc1baf0f9624b96b367e53b66d974e51d953" + checksum = "bb5de036369d1ac59d3c1819ebc4d850f89466f5401c571a285b6ed564a4cb78" + dependencies = [ - "bitcoin-consensus-encoding", ++ "bitcoin-consensus-encoding 1.0.0", + ] [[package]] name = "bitcoin-io" @@@ -581,13 -565,26 +598,26 @@@ dependencies = "toml 0.5.11", ] + [[package]] + name = "bitcoin-payment-instructions" + version = "0.7.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c300c948b2ff78c965ea3a613372352125448a22f1acf49e95e3878149824091" + dependencies = [ + "bitcoin", + "dnssec-prover", + "getrandom 0.3.4", + "lightning", + "lightning-invoice", + ] + [[package]] name = "bitcoin-units" - version = "0.1.2" + version = "0.1.101" source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "5285c8bcaa25876d07f37e3d30c303f2609179716e11d688f51e8f1fe70063e2" + checksum = "9cb95693f371d089a4b5b6fc41c6f3ea6e01ee8c15388335dfac8ea685173b51" dependencies = [ - "bitcoin-internals 0.3.0", - "bitcoin-consensus-encoding", ++ "bitcoin-consensus-encoding 1.0.0", "serde", ] @@@ -612,17 -609,6 +642,17 @@@ dependencies = "hex-conservative 0.3.2", ] +[[package]] +name = "bitcoin_hashes" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8a45c2b41c457a9a9e4670422fcbdf109afb3b22bc920b4045e8bdfd788a3d" +dependencies = [ - "bitcoin-consensus-encoding", ++ "bitcoin-consensus-encoding 0.1.0", + "bitcoin-internals 0.5.0", + "hex-conservative 0.3.2", +] + [[package]] name = "bitcoin_uri" version = "0.1.0" @@@ -730,9 -716,9 +760,9 @@@ checksum = "1fd0f2584146f6f2ef480850508 [[package]] name = "bytes" - version = "1.11.1" -version = "1.12.0" ++version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" -checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" ++checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" [[package]] name = "bzip2" @@@ -880,11 -877,17 +921,11 @@@ dependencies = "zeroize", ] -[[package]] -name = "claims" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bba18ee93d577a8428902687bcc2b6b45a56b1981a1f6d779731c86cc4c5db18" - [[package]] name = "clap" - version = "4.6.0" + version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" + checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" dependencies = [ "clap_builder", "clap_derive", @@@ -1018,9 -1040,9 +1078,9 @@@ dependencies = [[package]] name = "crossbeam-utils" --version = "0.8.21" ++version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" ++checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" [[package]] name = "crunchy" @@@ -1859,10 -1929,11 +1967,11 @@@ checksum = "8f42a60cbdf9a97f5d2305f08a8 [[package]] name = "jiff" - version = "0.2.23" -version = "0.2.31" ++version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359" -checksum = "ccfe6121cbe750cf81efa362d85c0bde7ea298ec43092d3a193baca59cdbd634" ++checksum = "961d16382652bfdd8c6f68b223b26a8c93e0d475c672f414411db31c6c5c900e" dependencies = [ + "defmt", "jiff-static", "log", "portable-atomic", @@@ -1872,11 -1943,60 +1981,60 @@@ [[package]] name = "jiff-static" - version = "0.2.23" -version = "0.2.31" ++version = "0.2.32" + source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e165e897f662d428f3cd3828a919dbe067c2d42bb1031eede74ef9d27ecdedd2" ++checksum = "d0879bd39df99c4c5e2c6615ccc026391a423dde10532c573e6086eb94a802cc" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "jni" + version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "2a8c8b344124222efd714b73bb41f8b5120b27a7cc1c75593a6ff768d9d05aa4" + checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" + dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys", + "log", + "simd_cesu8", + "thiserror 2.0.18", + "walkdir", + "windows-link", + ] + + [[package]] + name = "jni-macros" + version = "0.22.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" dependencies = [ "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn", + ] + + [[package]] + name = "jni-sys" + version = "0.4.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" + dependencies = [ + "jni-sys-macros", + ] + + [[package]] + name = "jni-sys-macros" + version = "0.4.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" + dependencies = [ "quote", "syn", ] @@@ -3858,18 -4093,18 +4131,18 @@@ dependencies = [[package]] name = "zerocopy" - version = "0.8.33" -version = "0.8.53" ++version = "0.8.54" source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" -checksum = "75726053136156d419e285b9b7eddaaea9e3fea6ce32eed44a89901f0bd98de1" ++checksum = "b7cbbc0a705a0fd05cc3676525980d2bf5a9bc4adac6d6475209a7887cf59d19" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" - version = "0.8.33" -version = "0.8.53" ++version = "0.8.54" source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" -checksum = "4714fd92cf900833d49538023a9b3915155210801d1c1169eba513b2addefd71" ++checksum = "e2e817b7b52d0c7358d3246da9d69935ebb18116b2b102b4230dac079b4862f5" dependencies = [ "proc-macro2", "quote", diff --cc Cargo.toml index 14184d4,1f91dd4..3c553a8 --- a/Cargo.toml +++ b/Cargo.toml @@@ -26,19 -26,21 +26,21 @@@ tracing = "0.1.44 tracing-subscriber = "0.3.20" toml = "1.1.0" serde= {version = "1.0", features = ["derive"]} + tap = "1.0.1" # Optional dependencies - bdk_bitcoind_rpc = { version = "0.21.0", features = ["std"], optional = true } - bdk_electrum = { version = "0.23.2", optional = true } - bdk_esplora = { version = "0.22.1", features = ["async-https", "tokio"], optional = true } + bdk_bitcoind_rpc = { version = "0.22.0", features = ["std"], optional = true } + bdk_electrum = { version = "0.24.0", optional = true } + bdk_esplora = { version = "0.22.2", features = ["async-https", "tokio"], optional = true } -bdk_kyoto = { version = "0.15.4", optional = true } -bdk_redb = { version = "0.1.1", optional = true } +bdk_kyoto = { version = "0.17.0", optional = true } +bdk_redb = { version = "0.2.0", optional = true } bdk_sp = { version = "0.1.0", optional = true, git = "https://github.com/bitcoindevkit/bdk-sp", tag = "v0.1.0" } shlex = { version = "1.3.0", optional = true } - payjoin = { version = "=1.0.0-rc.1", features = ["v1", "v2", "io", "_test-utils"], optional = true} - reqwest = { version = "0.13.2", default-features = false, optional = true } + payjoin = { version = "0.25.0", features = ["v1", "v2", "io", "_test-utils"], optional = true} + reqwest = { version = "0.13.2", default-features = false, features = ["rustls"], optional = true } url = { version = "2.5.8", optional = true } bdk_bip322 = { version = "0.1.0", optional = true } + bitcoin-payment-instructions = { version = "0.7.0", optional = true} [features] default = ["repl", "sqlite"] diff --cc src/commands.rs index 5ed726e,1d920ad..613a4f6 --- a/src/commands.rs +++ b/src/commands.rs @@@ -360,12 -366,9 +367,15 @@@ pub enum OfflineWalletSubCommand /// Verify a BIP322 signature #[cfg(feature = "bip322")] VerifyMessage(VerifyMessageCommand), + /// Lock UTXO(s) so they're excluded from coin selection. + LockUtxo(LockUtxoCommand), + /// Unlock previously locked UTXO(s). + UnlockUtxo(UnlockUtxoCommand), + /// List currently locked UTXOs. + LockedUtxos(LockedUtxosCommand), + /// Creates a new unsigned transaction from DNS payment instructions. + #[cfg(feature = "dns_payment")] + CreateDnsTx(CreateDnsTxCommand), } /// Wallet subcommands that needs a blockchain backend. diff --cc src/handlers/offline.rs index e0ee284,6853194..dde08de --- a/src/handlers/offline.rs +++ b/src/handlers/offline.rs @@@ -81,11 -81,10 +81,15 @@@ impl OfflineWalletSubCommand Self::VerifyMessage(verify_message_command) => verify_message_command .execute(ctx)? .write_out(std::io::stdout()), + Self::LockUtxo(lock_utxo) => lock_utxo.execute(ctx)?.write_out(std::io::stdout()), + Self::UnlockUtxo(unlock_utxo) => unlock_utxo.execute(ctx)?.write_out(std::io::stdout()), + Self::LockedUtxos(locked_utxos) => { + locked_utxos.execute(ctx)?.write_out(std::io::stdout()) + } + #[cfg(feature = "dns_payment")] + Self::CreateDnsTx(_) => Err(Error::Generic( + "CreateDnsTx is dispatched asynchronously through main".to_string(), + )), } } }