Payjoin 0.1.0

This package has a SemVer 2.0.0 package version: 0.1.0+payjoin-1.0.0.
dotnet add package Payjoin --version 0.1.0
                    
NuGet\Install-Package Payjoin -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Payjoin" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Payjoin" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Payjoin" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Payjoin --version 0.1.0
                    
#r "nuget: Payjoin, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Payjoin@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Payjoin&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Payjoin&version=0.1.0
                    
Install as a Cake Tool

Payjoin C# Bindings

Welcome to the C# language bindings for the Payjoin Dev Kit!

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 (synchronous payjoin) and BIP 77 (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.

Install

dotnet add package Payjoin --prerelease

Requires .NET 10.0 or later, on one of:

OS RIDs
Linux linux-x64, linux-arm64
macOS osx-arm64, osx-x64
Windows win-x64, win-arm64

End to end example

The usage reference is the commented walkthrough in IntegrationTests.cs: TestIntegrationV2ToV2 drives a complete payjoin from both sides, executed by CI on every change so it cannot go stale, and narrates each protocol step, from opening and persisting the session through the receiver checklist to signing the proposal.

Receive a payjoin

A receiver session produces a BIP 21 URI to show the sender. It works with every wallet: a payjoin-aware sender upgrades to a payjoin, any other wallet simply sends to the address as usual.

A session starts with the directory's OHTTP keys, fetched through an OHTTP relay so the directory never learns your IP address, then builds a receiver for your address and persists every step to an event log so your app can crash or restart and resume where it left off. From there the session advances through a typestate flow: each state hands you a request to relay with your own HTTP client, and the response moves you to the next state, through checking the sender's original transaction, contributing inputs, and posting the proposal.

Send a payjoin

A sender session starts from a BIP 21 URI scanned from the receiver (Payjoin.Uri.Parse(...).CheckPjSupported()), which is used to create and sign the original PSBT, posted to the receiver's mailbox on the directory. The sender then polls for the receiver's payjoin proposal through the same request/response flow, and once it arrives, signs it and broadcasts it to the network. The sender half of the same walkthrough shows every step.

Resume after a restart

Sessions persist each step to an event log through a persister you implement over your own storage; replaying the log with PayjoinMethods.ReplayReceiverEventLog recovers the current state after a crash or restart. Every Save has a SaveAsync counterpart, with async persister interfaces for database-backed storage.

Stability

The package is pre-1.0 while the C# API stabilizes; expect breaking changes between 0.x releases. The version's build metadata names the wrapped payjoin core release, so 0.1.0+payjoin-1.0.0 packages payjoin 1.0.0, the first stable payjoin release.

Documentation and help

To build the bindings from source, run the tests, or produce the NuGet package locally, see CONTRIBUTING.md.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 43 8/27/2026