{
  "schemaVersion": "1.0",
  "item": {
    "slug": "base-8004",
    "name": "Base 8004",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/squirt11e/base-8004",
    "canonicalUrl": "https://clawhub.ai/squirt11e/base-8004",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/base-8004",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=base-8004",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/base-8004"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/base-8004",
    "agentPageUrl": "https://openagent3.xyz/skills/base-8004/agent",
    "manifestUrl": "https://openagent3.xyz/skills/base-8004/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/base-8004/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Base-8004 Registration",
        "body": "This skill walks you through setting up your own wallet, funding it, and registering onchain with ERC-8004 on Base mainnet. Once registered, your agent has a permanent, verifiable onchain identity and can accumulate reputation."
      },
      {
        "title": "1. What ERC-8004 is",
        "body": "ERC-8004 is an onchain identity and reputation protocol for AI agents.\n\nIdentity — each registered agent gets an ERC-721 NFT on Base mainnet. This is your permanent, verifiable onchain identity.\nReputation Registry — a separate contract tracks reputation scores. Feedback signals (upvotes, downvotes, quality assessments) accumulate into a totalScore and feedbackCount.\nVerifiable metadata — your registration includes a JSON document (agentURI) with your name, description, and capabilities. Anyone can read it onchain.\n\nWhy it matters:\n\nPermanent identity — your agent ID persists across platforms, not tied to any single service.\nPublic reputation — your track record is onchain and verifiable by anyone."
      },
      {
        "title": "2. Set up your wallet",
        "body": "You need an Ethereum-compatible wallet on Base mainnet. If you already have a wallet with ETH on Base, skip to section 4. These steps are only needed if you're setting up a fresh wallet."
      },
      {
        "title": "Step 1: Install viem",
        "body": "npm install viem"
      },
      {
        "title": "Step 2: Generate a private key",
        "body": "import { generatePrivateKey } from \"viem/accounts\";\n\nconst privateKey = generatePrivateKey();\nconsole.log(\"Private key:\", privateKey);\n\nSave this private key immediately. You will never be able to recover it."
      },
      {
        "title": "Step 3: Derive your address",
        "body": "import { privateKeyToAccount } from \"viem/accounts\";\n\nconst account = privateKeyToAccount(privateKey);\nconsole.log(\"Address:\", account.address);"
      },
      {
        "title": "Step 4: Store the private key securely",
        "body": "Add it to your .env file:\n\nAGENT_PRIVATE_KEY=0x...your_private_key_here...\n\nAdd .env to .gitignore if it isn't already:\n\necho \".env\" >> .gitignore"
      },
      {
        "title": "Step 5: Security rules",
        "body": "Never leak your private key in logs, commits, or API calls.\nNever lose it — if you lose the key, you lose the wallet and your onchain identity forever.\nNever overwrite it without backing up the old one."
      },
      {
        "title": "Step 6: Configure a wallet client for Base mainnet",
        "body": "import { createWalletClient, createPublicClient, http } from \"viem\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nimport { base } from \"viem/chains\";\n\nconst account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY as `0x${string}`);\nconst publicClient = createPublicClient({ chain: base, transport: http() });\nconst walletClient = createWalletClient({ account, chain: base, transport: http() });"
      },
      {
        "title": "3. Fund your wallet",
        "body": "Your wallet needs ETH on Base to pay for gas.\n\nGet ETH on Base — use Coinbase (withdraw directly to Base), bridge from any chain via Relay, or receive from another Base wallet.\nGas is cheap — Base L2 gas costs are very low. Registration costs ~$0.02. $1 of ETH is more than enough.\nVerify balance before proceeding:\n\nconst balance = await publicClient.getBalance({ address: account.address });\nconsole.log(\"Balance:\", Number(balance) / 1e18, \"ETH\");\n\nif (balance < 500000000000000n) {\n  console.error(\"Need at least 0.0005 ETH for registration gas\");\n  process.exit(1);\n}"
      },
      {
        "title": "4. Register onchain",
        "body": "Register your agent on the ERC-8004 Identity Registry. This mints an NFT that represents your permanent onchain identity."
      },
      {
        "title": "Step 1: Create your registration JSON",
        "body": "Include the services array to declare your agent's capabilities so other agents and services can discover what you do:\n\nconst registration = {\n  type: \"https://eips.ethereum.org/EIPS/eip-8004#registration-v1\",\n  name: \"Your Agent Name\",\n  description: \"What your agent does\",\n  image: \"https://example.com/your-agent-avatar.png\",\n  active: true,\n  x402Support: false,\n  services: [\n    { name: \"A2A\", endpoint: \"https://your-agent.example.com/a2a\", version: \"0.3.0\" },\n    { name: \"MCP\", endpoint: \"https://your-agent.example.com/mcp\", version: \"0.1.0\" },\n  ],\n};\n\nimage — URL of your agent's avatar or logo, displayed in explorers and directories. Use a square image (256x256 or larger). If you don't have one yet, set it to \"\" and add one later via setAgentURI.\nservices — declares your agent's capabilities onchain. Each entry has a name (the service identifier), an endpoint, and optionally a version. Common service types include A2A (Agent-to-Agent protocol) and MCP (Model Context Protocol)."
      },
      {
        "title": "Step 2: Encode as a data URI",
        "body": "const uri =\n  \"data:application/json;base64,\" + Buffer.from(JSON.stringify(registration)).toString(\"base64\");"
      },
      {
        "title": "Step 3: Call register() on the Identity Registry",
        "body": "import { encodeFunctionData } from \"viem\";\n\nconst IDENTITY_REGISTRY = \"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\";\n\nconst registerAbi = [\n  {\n    inputs: [{ name: \"agentURI\", type: \"string\" }],\n    name: \"register\",\n    outputs: [{ name: \"agentId\", type: \"uint256\" }],\n    stateMutability: \"nonpayable\",\n    type: \"function\",\n  },\n] as const;\n\n// Estimate gas first\nconst gas = await publicClient.estimateGas({\n  account: account.address,\n  to: IDENTITY_REGISTRY,\n  data: encodeFunctionData({\n    abi: registerAbi,\n    functionName: \"register\",\n    args: [uri],\n  }),\n});\n\nconsole.log(\"Estimated gas:\", gas.toString());\n\n// Send the transaction\nconst hash = await walletClient.writeContract({\n  address: IDENTITY_REGISTRY,\n  abi: registerAbi,\n  functionName: \"register\",\n  args: [uri],\n});\n\nconsole.log(\"TX hash:\", hash);"
      },
      {
        "title": "Step 4: Parse the Transfer event to get your token ID",
        "body": "const receipt = await publicClient.waitForTransactionReceipt({ hash });\n\n// ERC-721 Transfer event topic\nconst transferTopic = \"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\";\nconst transferLog = receipt.logs.find(\n  (log) =>\n    log.topics[0] === transferTopic && log.address.toLowerCase() === IDENTITY_REGISTRY.toLowerCase()\n);\n\nconst erc8004AgentId = transferLog?.topics[3]\n  ? BigInt(transferLog.topics[3]).toString()\n  : undefined;\n\nconsole.log(\"Your ERC-8004 Agent ID:\", erc8004AgentId);"
      },
      {
        "title": "Step 5: Save your agent ID",
        "body": "Save erc8004AgentId — this is your permanent onchain identity. Add it to your .env:\n\nERC8004_AGENT_ID=42\n\nYou can verify your registration on BaseScan:\nhttps://basescan.org/nft/0x8004A169FB4a3325136EB29fA0ceB6D2e539a432/{your_agent_id}"
      },
      {
        "title": "5. Update your registration",
        "body": "After your initial registration, you can update your agentURI (name, description, services) by calling setAgentURI on the Identity Registry. This lets you add new capabilities or change your metadata without re-registering.\n\nconst setAgentUriAbi = [\n  {\n    inputs: [\n      { name: \"agentId\", type: \"uint256\" },\n      { name: \"agentURI\", type: \"string\" },\n    ],\n    name: \"setAgentURI\",\n    outputs: [],\n    stateMutability: \"nonpayable\",\n    type: \"function\",\n  },\n] as const;\n\n// Build updated registration JSON\nconst updatedRegistration = {\n  type: \"https://eips.ethereum.org/EIPS/eip-8004#registration-v1\",\n  name: \"Your Agent Name\",\n  description: \"Updated description\",\n  image: \"https://example.com/your-agent-avatar.png\",\n  active: true,\n  x402Support: false,\n  services: [\n    { name: \"A2A\", endpoint: \"https://your-agent.example.com/a2a\", version: \"0.3.0\" },\n    { name: \"MCP\", endpoint: \"https://your-agent.example.com/mcp\", version: \"0.1.0\" },\n  ],\n};\n\nconst newUri =\n  \"data:application/json;base64,\" +\n  Buffer.from(JSON.stringify(updatedRegistration)).toString(\"base64\");\n\nconst hash = await walletClient.writeContract({\n  address: IDENTITY_REGISTRY,\n  abi: setAgentUriAbi,\n  functionName: \"setAgentURI\",\n  args: [BigInt(process.env.ERC8004_AGENT_ID!), newUri],\n});\n\nconsole.log(\"URI updated, TX:\", hash);\n\nOnly the token owner can call setAgentURI."
      },
      {
        "title": "6. Contract addresses and verification",
        "body": "ContractAddressChainIdentity Registry0x8004A169FB4a3325136EB29fA0ceB6D2e539a432Base mainnetReputation Registry0x8004BAa17C55a88189AE136b182e5fdA19dE9b63Base mainnet\n\nVerify on BaseScan:\n\nIdentity Registry: basescan.org/address/0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\nReputation Registry: basescan.org/address/0x8004BAa17C55a88189AE136b182e5fdA19dE9b63\n\nOnchain query examples (read-only, no gas):\n\nimport { createPublicClient, http } from \"viem\";\nimport { base } from \"viem/chains\";\n\nconst client = createPublicClient({ chain: base, transport: http() });\n\n// Check who owns a token\nconst owner = await client.readContract({\n  address: \"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\",\n  abi: [\n    {\n      inputs: [{ name: \"agentId\", type: \"uint256\" }],\n      name: \"ownerOf\",\n      outputs: [{ name: \"\", type: \"address\" }],\n      stateMutability: \"view\",\n      type: \"function\",\n    },\n  ],\n  functionName: \"ownerOf\",\n  args: [42n],\n});\n\n// Read an agent's metadata URI\nconst uri = await client.readContract({\n  address: \"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\",\n  abi: [\n    {\n      inputs: [{ name: \"tokenId\", type: \"uint256\" }],\n      name: \"tokenURI\",\n      outputs: [{ name: \"\", type: \"string\" }],\n      stateMutability: \"view\",\n      type: \"function\",\n    },\n  ],\n  functionName: \"tokenURI\",\n  args: [42n],\n});"
      },
      {
        "title": "7. Resources",
        "body": "8004.org — ERC-8004 protocol\nBase — Base L2 chain\nBaseScan — Base block explorer\nviem — TypeScript Ethereum library"
      },
      {
        "title": "Summary",
        "body": "Set up wallet — generate a private key, derive address, store securely.\nFund wallet — get ETH on Base (Coinbase, bridge, or transfer). $1 is more than enough.\nRegister onchain — call register(agentURI) on the Identity Registry with your services. Parse the Transfer event for your token ID.\nUpdate registration — call setAgentURI to change your metadata or add new services."
      }
    ],
    "body": "Base-8004 Registration\n\nThis skill walks you through setting up your own wallet, funding it, and registering onchain with ERC-8004 on Base mainnet. Once registered, your agent has a permanent, verifiable onchain identity and can accumulate reputation.\n\n1. What ERC-8004 is\n\nERC-8004 is an onchain identity and reputation protocol for AI agents.\n\nIdentity — each registered agent gets an ERC-721 NFT on Base mainnet. This is your permanent, verifiable onchain identity.\nReputation Registry — a separate contract tracks reputation scores. Feedback signals (upvotes, downvotes, quality assessments) accumulate into a totalScore and feedbackCount.\nVerifiable metadata — your registration includes a JSON document (agentURI) with your name, description, and capabilities. Anyone can read it onchain.\n\nWhy it matters:\n\nPermanent identity — your agent ID persists across platforms, not tied to any single service.\nPublic reputation — your track record is onchain and verifiable by anyone.\n2. Set up your wallet\n\nYou need an Ethereum-compatible wallet on Base mainnet. If you already have a wallet with ETH on Base, skip to section 4. These steps are only needed if you're setting up a fresh wallet.\n\nStep 1: Install viem\nnpm install viem\n\nStep 2: Generate a private key\nimport { generatePrivateKey } from \"viem/accounts\";\n\nconst privateKey = generatePrivateKey();\nconsole.log(\"Private key:\", privateKey);\n\n\nSave this private key immediately. You will never be able to recover it.\n\nStep 3: Derive your address\nimport { privateKeyToAccount } from \"viem/accounts\";\n\nconst account = privateKeyToAccount(privateKey);\nconsole.log(\"Address:\", account.address);\n\nStep 4: Store the private key securely\n\nAdd it to your .env file:\n\nAGENT_PRIVATE_KEY=0x...your_private_key_here...\n\n\nAdd .env to .gitignore if it isn't already:\n\necho \".env\" >> .gitignore\n\nStep 5: Security rules\nNever leak your private key in logs, commits, or API calls.\nNever lose it — if you lose the key, you lose the wallet and your onchain identity forever.\nNever overwrite it without backing up the old one.\nStep 6: Configure a wallet client for Base mainnet\nimport { createWalletClient, createPublicClient, http } from \"viem\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nimport { base } from \"viem/chains\";\n\nconst account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY as `0x${string}`);\nconst publicClient = createPublicClient({ chain: base, transport: http() });\nconst walletClient = createWalletClient({ account, chain: base, transport: http() });\n\n3. Fund your wallet\n\nYour wallet needs ETH on Base to pay for gas.\n\nGet ETH on Base — use Coinbase (withdraw directly to Base), bridge from any chain via Relay, or receive from another Base wallet.\nGas is cheap — Base L2 gas costs are very low. Registration costs ~$0.02. $1 of ETH is more than enough.\nVerify balance before proceeding:\nconst balance = await publicClient.getBalance({ address: account.address });\nconsole.log(\"Balance:\", Number(balance) / 1e18, \"ETH\");\n\nif (balance < 500000000000000n) {\n  console.error(\"Need at least 0.0005 ETH for registration gas\");\n  process.exit(1);\n}\n\n4. Register onchain\n\nRegister your agent on the ERC-8004 Identity Registry. This mints an NFT that represents your permanent onchain identity.\n\nStep 1: Create your registration JSON\n\nInclude the services array to declare your agent's capabilities so other agents and services can discover what you do:\n\nconst registration = {\n  type: \"https://eips.ethereum.org/EIPS/eip-8004#registration-v1\",\n  name: \"Your Agent Name\",\n  description: \"What your agent does\",\n  image: \"https://example.com/your-agent-avatar.png\",\n  active: true,\n  x402Support: false,\n  services: [\n    { name: \"A2A\", endpoint: \"https://your-agent.example.com/a2a\", version: \"0.3.0\" },\n    { name: \"MCP\", endpoint: \"https://your-agent.example.com/mcp\", version: \"0.1.0\" },\n  ],\n};\n\nimage — URL of your agent's avatar or logo, displayed in explorers and directories. Use a square image (256x256 or larger). If you don't have one yet, set it to \"\" and add one later via setAgentURI.\nservices — declares your agent's capabilities onchain. Each entry has a name (the service identifier), an endpoint, and optionally a version. Common service types include A2A (Agent-to-Agent protocol) and MCP (Model Context Protocol).\nStep 2: Encode as a data URI\nconst uri =\n  \"data:application/json;base64,\" + Buffer.from(JSON.stringify(registration)).toString(\"base64\");\n\nStep 3: Call register() on the Identity Registry\nimport { encodeFunctionData } from \"viem\";\n\nconst IDENTITY_REGISTRY = \"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\";\n\nconst registerAbi = [\n  {\n    inputs: [{ name: \"agentURI\", type: \"string\" }],\n    name: \"register\",\n    outputs: [{ name: \"agentId\", type: \"uint256\" }],\n    stateMutability: \"nonpayable\",\n    type: \"function\",\n  },\n] as const;\n\n// Estimate gas first\nconst gas = await publicClient.estimateGas({\n  account: account.address,\n  to: IDENTITY_REGISTRY,\n  data: encodeFunctionData({\n    abi: registerAbi,\n    functionName: \"register\",\n    args: [uri],\n  }),\n});\n\nconsole.log(\"Estimated gas:\", gas.toString());\n\n// Send the transaction\nconst hash = await walletClient.writeContract({\n  address: IDENTITY_REGISTRY,\n  abi: registerAbi,\n  functionName: \"register\",\n  args: [uri],\n});\n\nconsole.log(\"TX hash:\", hash);\n\nStep 4: Parse the Transfer event to get your token ID\nconst receipt = await publicClient.waitForTransactionReceipt({ hash });\n\n// ERC-721 Transfer event topic\nconst transferTopic = \"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\";\nconst transferLog = receipt.logs.find(\n  (log) =>\n    log.topics[0] === transferTopic && log.address.toLowerCase() === IDENTITY_REGISTRY.toLowerCase()\n);\n\nconst erc8004AgentId = transferLog?.topics[3]\n  ? BigInt(transferLog.topics[3]).toString()\n  : undefined;\n\nconsole.log(\"Your ERC-8004 Agent ID:\", erc8004AgentId);\n\nStep 5: Save your agent ID\n\nSave erc8004AgentId — this is your permanent onchain identity. Add it to your .env:\n\nERC8004_AGENT_ID=42\n\n\nYou can verify your registration on BaseScan: https://basescan.org/nft/0x8004A169FB4a3325136EB29fA0ceB6D2e539a432/{your_agent_id}\n\n5. Update your registration\n\nAfter your initial registration, you can update your agentURI (name, description, services) by calling setAgentURI on the Identity Registry. This lets you add new capabilities or change your metadata without re-registering.\n\nconst setAgentUriAbi = [\n  {\n    inputs: [\n      { name: \"agentId\", type: \"uint256\" },\n      { name: \"agentURI\", type: \"string\" },\n    ],\n    name: \"setAgentURI\",\n    outputs: [],\n    stateMutability: \"nonpayable\",\n    type: \"function\",\n  },\n] as const;\n\n// Build updated registration JSON\nconst updatedRegistration = {\n  type: \"https://eips.ethereum.org/EIPS/eip-8004#registration-v1\",\n  name: \"Your Agent Name\",\n  description: \"Updated description\",\n  image: \"https://example.com/your-agent-avatar.png\",\n  active: true,\n  x402Support: false,\n  services: [\n    { name: \"A2A\", endpoint: \"https://your-agent.example.com/a2a\", version: \"0.3.0\" },\n    { name: \"MCP\", endpoint: \"https://your-agent.example.com/mcp\", version: \"0.1.0\" },\n  ],\n};\n\nconst newUri =\n  \"data:application/json;base64,\" +\n  Buffer.from(JSON.stringify(updatedRegistration)).toString(\"base64\");\n\nconst hash = await walletClient.writeContract({\n  address: IDENTITY_REGISTRY,\n  abi: setAgentUriAbi,\n  functionName: \"setAgentURI\",\n  args: [BigInt(process.env.ERC8004_AGENT_ID!), newUri],\n});\n\nconsole.log(\"URI updated, TX:\", hash);\n\n\nOnly the token owner can call setAgentURI.\n\n6. Contract addresses and verification\nContract\tAddress\tChain\nIdentity Registry\t0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\tBase mainnet\nReputation Registry\t0x8004BAa17C55a88189AE136b182e5fdA19dE9b63\tBase mainnet\n\nVerify on BaseScan:\n\nIdentity Registry: basescan.org/address/0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\nReputation Registry: basescan.org/address/0x8004BAa17C55a88189AE136b182e5fdA19dE9b63\n\nOnchain query examples (read-only, no gas):\n\nimport { createPublicClient, http } from \"viem\";\nimport { base } from \"viem/chains\";\n\nconst client = createPublicClient({ chain: base, transport: http() });\n\n// Check who owns a token\nconst owner = await client.readContract({\n  address: \"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\",\n  abi: [\n    {\n      inputs: [{ name: \"agentId\", type: \"uint256\" }],\n      name: \"ownerOf\",\n      outputs: [{ name: \"\", type: \"address\" }],\n      stateMutability: \"view\",\n      type: \"function\",\n    },\n  ],\n  functionName: \"ownerOf\",\n  args: [42n],\n});\n\n// Read an agent's metadata URI\nconst uri = await client.readContract({\n  address: \"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\",\n  abi: [\n    {\n      inputs: [{ name: \"tokenId\", type: \"uint256\" }],\n      name: \"tokenURI\",\n      outputs: [{ name: \"\", type: \"string\" }],\n      stateMutability: \"view\",\n      type: \"function\",\n    },\n  ],\n  functionName: \"tokenURI\",\n  args: [42n],\n});\n\n7. Resources\n8004.org — ERC-8004 protocol\nBase — Base L2 chain\nBaseScan — Base block explorer\nviem — TypeScript Ethereum library\nSummary\nSet up wallet — generate a private key, derive address, store securely.\nFund wallet — get ETH on Base (Coinbase, bridge, or transfer). $1 is more than enough.\nRegister onchain — call register(agentURI) on the Identity Registry with your services. Parse the Transfer event for your token ID.\nUpdate registration — call setAgentURI to change your metadata or add new services."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/squirt11e/base-8004",
    "publisherUrl": "https://clawhub.ai/squirt11e/base-8004",
    "owner": "squirt11e",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/base-8004",
    "downloadUrl": "https://openagent3.xyz/downloads/base-8004",
    "agentUrl": "https://openagent3.xyz/skills/base-8004/agent",
    "manifestUrl": "https://openagent3.xyz/skills/base-8004/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/base-8004/agent.md"
  }
}