Skip to content

Commit

Permalink
Merge pull request #40 from DanGould/pjuri-endpoint
Browse files Browse the repository at this point in the history
Expose PjUri pj_endpoint() function
  • Loading branch information
DanGould authored Dec 11, 2024
2 parents b2dc431 + 2d21d56 commit a9d7f7c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
5 changes: 5 additions & 0 deletions src/uri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ impl PjUri {
pub fn amount_sats(&self) -> Option<u64> {
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()
}
Expand Down

0 comments on commit a9d7f7c

Please sign in to comment.