@buildersgarden/siwa

中文文档
0.0.24发布于 2026/03/05TypeScriptES Module构建来源已验证近 30 天下载 2055

A Claude Code skill for registering AI agents on the ERC-8004 (Trustless Agents) standard and authenticating them via SIWA, a challenge-response protocol inspired by [EIP-4361 (SIWE)](https://eips.ethereum.or

原始使用文档
文档目录6 节
  1. What it does
  2. Project Structure
  3. Quick Start (Local Test)
  4. Security Model
  5. Tech Stack
  6. References

SIWA — Sign In With Agent

A Claude Code skill for registering AI agents on the ERC-8004 (Trustless Agents) standard and authenticating them via SIWA, a challenge-response protocol inspired by EIP-4361 (SIWE).

What it does

  • Create Wallet — Generate an Ethereum wallet via a keyring proxy (private key never enters the agent process)
  • Register Agent (Sign Up) — Mint an ERC-721 identity NFT on the ERC-8004 Identity Registry with metadata (endpoints, trust model, services)
  • Authenticate (Sign In) — Prove ownership of an onchain agent identity by signing a structured SIWA message; receive a verification receipt from the relying party and use ERC-8128 per-request signatures for subsequent API calls

Project Structure

src/               Core SDK modules
  keystore.ts        Proxy-only keystore (signing delegated over HMAC-authenticated HTTP)
  identity.ts        SIWA_IDENTITY.md read/write helpers
  siwa.ts            SIWA message building, signing, verification
  proxy-auth.ts      HMAC-SHA256 authentication utilities
  registry.ts        Onchain agent profile & reputation lookups
  addresses.ts       Deployed contract addresses
  receipt.ts         Stateless HMAC receipt creation and verification
  erc8128.ts         ERC-8128 HTTP Message Signatures (sign/verify)

references/        Protocol documentation
  siwa-spec.md       Full SIWA specification
  security-model.md  Threat model and keystore architecture

assets/            Templates
  SIWA_IDENTITY.template.md

Quick Start (Local Test)

The test harness lives in the siwa-testing package (sibling in this monorepo):

cd packages/siwa-testing
pnpm install

# Terminal 1: Start the SIWA relying-party server
pnpm run server

# Terminal 2: Run the full agent flow (create wallet → register → sign in → authenticated call)
pnpm run agent:flow

# Or run both at once:
pnpm run dev

See packages/siwa-testing/README.md for full details on the test environment.

Security Model

The agent's private key never enters the agent process. All signing is delegated to a keyring proxy over HMAC-authenticated HTTP. Even full agent compromise cannot extract the key — only request signatures.

See references/security-model.md for the full threat model.

Tech Stack

  • TypeScript (ES modules, strict mode)
  • viem — wallet management and contract interaction
  • pnpm — package manager

References

版本与发布记录

@buildersgarden/siwa 共发布 24 个版本,首次发布于 2026/02/06;过去 12 个月发布了 24 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.0.24latest2026/03/058 个月前
0.0.232026/03/058 个月前
0.0.222026/03/058 个月前
0.0.212026/02/198 个月前
0.0.202026/02/188 个月前
0.0.192026/02/188 个月前

关于 @buildersgarden/siwa 的常见问题

@buildersgarden/siwa 是什么?

A Claude Code skill for registering AI agents on the ERC-8004 (Trustless Agents) standard and authenticating them via SIWA, a challenge-response protocol inspired by [EIP-4361 (SIWE)](https://eips.ethereum.or

如何安装 @buildersgarden/siwa?

在项目目录运行 npm install @buildersgarden/siwa,或使用 pnpm add / yarn add / bun add。

@buildersgarden/siwa 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@buildersgarden/siwa 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@buildersgarden/siwa 可以商用吗?

@buildersgarden/siwa 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@buildersgarden/siwa 的下载量有多少?

根据 npm 官方下载统计,@buildersgarden/siwa 在 2026/10/09 – 2026/11/07 这 30 天内被下载 2,055 次,日均约 69 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@buildersgarden/siwa 还在维护吗?

最新版本 0.0.24 发布于 2026/03/05(8 个月前);至今共发布 24 个版本,其中过去 12 个月发布了 24 个;首次发布于 2026/02/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。