
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
@dsnp/did-resolver-plugin-frequency
Advanced tools
A DSNP over Frequency DID resolver
This package contains a plugin for the @dsnp/did-resolver library which enables resolution of did:dsnp:*
DIDs on the Frequency blockchain.
The plugin must be initialized with Frequency connection information.
import { pluginInit, pluginDestroy } from "@dsnp/did-resolver-plugin-frequency";
await pluginInit({
providerUri: "ws://127.0.0.1:9944",
frequencyNetwork: "local",
});
The plugin will automatically register itself with the DSNP DID resolver when initialized.
The following options must be provided:
Configuration option | Description |
---|---|
providerUri | Provider URI for Frequency RPC node |
frequencyNetwork | One of local , testnet , mainnet |
See .env.example
for example configuration.
Here's a full usage example with the DID resolver framework:
import { Resolver } from "did-resolver";
import dsnp from "@dsnp/did-resolver";
import { pluginInit, pluginDestroy } from "@dsnp/did-resolver-plugin-frequency";
await pluginInit({
providerUri: "wss://rpc.rococo.frequency.xyz",
frequencyNetwork: "testnet"
});
const resolver = new Resolver(dsnp.getResolver());
const myDid = "did:dsnp:13972";
const result = await resolver.resolve(myDid);
console.log(JSON.stringify(result, null, 2));
await pluginDestroy();
/* Example output:
{
"didResolutionMetadata": {
"contentType": "application/did+ld+json"
},
"didDocument": {
"@context": [
"https://www.w3.org/ns/did/v1"
],
"id": "did:dsnp:13972",
"assertionMethod": [
{
"@context": [
"https://w3id.org/security/multikey/v1"
],
"id": "did:dsnp:13972#z6MkuzE4hBVHTmwFff37ZuPQs9sbkdJo8jifN9sZ1jXbgyMp",
"type": "Multikey",
"controller": "did:dsnp:13972",
"publicKeyMultibase": "z6MkuzE4hBVHTmwFff37ZuPQs9sbkdJo8jifN9sZ1jXbgyMp"
}
]
},
"didDocumentMetadata": {}
}
*/
The example above is provided as a command line script.
cp .env.example .env
npm run resolve -- 13972
Currently this plugin implements the minimal functionality required to support lookup of public keys by DSNP applications.
keyType
1 are listed in the keyAgreement
array.keyType
2 are listed in the assertionMethod
array.Public keys are encoded using the Multikey
type.
The id
consists of the DSNP DID and a URL fragment that is the same as the publicKeyMultibase
value, which is a multicodec value in base58btc
encoding.
The decoded value for ed25519-pub
keys will be 34 bytes, including the two-byte multicodec identifier.
notFound
error if there is no corresponding Frequency MSA.FAQs
A DSNP over Frequency DID resolver
We found that @dsnp/did-resolver-plugin-frequency demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.