You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
only the receiver_pubkey method needs to be pub (because payjoin-cli uses the value), but ohttp_keys, expiration and endpoint only need to be accessed internally to the payjoin crate after the URI has been built
One part of this I'm still not completely happy with is the visibility of the getter methods on v2::PjParams. receiver_pubkey is used in payjoin-cli as a session-id parameter. The v2::PjParams::endpoint method is only used in payjoin-ffi, and I can't help but wonder if that's a mistake vestigial of the old way we were indexing sessions by endpoint before receiver_pubkey was used for indexing, as in payjoin-cli, related to #336. The other public getters for ohttp_keys and expiration are unused and can be made more private, though I'd like to give them holistic consideration the context of all of the getters.
In #995 we decided to use receiver_pubkey as the index. Upon reflection @nothingmuch mentioned that the comparison with Urls might be a better user experience even if receiver_pubkey is used to disambiguate. Yuval may you shed some light on how you'd like this fully realized?
comparing by RK should be done first, and payjoin-cli should error if that's ever duplicated.
as a special case, we can check if the full URI is identical if that happens (ideally by comparing the URI as a string, not just the fields we recognize in our extras struct) and soften the error to instruct the sender to use the resume command instead of just complaining about a duplicate RK
Activity
DanGould commentedon Sep 12, 2025
Originally posted by @DanGould in #1048 (comment)
DanGould commentedon Sep 12, 2025
In #995 we decided to use receiver_pubkey as the index. Upon reflection @nothingmuch mentioned that the comparison with Urls might be a better user experience even if receiver_pubkey is used to disambiguate. Yuval may you shed some light on how you'd like this fully realized?
nothingmuch commentedon Sep 12, 2025
comparing by RK should be done first, and payjoin-cli should error if that's ever duplicated.
as a special case, we can check if the full URI is identical if that happens (ideally by comparing the URI as a string, not just the fields we recognize in our extras struct) and soften the error to instruct the sender to use the
resumecommand instead of just complaining about a duplicate RKnothingmuch commentedon Sep 17, 2025
closed by #1082