From c5c0bc0aa1641c531f0f236b5ffe658d4bb994f4 Mon Sep 17 00:00:00 2001 From: chavic Date: Fri, 11 Sep 2026 16:57:59 +0200 Subject: [PATCH 1/2] Add canonical payjoin concept text and sync script Package READMEs each describe payjoin in their own words and the descriptions drift apart; a correction to one does not correct the others (#1772). Keep the conceptual text in one file, payjoin-ffi/CONCEPT.md, with a script that copies it into a marked block of each README and a --check mode that reports drift. The text follows the BIP 77 abstract's framing preferred in the review of #1764: senders and receivers interact to make batched transactions, with the privacy consequence stated as preserving privacy by poisoning the common-input-ownership heuristic, and it links the BIPs by their titles, Simple Payjoin and Async Payjoin. --- payjoin-ffi/CONCEPT.md | 15 ++++++++ payjoin-ffi/contrib/sync-concept.sh | 60 +++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 payjoin-ffi/CONCEPT.md create mode 100755 payjoin-ffi/contrib/sync-concept.sh diff --git a/payjoin-ffi/CONCEPT.md b/payjoin-ffi/CONCEPT.md new file mode 100644 index 000000000..dafd7d14c --- /dev/null +++ b/payjoin-ffi/CONCEPT.md @@ -0,0 +1,15 @@ +Payjoin lets Bitcoin senders and receivers interact to make batched +transactions. The cooperating peers choose the inputs and outputs of the +transfer together, so the result looks like any other transaction — which +preserves privacy by poisoning the common-input-ownership heuristic that +chain surveillance depends on — and the receiver can batch its own +operations into the same transaction. + +These bindings implement both +[BIP 78 Simple Payjoin](https://github.com/bitcoin/bips/blob/master/bip-0078.mediawiki) +and +[BIP 77 Async Payjoin](https://github.com/bitcoin/bips/blob/master/bip-0077.md), +in which sender and receiver exchange the transaction through an +untrusted directory and never need to be online at the same time. + +Learn more at [payjoindevkit.org](https://payjoindevkit.org/). diff --git a/payjoin-ffi/contrib/sync-concept.sh b/payjoin-ffi/contrib/sync-concept.sh new file mode 100755 index 000000000..5512d1543 --- /dev/null +++ b/payjoin-ffi/contrib/sync-concept.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Sync the shared payjoin concept text (payjoin-ffi/CONCEPT.md) into the +# marked block of each package README, so every package describes payjoin +# in the same words. Pass --check to fail on drift instead of rewriting. + +REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)" +CONCEPT="$REPO_ROOT/payjoin-ffi/CONCEPT.md" +READMES=( + "payjoin-ffi/README.md" + "payjoin-ffi/python/README.md" + "payjoin-ffi/dart/README.md" + "payjoin-ffi/javascript/README.md" + "payjoin-ffi/csharp/README.md" +) +BEGIN_MARKER='' +END_MARKER='' + +CHECK=0 +if [[ ${1:-} == "--check" ]]; then + CHECK=1 +fi + +status=0 +for readme in "${READMES[@]}"; do + path="$REPO_ROOT/$readme" + if ! grep -qF "$BEGIN_MARKER" "$path" || ! grep -qF "$END_MARKER" "$path"; then + echo "error: $readme is missing the concept markers" >&2 + exit 1 + fi + tmp="$(mktemp)" + awk -v begin="$BEGIN_MARKER" -v end="$END_MARKER" -v concept="$CONCEPT" ' + $0 == begin { + print + # prettier pads HTML comments in markdown with blank lines, so + # emit the same shape to keep sync and nix fmt at a fixpoint + print "" + while ((getline line < concept) > 0) print line + close(concept) + print "" + skipping = 1 + next + } + $0 == end { skipping = 0 } + !skipping { print } + ' "$path" >"$tmp" + if cmp -s "$path" "$tmp"; then + rm -f "$tmp" + elif [[ $CHECK -eq 1 ]]; then + echo "error: $readme is out of sync with payjoin-ffi/CONCEPT.md;" \ + "run payjoin-ffi/contrib/sync-concept.sh" >&2 + rm -f "$tmp" + status=1 + else + mv "$tmp" "$path" + echo "updated $readme" + fi +done +exit "$status" From b35c0a720ca6deafcbfefafcaebda46be58865a5 Mon Sep 17 00:00:00 2001 From: chavic Date: Fri, 11 Sep 2026 16:57:59 +0200 Subject: [PATCH 2/2] Sync package READMEs from shared concept text Insert the synced concept block into the python, dart, javascript and C# package READMEs and the top-level payjoin-ffi README, all generated by payjoin-ffi/contrib/sync-concept.sh. The C# README's paragraph is replaced by the shared block, keeping its native-libraries note as C#-specific text, and the top-level mission paragraph is replaced likewise. --- payjoin-ffi/README.md | 20 +++++++++++++++++++- payjoin-ffi/csharp/README.md | 22 +++++++++++++++++++++- payjoin-ffi/dart/README.md | 20 ++++++++++++++++++++ payjoin-ffi/javascript/README.md | 20 ++++++++++++++++++++ payjoin-ffi/python/README.md | 20 ++++++++++++++++++++ 5 files changed, 100 insertions(+), 2 deletions(-) diff --git a/payjoin-ffi/README.md b/payjoin-ffi/README.md index 284a76978..ee42c97ce 100644 --- a/payjoin-ffi/README.md +++ b/payjoin-ffi/README.md @@ -2,7 +2,25 @@ This repository creates Payjoin libraries for various programming languages, all using the Rust-based [Payjoin Dev Kit](https://github.com/payjoin/rust-payjoin) as the core implementation of BIP-77. -Our mission is to provide developers with cross-language libraries that seamlessly integrate with different platform languages. By offering support for multiple languages, we aim to enhance the accessibility and usability of Payjoin, empowering developers to incorporate it into their applications, no matter their preferred programming language. + + +Payjoin lets Bitcoin senders and receivers interact to make batched +transactions. The cooperating peers choose the inputs and outputs of the +transfer together, so the result looks like any other transaction — which +preserves privacy by poisoning the common-input-ownership heuristic that +chain surveillance depends on — and the receiver can batch its own +operations into the same transaction. + +These bindings implement both +[BIP 78 Simple Payjoin](https://github.com/bitcoin/bips/blob/master/bip-0078.mediawiki) +and +[BIP 77 Async Payjoin](https://github.com/bitcoin/bips/blob/master/bip-0077.md), +in which sender and receiver exchange the transaction through an +untrusted directory and never need to be online at the same time. + +Learn more at [payjoindevkit.org](https://payjoindevkit.org/). + + ## Supported Target Languages and Platforms diff --git a/payjoin-ffi/csharp/README.md b/payjoin-ffi/csharp/README.md index b6dce951a..2b48649ed 100644 --- a/payjoin-ffi/csharp/README.md +++ b/payjoin-ffi/csharp/README.md @@ -2,7 +2,27 @@ Welcome to the C# language bindings for the [Payjoin Dev Kit](https://payjoindevkit.org/)! -Payjoin lets the receiver of a Bitcoin transfer contribute inputs to the sender's transaction. The result looks like any other transaction, which preserves privacy by poisoning the common-input-ownership heuristic that chain surveillance depends on, and it lets the receiver batch its own operations into the same transaction. These bindings implement both [BIP 78](https://github.com/bitcoin/bips/blob/master/bip-0078.mediawiki) (synchronous payjoin) and [BIP 77](https://github.com/bitcoin/bips/blob/master/bip-0077.md) (asynchronous payjoin, where sender and receiver exchange the transaction through an untrusted directory and never need to be online at the same time), and ship with native libraries for every supported platform, so no Rust toolchain is required. + + +Payjoin lets Bitcoin senders and receivers interact to make batched +transactions. The cooperating peers choose the inputs and outputs of the +transfer together, so the result looks like any other transaction — which +preserves privacy by poisoning the common-input-ownership heuristic that +chain surveillance depends on — and the receiver can batch its own +operations into the same transaction. + +These bindings implement both +[BIP 78 Simple Payjoin](https://github.com/bitcoin/bips/blob/master/bip-0078.mediawiki) +and +[BIP 77 Async Payjoin](https://github.com/bitcoin/bips/blob/master/bip-0077.md), +in which sender and receiver exchange the transaction through an +untrusted directory and never need to be online at the same time. + +Learn more at [payjoindevkit.org](https://payjoindevkit.org/). + + + +The package ships with native libraries for every supported platform, so no Rust toolchain is required. ## Install diff --git a/payjoin-ffi/dart/README.md b/payjoin-ffi/dart/README.md index 399312bd5..97161de02 100644 --- a/payjoin-ffi/dart/README.md +++ b/payjoin-ffi/dart/README.md @@ -2,6 +2,26 @@ Welcome to the Dart language bindings for the [Payjoin Dev Kit](https://payjoindevkit.org/)! + + +Payjoin lets Bitcoin senders and receivers interact to make batched +transactions. The cooperating peers choose the inputs and outputs of the +transfer together, so the result looks like any other transaction — which +preserves privacy by poisoning the common-input-ownership heuristic that +chain surveillance depends on — and the receiver can batch its own +operations into the same transaction. + +These bindings implement both +[BIP 78 Simple Payjoin](https://github.com/bitcoin/bips/blob/master/bip-0078.mediawiki) +and +[BIP 77 Async Payjoin](https://github.com/bitcoin/bips/blob/master/bip-0077.md), +in which sender and receiver exchange the transaction through an +untrusted directory and never need to be online at the same time. + +Learn more at [payjoindevkit.org](https://payjoindevkit.org/). + + + ## Usage ### Install diff --git a/payjoin-ffi/javascript/README.md b/payjoin-ffi/javascript/README.md index b7e2c2d0f..41b27b16a 100644 --- a/payjoin-ffi/javascript/README.md +++ b/payjoin-ffi/javascript/README.md @@ -2,6 +2,26 @@ Welcome to the JavaScript language bindings for the [Payjoin Dev Kit](https://payjoindevkit.org/)! + + +Payjoin lets Bitcoin senders and receivers interact to make batched +transactions. The cooperating peers choose the inputs and outputs of the +transfer together, so the result looks like any other transaction — which +preserves privacy by poisoning the common-input-ownership heuristic that +chain surveillance depends on — and the receiver can batch its own +operations into the same transaction. + +These bindings implement both +[BIP 78 Simple Payjoin](https://github.com/bitcoin/bips/blob/master/bip-0078.mediawiki) +and +[BIP 77 Async Payjoin](https://github.com/bitcoin/bips/blob/master/bip-0077.md), +in which sender and receiver exchange the transaction through an +untrusted directory and never need to be online at the same time. + +Learn more at [payjoindevkit.org](https://payjoindevkit.org/). + + + ## Usage ### Install diff --git a/payjoin-ffi/python/README.md b/payjoin-ffi/python/README.md index 5975d7db6..3f575cbcc 100644 --- a/payjoin-ffi/python/README.md +++ b/payjoin-ffi/python/README.md @@ -2,6 +2,26 @@ Welcome to the Python language bindings for the [Payjoin Dev Kit](https://payjoindevkit.org/)! + + +Payjoin lets Bitcoin senders and receivers interact to make batched +transactions. The cooperating peers choose the inputs and outputs of the +transfer together, so the result looks like any other transaction — which +preserves privacy by poisoning the common-input-ownership heuristic that +chain surveillance depends on — and the receiver can batch its own +operations into the same transaction. + +These bindings implement both +[BIP 78 Simple Payjoin](https://github.com/bitcoin/bips/blob/master/bip-0078.mediawiki) +and +[BIP 77 Async Payjoin](https://github.com/bitcoin/bips/blob/master/bip-0077.md), +in which sender and receiver exchange the transaction through an +untrusted directory and never need to be online at the same time. + +Learn more at [payjoindevkit.org](https://payjoindevkit.org/). + + + ## Install from PyPI Grab the latest release with a simple: