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 🙏

© 2024 – Pkg Stats / Ryan Hefner

lifeid-did

v0.1.1

Published

lifeID did encoder/decoder

Downloads

4

Readme

lifeID Decentralized Identifier (DID)

The lifeID platform uses pairwise decentralized identifiers ("DIDs") for people and organizations to identify themselves to one another. This repository is a suite of tools allowing anyone to create, encode, decode DIDs for any blockchain. Please note that this is a work in progress and will almost certainly change over time. Expect revisions as we iron out bugs and improve the developer experience.

A lifeID DID looks like this:

"did:life:Lo3gVgN4WnXe6CnVn1zFSXGK4wL6eMJ7W1"

There are three parts to a lifeID did:

  1. The DID prefix did: This indicates that you are presenting a standardized DID according to the specification outlined by the World Wide Web Consortium ("W3C").

  2. The DID method. life: This signals to everyone that you are presenting a DID for use on the lifeID platform.

When decoded, a DID string includes the following parts:

  • The version number. Currently this is a single one byte version number it will start at 1 and can be updated in the future.

  • The network ID. This part of the DID describes which blockchain stores its public key. It is 4 bytes long.

  • The public key. Different blockchains use different encryption schemes, but they all require a cryptographic keys to prove ownership. It 65 bytes long.

  • The checksum. A SHA3-256 digest of the version number, network ID and public key. The checksum provides a way to quickly verify whether the DID is correct or has been changed in any way.

An example decoded DID:

didExample

API

This library provides the following functions for working with DIDs

createDID(didObject)

This function takes a valid DID object and returns an encoded DID wrapped in a promise

input: didObject

An object with the following fields. All are required.

  didObject: {
    method: string,
    network: string,
    version: string,
    key: string
    }

return value : Promise(did: string)

decodeDID(did)

This function takes a valid DID string and returns a DID object wrapped in a promise.

did

A string that is a validly formatted DID.

return value : Promise(didObject: object)

validateDID(did)

This function takes a valid DID string and returns a promise. The promise will resove to true if and only if the DID is correctly formed.

did

A string that is a validly formatted DID.

return value : Promise(boolean)

lifeidlogo

Built with ️ ❤️ in Seattle.

Special thanks to the team at uPort, our work borrows heavily from their ideas.