{
  "schemaVersion": "1.0",
  "item": {
    "slug": "self-xyz",
    "name": "Self zkID verification",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/0xturboblitz/self-xyz",
    "canonicalUrl": "https://clawhub.ai/0xturboblitz/self-xyz",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/self-xyz",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=self-xyz",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "references/contracts.md",
      "references/backend.md",
      "references/frontend.md",
      "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-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.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/self-xyz"
    },
    "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/self-xyz",
    "agentPageUrl": "https://openagent3.xyz/skills/self-xyz/agent",
    "manifestUrl": "https://openagent3.xyz/skills/self-xyz/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/self-xyz/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": "Self Protocol Integration",
        "body": "Self lets users prove identity attributes (age, nationality, humanity) from passports/ID cards using zero-knowledge proofs — no personal data exposed. Users scan their document's NFC chip in the Self mobile app and share a zk proof with your app."
      },
      {
        "title": "1. Install",
        "body": "npm install @selfxyz/qrcode @selfxyz/core"
      },
      {
        "title": "2. Frontend — QR Code Component",
        "body": "\"use client\";\nimport { SelfQRcodeWrapper, SelfAppBuilder } from \"@selfxyz/qrcode\";\n\nexport default function VerifyIdentity({ userId }: { userId: string }) {\n  const selfApp = new SelfAppBuilder({\n    appName: \"My App\",\n    scope: \"my-app-scope\",\n    endpoint: \"https://yourapp.com/api/verify\",\n    endpointType: \"https\",\n    userId,\n    userIdType: \"hex\",\n    disclosures: {\n      minimumAge: 18,\n    },\n  }).build();\n\n  return (\n    <SelfQRcodeWrapper\n      selfApp={selfApp}\n      onSuccess={() => console.log(\"Verified\")}\n      type=\"websocket\"\n      darkMode={false}\n    />\n  );\n}"
      },
      {
        "title": "3. Backend — Verification Endpoint",
        "body": "// app/api/verify/route.ts\nimport { SelfBackendVerifier, DefaultConfigStore } from \"@selfxyz/core\";\n\nexport async function POST(req: Request) {\n  const { proof, publicSignals } = await req.json();\n\n  const verifier = new SelfBackendVerifier(\n    \"my-app-scope\",                    // must match frontend scope\n    \"https://yourapp.com/api/verify\",  // must match frontend endpoint\n    true,                              // true = accept mock passports (dev only)\n    null,                              // allowedIds (null = all)\n    new DefaultConfigStore({           // must match frontend disclosures\n      minimumAge: 18,\n    })\n  );\n\n  const result = await verifier.verify(proof, publicSignals);\n\n  return Response.json({\n    verified: result.isValid,\n    nationality: result.credentialSubject?.nationality,\n  });\n}"
      },
      {
        "title": "Integration Patterns",
        "body": "PatternWhen to UseendpointendpointTypeOff-chain (backend)Web apps, APIs, most casesYour API URL\"https\" or \"https-staging\"On-chain (contract)DeFi, token gating, airdropsContract address (lowercase)\"celo\" or \"celo-staging\"Deep linkingMobile-first flowsYour API URL\"https\"\n\nOff-chain: Fastest to implement. Proof sent to your backend, verified server-side.\nOn-chain: Proof verified by Celo smart contract. Inherit SelfVerificationRoot. Use for trustless/permissionless scenarios.\nDeep linking: For mobile users — opens Self app directly instead of QR scan. See references/frontend.md."
      },
      {
        "title": "Critical Gotchas",
        "body": "Config matching is mandatory — Frontend disclosures must EXACTLY match backend/contract verification config. Mismatched age thresholds, country lists, or OFAC settings cause silent failures.\n\n\nContract addresses must be lowercase — Non-checksum format in frontend endpoint. Use .toLowerCase().\n\n\nCountry codes are ISO 3-letter — e.g., \"USA\", \"IRN\", \"PRK\". Max 40 countries in exclusion lists.\n\n\nMock passports = testnet only — Set mockPassport: true in backend / use \"celo-staging\" endpoint type. Real passports require mainnet. To create a mock passport: open Self app, tap the Passport button 5 times. Mock testing requires OFAC disabled.\n\n\nVersion requirement — @selfxyz/core >= 1.1.0-beta.1.\n\n\nAttestation IDs — 1 = Passport, 2 = Biometric ID Card. Must explicitly allow via allowedIds map.\n\n\nScope uniqueness — On-chain, scope is Poseidon-hashed with contract address, preventing cross-contract proof replay.\n\n\nEndpoint must be publicly accessible — Self app sends proof directly to your endpoint. Use ngrok for local development.\n\n\nCommon errors: ScopeMismatch = scope/address mismatch or non-lowercase address. Invalid 'to' Address = wrong endpointType (celo vs https). InvalidIdentityCommitmentRoot = real passport on testnet (use mainnet). Invalid Config ID = mock passport on mainnet (use testnet)."
      },
      {
        "title": "Deployed Contracts (Celo)",
        "body": "NetworkAddressMainnet Hub V20xe57F4773bd9c9d8b6Cd70431117d353298B9f5BFSepolia Hub V20x16ECBA51e18a4a7e61fdC417f0d47AFEeDfbed74Sepolia Staging Hub V20x68c931C9a534D37aa78094877F46fE46a49F1A51"
      },
      {
        "title": "References",
        "body": "Load these for deeper integration details:\n\nreferences/frontend.md — SelfAppBuilder full config, SelfQRcodeWrapper props, deep linking with getUniversalLink, disclosure options\nreferences/backend.md — SelfBackendVerifier constructor details, DefaultConfigStore vs InMemoryConfigStore, verification result schema, dynamic configs\nreferences/contracts.md — SelfVerificationRoot inheritance pattern, Hub V2 interaction, setVerificationConfigV2, customVerificationHook, getConfigId, userDefinedData patterns"
      }
    ],
    "body": "Self Protocol Integration\n\nSelf lets users prove identity attributes (age, nationality, humanity) from passports/ID cards using zero-knowledge proofs — no personal data exposed. Users scan their document's NFC chip in the Self mobile app and share a zk proof with your app.\n\nQuick Start (Next.js Off-Chain)\n1. Install\nnpm install @selfxyz/qrcode @selfxyz/core\n\n2. Frontend — QR Code Component\n\"use client\";\nimport { SelfQRcodeWrapper, SelfAppBuilder } from \"@selfxyz/qrcode\";\n\nexport default function VerifyIdentity({ userId }: { userId: string }) {\n  const selfApp = new SelfAppBuilder({\n    appName: \"My App\",\n    scope: \"my-app-scope\",\n    endpoint: \"https://yourapp.com/api/verify\",\n    endpointType: \"https\",\n    userId,\n    userIdType: \"hex\",\n    disclosures: {\n      minimumAge: 18,\n    },\n  }).build();\n\n  return (\n    <SelfQRcodeWrapper\n      selfApp={selfApp}\n      onSuccess={() => console.log(\"Verified\")}\n      type=\"websocket\"\n      darkMode={false}\n    />\n  );\n}\n\n3. Backend — Verification Endpoint\n// app/api/verify/route.ts\nimport { SelfBackendVerifier, DefaultConfigStore } from \"@selfxyz/core\";\n\nexport async function POST(req: Request) {\n  const { proof, publicSignals } = await req.json();\n\n  const verifier = new SelfBackendVerifier(\n    \"my-app-scope\",                    // must match frontend scope\n    \"https://yourapp.com/api/verify\",  // must match frontend endpoint\n    true,                              // true = accept mock passports (dev only)\n    null,                              // allowedIds (null = all)\n    new DefaultConfigStore({           // must match frontend disclosures\n      minimumAge: 18,\n    })\n  );\n\n  const result = await verifier.verify(proof, publicSignals);\n\n  return Response.json({\n    verified: result.isValid,\n    nationality: result.credentialSubject?.nationality,\n  });\n}\n\nIntegration Patterns\nPattern\tWhen to Use\tendpoint\tendpointType\nOff-chain (backend)\tWeb apps, APIs, most cases\tYour API URL\t\"https\" or \"https-staging\"\nOn-chain (contract)\tDeFi, token gating, airdrops\tContract address (lowercase)\t\"celo\" or \"celo-staging\"\nDeep linking\tMobile-first flows\tYour API URL\t\"https\"\nOff-chain: Fastest to implement. Proof sent to your backend, verified server-side.\nOn-chain: Proof verified by Celo smart contract. Inherit SelfVerificationRoot. Use for trustless/permissionless scenarios.\nDeep linking: For mobile users — opens Self app directly instead of QR scan. See references/frontend.md.\nCritical Gotchas\n\nConfig matching is mandatory — Frontend disclosures must EXACTLY match backend/contract verification config. Mismatched age thresholds, country lists, or OFAC settings cause silent failures.\n\nContract addresses must be lowercase — Non-checksum format in frontend endpoint. Use .toLowerCase().\n\nCountry codes are ISO 3-letter — e.g., \"USA\", \"IRN\", \"PRK\". Max 40 countries in exclusion lists.\n\nMock passports = testnet only — Set mockPassport: true in backend / use \"celo-staging\" endpoint type. Real passports require mainnet. To create a mock passport: open Self app, tap the Passport button 5 times. Mock testing requires OFAC disabled.\n\nVersion requirement — @selfxyz/core >= 1.1.0-beta.1.\n\nAttestation IDs — 1 = Passport, 2 = Biometric ID Card. Must explicitly allow via allowedIds map.\n\nScope uniqueness — On-chain, scope is Poseidon-hashed with contract address, preventing cross-contract proof replay.\n\nEndpoint must be publicly accessible — Self app sends proof directly to your endpoint. Use ngrok for local development.\n\nCommon errors: ScopeMismatch = scope/address mismatch or non-lowercase address. Invalid 'to' Address = wrong endpointType (celo vs https). InvalidIdentityCommitmentRoot = real passport on testnet (use mainnet). Invalid Config ID = mock passport on mainnet (use testnet).\n\nDeployed Contracts (Celo)\nNetwork\tAddress\nMainnet Hub V2\t0xe57F4773bd9c9d8b6Cd70431117d353298B9f5BF\nSepolia Hub V2\t0x16ECBA51e18a4a7e61fdC417f0d47AFEeDfbed74\nSepolia Staging Hub V2\t0x68c931C9a534D37aa78094877F46fE46a49F1A51\nReferences\n\nLoad these for deeper integration details:\n\nreferences/frontend.md — SelfAppBuilder full config, SelfQRcodeWrapper props, deep linking with getUniversalLink, disclosure options\nreferences/backend.md — SelfBackendVerifier constructor details, DefaultConfigStore vs InMemoryConfigStore, verification result schema, dynamic configs\nreferences/contracts.md — SelfVerificationRoot inheritance pattern, Hub V2 interaction, setVerificationConfigV2, customVerificationHook, getConfigId, userDefinedData patterns"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/0xturboblitz/self-xyz",
    "publisherUrl": "https://clawhub.ai/0xturboblitz/self-xyz",
    "owner": "0xturboblitz",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/self-xyz",
    "downloadUrl": "https://openagent3.xyz/downloads/self-xyz",
    "agentUrl": "https://openagent3.xyz/skills/self-xyz/agent",
    "manifestUrl": "https://openagent3.xyz/skills/self-xyz/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/self-xyz/agent.md"
  }
}