View on GitHub


Relies on bitcoin-ts for secp256k1 crypto.

Relies on jsonld-signatures for jsonld operations. Some of the javascript from that repo needed to be converted to typescript to get this module to build properly, I have retained the copyrights on source files.

Relies on undrafted / unoffical JWS alg:

JOSE Alg COSE Alg Value Description Recommended
SS256K TBD (requested assignment -48) Schnorr signature using secp256k1 curve and SHA-256 Yes

JSON-LD 1.1 is being formally specified in the W3C JSON-LD Working Group. To participate in this work, please join the W3C and then join the Working Group.

Suite Details

Per ld-signatures, this Signature Suite defines the following:

  "id": "",
  "type": "SignatureSuite",
  "canonicalizationAlgorithm": "",
  "digestAlgorithm": "",
  "signatureAlgorithm": ""



This suite uses detached JWS using alg “SS256K” an unregistered, experimental Schnorr over secp256k1. Please review the details below.

SS256K is just ES256K but uses Schnorr instead of ECDSA.

The detached JWS must have the following header:

  "alg": "SS256K",
  "b64": false,
  "crit": ["b64"]


This is what a proof with SchnorrSecp256k1Signature2019 looks like:

  "type": "SchnorrSecp256k1Signature2019",
  "created": "2020-04-11T21:07:06Z",
  "verificationMethod": "did:example:123#vm-3",
  "proofPurpose": "assertionMethod",
  "jws": "eyJhbGciOiJFUzI1NkstUiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..pp9eiLCMfN4EfSB3cbl3UxJ4TtgUaTfByDaaB6IZbXsnvIy5AUIFjbgaiFNtq9-3f8mP7foD_HXpjrdWZfzlwAE"

Local Development

This project was bootstrapped with TSDX.

Below is a list of commands you will probably find useful.

npm start or yarn start

Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code’s Problems tab.

Your library will be rebuilt if you make edits.

npm run build or yarn build

Bundles the package to the dist folder. The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).

npm test or yarn test

Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.