JSPM

did-document-public-key

0.5.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 4
    • Score
      100M100P100Q49909F
    • License MIT

    Decentralized Identity (DID) Document (DDO) Public Key interface

    Package Exports

    • did-document-public-key

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (did-document-public-key) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    did-document-public-key

    Decentralized Identity (DID) Document (DDO) Public Key interface

    Abstract

    In this module, we provide a class interface for creating Public Keys suitable for a Decentralized Identity (DID) Document (DDO)

    Installation

    $ npm install did-document-public-key

    Example Usage

    const { Ed25519VerificationKey2018 } = require('ld-cryptosuite-registry')
    const { PublicKey } = require('did-document-public-key')
    const pk = new PublicKey({
      id: 'did:ara:6d75736963',
      type: Ed25519VerificationKey2018
    })
    
    console.log(pk.toJSON()

    API

    pk = new PublicKey(opts)

    where opts should be:

    {
      id: String // A valid DID URI
      type: String // A valid type from 'ld-cryptosuite-registry'
      owner: String // DEPRECATED: Use 'opts.controller'
      controller: String // An optional DID who owns this public key, defaults to id
    }

    See Also

    TODO

    License

    MIT