Skip to content

Implements BIP322 generic message signing and verification

Notifications You must be signed in to change notification settings

ordinalspractice/bip322

 
 

Repository files navigation

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.

About

Implements BIP322 generic message signing and verification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 40.8%
  • Rust 39.2%
  • JavaScript 11.4%
  • CSS 4.6%
  • Just 2.4%
  • Shell 1.1%
  • HTML 0.5%