Skip to content

Commit

Permalink
Add preliminary send payjoin support
Browse files Browse the repository at this point in the history
  • Loading branch information
willowens14 authored and notmandatory committed Aug 2, 2023
1 parent fdb9d18 commit abb8b3b
Show file tree
Hide file tree
Showing 4 changed files with 213 additions and 28 deletions.
82 changes: 57 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ keywords = ["bitcoin", "wallet", "descriptor", "psbt", "taproot"]
readme = "README.md"
license = "MIT"

[dependencies]
[dependencies]
# right here set path
bdk = { version = "0.27.1", default-features = false, features = ["all-keys"] }
bdk-macros = "0.6"
clap = { version = "3.2.22", features = ["derive"] }
Expand All @@ -21,6 +22,12 @@ zeroize = "<1.4.0"
dirs-next = "2.0"
env_logger = "0.7"
base64 = "^0.13"
# payjoin dependencies
payjoin = { version = "=0.8.0", features = ["send"] }
# reqwest
reqwest = { version = "0.11.4", features = ["blocking"] }



# Optional dependencies
rustyline = { version = "~9.0", optional = true }
Expand Down
8 changes: 7 additions & 1 deletion src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,12 @@ pub enum OnlineWalletSubCommand {
#[clap(name = "CONFIRMATIONS", long = "confirmations", default_value = "6")]
confirmations: u32,
},
/// Sends a Payjoin Transaction. Takes a valid payjoin bip21 uri.
SendPayjoin {
/// Sets the bip21 uri to send to.
#[clap(name = "URI", long = "uri")]
uri: String,
},
}

/// Subcommands for Key operations.
Expand Down Expand Up @@ -622,7 +628,7 @@ mod test {
feature = "compact_filters",
feature = "rpc"
))]
use super::OnlineWalletSubCommand::{Broadcast, Sync};
use super::OnlineWalletSubCommand::{Broadcast, SendPayjoin, Sync};
use super::WalletSubCommand::OfflineWalletSubCommand;
#[cfg(any(
feature = "electrum",
Expand Down
Loading

0 comments on commit abb8b3b

Please sign in to comment.