Git Product home page Git Product logo

did-key.js's Introduction

did:key

CI CD

did:key is a DID Method which is offline friendly, cryptographically self certifying, requires no trust of blockchain or certificate authoritites and is ideal for ephemeral use.

๐Ÿšง Under Construction.

Demos:

NIST Curves are only supported in node 15.

If you want to resolve all did keys, you need to install all of them:

npm i @transmute/did-key.js@latest @transmute/did-key-ed25519@latest @transmute/did-key-x25519@latest @transmute/did-key-bls12381@latest @transmute/did-key-secp256k1@latest @transmute/did-key-p384@latest --save

Use the imports below if you only want to support 1 did key type.

did:key:z6Mk...

npm i @transmute/did-key-ed25519@latest --save

did:key:z6LS...

npm i @transmute/did-key-x25519@latest --save

did:key:zUC7...

npm i @transmute/did-key-bls12381@latest --save

did:key:zQ3s...

npm i @transmute/did-key-secp256k1@latest --save

did:key:zUew...

npm i @transmute/did-key-p384@latest --save

Alternatives

Release process

Unstable releases

Unstable releases are automatic, from CD:

  • On every commit to master 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...

Deployment

Because did:key is just a deterministic transformer of public key bytes...

You really ought to never resolve it over a network.

However, it can be useful for testing purposes.

See the workbench and resolver modules.

  1. Create a new glitch.com project.
  2. Allow git pushes for the project.

Tools > Terminal

git config receive.denyCurrentBranch updateInstead
  1. Get the project git url

Tools > Import & Export > Project_Git_URL

  1. Set the project as a submodule
git submodule add <Project_Git_URL> glitch-hosting
  1. Make some changes and push

  2. Refresh glitch project to see changes.

Tools > Terminal

refresh
  1. Setup npm scripts to automate deployments according to your preferences.

License

Copyright 2020 Transmute Industries Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

did-key.js's People

Contributors

or13 avatar dependabot[bot] avatar gjgd avatar nickdarvey avatar timoglastra avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.