npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@siriusid-next/did-method-sirius

v0.1.0-unstable.11

Published

This package contains an implementation of Sidetree Core, using Sirius Chain and IPFS

Readme

@sidetree/element

This package contains an implementation of Sidetree Core, using Sirius Chain and IPFS

Usage

yarn add @siriusid-next/did-method-sirius

Development

yarn install
yarn test

SiriusID DID Method Specification

SiriusID is an implementation of the Sidetree Protocol that uses the Sirius Chain blockchain as the ledger layer and IPFS as the content-addressable storage layer

For more information, see the sidetree spec

Method syntax

The namestring identifying this did method is sirius

A DID that uses this method MUST begin with the following prefix: did:sirius. Per the DID specification, this string MUST be in lowercase.

An additional optional network specific identifier may be added as such

  • did:sirius:testnet:EiBOWH8368BI9NSaVZTmtxuqwpfN9NwAwy4Z95_VCl6A9g
  • did:sirius:mainnet:EiBOWH8368BI9NSaVZTmtxuqwpfN9NwAwy4Z95_VCl6A9g
  • did:sirius:EiBOWH8368BI9NSaVZTmtxuqwpfN9NwAwy4Z95_VCl6A9g

By default, if the network specific identifier is not present, then the default is testnet. The default may change in the future once mainnet is supported.

The remainder of a DID after the prefix, called the did unique suffix, MUST be SHA256 hash of the encoded create payload (see below)

Format and Encoding

Base64URL encoded Multihashes are used.

CRUD Operations

Element supports the 4 CRUD operations. Each operation is performed by submitting a Sidetree operation from Sidetree client to a Sidetree node.

A Sidetree payload looks like this:

{
  "protected": "Encoded header.",
  "payload": "Encoded payload of the operation.",
  "signature": "Encoded signature."
}

Create

The payload for a create operation MUST be a did document model, that is to say the did document without the id property, and without the controller property for the publicKeys.

A did document model should look like this

{
  "@context": "https://w3id.org/did/v1",
  "publicKey": [
    {
      "id": "#primary",
      "type": "JsonWebKey2020",
      "publicKeyJwk": {
        "crv": "Ed25519",
        "x": "2UR1Cz7qUSuoc4b4xw4JNJto1PD4IcTNC28Xdwrbdug",
        "kty": "OKP"
      }
    },
    {
      "id": "#secondary",
      "type": "JsonWebKey2020",
      "publicKeyJwk": {
        "crv": "Ed25519",
        "x": "2UR1Cz7qUSuoc4b4xw4JNJto1PD4IcTNC28Xdwrbdug",
        "kty": "OKP"
      }
    }
  ]
}

Read

In order to resolve a did into a did document, one MUST use the resolve API of an SiriusID node.

See the Sidetree spec for more details on how a read operation is performed by an SiriusID node

Update

The payload for an update operation MUST be of the following format:

{
  "didUniqueSuffix": "The did unique suffix (the did without the did:elem part)",
  "previousOperationHash": "The operation hash of the latest CREATE or UPDATE operation returned by the Sidetree client",
  "patches": [
    "a list of",
    "supported",
    "patches to apply",
    "to the did document"
  ],
}

The list of patches currently supported is:

  • add-public-keys
  • add-authentication
  • remove-authentication
  • add-assertion-method
  • remove-assertion-method
  • add-capability-delegation
  • remove-capability-delegation
  • add-capability-invocation
  • remove-capability-invocation
  • add-key-agreement
  • remove-key-agreement
  • add-service-endpoint
  • remove-service-endpoint

An update payload SHOULD look like this

{
  "didUniqueSuffix": "EiDV20SIx04vrz-2iea-UE7G6y7eRwo7lnCKJNYTfZ3rcQ",
  "previousOperationHash": "EiAZSwY92kqd5oeaWULYe2EjZc6TxTL9yHWgWOVKJraw9w",
  "patches": [
    {
      "action": "add-public-keys",
      "publicKeys": [
        {
          "id": "#newKey2",
          "usage": "signing",
          "type": "JsonWebKey2020",
          "publicKeyJwk": {
                "crv": "Ed25519",
                "x": "2UR1Cz7qUSuoc4b4xw4JNJto1PD4IcTNC28Xdwrbdug",
                "kty": "OKP"
            }
        },
        {
          "id": "#newKey3",
          "usage": "signing",
          "type": "JsonWebKey2020",
          "publicKeyJwk": {
                "crv": "Ed25519",
                "x": "2UR1Cz7qUSuoc4b4xw4JNJto1PD4IcTNC28Xdwrbdug",
                "kty": "OKP"
            }
        }
      ]
    },
    {
      "action": "remove-public-keys",
      "publicKeys": [
        "#primary"
      ]
    }
  ]
}

Delete

The payload for a DELETE operation MUST be:

{
  "didUniqueSuffix": "The did unique suffix (the did without the did:elem part)"
}

Security and privacy considerations

A Sidetree did document need not contain a proof property. Indeed, all operations are authenticated with the signature field of the payload sent to the Sidetree node. This signature is generated using a key specified in the corresponding DID Document.