1.0.0 • Published 1 year ago
@didtools/key-did v1.0.0
Key DID
Utility functions for did:key DIDs.
Installation
npm install @didtools/key-didUsage
Create a DID with an optional seed
import { createDID } from '@didtools/key-did'
const seed = // 32 bytes of entropy, Uint8Array
const did = createDID(seed)
// Authenticate with the provider
await did.authenticate()Generate a random private key and create an authenticated DID
import { generatePrivateKey, getAuthenticatedDID } from '@didtools/key-did'
const randomKey = generatePrivateKey()
const did = await getAuthenticatedDID(randomKey)Additional Usage Notes
See the dids developer site for more details about how to use this package.
Contributing
We are happy to accept small and large contributions.
License
Apache-2.0 OR MIT
1.0.0
1 year ago