Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1008 Bytes

README.md

File metadata and controls

33 lines (21 loc) · 1008 Bytes

schnorr-minimal build status

A simple but naive Typescript implementation of Schnorr signatures on the secp256k1 elliptical curve.

Use at your own risk.

Features

  • Schnorr signatures (bip-schnorr)
  • Multi signatures (MuSig)
  • Blind signatures
  • Jacobian optimization

Goals

  1. Zero dependencies
  2. Works in Node and web browsers (https://caniuse.com/#feat=bigint 💀)

Plans

  • Migrate from bigint to uint8array internally.

Usage

(TODO) See tests for now.

import { Scalar, Point } from 'schnorr-minimal'

const priv = Scalar.fromHex('e47d79c74106dbc026a8e672ced54c3f23c7a001a2ef9318be3f338db4edba2d')
const pub = Point.fromPrivKey(priv)
assert(Point.toHex(pub) === '0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798')