← 文档 · 收藏

代理接入

Proof of Architect 可被机器读取。本页上的每一个读取接口都是匿名且无需身份验证的:无需 API 密钥、无需账户。代理注册(第 9 节)是唯一的写入接口,且仅需一个钱包签名。该系列运行在 Arc(chainId 5042)上。参考合约:0x3E20bb7be2C46f94Cab78d340D3F79Afc2a9Fed4

1. 远程 MCP 服务器

一个 Model Context Protocol 服务器通过可流式 HTTP 提供于 POST https://proofofarchitect.builders/api/mcp。它暴露了下一节中的只读工具,使 LLM 代理无需编写代码即可检查该系列、读取难度和定价,并验证挖出的 nonce。

会话以标准的 MCP initialize 握手开始。该端点接受 JSON-RPC 2.0 并流式返回响应;Accept 请求头必须包含 text/event-stream。MCP 客户端库会为你处理这一点——下面的 curl 仅用于诊断。

curl -sS https://proofofarchitect.builders/api/mcp \
  -H 'content-type: application/json' \
  -H 'accept: application/json, text/event-stream' \
  -d '{
        "jsonrpc": "2.0",
        "id": 1,
        "method": "initialize",
        "params": {
          "protocolVersion": "2025-06-18",
          "capabilities": {},
          "clientInfo": { "name": "curl", "version": "0.0.0" }
        }
      }'

使用 tools/call 调用工具,并将工具名放在 params.name 中:

curl -sS https://proofofarchitect.builders/api/mcp \
  -H 'content-type: application/json' \
  -H 'accept: application/json, text/event-stream' \
  -d '{
        "jsonrpc": "2.0",
        "id": 2,
        "method": "tools/call",
        "params": {
          "name": "verify_nonce",
          "arguments": {
            "miner": "0x1111111111111111111111111111111111111111",
            "nonce": "1024085"
          }
        }
      }'

2. 工具

工具参数返回
collection_statstotalMinted、maxSupply (15,042)、freeClaims、claimsLeft、currentWave、currentPriceUSDC、mintPaused、baseBits、contract、chainId
get_tokentokenIdowner、seedOf、displaySeed(包含后)、mintBlock、pending、nonce、tokenURI、imageUrl、metadataUrl
required_bitsminerrequiredBits(显示值)、requiredMilli(毫比特)、target (work < target) + 公式
verify_nonceminer, noncework、target、valid——无需交易即可根据分数目标验证一个 nonce
price_infowave、epochIndex、currentPriceUSDC 以及完整的定价表(每波 1.0 USDC × 2,无上限)
craft_infocontroller、paused、craftFee / totalFeesCollected(USDC)、craftNonce、bounds(MAX_SLOT/MAX_BOOST_TIER/LOCK_WAVES)、按层级的 boostCost / feeFor / maxChosen(层级 0..3),以及子代预种子公式(一次性锻造)

所有工具都返回一个 JSON 文本内容块。服务器从不会发送交易,也从不读取私钥。

3. 独立 stdio 服务器(mcp/)

该仓库还附带一个独立的 MCP 服务器包,arc-pow-sigils-mcp,它通过 stdio(以换行分隔的 JSON-RPC)提供相同的工具,并直接与 Arc RPC 通信。它面向那些启动本地进程而不是连接 URL 的桌面客户端。

Claude Desktop(通过 npx 使用 stdio)

添加到 claude_desktop_config.json 并重启应用。在包发布后这会使用 npm 包;若要今天就从源码运行,请将 command 换成 node,并将 args 指向本地构建。

{
  "mcpServers": {
    "proof-of-architect": {
      "command": "npx",
      "args": ["-y", "arc-pow-sigils-mcp"],
      "env": {
        "SITE_URL": "https://proofofarchitect.builders"
      }
    }
  }
}

Cursor(HTTP url)

远程 MCP 服务器在 .cursor/mcp.json(项目)或 ~/.cursor/mcp.json(全局)中通过 URL 配置。

{
  "mcpServers": {
    "proof-of-architect": {
      "url": "https://proofofarchitect.builders/api/mcp"
    }
  }
}

VS Code(HTTP url)

VS Code 从 .vscode/mcp.json(或用户设置)读取 MCP 服务器。使用同一个 HTTP 端点。

{
  "servers": {
    "proof-of-architect": {
      "type": "http",
      "url": "https://proofofarchitect.builders/api/mcp"
    }
  }
}

4. 发现与规范

OpenAPI 3.0面向 GET /api/meta/{id} 和 GET /api/image/{id} 的机器规范。
服务发现以 JSON 形式提供端点、合约事实和 MCP 工具清单。
llms.txt站点的 llms.txt v2 索引。
llms-full.txt完整的代理可读文档。
站点地图所有页面,外加每个已铸造代币一个 URL。

5. 验证检查(可复制粘贴)

这些只读读取用于确认部署处于在线状态。它们无需 cookie、无需 JavaScript 即可运行,代理可以将其作为存活探测来执行。

某个已铸造代币的元数据 JSON(代币 1):

curl -sS https://proofofarchitect.builders/api/meta/1

同一个代币的确定性 PNG 渲染(添加 ?master=1 可获得 3072×3072 的主图):

curl -sS https://proofofarchitect.builders/api/image/1 -o token-1.png

通过远程 MCP 端点验证一个挖出的 nonce(与第 1 节中的调用相同):

curl -sS https://proofofarchitect.builders/api/mcp \
  -H 'content-type: application/json' \
  -H 'accept: application/json, text/event-stream' \
  -d '{
        "jsonrpc": "2.0",
        "id": 3,
        "method": "tools/call",
        "params": {
          "name": "verify_nonce",
          "arguments": {
            "miner": "0x1111111111111111111111111111111111111111",
            "nonce": "1024085"
          }
        }
      }'

元数据响应的绝对 URL 由 NEXT_PUBLIC_SITE_URL 构建;合约事实和精确的工作量证明数学记录在 /docs/verification

6. 从代理进行锻造

持有者可以在单笔一次性 craft 交易中,用自己拥有的两个 Architector(父代)锻造出一个新的 Architector(子代)——没有 commit/reveal,也没有退款。控制器是 0xb7f32811F19579D9FC6F0e5ac925473554091a91,从构建环境读取(NEXT_PUBLIC_CRAFT_ADDRESS)——它会随环境切换而更新。父代存放在核心合约 0x3E20bb7be2C46f94Cab78d340D3F79Afc2a9Fed4 上,因此 MCP 接口(只读,从不签名)无法进行锻造:它需要一个钱包或代理签名者。

choices 是一个 SlotChoice[],其中每个条目都是结构体 { uint8 slot, uint8 parent }(slot 严格递增,slot ≤ 11,parent 取值为 {0,1})。一个常见的 bug 是元组类型写错:应传入一个真正的 tuple[] 模式,并带上 components(如下所示)——一个裸的 (uint8,uint8)[] 字符串很容易编码错误,调用会回滚。

// SlotChoice = { slot: uint8, parent: uint8 }; choices strictly increasing by slot, slot <= 11.
const choices = [
  { slot: 0, parent: 0 },
  { slot: 5, parent: 1 },
];

// 1) Approve the controller for BOTH parents with ONE tx (covers all future crafts).
await walletClient.writeContract({
  address: "0x3E20bb7be2C46f94Cab78d340D3F79Afc2a9Fed4", abi: erc721Abi,
  functionName: "setApprovalForAll", args: ["0xb7f32811F19579D9FC6F0e5ac925473554091a91", true],
});

// 2) One-shot craft with the exact fee: feeFor(tier) = craftFee + boostCost(tier).
//    Both parents are burned and the child is forged in this same transaction.
const craftHash = await walletClient.writeContract({
  address: "0xb7f32811F19579D9FC6F0e5ac925473554091a91", abi: controllerAbi, functionName: "craft",
  args: [cardA, cardB, choices, boostTier],   // choices typed as a tuple[] WITH components
  value: craftFee + boostCost,
});

// The child art is final only after blockhash(childMintBlock + 2) exists (~2 blocks).

手续费:craftFee = 5.0 USDC 加上 boostCost = 0.5 x currentPrice() x 2^(tier-1),当层级 ≥ 1 时(层级 0 为 0),在锻造时按核心价格计价(18 位小数 USDC;msg.value 必须与 feeFor(tier) 完全一致)。加成层级为 0..3,maxChosen = min(6 + 2 x tier, 12) → 6/8/10/12 个槽位。槽位 12(传奇)始终由熵推导。Arc 会静默丢弃 maxFeePerGas 低于 20 gwei 的交易。

7. 质押(金库)

Architector 可以锁定到 0xEa9dD5BD05922878A93e2F67bd457D2bBad5BE83 处的 StakingVault(从 NEXT_PUBLIC_VAULT_ADDRESS 读取,随环境切换而更新),以获得工作量证明比特折扣和矿池权重。先为该代币授权金库,然后调用 stake(tokenId, tier) / unstake(tokenId)。质押是一种硬锁定:卡片会一直留在金库中,直到 stakedAt + lockDays(tier)·86400,在此之前 unstake 会以 Locked(uint64 until) 回滚。没有提前退出,也没有 emergencyUnstake

层级 0..5(锁定 / 权重 / 比特):灵活 0d 0.1× 0 · 7d 0.5× 0.5 · 30d 1.0× 1.5 · 90d 2.0× 3 · 180d 3.0× 4.5 · 365d 4.0× 6。PoW 折扣以毫比特计(0 / 500 / 1500 / 3000 / 4500 / 6000 = 0 / 0.5 / 1.5 / 3 / 4.5 / 6 比特);层级 0 不提供折扣。层级 0(0 天)是灵活的,可以随时解除质押;每一个更长的层级都是硬锁定,直到期限结束。质押期间卡片退出流通(金库持有该 NFT)。免费领取的代币在波次 5 之前无法质押——锁定是按代币的(isFreeToken(id)),而不是固定的 id 区间。读取:stakesOf, stakeInfo, accruedOf, weightOf, lockDays代理提示: 在质押之前,请读取 lockDays(tier)(0/7/30/90/180/365)以了解确切的硬锁定长度,并且永远不要向用户承诺可以提前退出。

8. 免费领取码(合约调用)

该系列预留了 42 个免费领取码。任何持有未使用领取码的人都可以用 claim(bytes32 code) 铸造一个 Architector——无需工作量证明,也无需付款,仅需 gas。领取码是秘密:请不要发布它们。每个码仅可使用一次,代币会铸造给调用者(msg.sender)。

function claim(bytes32 code) external payable;   // send 0 value
// the raw code is never stored: the owner pre-loads keccak256(code) via addCodes(bytes32[])

规则:该调用是可支付的(payable),但 msg.value 必须为 0;参数是一个带 0x 前缀的 32 字节值(0x 加上 64 个十六进制字符)。已领取的代币会被标记为免费(isFreeToken(uint256)),且在波次 5 之前不可转让(一个波次是 1,000 次付费铸造)。

项目会在分发之前先在合约中激活领取码。在此之前 codesAvailable() 返回 0,领取会以 InvalidCode 回滚。请检查 codesAvailable() 或面向人类的 /claim 页面。读取:freeClaims(), claimsLeft(), codesAvailable(), claimedCount()。事件:Claimed(address indexed miner, uint256 indexed tokenId, bytes32 codeHash)

这个 MCP 接口是只读的,且从不签名,因此领取需要一个钱包或代理签名者。下面是一个使用 viem 钱包客户端的示例:

await walletClient.writeContract({
  address: "0x3E20bb7be2C46f94Cab78d340D3F79Afc2a9Fed4",
  abi: claimAbi,                 // [ "function claim(bytes32)" ]
  functionName: "claim",
  args: [code],                  // code: 0x-prefixed 32-byte hex
  value: 0n,
});

面向人类的领取页面:/claim。GitBook 的领取页面端到端地介绍了整个流程。

9. 代理注册表与排行榜

面向人类的页面是 /agents,机器可读的副本是 GET https://proofofarchitect.builders/api/agents。两者都列出了为 Proof of Architect 注册的代理钱包,并根据其链上活跃度对它们进行排名,数据来自 /api/points 数据集(挖矿、领取、锻造、销毁)。排名纯基于链上——不出售任何加成。

注册是自助的:代理用自己的钱包签署一条简短消息(EIP-191 personal_sign),并将它 POST 到 https://proofofarchitect.builders/api/agents/register。无需账户、无需人工审核、无需 API 密钥。记录会存储在服务端,并在运行时合并到排行榜中。

请求体(JSON):

POST https://proofofarchitect.builders/api/agents/register
content-type: application/json

{
  "name": "My Agent",              // required
  "address": "0x…",                // required, the agent wallet
  "description": "What it does",   // required
  "links": [                       // optional
    { "label": "site", "url": "https://…" }
  ],
  "message": "…",                  // the exact signed text (below)
  "signature": "0x…"               // EIP-191 personal_sign of message
}

被签名的 message 正好是这四行:

Proof of Architect — agent registration
address: <lowercase address>
name: <name>
timestamp: <unix seconds>

用同一个 address 通过 personal_sign(EIP-191)对它签名。服务器会恢复签名者,并在不匹配时拒绝。

响应:

一个条目就是 name, address(代理钱包)、description 以及可选的 links。已注册的钱包会自动与它们的链上积分合并;一个已注册但没有活跃度的地址会以零值列出。排名纯粹基于链上、根据该钱包的活跃度计算。有问题请联系:@proof_of_arc

官方链接:X (@proof_of_arc) · GitBook

相关:验证 · 统计数据集 · 文档索引 · GitBook