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

@hypernetlabs/hypernet-id-web-integration

v0.0.5

Published

Web integration package for Hypernet.ID. Provides basic access to user identity status and facilitates onboarding workflows.

Downloads

1

Readme

Web Integration

How It Works

This package provides a convienient entry point for integrating with Hypernet.ID in web-based applications (like a dApp or traditional webapp). It exports the HypernetID class, which you will need to instantiate with your Customer ID (don't worry, that is public information). Hypernet.ID has a variety of useful methods available, but for the simplest possible integration, you can make use of just a few.

Installation

In order to use Hypernet.ID's web integration package, add it to your project's dependency list:

npm install @hypernetlabs/hypernet-id-web-integration

Useful API calls

The Hypernet.ID npm package is a ultra-lightweight convenience layer for interfacing the the Hypernet.ID service. Below are function calls for performing the most important tasks when attesting a user's identity and determining if they need to be sent to Hypernet.ID for identity verification.

getIdentityTokenForAccount()

This method takes an ethereum account address that you have collected and returns the "hypothetical" Identity Token that Hypernet.ID would mint to any particular chain. Hypernet.ID actually may have minted it already, but this method won't tell you that.

getIdentityTokenForAccountOnChain()

This method is similar to the above but also takes a Chain ID. It will return the actual token that was minted on the requested chain, or null if no token was minted. This is not a good way to figure out if Hypernet.ID knows anything about the account in question, though, since there is no guarantee that every Identity gets a token on every chain. Use getIdentityTokenForAccount() to verify whether or not Hypernet.ID knows about the account at all.

getRedirectUrl()

Returns a URL object that you can direct your user to in order to complete the Hypernet.ID onboarding flow. At the completion of that flow, the user will be redirected back to your pre-configured destination.