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

@agentlyhq/erc-8004

v0.0.5

Published

Shared ERC-8004 contract ABIs, addresses, and Solidity sources for the Agently ecosystem.

Readme

@agentlyhq/erc-8004

TypeScript SDK for ERC-8004, the decentralized agent registry standard. Provides contract ABIs, deployed addresses, and Zod schemas for agent registration and feedback files.

Installation

bun add @agentlyhq/erc-8004
# or
npm install @agentlyhq/erc-8004

Usage

Contract Interaction

import { IdentityRegistryAbi, ADDRESSES, CHAIN_ID } from "@agentlyhq/erc-8004";
import { createPublicClient, http } from "viem";
import { sepolia } from "viem/chains";

const client = createPublicClient({
  chain: sepolia,
  transport: http(),
});

const address = ADDRESSES[CHAIN_ID.SEPOLIA].identityRegistry;

const tokenURI = await client.readContract({
  address,
  abi: IdentityRegistryAbi,
  functionName: "tokenURI",
  args: [1n],
});

Parsing Registration Files

import { parseRawRegistrationFile, getServices, hasX402Support } from "@agentlyhq/erc-8004";

// Parse an existing file fetched from an agent's tokenURI
const result = parseRawRegistrationFile(fetchedData);
if (result.success) {
  const services = getServices(result.data);
  const supportsPayment = hasX402Support(result.data);
}

Creating Registration Files

import { validateRegistrationFile } from "@agentlyhq/erc-8004";

// Strict validation before on-chain submission — requires type literal and at least one service
const result = validateRegistrationFile(newFile);
if (!result.success) {
  console.error(result.error.issues);
}

Parsing Feedback Files

import { parseRawFeedbackFile } from "@agentlyhq/erc-8004";

const result = parseRawFeedbackFile(fetchedData);
if (result.success) {
  const { agentId, value, valueDecimals, clientAddress } = result.data;
}

Solidity (Foundry)

# foundry.toml
remappings = ["@agentlyhq/erc-8004/=node_modules/@agentlyhq/erc-8004/"]
import { IdentityRegistryUpgradeable } from "@agentlyhq/erc-8004/contracts/IdentityRegistryUpgradeable.sol";
import { ReputationRegistryUpgradeable } from "@agentlyhq/erc-8004/contracts/ReputationRegistryUpgradeable.sol";
import { ValidationRegistryUpgradeable } from "@agentlyhq/erc-8004/contracts/ValidationRegistryUpgradeable.sol";

Supported Chains

Mainnets:

| Chain | Chain ID | Constant | | ------- | -------- | ------------------ | | Mainnet | 1 | CHAIN_ID.MAINNET | | Base | 8453 | CHAIN_ID.BASE | | Polygon | 137 | CHAIN_ID.POLYGON | | Scroll | 534352 | CHAIN_ID.SCROLL | | Monad | 143 | CHAIN_ID.MONAD | | BSC | 56 | CHAIN_ID.BSC | | Gnosis | 100 | CHAIN_ID.GNOSIS |

Testnets:

| Chain | Chain ID | Constant | | -------------- | ---------- | ------------------------- | | Sepolia | 11155111 | CHAIN_ID.SEPOLIA | | Base Sepolia | 84532 | CHAIN_ID.BASE_SEPOLIA | | Polygon Amoy | 80002 | CHAIN_ID.POLYGON_AMOY | | Scroll Sepolia | 534351 | CHAIN_ID.SCROLL_SEPOLIA | | Monad Testnet | 10143 | CHAIN_ID.MONAD_TESTNET | | BSC Testnet | 97 | CHAIN_ID.BSC_TESTNET |

ABIs

| Export | Description | | ----------------------- | ------------------------------------- | | IdentityRegistryAbi | ERC-721 based agent identity registry | | ReputationRegistryAbi | Agent reputation/feedback registry | | ValidationRegistryAbi | Third-party agent validation registry |

Versioned ABIs (e.g. IdentityRegistryAbi_V1, ReputationRegistryAbi_V3) are available for pinning. See CHANGELOG.md for details.

Contract Addresses

All contracts use UUPS proxies. Addresses are consistent across all chains within each environment.

Mainnets (Ethereum, Base, Polygon, Scroll, Monad, BSC, Gnosis):

| Contract | Address | | -------------------- | -------------------------------------------- | | identityRegistry | 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 | | reputationRegistry | 0x8004BAa17C55a88189AE136b182e5fdA19dE9b63 | | validationRegistry | 0x8004Cc8439f36fd5F9F049D9fF86523Df6dAAB58 |

Testnets (Sepolia, Base Sepolia, Polygon Amoy, Scroll Sepolia, Monad Testnet, BSC Testnet):

| Contract | Address | | -------------------- | -------------------------------------------- | | identityRegistry | 0x8004A818BFB912233c491871b3d84c89A494BD9e | | reputationRegistry | 0x8004B663056A597Dffe9eCcC1965A193B7388713 | | validationRegistry | 0x8004Cb1BF31DAf7788923b405b754f57acEB4272 |

References