
Security News
PolinRider: North Korea-Linked Supply Chain Campaign Expands Across Open Source Ecosystems
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.
@sovrahq/did-registry
Advanced tools
This package exposes the functionality to create and publish DIDs using Modena Registry.
This package exposes the functionality to create and publish DIDs using Modena Registry.
To create a new DID, you need to provide some public keys. You can use Extrimian KMS to generate the private keys.
The next example shows how to create a new DID using Extrimian Registry and Extrimian KMS.
import { KMSClient } from "@quarkid/kms-client";
import { Did } from "@quarkid/did-registry";
import { AssertionMethodPurpuse, KeyAgreementPurpose } from "@quarkid/did-core";
import { LANG, Suite } from "@quarkid/kms-core";
const kms = new KMSClient({
lang: LANG.en,
storage: new SecureStorage(),
});
const updateKey = await kms.create(Suite.ES256k);
const recoveryKey = await kms.create(Suite.ES256k);
const didComm = await kms.create(Suite.DIDComm);
const bbsbls = await kms.create(Suite.Bbsbls2020);
const didService = new Did();
const longDID = await didService.createDID({
updateKey: updateKey.publicKeyJWK,
recoveryKey: recoveryKey.publicKeyJWK,
verificationMethods: [{
id: "bbsbls",
type: "Bls12381G1Key2020",
publicKeyJwk: bbsbls.publicKeyJWK,
purpose: [new AssertionMethodPurpuse()]
},
{
id: "didComm",
type: "X25519KeyAgreementKey2019",
publicKeyJwk: didComm.publicKeyJWK,
purpose: [new KeyAgreementPurpose()]
}],
})
KMS applies dependency inversion concepts so it requires send a SecureStorage by its constructor.
To learn more about the Extrimian KMS read the documentation: @quarkid/kms-client
createDID request returns a CreateDIDResponse
export interface CreateDIDResponse {
recoveryKey: IJWK;
updateKey: IJWK;
document: IonDocumentModel;
longDid: string;
didUniqueSuffix: string;
}
Then you could publish your LongDID using the CreateDIDResponse:
const registry = new Did();
return await registry.publishDID({
modenaApiURL: getModenaApiURL(),
createDIDResponse: createDID,
});
Publish a did requires a Modena API URL, which represents a modena node running as a service.
You can provide your own Modena node or use a public node.
FAQs
This package exposes the functionality to create and publish DIDs using Modena Registry.
The npm package @sovrahq/did-registry receives a total of 62 weekly downloads. As such, @sovrahq/did-registry popularity was classified as not popular.
We found that @sovrahq/did-registry demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.