Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
/ rust-payjoin Public archive
forked from payjoin/rust-payjoin

Optimize settlement with privacy by default. PDK makes Payjoin support easy for any wallet or service. Save significant fees as a result.

Notifications You must be signed in to change notification settings

BitSwap-BiFi/rust-payjoin

 
 

Repository files navigation

Rust-Payjoin

Supercharged payment batching to save you fees and preserve your privacy.

About

payjoin

The Payjoin Dev Kit payjoin library implements both BIP 78 Payjoin V1 and BIP 77 Payjoin V2.

The payjoin crate is compatible with many wallets like LND in nolooking and Bitcoin Dev Kit in Mutiny Wallet and in BitMask

payjoin-cli

The payjoin-cli crate performs no-frills Payjoin as a reference implementation using Bitcoin Core wallet.

payjoin-directory

The payjoin-directory crate implements the Payjoin Directory store-and-forward server required for Payjoin V2's asynchronous operation.

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, be careful relying on its security for now!

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

Development status

Sender (V1 beta, V2 alpha)

  • Basic logic
  • Most checks implemented
  • Documentation
  • Unit test with official test vectors passes
  • Many unit tests
  • Fee contribution support
  • Example client using bitcoind
  • Tested and works with BTCPayServer
  • Tested and works with JoinMarket
  • Minimum fee rate enforcement
  • Independent review
  • Independent testing

Receiver (V1 beta, V2 alpha)

  • Basic logic
  • Most checks implemented
  • Documentation
  • Unit test with official test vectors passes
  • Many unit tests
  • Fee contribution support
  • Example server using bitcoind
  • Tested and works with BTCPayServer
  • Tested and works with WasabiWallet
  • Tested and works with Blue Wallet
  • Tested and works with Sparrow
  • Tested and works with JoinMarket
  • Minimum fee rate enforcement
  • Discount support
  • Independent review
  • Independent testing

Code quality

  • Idiomatic Rust code
  • Newtypes
  • Panic-free error handling
  • No unsafe code or well-tested/analyzed/proven/... unsafe code
  • Warning-free
  • CI
  • Integration tests
  • Fuzzing
  • Coverage measurement

Minimum Supported Rust Version (MSRV)

The payjoin library and payjoin-cli should always compile with any combination of features on Rust 1.63.0.

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

payjoin

cargo update -p cc --precise 1.0.105
cargo update -p regex --precise 1.9.6
cargo update -p reqwest --precise 0.12.4
cargo update -p url --precise 2.5.0
cargo update -p tokio --precise 1.38.1
cargo update -p which --precise 4.4.0
cargo update -p zstd-sys --precise 2.0.8+zstd.1.5.5

payjoin-cli

cargo update -p cc --precise 1.0.105
cargo update -p clap_lex --precise 0.3.0
cargo update -p regex --precise 1.9.6
cargo update -p reqwest --precise 0.12.4
cargo update -p [email protected] --precise 0.3.20
cargo update -p tokio --precise 1.38.1
cargo update -p url --precise 2.5.0
cargo update -p which --precise 4.4.0
cargo update -p zstd-sys --precise 2.0.8+zstd.1.5.5

Code Formatting

We use the nightly Rust formatter for this project. Please run rustfmt using the nightly toolchain before submitting any changes.

License

MIT

About

Optimize settlement with privacy by default. PDK makes Payjoin support easy for any wallet or service. Save significant fees as a result.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 99.7%
  • Other 0.3%