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

@spherity/ethr-revocation-registry-controller

v1.3.4

Published

The controller module for interacting with Ethereum revocation lists & resolving revocation entries for EIP-5539.

Downloads

232

Readme

Ethereum Revocation Registry Controller

The controller module for interacting with EIP-5539-compatible Ethereum revocation lists.

EIP Draft Registry Repo GitHub contributors GitHub issues GitHub pull-requests

Motivation

The EIP-5539 draft proposes a new RBAC-enabled revocation registry that can be used by any valid Ethereum address to maintain a set of revocation lists. In those, arbitrary revocation keys can be marked as either revoked or not. Additionally, the registry includes a set of management features that enables owners to have features like delegates, owner changes, and meta transactions.

This repository includes a controller module for interacting with EIP-5539-compatible revocation lists. This includes managing owners, delegates, revocation lists, revocation keys, and the support for meta transactions.

Installation

Execute this to install this dependency:

npm install --save @spherity/ethr-revocation-registry-controller

You can then build the controller object by instantiating it for example with a WebsocketProvider connected to Infura:

const { ethers } = require("ethers");
const {EthereumRevocationRegistryController} = require("@spherity/ethr-revocation-registry-controller");
const {InfuraWebSocketProvider} = require('@ethersproject/providers');

const provider = new InfuraWebSocketProvider(5, "XXXXXX");
const signer = ethers.Wallet.createRandom();
const signerAndProvider = signer.connect(provider);

const config = {
  signer: signerAndProvider,
  chainId: 5,
  address: "0x534b89b798e45929A24a217d7324EAd0EAF9413E"
}

const controller = new EthereumRevocationRegistryController(config);

async function checkRevocation() {
  const date = new Date(1686386460*1000);
  console.log(`Date: ${date.toDateString()}`);

  const revoked = await controller.isRevoked({
    namespace: "0x68849D547F49f19291737bFebA5ca5a0E1e19d84",
    list: "0x1bfcc5aaebc43b53d181ad28013ffb74e750b43b5f7c3340bfe6f33ac66e3d49",
    revocationKey: "0x6c329cb9bd41aa21e38d2c1c6ca83d88b381f2dad0a489769684f4d5c575eb2b",
  });

  console.log(`Credential status is: ${revoked}`);
}

Make sure to provide a TypedDataSigner if you intend to use Meta transactions (for example 'Wallet')!

Now you're ready to interact with your revocation lists/keys!

Development

Test Suite

To start the test suite, you can call:

npm run test

To get a coverage report you need to run:

npm run test:coverage