{"repo":"ACken2/bip322-js","free":true,"listed":false,"github":"https://github.com/ACken2/bip322-js","clone":"git clone https://github.com/ACken2/bip322-js.git","description":"A Javascript library that provides utility functions related to the BIP-322 signature scheme","language":"TypeScript","stars":38,"topics":["bitcoin","bitcoinjs","javascript","typescript","bip322","no-wasm"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"BIP322-JS A Javascript library that provides utility functions related to the BIP-322 signature scheme. Documentation Available at https://acken2.github.io/bip322-js/ Supported Features The following features are supported on mainnet, testnet, and regtest for P2PKH, P2SH-P2WPKH, P2WPKH, and single-key-spend P2TR addresses: 1. Generate raw toSpend and toSign BIP-322 transactions. 2. Sign a BIP-322 signature using a private key. 3. Verify a legacy BIP-137 signature loosely (see below). 4. Verify a simple BIP-322 signature. Usage Use the Signer class to sign a BIP-322 signature: Use the Verifier class to verify a BIP-322 signature (which also validates a BIP-137 signature): Loose BIP-137 Verification A BIP-322 signature is backward compatible with the legacy signature scheme (i.e., BIP-137 signature). As a result, this library also recognizes valid BIP-137 signatures. In a BIP-137 signature, a header flag indicates the type of Bitcoin address for which the signature is signed: - 27-30: P2PKH uncompressed - 31-34: P2PKH compressed - 35-38: Segwit P2SH - 39-42: Segwit Bech32 However, some wallets' implementations of the BIP-137 signature did not strictly follow this header flag specification, and some may have signed signatures with the wrong header (e.g., using header 27 for a native segwit address). It is trivial, however, to convert a BIP-137 signature with an incorrect header flag to one with the correct header flag since the \"address type\" component in the header flag is not ","default_branch":null,"files":null,"tree":[],"storefront":"/r/ACken2","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ACken2/bip322-js/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}