This release changes how a receiver learns which transaction resolved its
session. Instead of polling for a predicted txid, the wallet passes each
transaction it receives to classify_tx, which says whether it is the
Payjoin proposal, the fallback, or neither, and then closes the session with
close once that transaction has enough confirmations. The old polling
methods are deprecated rather than removed.
Selected Improvements:
Deprecations
- Deprecate
Receiver<Monitor>::check_for_transaction. It closes the
session on first sight of a predicted txid, never sees a spend that is
neither the proposal nor the fallback, and closes a session with
non-SegWit sender inputs without checking. Useclassify_txandclose
instead. For a session with a legacy or P2SH-wrapped receiver input it
now probes a txid that includes that input's script_sig, where it used
to probe one that never appears on chain (#1971) - Deprecate
Receiver::proposal_txid_is_stable. It checks only the
sender's inputs, so a legacy or P2SH-wrapped receiver input can change
the txid even when it returns true. Useclassify_txinstead (#1971) - Deprecate
Receiver<MaybeInputsOwned>::extract_tx_to_schedule_broadcast.
Schedule the fallback broadcast by cancelling the session when the payjoin
fails:cancelyields aReceiver<PendingFallback>whosefallback_tx
is the transaction to broadcast (#1994)
API Additions
- Add
classify_txto everyreceive::v2::Receiverstate that holds a
fallback transaction and is advancing the Payjoin protocol, from
MaybeInputsOwnedthroughMonitor. For a transaction spending the
sender's original inputs it returns aResolution, whoseresolved_byis a
ResolvedBysaying whether that transaction is the Payjoin proposal, the
fallback, or neither.ReceiveSession::classify_txdoes the same for a
session in any state. Wallets should pass every transaction they receive to
classify_txon each open session. It recognizes the proposal even after a
non-SegWit sender's signature changes its txid, and never reportsPayjoin
beforePayjoinProposal(#1971) - Add
closeto the same states and toReceiveSession. It takes a
Resolutionand ends the session once the wallet decides the transaction
has enough confirmations, without broadcasting the fallback. Only
classify_txmakes aResolution, andcloserejects one classified from
another session.ReceiveSession::closealso rejects a session state
that cannot be closed via resolution.closeclassifies the transaction
again against the session's current state, and records
PayjoinProposalSentfromMonitor, and fromPayjoinProposalwhen the
Payjoin resolved it, andAbortedotherwise (#1971, #2043)
Bug Fixes
- Close a leak in the
HasFallbackTxseal. Generic code bounded on the trait
could call the sealedfallback_txmethod, which was never part of the
documented API; such code no longer compiles. Read the fallback transaction
fromReceiver<PendingFallback>::fallback_txaftercancel, or from
SessionHistory::fallback_tx(#1994)
What's Changed
- chore: update cargo.lock by @payjoin-robot[bot] in #1946
- Update CONTRIBUTING AI Policy by @xstoicunicornx in #1937
- Add v2 roundtrip fuzz target by @caarloshenriq in #1951
- Test non-blocking receive interface in Kotlin by @xstoicunicornx in #1927
- chore: update flake.lock by @payjoin-robot[bot] in #1963
- Note how the MSRV policy is enforced by @Xoulomon in #1965
- Add Uri and PjUri parsing examples by @Xoulomon in #1962
- Dedupe OHTTP privacy warning in module docs by @Xoulomon in #1961
- chore: update cargo.lock by @payjoin-robot[bot] in #1967
- chore: update flake.lock by @payjoin-robot[bot] in #1972
- Point crate docs at the v2 entry points by @Xoulomon in #1956
- Expose typed InputPair constructors in payjoin-ffi by @chavic in #1959
- Move integration examples to crate docs by @Xoulomon in #1964
- fuzz: exercise v1 sender validation in roundtrip target by @Christopherdominic in #1958
- chore: update nightly toolchain pin by @payjoin-robot[bot] in #1976
- Handle p2tr key-spend weights in payjoin-cli by @benalleng in #1970
- Add v2 receiver fuzz target by @caarloshenriq in #1887
- Unify bindings release by @spacebear21 in #1952
- Bump bindings by @spacebear21 in #1977
- Fill in deprecation versions at release by @DanGould in #1984
- Fix SenderBuilder::new deprecated
sinceversion by @spacebear21 in #1987 - Zizmor by @benalleng in #1886
- Action and dep fixes by @benalleng in #1990
- Bump the github-actions group across 2 directories with 12 updates by @dependabot[bot] in #1989
- chore: update cargo.lock by @payjoin-robot[bot] in #1991
- Test the README telemetry table against export by @DanGould in #1993
- Verify builtins.match for mailroom in flake by @benalleng in #1995
- Lock and remap Dart native builds for reproducibility by @DanGould in #1996
- Bump the github-actions group across 2 directories with 3 updates by @dependabot[bot] in #2000
- Fix failing reproducibility checks by @spacebear21 in #2003
- Bump payjoin-ffi to 0.25.1 by @spacebear21 in #2002
- Replace corepc-node with bitcoind 0.43.2 by @benalleng in #2001
- Move long-running FFI CI jobs to cron and release only by @spacebear21 in #2004
- chore: update cargo.lock by @payjoin-robot[bot] in #2008
- chore: update flake.lock by @payjoin-robot[bot] in #2010
- chore: update nightly toolchain pin by @payjoin-robot[bot] in #2013
- Add FFI session event log fuzz target by @caarloshenriq in #2005
- Generalize the dependabot action directories by @benalleng in #2012
- Drop package write for release-image CI by @benalleng in #2014
- Remove
taras a dependency in payjoin-test-utils by @benalleng in #2011 - Reject mailbox payloads the gateway can't return by @caarloshenriq in #1983
- Bump the github-actions group across 2 directories with 7 updates by @dependabot[bot] in #2017
- Fix dependabot config glob pattern for github actions by @benalleng in #2018
- Replace httpx with httpx2 by @benalleng in #2021
- chore: update flake.lock by @payjoin-robot[bot] in #2028
- chore: update cargo.lock by @payjoin-robot[bot] in #2025
- Add BTCPay plugin and Bitcoin Core integratinon fork to check-ins by @ValeraFinebits in #2007
- chore: update nightly toolchain pin by @payjoin-robot[bot] in #2029
- Seal fallback_tx and deprecate extract_tx_to_schedule_broadcast by @spacebear21 in #1994
- Add FFI receiver checklists fuzz target by @caarloshenriq in #2022
- Bump the github-actions group across 1 directory with 3 updates by @dependabot[bot] in #2032
- Drop uv version updates from dependabot by @caarloshenriq in #2033
- Classify Payjoin settlements on the Monitor typestate by @xstoicunicornx in #1971
- Native FFI builds by @spacebear21 in #2023
- Accept configured gateway purposes in the relay by @gf5901 in #2026
- chore: update flake.lock by @payjoin-robot[bot] in #2042
- Collect changelog lines from per-PR fragments by @DanGould in #2038
- Monitor revamp followups by @xstoicunicornx in #2043
- chore: update cargo.lock by @payjoin-robot[bot] in #2039
- chore: update nightly toolchain pin by @payjoin-robot[bot] in #2044
- Bump payjoin version to 1.3.0 by @spacebear21 in #2046
New Contributors
- @Xoulomon made their first contribution in #1965
- @Christopherdominic made their first contribution in #1958
- @gf5901 made their first contribution in #2026
Full Changelog: payjoin-javascript-0.3.0+payjoin-1.2.0...payjoin-1.3.0