diff --git a/Cargo-minimal.lock b/Cargo-minimal.lock index ecdc8b2fa..d8c58ee4d 100644 --- a/Cargo-minimal.lock +++ b/Cargo-minimal.lock @@ -2307,7 +2307,7 @@ dependencies = [ [[package]] name = "payjoin-ffi" -version = "0.25.1" +version = "0.26.0" dependencies = [ "async-trait", "bdk_wallet", diff --git a/Cargo-recent.lock b/Cargo-recent.lock index 6e37bd733..59b0a72c0 100644 --- a/Cargo-recent.lock +++ b/Cargo-recent.lock @@ -2513,7 +2513,7 @@ dependencies = [ [[package]] name = "payjoin-ffi" -version = "0.25.1" +version = "0.26.0" dependencies = [ "async-trait", "bdk_wallet", diff --git a/payjoin-ffi/CHANGELOG.md b/payjoin-ffi/CHANGELOG.md index b9d65b645..08096cf67 100644 --- a/payjoin-ffi/CHANGELOG.md +++ b/payjoin-ffi/CHANGELOG.md @@ -1,3 +1,65 @@ +## [0.26.0] + +- Wraps payjoin 1.3.0 +- Add `classify_tx` to every receiver state that holds a fallback transaction + and is advancing the Payjoin protocol, from `MaybeInputsOwned` through + `Monitor`. Pass every consensus-encoded transaction the wallet receives to + `classify_tx` on each open session, or to `classify_receiver_tx` with a + session in any state. It returns a `Resolution` whose `resolved_by` is a + `ResolvedBy` of `Payjoin`, `Fallback` or `Unrecognized`, or none for a + transaction that spends none of the sender's original inputs, and never + reports `Payjoin` before `PayjoinProposal`. +- Add `close_session` to the same states, and `close_receiver_session` for a + session in any state. Each takes a `Resolution` and returns a + `CloseTransition` that ends the session once the wallet decides the + transaction has enough confirmations. Saving it fails with a transient + error, without persisting, if the resolution was classified from another + session, or, for `close_receiver_session`, if the session state cannot be + closed via resolution. Closing classifies the transaction again against + the session's current state. +- Remove `Monitor.check_for_transaction`, with its `TransactionFinder` + callback and `MonitorTransition`. It closed the session on first sight of + a predicted txid and never saw a spend that is neither the proposal nor + the fallback. Use `classify_tx` and `close_session` instead. +- Remove `proposal_txid_is_stable` from every receiver state. It checked + only the sender's inputs, so a legacy or P2SH-wrapped receiver input could + change the txid even when it returned true. Use `classify_tx` instead. +- To migrate from `Monitor.check_for_transaction`: + - `close_session` on a `Monitor` records `PayjoinProposalSent` whichever + transaction resolved the session, where `check_for_transaction` recorded + `Success(txid)` or `FallbackBroadcasted`. Store `resolved_by` and the + txid yourself if the app needs them. + - `classify_tx` also classifies unconfirmed transactions. Call + `close_session` only once the transaction reaches the wallet's + confirmation depth. + - Non-SegWit senders no longer need special handling. + - A `Resolution` can't be persisted, so classify the transaction again + after a restart. + - `classify_tx` raises `TransactionParseError` for bytes that don't decode + as a transaction. +- Deprecate `MaybeInputsOwned.extract_tx_to_schedule_broadcast`. Cancel the + session when the payjoin fails and broadcast the `fallback_tx` of the + resulting `ReceiverPendingFallback` instead. +- Replace `InputPairError::InvalidTransaction(String)` with + `InputPairError::TransactionDecode(TransactionParseError)`, the same error + `classify_tx` returns for bytes that do not decode. Bindings that match on + the old variant need to match the new one and read the nested + `TransactionParseError`. +- Dart: the package now ships the release's prebuilt native libraries, + and the build hook uses them instead of compiling Rust, so apps no + longer need a Rust toolchain or network access at build time. Set + `build: source` under `hooks: user_defines: payjoin:` in your app's + `pubspec.yaml` to keep compiling it. +- Python: require Python 3.11+ and replace httpx with httpx2. Callers catching + HTTP errors from `fetch_ohttp_keys` should use `httpx2.HTTPError` instead of + `httpx.HTTPError`. +- Python: the Linux wheel's library now needs at most glibc 2.17, and + the wheel is tagged `manylinux_2_17`. The macOS wheel now supports + macOS 10.15 and later, down from 13. +- The GitHub release now attaches every native library as + `payjoin_ffi--.`, listed in `SHA256SUMS` and + attested. `VERIFYING.md` explains how to check one or rebuild it. + ## [0.25.1] - Wraps payjoin 1.2.0 diff --git a/payjoin-ffi/Cargo.toml b/payjoin-ffi/Cargo.toml index f25b1e85a..184fb64c9 100644 --- a/payjoin-ffi/Cargo.toml +++ b/payjoin-ffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "payjoin-ffi" -version = "0.25.1" +version = "0.26.0" edition = "2024" license = "MIT OR Apache-2.0" exclude = ["tests"] diff --git a/payjoin-ffi/changelog.d/check-for-transaction-migration.md b/payjoin-ffi/changelog.d/check-for-transaction-migration.md deleted file mode 100644 index 7fcb46ec0..000000000 --- a/payjoin-ffi/changelog.d/check-for-transaction-migration.md +++ /dev/null @@ -1,13 +0,0 @@ -- To migrate from `Monitor.check_for_transaction`: - - `close_session` on a `Monitor` records `PayjoinProposalSent` whichever - transaction resolved the session, where `check_for_transaction` recorded - `Success(txid)` or `FallbackBroadcasted`. Store `resolved_by` and the - txid yourself if the app needs them. - - `classify_tx` also classifies unconfirmed transactions. Call - `close_session` only once the transaction reaches the wallet's - confirmation depth. - - Non-SegWit senders no longer need special handling. - - A `Resolution` can't be persisted, so classify the transaction again - after a restart. - - `classify_tx` raises `TransactionParseError` for bytes that don't decode - as a transaction. diff --git a/payjoin-ffi/changelog.d/classify-tx.md b/payjoin-ffi/changelog.d/classify-tx.md deleted file mode 100644 index b0faa4467..000000000 --- a/payjoin-ffi/changelog.d/classify-tx.md +++ /dev/null @@ -1,23 +0,0 @@ -- Add `classify_tx` to every receiver state that holds a fallback transaction - and is advancing the Payjoin protocol, from `MaybeInputsOwned` through - `Monitor`. Pass every consensus-encoded transaction the wallet receives to - `classify_tx` on each open session, or to `classify_receiver_tx` with a - session in any state. It returns a `Resolution` whose `resolved_by` is a - `ResolvedBy` of `Payjoin`, `Fallback` or `Unrecognized`, or none for a - transaction that spends none of the sender's original inputs, and never - reports `Payjoin` before `PayjoinProposal`. -- Add `close_session` to the same states, and `close_receiver_session` for a - session in any state. Each takes a `Resolution` and returns a - `CloseTransition` that ends the session once the wallet decides the - transaction has enough confirmations. Saving it fails with a transient - error, without persisting, if the resolution was classified from another - session, or, for `close_receiver_session`, if the session state cannot be - closed via resolution. Closing classifies the transaction again against - the session's current state. -- Remove `Monitor.check_for_transaction`, with its `TransactionFinder` - callback and `MonitorTransition`. It closed the session on first sight of - a predicted txid and never saw a spend that is neither the proposal nor - the fallback. Use `classify_tx` and `close_session` instead. -- Remove `proposal_txid_is_stable` from every receiver state. It checked - only the sender's inputs, so a legacy or P2SH-wrapped receiver input could - change the txid even when it returned true. Use `classify_tx` instead. diff --git a/payjoin-ffi/changelog.d/dart-prebuilt-libraries.md b/payjoin-ffi/changelog.d/dart-prebuilt-libraries.md deleted file mode 100644 index 7e6b22ad1..000000000 --- a/payjoin-ffi/changelog.d/dart-prebuilt-libraries.md +++ /dev/null @@ -1,5 +0,0 @@ -- Dart: the package now ships the release's prebuilt native libraries, - and the build hook uses them instead of compiling Rust, so apps no - longer need a Rust toolchain or network access at build time. Set - `build: source` under `hooks: user_defines: payjoin:` in your app's - `pubspec.yaml` to keep compiling it. diff --git a/payjoin-ffi/changelog.d/deprecate-extract-tx-to-schedule-broadcast.md b/payjoin-ffi/changelog.d/deprecate-extract-tx-to-schedule-broadcast.md deleted file mode 100644 index a9a65f4a3..000000000 --- a/payjoin-ffi/changelog.d/deprecate-extract-tx-to-schedule-broadcast.md +++ /dev/null @@ -1,3 +0,0 @@ -- Deprecate `MaybeInputsOwned.extract_tx_to_schedule_broadcast`. Cancel the - session when the payjoin fails and broadcast the `fallback_tx` of the - resulting `ReceiverPendingFallback` instead. diff --git a/payjoin-ffi/changelog.d/httpx2.md b/payjoin-ffi/changelog.d/httpx2.md deleted file mode 100644 index ee460c401..000000000 --- a/payjoin-ffi/changelog.d/httpx2.md +++ /dev/null @@ -1 +0,0 @@ -- Python: require Python 3.11+ and replace httpx with httpx2. Callers catching HTTP errors from fetch_ohttp_keys should use httpx2.HTTPError instead of httpx.HTTPError. diff --git a/payjoin-ffi/changelog.d/input-pair-transaction-decode.md b/payjoin-ffi/changelog.d/input-pair-transaction-decode.md deleted file mode 100644 index 077c6fbc9..000000000 --- a/payjoin-ffi/changelog.d/input-pair-transaction-decode.md +++ /dev/null @@ -1,5 +0,0 @@ -- Replace `InputPairError::InvalidTransaction(String)` with - `InputPairError::TransactionDecode(TransactionParseError)`, the same error - `classify_tx` returns for bytes that do not decode. Bindings that match on - the old variant need to match the new one and read the nested - `TransactionParseError`. diff --git a/payjoin-ffi/changelog.d/native-release-assets.md b/payjoin-ffi/changelog.d/native-release-assets.md deleted file mode 100644 index 2d5a9cda5..000000000 --- a/payjoin-ffi/changelog.d/native-release-assets.md +++ /dev/null @@ -1,3 +0,0 @@ -- The GitHub release now attaches every native library as - `payjoin_ffi--.`, listed in `SHA256SUMS` and - attested. `VERIFYING.md` explains how to check one or rebuild it. diff --git a/payjoin-ffi/changelog.d/python-wheel-platforms.md b/payjoin-ffi/changelog.d/python-wheel-platforms.md deleted file mode 100644 index 08e04665d..000000000 --- a/payjoin-ffi/changelog.d/python-wheel-platforms.md +++ /dev/null @@ -1,3 +0,0 @@ -- Python: the Linux wheel's library now needs at most glibc 2.17, and - the wheel is tagged `manylinux_2_17`. The macOS wheel now supports - macOS 10.15 and later, down from 13. diff --git a/payjoin-ffi/csharp/Payjoin.csproj b/payjoin-ffi/csharp/Payjoin.csproj index 5191cb508..e8004f25d 100644 --- a/payjoin-ffi/csharp/Payjoin.csproj +++ b/payjoin-ffi/csharp/Payjoin.csproj @@ -7,7 +7,7 @@ true true Payjoin - 0.25.1 + 0.26.0 Payjoin Payjoin Dev Kit Contributors C# bindings for payjoin-ffi, generated from rust-payjoin via UniFFI. diff --git a/payjoin-ffi/dart/CHANGELOG.md b/payjoin-ffi/dart/CHANGELOG.md index e1fa18837..eca40674c 100644 --- a/payjoin-ffi/dart/CHANGELOG.md +++ b/payjoin-ffi/dart/CHANGELOG.md @@ -1,3 +1,7 @@ +## [0.26.0] + +- Wraps payjoin-ffi 0.26.0; see its [changelog](https://github.com/payjoin/rust-payjoin/blob/payjoin-ffi-0.26.0/payjoin-ffi/CHANGELOG.md). + ## [0.25.1] - Wraps payjoin-ffi 0.25.1; see its [changelog](https://github.com/payjoin/rust-payjoin/blob/payjoin-ffi-0.25.1/payjoin-ffi/CHANGELOG.md). diff --git a/payjoin-ffi/dart/pubspec.yaml b/payjoin-ffi/dart/pubspec.yaml index b4071de10..40706d1c1 100644 --- a/payjoin-ffi/dart/pubspec.yaml +++ b/payjoin-ffi/dart/pubspec.yaml @@ -1,6 +1,6 @@ name: payjoin description: Dart bindings for payjoin -version: 0.25.1 +version: 0.26.0 homepage: https://github.com/payjoin/rust-payjoin repository: https://github.com/payjoin/rust-payjoin diff --git a/payjoin-ffi/javascript/CHANGELOG.md b/payjoin-ffi/javascript/CHANGELOG.md index 56b325666..06b7c28f1 100644 --- a/payjoin-ffi/javascript/CHANGELOG.md +++ b/payjoin-ffi/javascript/CHANGELOG.md @@ -1,3 +1,7 @@ +## [0.26.0] + +- Wraps payjoin-ffi 0.26.0; see its [changelog](https://github.com/payjoin/rust-payjoin/blob/payjoin-ffi-0.26.0/payjoin-ffi/CHANGELOG.md). + ## [0.25.1] - Wraps payjoin-ffi 0.25.1; see its [changelog](https://github.com/payjoin/rust-payjoin/blob/payjoin-ffi-0.25.1/payjoin-ffi/CHANGELOG.md). diff --git a/payjoin-ffi/javascript/package-lock.json b/payjoin-ffi/javascript/package-lock.json index cd1c3c321..c2a778137 100644 --- a/payjoin-ffi/javascript/package-lock.json +++ b/payjoin-ffi/javascript/package-lock.json @@ -1,12 +1,12 @@ { "name": "payjoin", - "version": "0.25.1", + "version": "0.26.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "payjoin", - "version": "0.25.1", + "version": "0.26.0", "dependencies": { "@ubjs/core": "^0.31.0-3", "uniffi-bindgen-react-native": "github:spacebear21/uniffi-bindgen-react-native#d10f04d83299" diff --git a/payjoin-ffi/javascript/package.json b/payjoin-ffi/javascript/package.json index 4c81a0e33..dc3f85c18 100644 --- a/payjoin-ffi/javascript/package.json +++ b/payjoin-ffi/javascript/package.json @@ -1,6 +1,6 @@ { "name": "payjoin", - "version": "0.25.1", + "version": "0.26.0", "description": "JavaScript/WASM bindings for rust-payjoin (EXPERIMENTAL)", "scripts": { "ubrn:nodejs": "ubrn build web --release --and-generate --config ubrn.nodejs.config.yaml", diff --git a/payjoin-ffi/python/CHANGELOG.md b/payjoin-ffi/python/CHANGELOG.md index 5d2c55a9c..b56b9c99f 100644 --- a/payjoin-ffi/python/CHANGELOG.md +++ b/payjoin-ffi/python/CHANGELOG.md @@ -1,3 +1,7 @@ +## [0.26.0] + +- Wraps payjoin-ffi 0.26.0; see its [changelog](https://github.com/payjoin/rust-payjoin/blob/payjoin-ffi-0.26.0/payjoin-ffi/CHANGELOG.md). + ## [0.25.1] - Wraps payjoin-ffi 0.25.1; see its [changelog](https://github.com/payjoin/rust-payjoin/blob/payjoin-ffi-0.25.1/payjoin-ffi/CHANGELOG.md). diff --git a/payjoin-ffi/python/pyproject.toml b/payjoin-ffi/python/pyproject.toml index 5fd14b2aa..f9bb0c7c2 100644 --- a/payjoin-ffi/python/pyproject.toml +++ b/payjoin-ffi/python/pyproject.toml @@ -8,7 +8,7 @@ description = "The Python language bindings for the Payjoin Dev Kit" readme = "README.md" requires-python = ">=3.11" license = "MIT" -version = "0.25.1" +version = "0.26.0" dependencies = ["httpx2>=2.16,<3.0"] [tool.setuptools] diff --git a/payjoin-ffi/python/uv.lock b/payjoin-ffi/python/uv.lock index 2a9b1a84d..e2e845ca9 100644 --- a/payjoin-ffi/python/uv.lock +++ b/payjoin-ffi/python/uv.lock @@ -78,7 +78,7 @@ wheels = [ [[package]] name = "payjoin" -version = "0.25.1" +version = "0.26.0" source = { editable = "." } dependencies = [ { name = "httpx2" }, diff --git a/payjoin-ffi/src/receive/mod.rs b/payjoin-ffi/src/receive/mod.rs index 968d63a57..50689e572 100644 --- a/payjoin-ffi/src/receive/mod.rs +++ b/payjoin-ffi/src/receive/mod.rs @@ -1068,7 +1068,7 @@ pub trait IsInputOwned: Send + Sync { #[uniffi::export] impl MaybeInputsOwned { - /// Deprecated since payjoin 0.0.0-unreleased: cancel the session when the payjoin + /// Deprecated since payjoin 1.3.0: cancel the session when the payjoin /// fails and broadcast the `fallback_tx` of the resulting `ReceiverPendingFallback` /// instead. ///