Veramo Framework

repository·next·Indexed 20 days ago

https://github.com/decentralized-identity/veramo

A 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.

Tokens
102K
Snippets
342
Records
478
Agent score
68%

What's inside Veramo

  1. Overview of Veramo did:ion provider

    next

    The did:ion provider implements the AbstractIdentifierProvider for the did:ion method. It enables the creation, updating, deactivation, and resolution of did:ion entities. 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 did value and the short form as its alias.
    • 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.
  2. Overview of Veramo data storage plugins

    next

    Veramo uses a storage system based on TypeORM. The @veramo/data-store package provides several specialized plugins to manage different types of decentralized identity data:

    • DataStore: A plugin providing simple store and get methods specifically for messages, credentials, and presentations.
    • DataStoreORM: A plugin that offers advanced querying capabilities by leveraging TypeORM directly.
    • KeyStore and DIDStore: Specific implementations of the AbstractKeyStore and AbstractDIDStore interfaces, used for managing cryptographic keys and Decentralized Identifiers (DIDs) respectively.
  3. Overview of Veramo Express

    next

    Veramo Express is a utility module providing Express.js routers designed to bridge Veramo agents with external consumers. It enables three primary capabilities:

    1. Expose Agent Methods: Allows specific Veramo agent methods to be accessible via HTTP to other agents or external APIs.
    2. Serve OpenAPI Schemas: Automatically serves OpenAPI documentation for the exposed agent methods, facilitating easier integration for developers.
    3. Serve did:web Documents: Provides a mechanism to serve DID documents for the did:web method via HTTP.
  4. Overview of Veramo Framework

    next

    Veramo 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
  5. Use the Veramo JSON-LD credentials plugin

    next
    The @veramo/credential-ld package 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.