/sidetree.js

Sidetree Core Protocol and DID Method Drivers

Primary LanguageTypeScriptApache License 2.0Apache-2.0

sidetree.js

npm version Continuous Integration

Sidetree.js is an implementation of v0.1.0 of the sidetree specification

This codebase is a Lerna monorepo.

For a list of all modules in this repository, see packages.

Sidetree Based DID Methods

Method Spec Ledger
did:ion spec Bitcoin
did:elem spec Ethereum
did:photon spec Amazon QLDB
did:trustbloc spec Hyperledger Fabric

Usage

To install all packages run

npm install

To install a specific package (and its dependencies) run

npm run install:only @sidetree/photon

To run tests in every packages run

npm run test

To test a specific package run

npm run test:only @sidetree/photon

Services

We use docker-compose to setup the services used in tests, Namely:

  • ganache: for a local ethereum testnet
  • ipfs: for a local ipfs node
  • mongodb: for a local mongo DB

Make sure you have docker and docker-compose installed before running the tests

How to pull individual packages from the mono repo

  • Copy the global eslint config to the package
  • Make sure the linked packages are published

Release process

Unstable releases

Unstable releases are automatic, from CD:

  • On every commit to main an unstable release is pushed. An unstable release is a release with a tag of the form: vA.B.C-unstable.X. Everytime a PR is merged, X is incremented.
  • If "skip-ci" is present in the commit message, the aforementioned behavior is skipped

Stable releases

Stable releases are triggered by a dev locally

  • Make sure you are familiar with Semantic Versioning
  • Run npm install and npm build in the root level directory
  • Run
    • npm run publish:stable:patch for a patch version increment
    • npm run publish:stable:minor for a minor version increment
    • npm run publish:stable:major for a major version increment

Example

  • Current version is v0.1.0
  • A PR is made to fix bug A. When it's merged a release is made: v0.1.0-unstable-0
  • A PR is made to add feature B. When it's merged a release is made: v0.1.0-unstable-1
  • A PR is made to add feature C. When it's merged a release is made: v0.1.0-unstable-2
  • Dev runs npm run publish:stable:patch. Current version is v0.1.0
  • A PR is made to fix bug D. When it's merged a release is made: v0.1.1-unstable-0
  • etc...

Docker Commands

You may find it useful to prune all docker data:

docker system prune

Commercial Support

Commercial support for these libraries is available upon request from Transmute: support at transmute dot industries

Security Policy

Please see our security policy for additional details about responsible disclosure of security related issues.

License

Apache-2.0 © Transmute Industries Inc.