9 releases

0.0.9 Nov 1, 2024
0.0.8 Oct 20, 2024
0.0.7 Aug 26, 2024
0.0.1 Jul 22, 2024

#15 in #legacy

Download history 340/week @ 2024-08-06 33/week @ 2024-08-13 264/week @ 2024-08-20 88/week @ 2024-08-27 41/week @ 2024-09-03 66/week @ 2024-09-10 23/week @ 2024-09-17 27/week @ 2024-09-24 24/week @ 2024-10-01 120/week @ 2024-10-08 416/week @ 2024-10-15 178/week @ 2024-10-22 223/week @ 2024-10-29 99/week @ 2024-11-05 102/week @ 2024-11-12 67/week @ 2024-11-19

505 downloads per month
Used in 2 crates

CC0 license

35KB
866 lines

BIP-322

Implements BIP-322, generic message signing and verification.

Types of Signatures

At the moment this crate supports P2TR, P2WPKH and P2SH-P2WPKH single-sig addresses. Feedback through issues or PRs on the interface design and security is welcome and encouraged.

  • simple
  • full
  • full (proof-of-funds)
  • legacy (BIP-137)

The goal is to provide a full signing and verifying library similar to this Javascript library.

Test Vectors

Compile for WASM (on MacOs)

brew install llvm
cargo install wasm-pack
rustup target add wasm32-unknown-unknown
AR=/opt/homebrew/opt/llvm/bin/llvm-ar \
CC=/opt/homebrew/opt/llvm/bin/clang \
wasm-pack build \
    --target web \
    --out-name bip322 \
    www

The WASM binary and Javascript glue code can then be found in www/pkg. The bip322.rs site also runs a small WASM binary if you'd like to check it out.

MSRV

At the moment the Minimum Supported Rust Version (MSRV) is 1.63. You can check it by running just msrv.

Dependencies

~8.5MB
~113K SLoC