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

@basecred/openclaw-8004

v2.0.1

Published

OpenClaw skill for registering and managing AI agent identities on-chain via ERC-8004

Readme

OpenClaw ERC-8004 Agent Registration

An OpenClaw skill that teaches AI agents to register and manage fully on-chain identities on Base mainnet via ERC-8004 using viem + ABI direct contract calls.

Scope: Fully on-chain agent identity + registration file schema. All identity operations are on-chain transactions against the IdentityRegistry and ReputationRegistry contracts (ERC-721 on Base). This skill covers agent identity minting, updates, search, feedback, reputation, transfers, on-chain contract functions, and the EIP-8004 registration file schema. IPFS-based metadata URIs and subgraph queries are not covered — see References in SKILL.md.

Install

npm install @basecred/openclaw-8004

Or copy SKILL.md directly into your agent's skill directory.

Prerequisites

  • Node.js >= 22
  • viem ^2.0.0 (direct contract calls via ABI)
  • A private key with ETH on Base mainnet (for gas)
  • A Base RPC URL (default: https://mainnet.base.org)

What This Skill Does

| Operation | Contract | Gas | |-----------|----------|-----| | Register — mint an on-chain agent identity (ERC-721 NFT) | IdentityRegistry.register() | Yes | | Update — modify name, description, services, skills, metadata | IdentityRegistry.setAgentURI() | Yes | | Search — query reputation summaries and feedback history | ReputationRegistry.getSummary() | No (view) | | Feedback — submit on-chain reputation scores for other agents | ReputationRegistry.giveFeedback() | Yes | | Transfer — move agent ownership to a new wallet | IdentityRegistry.transferFrom() | Yes |

Architecture: viem + ABI (No SDK)

This skill uses direct contract calls via viem and contract ABIs. No agent0-sdk dependency. You control the full transaction flow:

import { createPublicClient, createWalletClient, http } from 'viem';
import { base } from 'viem/chains';
import { privateKeyToAccount } from 'viem/accounts';

const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);
const publicClient = createPublicClient({ 
  chain: base, 
  transport: http(process.env.BASE_RPC_URL || 'https://mainnet.base.org') 
});
const walletClient = createWalletClient({ 
  account, 
  chain: base, 
  transport: http(process.env.BASE_RPC_URL || 'https://mainnet.base.org') 
});

const IDENTITY_REGISTRY = '0x8004A169FB4a3325136EB29fA0ceB6D2e539a432';
const REPUTATION_REGISTRY = '0x8004BAa17C55a88189AE136b182e5fdA19dE9b63';

Full ABI definitions and transaction examples in SKILL.md.

Files

| File | Description | |---|---| | SKILL.md | Full agent instructions — all 5 flows with step-by-step guides | | README.md | Quick-start guide (this file) | | IDENTITY.md | Agent profile card (created after registration) |

Environment Variables

| Variable | Required | Description | |---|---|---| | WALLET_PRIVATE_KEY | Yes | Private key for signing transactions | | BASE_RPC_URL | No | Base RPC endpoint (default: https://mainnet.base.org) | | AGENT0_AGENT_ID | Auto | Set after registration (e.g. 8453:42) |

Store these in a .env file in the project root. Never commit .env to version control.

Contracts (Base Mainnet)

| Contract | Address | Source | |----------|---------|--------| | Identity Registry | 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 | erc-8004-contracts | | Reputation Registry | 0x8004BAa17C55a88189AE136b182e5fdA19dE9b63 | erc-8004-contracts |

How It Works

  1. First run — the agent asks the owner for credentials and saves them to .env
  2. Registration — gathers profile info, previews draft, mints ERC-721 identity on-chain after owner approval
  3. IDENTITY.md — after registration, offers to save a local profile card
  4. Subsequent runs — presents action menu (update, search, feedback, transfer, view profile) and waits for the owner's choice
  5. Every transaction — previews a draft and waits for explicit owner approval before signing

Multi-Agent Support

Detection: Config-first approach. Agent IDs listed in TOOLS.md under "Owned Agents:", primary ID in .env as AGENT0_AGENT_ID. No RPC enumeration or subgraph queries.

Why this matters: If you manage multiple agent identities, track them in your config files rather than querying the chain each time.

Safety Features

  • Preview-first: Every transaction shows a draft and waits for explicit owner approval
  • No blind execution: Agent never signs without confirmation
  • Event parsing: Confirms minting/updates via on-chain events
  • Burn protection: Burning requires 2 steps (set active: false → transfer to 0xdEaD)

SKILL.md Contents

See SKILL.md for complete agent instructions:

| Section | Description | |---------|-------------| | Quick Reference | viem setup and contract mappings at a glance | | On-Chain Contract Functions | IdentityRegistry and ReputationRegistry ABI reference | | Registration File Schema | EIP-8004 JSON format, field reference, service types | | Register Agent | 8-step flow: pre-fill → gather → configure → preview → mint → save | | Update Agent | 6-step flow: load → modify → preview → submit → confirm | | Search Feedback | 3-step flow: get ID → query → deliver results (no gas) | | Give Feedback | 4-step flow: gather → preview → submit → confirm | | Transfer Ownership | 5-step flow: verify → preview → execute → verify → confirm |

License

MIT