
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
veramo-plugin-did-config
Advanced tools
veramo plugin that generates DID configuration files to be used in the DIF Well Known DID Configuration standard: https://identity.foundation/.well-known/resources/did-configuration/
yarn
yarn build
or yarn watch
yarn generate-plugin-schema
yarn start
or VSCode Debugger (CMD + Shift + D) > Run OpenAPI server
yarn add veramo-plugin-did-config
This plugin relies on the availability of other veramo plugins installed on the same agent.
The minimum Veramo configuration for using this library requires the following dependencies:
yarn add @veramo/core @veramo/message-handler @veramo/did-resolver @veramo/credential-w3c @veramo/did-jwt @veramo/data-store did-resolver
When initializing your Veramo agent message handler, the order of the handlers matters.
JwtMessageHandler
should be first.
import { createAgent } from "@veramo/core";
import {
DIDConfigurationPlugin,
IWellKnownDidConfigurationPlugin,
} from "veramo-plugin-did-config";
import { MessageHandler } from "@veramo/message-handler";
import { CredentialIssuer, W3cMessageHandler } from "@veramo/credential-w3c";
import { DIDResolverPlugin, UniversalResolver } from "@veramo/did-resolver";
import { JwtMessageHandler } from "@veramo/did-jwt";
import { Resolver, DIDResolver } from "did-resolver";
const uniresolver = new UniversalResolver({
url: "https://uniresolver.io/1.0/identifiers/",
}) as DIDResolver;
export const agent = createAgent<IWellKnownDidConfigurationPlugin>({
plugins: [
new DIDConfigurationPlugin(),
new MessageHandler({
messageHandlers: [new JwtMessageHandler(), new W3cMessageHandler()],
}),
new DIDResolverPlugin({
resolver: new Resolver({
key: uniresolver,
web: uniresolver,
ethr: uniresolver,
ion: uniresolver,
elem: uniresolver,
//...
}),
}),
new CredentialIssuer(),
],
});
Since we are asserting the agent to have a type of IWellKnownDidConfigurationPlugin
we can access the plugin methods directly.
The verifyWellKnownDidConfiguration
method will return an object with the provided domain, list of DIDs associated with it,
the JSON DID Configuration which was verified, and a boolean for validity.
const { domain, dids, didConfiguration, valid } = await agent.verifyWellKnownDidConfiguration({ domain });
Clone the plugin repo on your machine and configure the agent instance by editing the agent.yml file (or, if you’re simply trying it or joining a hackathon, keep the configuration as it is).
yarn && yarn build && yarn start
yarn veramo execute -m identityManagerCreateIdentity -a "{}"
yarn veramo execute -m generateDidConfiguration -a "{\"dids\":[\"<did>\"],\"domain\":\"<domain>\"}"
Upload the Well-Known DID Configuration file to the company website and host it under the well-known URI:
https://<domain>/.well-known/did-configuration.json
Verify your Well-Known DID Configuration running:
yarn veramo execute -m verifyWellKnownDidConfiguration -a "{\"domain\": \"<domain>\"}"
FAQs
veramo plugin that generates DID configuration files to be used in the DIF Well Known DID Configuration standard: https://identity.foundation/.well-known/resources/did-configuration/
The npm package veramo-plugin-did-config receives a total of 0 weekly downloads. As such, veramo-plugin-did-config popularity was classified as not popular.
We found that veramo-plugin-did-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.