0.0.1 • Published 4 months ago
@sondreb/did-key v0.0.1
did:key resolver
A JavaScript library implementing the "did:key" Decentralized Identifier (DID) method, supports ed25519 and secp256k1 for DID creation and resolution.
The library was built to have a web friendly package that works without relying on Buffer
and crypto
from Node.js.
Installation
npm install @sondreb/did-key
Examples
import { DidKey } from '@sondreb/did-key';
const ed25519Key = DidKey.generate('ed25519');
const secp256k1Key = DidKey.generate('secp256k1');
const didResolution = DidKey.resolve(ed25519Key.did);
const document1 = DidKey.fromPrivateKey(privateKey, 'secp256k1');
const document2 = DidKey.fromPrivateKey(privateKey, 'ed25519');
License
This project is licensed under the MIT License - see the LICENSE file for details.
0.0.1
4 months ago