Giter VIP home page Giter VIP logo

veramo's Introduction

Discord Twitter Follow Build, Test and Publish codecov

Veramo

Veramo is a JavaScript Framework for Verifiable Data that was designed to be flexible and modular which makes it an easy fit for a lot of complex workflows.

Create an agent, add plugins, run on a server or a frontend or mobile, or all of them combined. Veramo runs on Node, Browsers, and React Native straight out of the box. Save time by using the same API across all platforms.

Veramo is a core + some plugins. The core provides an entry point into the API, glues the plugins together and allows them to interoperate. Depending on which plugins you use, your instance of Veramo (your agent) can perform a variety of roles:

  • Create and manage keys for signing and encryption
  • Create and manage Decentralized Identifiers (DID)
  • Issue Verifiable Credentials (VCs) and Presentations (VPs)
  • Verify such VCs and VPs
  • Present credentials using Selective Disclosure
  • Communicate with other agents using DIDComm (or other protocols)
  • Receive, filter, store and serve data
  • Control other agents remotely, or act as a proxy for them
  • ...whatever else you can think of

Documentation

See the full docs on veramo.io

Also, there are a few examples and code samples that you can get from the integration test suite.

Contributing

This repository contains the Veramo core package, which only becomes relevant when you add plugins to it. These plugins can be developed by anyone and Veramo provides is the glue that can make them interoperate.

We maintain some "core" plugins in this monorepo to provide some functionality "out of the box", but a lot more can be done than is present in this codebase. We encourage you to contribute feedback and fixes for everything that you see here, as well as posting about your own plugins or projects on our Discussions page or on our Discord server.

Our documentation site is also open-source, and we invite you to contribute feedback and fixes there as well.

Build Veramo locally

This monorepo uses pnpm and lerna

Install dependencies

npm -g i pnpm
pnpm install

Build

pnpm build

Run the tests

pnpm test
pnpm test:watch

If you are running Visual Studio Code, there are some launch configurations available that can be used as template for step by step debugging.

Building a plugin

If you intend to write a plugin, we have made a plugin template repository that can be used to get you started. It is preconfigured with GitHub Actions for checks and automatic updates using renovate-bot so that your plugin can keep in sync with the cutting edge versions of Veramo and notify you if upcoming API changes are breaking anything. Of course, this automation will depend on the tests you write for your new plugin.

Depending on what functionality you intend to develop, some code from the template can be safely removed. The embedded comments should guide you, but if something does not make sense, please reach out.

Who's using Veramo?

Check out the awesome list of awesome projects using or extending Veramo.

Let's make it better

This framework can be used to build permissionless collaboration tools for the world. This is not an easy task, and we have a much greater chance of improving the world if we work together.

Share your feedback, your fixes, your plugins and your tools so that others may build better and better stuff based on them.

veramo's People

Contributors

aldigjo avatar andyv09 avatar awoie avatar cre8 avatar dchagastelles avatar dependabot[bot] avatar devrajsinghrawat avatar eengineer1 avatar eseoghene avatar italobb avatar jasny avatar jceb avatar martines3000 avatar mirceanis avatar nickreynolds avatar nklomp avatar radleylewis avatar rado0x54 avatar renovate-bot avatar renovate[bot] avatar rh7 avatar rkreutzer avatar roderik avatar shoito avatar simonas-notcat avatar tadejpodrekar avatar tientaidev avatar trentlarson avatar uport-automation-bot avatar walfly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

veramo's Issues

Encryption key management

constraints:

  • IdentityController is conceptually linked to encryption key management
  • maybe there's also a link to DID document management (enc keys may need to be added to the doc)

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._root:3.0.1

Vulnerabilities

DepShield reports that this application's usage of lodash._root:3.0.1 results in the following vulnerability(s):


Occurrences

lodash._root:3.0.1 is a transitive dependency introduced by the following direct dependency(s):

semantic-release:16.0.0-beta.31
        └─ @semantic-release/npm:6.0.0-beta.3
              └─ npm:6.13.1
                    └─ lodash._baseuniq:4.6.0
                          └─ lodash._root:3.0.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.union:4.6.0

Vulnerabilities

DepShield reports that this application's usage of lodash.union:4.6.0 results in the following vulnerability(s):


Occurrences

lodash.union:4.6.0 is a transitive dependency introduced by the following direct dependency(s):

semantic-release:16.0.0-beta.31
        └─ @semantic-release/npm:6.0.0-beta.3
              └─ npm:6.13.1
                    └─ lodash.union:4.6.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.memoize:4.1.2

Vulnerabilities

DepShield reports that this application's usage of lodash.memoize:4.1.2 results in the following vulnerability(s):


Occurrences

lodash.memoize:4.1.2 is a transitive dependency introduced by the following direct dependency(s):

ts-jest:24.1.0
        └─ lodash.memoize:4.1.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Public profile VP

  • Self sign a VP with some VCs (name, profileImage, url, etc).
  • Upload it
  • Update DID document to include URL to this VP

Something like this:

service: [{
  type: 'PublicProfilePresentation`,
  serviceEndpoint: 'https://custom/publicProfileVP.jwt`
}]

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.isstring:4.0.1

Vulnerabilities

DepShield reports that this application's usage of lodash.isstring:4.0.1 results in the following vulnerability(s):


Occurrences

lodash.isstring:4.0.1 is a transitive dependency introduced by the following direct dependency(s):

semantic-release:16.0.0-beta.31
        └─ @semantic-release/github:5.6.0-beta.2
              └─ issue-parser:4.0.0
                    └─ lodash.isstring:4.0.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Error: Could not find a declaration file for module 'ws'. '/daf/examples/expressjs-ethr/node_modules/ws/index.js' implicitly has an 'any' type.

/daf/examples/expressjs-ethr$ yarn build
yarn run v1.21.1
$ tsc
src/framework.ts:18:16 - error TS7016: Could not find a declaration file for module 'ws'. '/daf/examples/expressjs-ethr/node_modules/ws/index.js' implicitly has an 'any' type.
  Try `npm install @types/ws` if it exists or add a new declaration (.d.ts) file containing `declare module 'ws';`

18 import ws from 'ws'
                  ~~~~

Found 1 error.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
/daf/examples/expressjs-ethr$ yarn add @types/ws
yarn add v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ @types/[email protected]
info All dependencies
└─ @types/[email protected]
Done in 5.83s.
/daf/examples/expressjs-ethr$ yarn build
yarn run v1.21.1
$ tsc
Done in 6.67s.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.escaperegexp:4.1.2

Vulnerabilities

DepShield reports that this application's usage of lodash.escaperegexp:4.1.2 results in the following vulnerability(s):


Occurrences

lodash.escaperegexp:4.1.2 is a transitive dependency introduced by the following direct dependency(s):

semantic-release:16.0.0-beta.31
        └─ @semantic-release/github:5.6.0-beta.2
              └─ issue-parser:4.0.0
                    └─ lodash.escaperegexp:4.1.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

nacl-did IdentityController

We need nacl-did IdentityController.

It should be very similar to daf-ethr-did-fs, meaning it should save identity information in a plaintext json file.

Todo:

  • Copy packages/daf-ethr-did-fs to packages/daf-nacl-did-fs
  • Replace ethr-did with nacl-did
  • Add reference to the new package in packages/tsconfig.json, packages/daf-cli/tsconfig.json and packages/daf-cli/package.json
  • Add this new controller in daf-cli setup

If everything goes well, you should be able to call yarn daf identity-manager -c and create new nacl-did identity.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.clonedeep:4.5.0

Vulnerabilities

DepShield reports that this application's usage of lodash.clonedeep:4.5.0 results in the following vulnerability(s):


Occurrences

lodash.clonedeep:4.5.0 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.18.4
        └─ @lerna/publish:3.18.4
              └─ @lerna/npm-publish:3.16.2
                    └─ @evocateur/libnpmpublish:1.2.2
                          └─ lodash.clonedeep:4.5.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.get:4.4.2

Vulnerabilities

DepShield reports that this application's usage of lodash.get:4.4.2 results in the following vulnerability(s):


Occurrences

lodash.get:4.4.2 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.18.4
        └─ @lerna/version:3.18.4
              └─ @lerna/github-client:3.16.5
                    └─ @octokit/rest:16.35.0
                          └─ lodash.get:4.4.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of q:1.5.1

Vulnerabilities

DepShield reports that this application's usage of q:1.5.1 results in the following vulnerability(s):


Occurrences

q:1.5.1 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.18.4
        └─ @lerna/version:3.18.4
              └─ @lerna/conventional-commits:3.16.4
                    └─ conventional-changelog-angular:5.0.6
                          └─ q:1.5.1
                    └─ conventional-changelog-core:3.2.3
                          └─ q:1.5.1
                    └─ conventional-recommended-bump:5.0.1
                          └─ q:1.5.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._reinterpolate:3.0.0

Vulnerabilities

DepShield reports that this application's usage of lodash._reinterpolate:3.0.0 results in the following vulnerability(s):


Occurrences

lodash._reinterpolate:3.0.0 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.18.4
        └─ @lerna/version:3.18.4
              └─ @lerna/conventional-commits:3.16.4
                    └─ lodash.template:4.5.0
                          └─ lodash._reinterpolate:3.0.0
                          └─ lodash.templatesettings:4.2.0
                                └─ lodash._reinterpolate:3.0.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._createcache:3.1.2

Vulnerabilities

DepShield reports that this application's usage of lodash._createcache:3.1.2 results in the following vulnerability(s):


Occurrences

lodash._createcache:3.1.2 is a transitive dependency introduced by the following direct dependency(s):

semantic-release:16.0.0-beta.31
        └─ @semantic-release/npm:6.0.0-beta.3
              └─ npm:6.13.1
                    └─ lodash._createcache:3.1.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._getnative:3.9.1

Vulnerabilities

DepShield reports that this application's usage of lodash._getnative:3.9.1 results in the following vulnerability(s):


Occurrences

lodash._getnative:3.9.1 is a transitive dependency introduced by the following direct dependency(s):

semantic-release:16.0.0-beta.31
        └─ @semantic-release/npm:6.0.0-beta.3
              └─ npm:6.13.1
                    └─ lodash._createcache:3.1.2
                          └─ lodash._getnative:3.9.1
                    └─ lodash._getnative:3.9.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._baseindexof:3.1.0

Vulnerabilities

DepShield reports that this application's usage of lodash._baseindexof:3.1.0 results in the following vulnerability(s):


Occurrences

lodash._baseindexof:3.1.0 is a transitive dependency introduced by the following direct dependency(s):

semantic-release:16.0.0-beta.31
        └─ @semantic-release/npm:6.0.0-beta.3
              └─ npm:6.13.1
                    └─ lodash._baseindexof:3.1.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._bindcallback:3.0.1

Vulnerabilities

DepShield reports that this application's usage of lodash._bindcallback:3.0.1 results in the following vulnerability(s):


Occurrences

lodash._bindcallback:3.0.1 is a transitive dependency introduced by the following direct dependency(s):

semantic-release:16.0.0-beta.31
        └─ @semantic-release/npm:6.0.0-beta.3
              └─ npm:6.13.1
                    └─ lodash._bindcallback:3.0.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.restparam:3.6.1

Vulnerabilities

DepShield reports that this application's usage of lodash.restparam:3.6.1 results in the following vulnerability(s):


Occurrences

lodash.restparam:3.6.1 is a transitive dependency introduced by the following direct dependency(s):

semantic-release:16.0.0-beta.31
        └─ @semantic-release/npm:6.0.0-beta.3
              └─ npm:6.13.1
                    └─ lodash.restparam:3.6.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.set:4.3.2

Vulnerabilities

DepShield reports that this application's usage of lodash.set:4.3.2 results in the following vulnerability(s):


Occurrences

lodash.set:4.3.2 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.18.4
        └─ @lerna/version:3.18.4
              └─ @lerna/github-client:3.16.5
                    └─ @octokit/rest:16.35.0
                          └─ lodash.set:4.3.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.isplainobject:4.0.6

Vulnerabilities

DepShield reports that this application's usage of lodash.isplainobject:4.0.6 results in the following vulnerability(s):


Occurrences

lodash.isplainobject:4.0.6 is a transitive dependency introduced by the following direct dependency(s):

semantic-release:16.0.0-beta.31
        └─ @semantic-release/github:5.6.0-beta.2
              └─ issue-parser:4.0.0
                    └─ lodash.isplainobject:4.0.6

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of debug:2.6.9

Vulnerabilities

DepShield reports that this application's usage of debug:2.6.9 results in the following vulnerability(s):


Occurrences

debug:2.6.9 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.18.4
        └─ @lerna/create:3.18.0
              └─ globby:9.2.0
                    └─ fast-glob:2.2.7
                          └─ micromatch:3.1.10
                                └─ extglob:2.0.4
                                      └─ expand-brackets:2.1.4
                                            └─ debug:2.6.9
                                └─ snapdragon:0.8.2
                                      └─ debug:2.6.9

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.toarray:4.4.0

Vulnerabilities

DepShield reports that this application's usage of lodash.toarray:4.4.0 results in the following vulnerability(s):


Occurrences

lodash.toarray:4.4.0 is a transitive dependency introduced by the following direct dependency(s):

semantic-release:16.0.0-beta.31
        └─ marked-terminal:3.3.0
              └─ node-emoji:1.10.0
                    └─ lodash.toarray:4.4.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Provide mechanism and examples to use QR Code flows for SDR

We should provide examples and add missing functionality (e.g., message validators) for how to use QR Codes to create SDR and respond to a SDR.

SDR flow:

  • verifier creates SDR message using DAF and specifies whitelisted issuers and VC types and or claims. The message contains a simple callback URL.
  • holder scans the message (e.g., QR Code) and provides it to DAF for further processing to answer the SDR. The response is sent to the callback URL.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.sortby:4.7.0

Vulnerabilities

DepShield reports that this application's usage of lodash.sortby:4.7.0 results in the following vulnerability(s):


Occurrences

lodash.sortby:4.7.0 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.18.4
        └─ @lerna/create:3.18.0
              └─ whatwg-url:7.1.0
                    └─ lodash.sortby:4.7.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._cacheindexof:3.0.2

Vulnerabilities

DepShield reports that this application's usage of lodash._cacheindexof:3.0.2 results in the following vulnerability(s):


Occurrences

lodash._cacheindexof:3.0.2 is a transitive dependency introduced by the following direct dependency(s):

semantic-release:16.0.0-beta.31
        └─ @semantic-release/npm:6.0.0-beta.3
              └─ npm:6.13.1
                    └─ lodash._cacheindexof:3.0.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.uniq:4.5.0

Vulnerabilities

DepShield reports that this application's usage of lodash.uniq:4.5.0 results in the following vulnerability(s):


Occurrences

lodash.uniq:4.5.0 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.18.4
        └─ @lerna/version:3.18.4
              └─ @lerna/github-client:3.16.5
                    └─ @octokit/rest:16.35.0
                          └─ lodash.uniq:4.5.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.uniqby:4.7.0

Vulnerabilities

DepShield reports that this application's usage of lodash.uniqby:4.7.0 results in the following vulnerability(s):


Occurrences

lodash.uniqby:4.7.0 is a transitive dependency introduced by the following direct dependency(s):

semantic-release:16.0.0-beta.31
        └─ @semantic-release/github:5.6.0-beta.2
              └─ issue-parser:4.0.0
                    └─ lodash.uniqby:4.7.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Provide mechanism and examples to use QR Code flows for issuance

We should provide examples and add missing functionality (e.g., message validators) for how to use QR Codes to issue and receive a VC.

Issuance flow:

  • issuer creates VC and puts that VC into a message using DAF. The message contains a simple callback URL.
  • holder scans the message (e.g., QR Code) and provides it to DAF for further processing. The response is sent to the callback URL, e.g., approved / not approved. Sending the response is important in some cases to acknowledge that the holder received the VC.

DID Document management abstraction

  • Update IdentityManager, IdentityController and Issuer interfaces
  • Update daf-ethr-did-* packages to follow new architecture
  • Add DID Doc management methods to daf-cli
  • Expose these new methods over GraphQL

Proposed new interfaces

sign(), encrypt(), decrypt() are placeholders for now

export interface Identity {
  identityProviderType: string
  did: string
  didDoc: () => Promise<DIDDocument>
  sign: (data: string, keyId?: string) => Promise<EcdsaSignature | string>
  encrypt: (to: string, data: string | Uint8Array) => Promise<Encrypted>
  decrypt: (encrypted: Encrypted) => Promise<string>
  addPublicKey: (type: string, proofPurpose?: string[]) => Promise<PublicKey>
  removePublicKey: (keyId: string) => Promise<boolean>
  addService: (service: ServiceEndpoint) => Promise<boolean>
  removeService: (service: ServiceEndpoint) => Promise<boolean>
}

export interface IdentityProvider {
  type: string
  description: string
  createIdentity: () => Promise<Identity>
  importIdentity: (secret: string) => Promise<Identity>
  exportIdentity: (did: string) => Promise<string>
  deleteIdentity: (did: string) => Promise<boolean>
  getIdentities: () => Promise<Identity[]>
  getIdentity: (did: string) => Promise<Identity>
  on(event: string | symbol, listener: (...args: any[]) => void): this
  // event: 'identityCreated', 'identityDeleted'
}


export interface IdentityManager {
  getIdentityProviderTypes: () => Promise<string[]>
  createIdentity: (identityProviderType: string) => Promise<Identity>
  importIdentity: (identityProviderType: string, secret: string) => Promise<Identity>
  exportIdentity: (did: string) => Promise<string>
  deleteIdentity: (did: string) => Promise<boolean>
  getIdentities: () => Promise<Identity[]>
  getIdentity: (did: string) => Promise<Identity>
  on(event: string | symbol, listener: (...args: any[]) => void): this
  // event: 'identityCreated', 'identityDeleted'
}

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.