Note, bitcoin-ts was renamed to Libauth in June 2020.

Schnorr Signature Support for JavasScript using WebAssembly

The latest version of bitcoin-ts now includes support for signing and verifying Schnorr signatures over the secp256k1 curve. Schnorr functionality has been added to the library’s Secp256k1 WebAssembly interface:

This implementation follows the BCH_2019_05 Schnorr specification, which is derived from Pieter Wuille’s Schnorr BIP specification. (As other Schnorr implementations are deployed, we’ll plan to support them as well.)

The WebAssembly interface is compiled from bitcoin-ts-secp256k1 (bitcoin-ts’s fork of Bitcoin Core’s libsecp256k1) which has now been patched to include Bitcoin ABC’s Schnorr module.

As with the rest of bitcoin-ts, the code is fully portable — only universal APIs are used, so the same code runs on both Node.js and browsers.

You can also read the TSDocs for the new methods directly in your editor.

The new functionality is tested using both existing test vectors and property-based generated tests. Schnorr vs. ECDSA tests have also been added to the benchmarks.

If you find this useful, please star the bitcoin-ts GitHub repo. Thanks!