Payjoin implementation in Rust

About

This is a library and a client binary for bitcoind implementing BIP78 Payjoin.

The library is perfectly IO-agnostic—in fact, it does no IO. The primary goal of such design is to be easy to unit test. While not there yet, it already has infinitely more tests than the Payjoin PR against Electrum. :P

It doesn't care whether you use async, blocking, tokio, sync-std hyper, actix or whatever. There are already too many frameworks in Rust so it's best avoiding directly introducing them into library code. The library currently only contains sender implementation and a partial receiver.

The payjoin-cli binary performs no-frills Payjoin using Bitcoin Core wallet. The payjoin crate also supports other wallet software like LND.

Disclaimer ⚠️ WIP

Use at your own risk. this crate has not yet been reviewed by independent Rust and Bitcoin security professionals.

While I don't think there is a huge risk running it, don't rely on its security for now!

Seeking review of the code that verifies there is no overpayment. Contributions are welcome!

Development status

Sender (beta)

Receiver (beta)

Code quality

Minimum Supported Rust Version (MSRV)

The payjoin library should always compile with any combination of features on Rust 1.57.0.

To build and test with the MSRV you will need to pin the below dependency versions:

shell cargo update -p log --precise 0.4.18 cargo update -p tempfile --precise 3.6.0

License

MIT