Veramo Framework
repository·next·Indexed 20 days ago
https://github.com/decentralized-identity/veramoA modular JavaScript framework for managing Verifiable Data, including DIDs, Verifiable Credentials, and DIDComm communication. Designed to run across Node.js, Browsers, and React Native, Veramo features a core orchestration engine and a plugin-based architecture. It includes support for W3C-compliant credentials, various DID providers (such as did:ethr and did:ion), and flexible data storage options using TypeORM and JSON trees.
What's inside Veramo
- The Veramo selective disclosure plugin enables decentralized identity workflows where users can selectively disclose specific parts of their credentials. It provides the necessary functionality to both create and receive selective disclosure requests, allowing for privacy-preserving data sharing.
Overview of Veramo DIDComm
nextVeramo DIDComm is a messaging plugin that implements the DIDComm v2 specification. It allows for secure, decentralized communication between entities using DIDComm protocols. It is designed to be compliant with the DIDComm v2 Spec.What is Veramo Core-types?
nextVeramo Core-types is a package containing the common data type definitions used across the Veramo ecosystem. It ensures type safety and consistency when working with different Veramo plugins and core modules.Overview of Veramo did:ion provider
nextThe
did:ionprovider implements theAbstractIdentifierProviderfor thedid:ionmethod. It enables the creation, updating, deactivation, and resolution ofdid:ionentities. The ION Network is an implementation of the Sidetree protocol using the Bitcoin blockchain.Key Concepts:
- Long form vs Short form DIDs: ION uses short form DIDs (standard DIDs) which require anchoring to be resolvable. To allow immediate resolution after creation, the provider uses Long form DIDs, which append a signed string to the short form DID. The provider uses the Long form as the identifier's
didvalue and the short form as itsalias. - Network Latency: Because ION anchors to Bitcoin, updates typically take at least 10 minutes to reflect in the ION Network or the ION Explorer. During this 10-15 minute anchoring window, you cannot perform another operation on the same identifier.
- Key Rotation: The provider automatically manages Update keys and Recovery keys. For updates, it resolves the current document, matches the local key with the current commitment value, signs the request, and generates a new update key for the next rotation.
- Long form vs Short form DIDs: ION uses short form DIDs (standard DIDs) which require anchoring to be resolvable. To allow immediate resolution after creation, the provider uses Long form DIDs, which append a signed string to the short form DID. The provider uses the Long form as the identifier's
Overview of Veramo data storage plugins
nextVeramo uses a storage system based on TypeORM. The
@veramo/data-storepackage provides several specialized plugins to manage different types of decentralized identity data:DataStore: A plugin providing simplestoreandgetmethods specifically for messages, credentials, and presentations.DataStoreORM: A plugin that offers advanced querying capabilities by leveraging TypeORM directly.KeyStoreandDIDStore: Specific implementations of theAbstractKeyStoreandAbstractDIDStoreinterfaces, used for managing cryptographic keys and Decentralized Identifiers (DIDs) respectively.
Overview of Veramo Express
nextVeramo Express is a utility module providing Express.js routers designed to bridge Veramo agents with external consumers. It enables three primary capabilities:
- Expose Agent Methods: Allows specific Veramo agent methods to be accessible via HTTP to other agents or external APIs.
- Serve OpenAPI Schemas: Automatically serves OpenAPI documentation for the exposed agent methods, facilitating easier integration for developers.
- Serve did:web Documents: Provides a mechanism to serve DID documents for the
did:webmethod via HTTP.
Overview of Veramo Framework
nextVeramo is a modular JavaScript framework for Verifiable Data designed to work across Node.js, Browsers, and React Native.
It follows a core + plugin architecture. The core provides the API entry point and manages plugin interoperability, while specific functionalities are added via plugins. An instance of Veramo (referred to as an agent) can be configured to perform various roles, including:
- Managing keys for signing and encryption
- Managing Decentralized Identifiers (DIDs)
- Issuing and verifying Verifiable Credentials (VCs) and Verifiable Presentations (VPs)
- Using Selective Disclosure for credential presentation
- Communicating via DIDComm
- Storing and serving data
- Remote agent control or proxying
Use the Veramo JSON-LD credentials plugin
nextThe@veramo/credential-ldpackage is a plugin for Veramo that enables working with W3C-compliant JSON-LD Verifiable Credentials and Verifiable Presentations. It provides both a plugin interface and a message handler to facilitate the issuing and verification of these credentials and presentations according to W3C standards.Use the Veramo did:key provider
nextThe@veramo/did-provider-keypackage provides an implementation ofAbstractIdentifierProviderspecifically for thedid:keymethod. Use this provider when you need to create and manage Decentralized Identifiers (DIDs) that use thedid:keymethod, which allows for the creation of DIDs directly from public keys.Purpose of test-react-app
nextThetest-react-apppackage is a specialized testing environment designed to verify the compatibility of Veramo core dependencies within a browser environment. It is intended as a testing ground for compatibility checks rather than as a template or sample code for production applications.Use the Veramo did:ethr provider
nextThedid:ethrprovider implements theAbstractIdentifierProviderinterface, allowing you to create and manage Decentralized Identifiers (DIDs) using thedid:ethrmethod within the Veramo framework. This enables the creation and control of Ethereum-based DID entities.Use the Veramo DID discovery plugin
nextThe Veramo DID discovery plugin allows you to discover Decentralized Identifiers (DIDs) within the Veramo ecosystem. It is designed to be used as a plugin within a Veramo agent instance.