Skip to content

Commit abb8b3b

Browse files
willowens14notmandatory
authored andcommitted
Add preliminary send payjoin support
1 parent fdb9d18 commit abb8b3b

File tree

4 files changed

+213
-28
lines changed

4 files changed

+213
-28
lines changed

Cargo.lock

Lines changed: 57 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ keywords = ["bitcoin", "wallet", "descriptor", "psbt", "taproot"]
1111
readme = "README.md"
1212
license = "MIT"
1313

14-
[dependencies]
14+
[dependencies]
15+
# right here set path
1516
bdk = { version = "0.27.1", default-features = false, features = ["all-keys"] }
1617
bdk-macros = "0.6"
1718
clap = { version = "3.2.22", features = ["derive"] }
@@ -21,6 +22,12 @@ zeroize = "<1.4.0"
2122
dirs-next = "2.0"
2223
env_logger = "0.7"
2324
base64 = "^0.13"
25+
# payjoin dependencies
26+
payjoin = { version = "=0.8.0", features = ["send"] }
27+
# reqwest
28+
reqwest = { version = "0.11.4", features = ["blocking"] }
29+
30+
2431

2532
# Optional dependencies
2633
rustyline = { version = "~9.0", optional = true }

src/commands.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,12 @@ pub enum OnlineWalletSubCommand {
527527
#[clap(name = "CONFIRMATIONS", long = "confirmations", default_value = "6")]
528528
confirmations: u32,
529529
},
530+
/// Sends a Payjoin Transaction. Takes a valid payjoin bip21 uri.
531+
SendPayjoin {
532+
/// Sets the bip21 uri to send to.
533+
#[clap(name = "URI", long = "uri")]
534+
uri: String,
535+
},
530536
}
531537

532538
/// Subcommands for Key operations.
@@ -622,7 +628,7 @@ mod test {
622628
feature = "compact_filters",
623629
feature = "rpc"
624630
))]
625-
use super::OnlineWalletSubCommand::{Broadcast, Sync};
631+
use super::OnlineWalletSubCommand::{Broadcast, SendPayjoin, Sync};
626632
use super::WalletSubCommand::OfflineWalletSubCommand;
627633
#[cfg(any(
628634
feature = "electrum",

0 commit comments

Comments
 (0)