diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 58860f77..ad93e197 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -31,6 +31,7 @@ jobs: cargo update -p log --precise 0.4.18 cargo update -p tempfile --precise 3.6.0 cargo update -p flate2 --precise 1.0.26 + cargo update -p minreq --precise 2.8.0 - name: test run: cargo test --verbose --all-features --lib diff --git a/README.md b/README.md index 427ffc7c..1f57a35e 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ To build and test with the MSRV you will need to pin the below dependency versio cargo update -p log --precise 0.4.18 cargo update -p tempfile --precise 3.6.0 cargo update -p flate2 --precise 1.0.26 +cargo update -p minreq --precise 2.8.0 ``` ## License diff --git a/payjoin-cli/Cargo.lock b/payjoin-cli/Cargo.lock index 139137f6..88c4df96 100644 --- a/payjoin-cli/Cargo.lock +++ b/payjoin-cli/Cargo.lock @@ -1138,7 +1138,6 @@ name = "payjoin-cli" version = "0.0.1" dependencies = [ "anyhow", - "base64 0.13.1", "bip21", "bitcoincore-rpc", "clap", diff --git a/payjoin-cli/Cargo.toml b/payjoin-cli/Cargo.toml index 89b00bd4..961ae61c 100644 --- a/payjoin-cli/Cargo.toml +++ b/payjoin-cli/Cargo.toml @@ -15,14 +15,13 @@ local-https = ["rcgen", "rouille/ssl"] [dependencies] anyhow = "1.0.70" -base64 = "0.13.0" bip21 = "0.3.1" bitcoincore-rpc = "0.17.0" clap = "4.1.4" config = "0.13.3" env_logger = "0.9.0" log = "0.4.7" -payjoin = { path = "../payjoin", features = ["send", "receive"] } +payjoin = { path = "../payjoin", features = ["send", "receive", "base64"] } reqwest = { version = "0.11.4", features = ["blocking"] } rcgen = { version = "0.11.1", optional = true } rouille = "3.6.2" diff --git a/payjoin-cli/src/app.rs b/payjoin-cli/src/app.rs index 5a592088..9b8844b7 100644 --- a/payjoin-cli/src/app.rs +++ b/payjoin-cli/src/app.rs @@ -324,7 +324,7 @@ impl App { |psbt: &Psbt| { self.bitcoind .wallet_process_psbt( - &bitcoin::base64::encode(psbt.serialize()), + &payjoin::base64::encode(psbt.serialize()), None, None, Some(false), @@ -337,7 +337,7 @@ impl App { let payjoin_proposal_psbt = payjoi_proposal.psbt(); log::debug!("Receiver's Payjoin proposal PSBT Rsponse: {:#?}", payjoin_proposal_psbt); - let payload = base64::encode(&payjoin_proposal_psbt.serialize()); + let payload = payjoin::base64::encode(&payjoin_proposal_psbt.serialize()); log::info!("successful response"); Ok(Response::text(payload)) } @@ -488,4 +488,4 @@ impl payjoin::receive::Headers for Headers<'_> { } } -fn serialize_psbt(psbt: &Psbt) -> String { base64::encode(&psbt.serialize()) } +fn serialize_psbt(psbt: &Psbt) -> String { payjoin::base64::encode(&psbt.serialize()) } diff --git a/payjoin/Cargo.toml b/payjoin/Cargo.toml index 60e0ec04..4a582d16 100644 --- a/payjoin/Cargo.toml +++ b/payjoin/Cargo.toml @@ -15,6 +15,7 @@ edition = "2018" [features] send = [] receive = ["rand"] +base64 = ["bitcoin/base64"] [dependencies] bitcoin = { version = "0.30.0", features = ["base64"] } @@ -28,4 +29,4 @@ env_logger = "0.9.0" bitcoind = { version = "0.31.1", features = ["0_21_2"] } [package.metadata.docs.rs] -features = ["send", "receive"] \ No newline at end of file +features = ["send", "receive", "base64"] \ No newline at end of file diff --git a/payjoin/src/lib.rs b/payjoin/src/lib.rs index fc787d45..322b6ddd 100644 --- a/payjoin/src/lib.rs +++ b/payjoin/src/lib.rs @@ -35,4 +35,6 @@ mod uri; #[cfg(any(feature = "send", feature = "receive"))] pub(crate) mod weight; +#[cfg(feature = "base64")] +pub use bitcoin::base64; pub use uri::{PjParseError, PjUri, PjUriExt, Uri, UriExt};