Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions payjoin-ffi/src/send/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,18 @@ impl From<PjParam> for payjoin::uri::v2::PjParam {
fn from(value: PjParam) -> Self { value.0 }
}

#[uniffi::export]
impl PjParam {
/// The receiver's ephemeral HPKE public key, as 33 compressed bytes.
///
/// Stable for the lifetime of a receive session. Consumers use it to
/// deduplicate and resume sender sessions and to ensure a receiver key
/// is not reused across sessions, without parsing the endpoint fragment.
pub fn receiver_pubkey(&self) -> Vec<u8> {
self.0.receiver_pubkey().to_compressed_bytes().to_vec()
}
}

#[derive(uniffi::Object, Clone)]
pub struct SenderSessionHistory(pub payjoin::send::v2::SessionHistory);

Expand Down
Loading