There was an error while loading. Please reload this page.
2 parents 4fa4076 + efb7204 commit a5ff964Copy full SHA for a5ff964
1 file changed
payjoin-ffi/src/send/mod.rs
@@ -252,6 +252,18 @@ impl From<PjParam> for payjoin::uri::v2::PjParam {
252
fn from(value: PjParam) -> Self { value.0 }
253
}
254
255
+#[uniffi::export]
256
+impl PjParam {
257
+ /// The receiver's ephemeral HPKE public key, as 33 compressed bytes.
258
+ ///
259
+ /// Stable for the lifetime of a receive session. Consumers use it to
260
+ /// deduplicate and resume sender sessions and to ensure a receiver key
261
+ /// is not reused across sessions, without parsing the endpoint fragment.
262
+ pub fn receiver_pubkey(&self) -> Vec<u8> {
263
+ self.0.receiver_pubkey().to_compressed_bytes().to_vec()
264
+ }
265
+}
266
+
267
#[derive(uniffi::Object, Clone)]
268
pub struct SenderSessionHistory(pub payjoin::send::v2::SessionHistory);
269
0 commit comments