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

@reinconsole/erc8004

v0.1.1

Published

ERC-8004 Identity Registry integration — reads on-chain identity facts (ownerOf, agentWallet) and turns them into reputation-graph link facts; registers agents on the real registry.

Downloads

212

Readme

@reinconsole/erc8004

ERC-8004 registry integration for Rein — on-chain agent identity and reputation. Reads identity facts from the ratified Identity Registry (an ERC-721; tokenId = the spec's agentId) and turns them into link facts for @reinconsole/graph; publishes Rein's graph-derived scores on-chain through the Reputation Registry's giveFeedback.

Status: v0.1 — early open-source infrastructure, live on testnet. Verified against the real singleton deployments on Base Sepolia — including a live registration (agentId 7393) carrying its rein-score on-chain. APIs may change before 1.0.

Install

npm install @reinconsole/erc8004

What's in it

import {
  identityRegistryReader,  // viem-backed IdentityRegistryReader (ownerOf / agentWallet / agentURI)
  registerAgent,           // the write path: simulate → write → decode the Registered event
  linkAgentFromRegistry,   // registry facts → graph link facts (agents become erc8004-canonical)
  linkVendorFromRegistry,  // vendors stay host-canonical; identity + treasury fold into the host row
  publishAgentScore,       // graph score → giveFeedback on the Reputation Registry, evidence anchored
  readSummary,             // on-chain score summary (resolves getClients first — see below)
  MockIdentityRegistry, MockReputationRegistry, // in-memory twins for every offline path
} from '@reinconsole/erc8004';
  • One identity, one history. A registered agent's reputation keys by the canonical id eip155:{chainId}:{registry}/{tokenId} (formatted by @reinconsole/core); its local id and every wallet — ownerOf, the verified agentWallet — fold in as aliases. Two deployments claiming the same registration merge into one history; key rotation never splits a score.
  • Foreign-registry guard. A document naming another chain's or another registry's id is never resolved against ours; stale docs degrade to local linking (lenient), network errors stay loud — a dead RPC is never misread as "not registered".
  • Scores go on-chain. scoreToFeedback maps a 0–100 graph score to giveFeedback (value at decimals 0, rein-score tag, confidence tag); evidence documents are keccak-anchored self-verifying data: URIs — nothing to host.
  • Deployment-verified quirks handled. getAgentWallet returns the zero address rather than reverting; the live Base Sepolia Reputation Registry requires an explicit client list for getSummary (readSummary resolves getClients first). Both learned against the real contracts, not the repo source.
  • Offline twins included. MockIdentityRegistry / MockReputationRegistry mirror the deployed semantics (1-based feedback indexes, self-feedback ban, zero-address fidelity) for tests and demos.

Singleton deployment addresses ship as constants (BASE_SEPOLIA_REGISTRY, IDENTITY_REGISTRY_MAINNET, BASE_SEPOLIA_REPUTATION, …).

MIT © Rein contributors · Repository · Issues