From 36582f89f270f017320165ffddc7dab4e94f5dcc Mon Sep 17 00:00:00 2001 From: DanGould Date: Mon, 9 Dec 2024 15:19:51 -0500 Subject: [PATCH 1/2] Add `pj_endpoint` method to `PjUri` types. `pj_endpoint` is used as the `Sender` id for persistent storage. --- src/uri.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/uri.rs b/src/uri.rs index a3ef2a3..bb15e26 100644 --- a/src/uri.rs +++ b/src/uri.rs @@ -86,6 +86,11 @@ impl PjUri { pub fn amount_sats(&self) -> Option { self.0.clone().amount.map(|e| e.to_sat()) } + + pub fn pj_endpoint(&self) -> String { + self.0.extras.endpoint().to_string() + } + pub fn as_string(&self) -> String { self.0.clone().to_string() } From 2d21d5666451fcb5dcbcc3b6787edbac148722a2 Mon Sep 17 00:00:00 2001 From: DanGould Date: Mon, 9 Dec 2024 15:20:17 -0500 Subject: [PATCH 2/2] Bump payjoin-ffi 0.21.2 --- CHANGELOG.md | 3 +++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf8160e..0c4f684 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [0.21.2] +- Add `pj_endpoint` method to `PjUri` types. ([#40](https://github.com/LtbLightning/payjoin-ffi/pull/40)) + ## [0.21.1] - Add `to_json` and `from_json` methods to `Sender` and `Receiver` UniFFI types. ([#39](https://github.com/LtbLightning/payjoin-ffi/pull/39)) diff --git a/Cargo.lock b/Cargo.lock index fb0dc26..856162e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2042,7 +2042,7 @@ dependencies = [ [[package]] name = "payjoin_ffi" -version = "0.21.1" +version = "0.21.2" dependencies = [ "base64 0.22.1", "bdk", diff --git a/Cargo.toml b/Cargo.toml index 6fc5536..bdf5467 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "payjoin_ffi" -version = "0.21.1" +version = "0.21.2" edition = "2021" license = "MIT OR Apache-2.0" exclude = ["tests"]