# Send Self zkID verification to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- 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.
## Suggested prompts
### New install

```text
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.
```
### Upgrade existing

```text
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.
```
## Machine-readable fields
```json
{
  "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": {
    "downloadUrl": "/downloads/self-xyz",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=self-xyz",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "references/contracts.md",
      "references/backend.md",
      "references/frontend.md",
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "self-xyz",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-03T15:27:38.451Z",
      "expiresAt": "2026-05-10T15:27:38.451Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=self-xyz",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=self-xyz",
        "contentDisposition": "attachment; filename=\"self-xyz-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "self-xyz"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "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."
      ]
    }
  },
  "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"
  }
}
```
## Documentation

### Self Protocol Integration

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.

### 1. Install

npm install @selfxyz/qrcode @selfxyz/core

### 2. Frontend — QR Code Component

"use client";
import { SelfQRcodeWrapper, SelfAppBuilder } from "@selfxyz/qrcode";

export default function VerifyIdentity({ userId }: { userId: string }) {
  const selfApp = new SelfAppBuilder({
    appName: "My App",
    scope: "my-app-scope",
    endpoint: "https://yourapp.com/api/verify",
    endpointType: "https",
    userId,
    userIdType: "hex",
    disclosures: {
      minimumAge: 18,
    },
  }).build();

  return (
    <SelfQRcodeWrapper
      selfApp={selfApp}
      onSuccess={() => console.log("Verified")}
      type="websocket"
      darkMode={false}
    />
  );
}

### 3. Backend — Verification Endpoint

// app/api/verify/route.ts
import { SelfBackendVerifier, DefaultConfigStore } from "@selfxyz/core";

export async function POST(req: Request) {
  const { proof, publicSignals } = await req.json();

  const verifier = new SelfBackendVerifier(
    "my-app-scope",                    // must match frontend scope
    "https://yourapp.com/api/verify",  // must match frontend endpoint
    true,                              // true = accept mock passports (dev only)
    null,                              // allowedIds (null = all)
    new DefaultConfigStore({           // must match frontend disclosures
      minimumAge: 18,
    })
  );

  const result = await verifier.verify(proof, publicSignals);

  return Response.json({
    verified: result.isValid,
    nationality: result.credentialSubject?.nationality,
  });
}

### Integration Patterns

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"

Off-chain: Fastest to implement. Proof sent to your backend, verified server-side.
On-chain: Proof verified by Celo smart contract. Inherit SelfVerificationRoot. Use for trustless/permissionless scenarios.
Deep linking: For mobile users — opens Self app directly instead of QR scan. See references/frontend.md.

### Critical Gotchas

Config matching is mandatory — Frontend disclosures must EXACTLY match backend/contract verification config. Mismatched age thresholds, country lists, or OFAC settings cause silent failures.


Contract addresses must be lowercase — Non-checksum format in frontend endpoint. Use .toLowerCase().


Country codes are ISO 3-letter — e.g., "USA", "IRN", "PRK". Max 40 countries in exclusion lists.


Mock 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.


Version requirement — @selfxyz/core >= 1.1.0-beta.1.


Attestation IDs — 1 = Passport, 2 = Biometric ID Card. Must explicitly allow via allowedIds map.


Scope uniqueness — On-chain, scope is Poseidon-hashed with contract address, preventing cross-contract proof replay.


Endpoint must be publicly accessible — Self app sends proof directly to your endpoint. Use ngrok for local development.


Common 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).

### Deployed Contracts (Celo)

NetworkAddressMainnet Hub V20xe57F4773bd9c9d8b6Cd70431117d353298B9f5BFSepolia Hub V20x16ECBA51e18a4a7e61fdC417f0d47AFEeDfbed74Sepolia Staging Hub V20x68c931C9a534D37aa78094877F46fE46a49F1A51

### References

Load these for deeper integration details:

references/frontend.md — SelfAppBuilder full config, SelfQRcodeWrapper props, deep linking with getUniversalLink, disclosure options
references/backend.md — SelfBackendVerifier constructor details, DefaultConfigStore vs InMemoryConfigStore, verification result schema, dynamic configs
references/contracts.md — SelfVerificationRoot inheritance pattern, Hub V2 interaction, setVerificationConfigV2, customVerificationHook, getConfigId, userDefinedData patterns
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: 0xturboblitz
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-03T15:27:38.451Z
- Expires at: 2026-05-10T15:27:38.451Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/self-xyz)
- [Send to Agent page](https://openagent3.xyz/skills/self-xyz/agent)
- [JSON manifest](https://openagent3.xyz/skills/self-xyz/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/self-xyz/agent.md)
- [Download page](https://openagent3.xyz/downloads/self-xyz)