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

@bankofai/8004-sdk

v1.1.1

Published

TypeScript SDK for 8004. Supports agent registration, reputation, and validation flows.

Readme

BankOfAI 8004 SDK (TypeScript)

TypeScript SDK for agent identity, discovery, trust, and reputation based on 8004.

This SDK provides a unified API for registration, wallet binding, feedback/reputation, and validation workflows.

What Does This SDK Do?

BankOfAI 8004 SDK enables you to:

  • Create and manage on-chain agent identities
  • Register agent card URIs on-chain (agent.register())
  • Register via IPFS uploader hook (agent.registerIPFS())
  • Configure MCP/A2A endpoints, skills/domains, trust flags, metadata, and status
  • Manage ENS/profile update and endpoint cleanup (setENS(), updateInfo(), removeEndpoint())
  • Manage verified wallet binding (agent.getWallet(), agent.setWallet(), agent.unsetWallet())
  • Submit/read/manage feedback (giveFeedback(), getFeedback(), searchFeedback(), appendResponse(), revokeFeedback(), getReputationSummary())
  • Run validation request/response flows (validationRequest(), validationResponse(), getValidationStatus())
  • Load and update registered agents (loadAgent(), updateRegistration(), setAgentUri())
  • Transfer and operator management (transfer(), addOperator(), removeOperator())

Package import:

import { SDK } from "@bankofai/8004-sdk";

Installation

Prerequisites

  • Node.js >=20
  • npm
  • Funded private key for write operations
  • RPC endpoint

Install from Source (Local)

git clone https://github.com/bankofai/8004-sdk.git
cd 8004-sdk/ts
npm install
npm run build

Quick Start

import { SDK } from "@bankofai/8004-sdk";

const sdk = new SDK({
  network: "<NETWORK_ID>", // e.g. eip155:97 or nile
  rpcUrl: "<RPC_URL>",
  signer: "<PRIVATE_KEY>",
});

const agent = sdk.createAgent({
  name: "My AI Agent",
  description: "Demo agent",
  image: "https://example.com/agent.png",
});

agent.setMCP("https://mcp.example.com/");
agent.setA2A("https://a2a.example.com/.well-known/agent-card.json");
agent.setTrust({ reputation: true, cryptoEconomic: true });
agent.setMetadata({ version: "1.1.0" });
agent.setActive(true);

const tx = await agent.register("https://example.com/agent-card.json");
const mined = await tx.waitConfirmed({ timeoutMs: 180_000 });
console.log(mined.result.agentId, mined.result.agentURI);

IPFS upload flow (optional):

const sdk = new SDK({
  network: "eip155:97",
  rpcUrl: "<RPC_URL>",
  signer: "<PRIVATE_KEY>",
  ipfsUploader: async (json) => {
    // Upload JSON to your pinning/storage service and return ipfs://... URI
    return "ipfs://QmExample";
  },
});

const agent = sdk.createAgent({ name: "IPFS Agent", description: "IPFS flow" });
const tx = await agent.registerIPFS();
await tx.waitConfirmed({ timeoutMs: 180_000 });

Core Flows

Wallet Management

const wallet = await agent.getWallet();
const setTx = await agent.setWallet("<NEW_WALLET_ADDRESS>");
if (setTx) await setTx.waitConfirmed({ timeoutMs: 180_000 });

Feedback and Reputation

const fbTx = await sdk.giveFeedback({ agentId: "<AGENT_ID>", value: 88 });
const fb = await fbTx.waitConfirmed({ timeoutMs: 180_000 });
await sdk.appendResponse({
  agentId: "<AGENT_ID>",
  clientAddress: fb.result.reviewer,
  feedbackIndex: fb.result.feedbackIndex,
  responseURI: "ipfs://QmResponse",
});
const summary = await sdk.getReputationSummary("<AGENT_ID>");
const list = await sdk.searchFeedback({ agents: ["<AGENT_ID>"] });
console.log(fb.result, summary);

Agent Lifecycle

const loaded = await sdk.loadAgent("<CHAIN_ID>:<TOKEN_ID>");
loaded.updateInfo({ description: "updated description" });
loaded.setENS("myagent.eth");
await loaded.updateRegistration("https://example.com/agent-card-updated.json");

Validation

const reqTx = await sdk.validationRequest({
  validatorAddress: "<VALIDATOR_ADDRESS>",
  agentId: "<AGENT_ID>",
  requestURI: "ipfs://QmRequest",
});
const req = await reqTx.waitConfirmed({ timeoutMs: 180_000 });

const respTx = await sdk.validationResponse({
  requestHash: req.result.requestHash,
  response: 95,
});
await respTx.waitConfirmed({ timeoutMs: 180_000 });

Search and Indexing

  • searchAgents() / getAgent() APIs exist in the SDK.
  • searchFeedback() is available when subgraph is configured.
  • Current release does not enable subgraph URL integration by default.
  • Full subgraph-backed search support is planned in a future update.

Examples

Chain-specific runnable scripts are in ts/examples/. See ts/examples/README.md for full usage.

Notes

  • Package name: @bankofai/8004-sdk
  • ESM package ("type": "module")
  • Contracts reject self-feedback; use a separate reviewer wallet

License

MIT