diff --git a/Cargo-minimal.lock b/Cargo-minimal.lock index 89cddbf23..023b0d904 100644 --- a/Cargo-minimal.lock +++ b/Cargo-minimal.lock @@ -2319,7 +2319,7 @@ checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "payjoin" -version = "1.1.0" +version = "1.2.0" dependencies = [ "arbitrary", "bhttp", diff --git a/Cargo-recent.lock b/Cargo-recent.lock index e92756c48..3df8e7428 100644 --- a/Cargo-recent.lock +++ b/Cargo-recent.lock @@ -2519,7 +2519,7 @@ checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "payjoin" -version = "1.1.0" +version = "1.2.0" dependencies = [ "arbitrary", "bhttp", diff --git a/payjoin-cli/Cargo.toml b/payjoin-cli/Cargo.toml index 28e990b32..05aeca475 100644 --- a/payjoin-cli/Cargo.toml +++ b/payjoin-cli/Cargo.toml @@ -34,7 +34,7 @@ dirs = "6.0.0" http-body-util = { version = "0.1.3", optional = true } hyper = { version = "1.8.0", features = ["http1", "server"], optional = true } hyper-util = { version = "0.1.18", optional = true } -payjoin = { version = "1.1.0", default-features = false } +payjoin = { version = "1.2.0", default-features = false } pest_derive = "2.7.0" r2d2 = "0.8.10" r2d2_sqlite = "0.22.0" diff --git a/payjoin-ffi/Cargo.toml b/payjoin-ffi/Cargo.toml index 4797339f4..c89310d3a 100644 --- a/payjoin-ffi/Cargo.toml +++ b/payjoin-ffi/Cargo.toml @@ -25,7 +25,7 @@ path = "uniffi-bindgen.rs" async-trait = "0.1.89" getrandom = "0.2.10" lazy_static = "1.5.0" -payjoin = { version = "1.1.0", features = ["v1", "v2"] } +payjoin = { version = "1.2.0", features = ["v1", "v2"] } payjoin-test-utils = { version = "0.0.1", optional = true } serde = { version = "1.0.228", features = ["derive"] } serde_json = "1.0.149" diff --git a/payjoin-ffi/kotlin/src/test/kotlin/org/payjoindevkit/ValidationTests.kt b/payjoin-ffi/kotlin/src/test/kotlin/org/payjoindevkit/ValidationTests.kt index b008dd803..6e0b6674f 100644 --- a/payjoin-ffi/kotlin/src/test/kotlin/org/payjoindevkit/ValidationTests.kt +++ b/payjoin-ffi/kotlin/src/test/kotlin/org/payjoindevkit/ValidationTests.kt @@ -31,7 +31,7 @@ class ValidationTests { @Test fun receiverBuilderRejectsBadAddress() { val ohttpKeys = OhttpKeys.decode(ohttpKeysData) - assertFailsWith { + assertFailsWith { ReceiverBuilder("not-an-address", "https://example.com", ohttpKeys) } } diff --git a/payjoin-mailroom/Cargo.toml b/payjoin-mailroom/Cargo.toml index 8000741fd..dce38bfbf 100644 --- a/payjoin-mailroom/Cargo.toml +++ b/payjoin-mailroom/Cargo.toml @@ -67,7 +67,7 @@ opentelemetry-otlp = { version = "0.32", optional = true, default-features = fal "http-proto", ] } opentelemetry_sdk = "0.32" -payjoin = { version = "1.1.0", features = [ +payjoin = { version = "1.2.0", features = [ "directory", ], default-features = false } rand = "0.8" diff --git a/payjoin-test-utils/Cargo.toml b/payjoin-test-utils/Cargo.toml index ec90b40d7..3d9de2e70 100644 --- a/payjoin-test-utils/Cargo.toml +++ b/payjoin-test-utils/Cargo.toml @@ -32,7 +32,7 @@ futures = { version = "0.3.21", default-features = false, features = ["std"] } http = { version = "1.3.1", optional = true } ohttp = { package = "bitcoin-ohttp", version = "0.7.0", optional = true } once_cell = "1.21.3" -payjoin = { version = "1.1.0", default-features = false } +payjoin = { version = "1.2.0", default-features = false } payjoin-mailroom = { version = "0.1.2", features = ["_manual-tls"] } rcgen = { version = "0.14.7", optional = true } reqwest = { version = "0.12.23", default-features = false, features = [ diff --git a/payjoin/CHANGELOG.md b/payjoin/CHANGELOG.md index 5cb50a278..d4e484a19 100644 --- a/payjoin/CHANGELOG.md +++ b/payjoin/CHANGELOG.md @@ -1,5 +1,45 @@ # Payjoin Changelog +## 1.2.0 + +This release adds a non-blocking interface to the receiver state machine. +Every step that previously required a synchronous validation closure is +now split in two: a method that extracts the data to be checked, and a +method that submits the results and advances the typestate. Wallets whose +signing, broadcast checks, or ownership lookups are asynchronous, or that +live in a separate process from the code driving the session, can now +drive both the v1 and v2 receiver flows without blocking. The existing +callback methods remain as convenience wrappers, so this release is +backward compatible. + +Selected Improvements: + +### API Additions + +- Split every callback-based receiver transition into an extract/apply + pair, available on both the v1 and v2 receiver flows: + `extract_tx_to_check_broadcast_suitability` and + `apply_broadcast_suitability`, `inputs_owned_checklist` and + `apply_inputs_owned_checklist`, `inputs_seen_checklist` and + `apply_inputs_seen_checklist`, `outputs_owned_checklist` and + `apply_outputs_owned_checklist`, and `psbt_to_sign` and + `finalize_signed_proposal` (#1446) +- Add `ChecklistItem`, `MarkedChecklistItem`, and the sealed + `ChecklistKind` trait with the `InputOwnership`, `InputSeenBefore`, and + `OutputOwnership` kinds, plus a `mark_checklist` helper for integrators + that prefer a closure. A submitted checklist must match the inputs or + outputs of the receiver's own original PSBT (#1446) + +### Bug Fixes + +- Reject proposals that drop or reorder the sender's original inputs + before classifying any input as sender or receiver contributed. Input + classification treated any proposed input whose outpoint did not match + an original one as receiver-contributed, so a receiver that altered a + sender outpoint was validated as though the receiver had contributed + it. Dropped and reordered inputs are now both rejected up front with + `MissingOrShuffledInputs` (#1836) + ## 1.1.0 This release hardens how both sides of a payjoin validate what the diff --git a/payjoin/Cargo.toml b/payjoin/Cargo.toml index 8a0f6b88d..bd54137b0 100644 --- a/payjoin/Cargo.toml +++ b/payjoin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "payjoin" -version = "1.1.0" +version = "1.2.0" authors = ["Dan Gould "] description = "Payjoin Library implementing BIP 78 and BIP 77 batching protocols." repository = "https://github.com/payjoin/rust-payjoin"