{
  "schemaVersion": "1.0",
  "item": {
    "slug": "x402-layer",
    "name": "x402 Singularity Layer",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ivaavimusic/x402-layer",
    "canonicalUrl": "https://clawhub.ai/ivaavimusic/x402-layer",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/x402-layer",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x402-layer",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "requirements.txt",
      "SKILL.md",
      "scripts/manage_webhook.py",
      "scripts/awal_cli.py",
      "scripts/wallet_signing.py",
      "scripts/erc8004_wallet_client.py"
    ],
    "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-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-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/x402-layer"
    },
    "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/x402-layer",
    "agentPageUrl": "https://openagent3.xyz/skills/x402-layer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/x402-layer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/x402-layer/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": "x402 Singularity Layer",
        "body": "x402 is a Web3 payment layer where humans and agents can sell/consume APIs and products.\nThis skill covers the full Singularity Layer lifecycle:\n\npay/consume services\ncreate/manage/list endpoints\nreceive and verify webhook payment events\nregister agents and submit on-chain reputation feedback\n\nNetworks: Base, Ethereum, Polygon, BSC, Monad, Solana\nCurrency: USDC\nProtocol: HTTP 402 Payment Required"
      },
      {
        "title": "Intent Router",
        "body": "Use this routing first, then load the relevant reference doc.\n\nUser intentPrimary scriptsReferencePay/consume endpoint or productpay_base.py, pay_solana.py, consume_credits.py, consume_product.pyreferences/pay-per-request.md, references/credit-based.mdDiscover/search marketplacediscover_marketplace.pyreferences/marketplace.mdCreate/edit/list endpointcreate_endpoint.py, manage_endpoint.py, list_on_marketplace.py, topup_endpoint.pyreferences/agentic-endpoints.md, references/marketplace.mdConfigure/verify webhooksmanage_webhook.py, verify_webhook_payment.pyreferences/webhooks-verification.mdRegister/discover/manage/rate agents (ERC-8004/Solana-8004)register_agent.py, list_agents.py, list_my_endpoints.py, update_agent.py, submit_feedback.pyreferences/agent-registry-reputation.md"
      },
      {
        "title": "1) Install Skill Dependencies",
        "body": "pip install -r {baseDir}/requirements.txt"
      },
      {
        "title": "2) Choose Wallet Mode",
        "body": "Option A: private keys\n\nexport PRIVATE_KEY=\"0x...\"\nexport WALLET_ADDRESS=\"0x...\"\n# Solana optional\nexport SOLANA_SECRET_KEY=\"base58-or-[1,2,3,...]\"\n\nOption B: Coinbase AWAL\n\n# Install Coinbase AWAL skill (shortcut)\nnpx skills add coinbase/agentic-wallet-skills\nexport X402_USE_AWAL=1\n\nUse private-key mode for ERC-8004 wallet-first registration. AWAL remains useful for x402 payment flows.\n\nSecurity note: scripts read only explicit process environment variables. .env files are not auto-loaded."
      },
      {
        "title": "Consumer",
        "body": "ScriptPurposepay_base.pyPay endpoint on Basepay_solana.pyPay endpoint on Solanaconsume_credits.pyConsume using creditsconsume_product.pyPurchase digital products/filescheck_credits.pyCheck credit balancerecharge_credits.pyBuy endpoint credit packsdiscover_marketplace.pyBrowse/search marketplaceawal_cli.pyRun AWAL auth/pay/discover commands"
      },
      {
        "title": "Provider",
        "body": "ScriptPurposecreate_endpoint.pyDeploy endpoint ($1 one-time, includes 4,000 credits)manage_endpoint.pyList/update endpoint settingstopup_endpoint.pyRecharge provider endpoint creditslist_on_marketplace.pyList/unlist/update marketplace listingmanage_webhook.pySet/remove/check endpoint webhook URLverify_webhook_payment.pyVerify webhook signature + receipt genuineness (PyJWT/JWKS)"
      },
      {
        "title": "Agent Registry + Reputation",
        "body": "ScriptPurposeregister_agent.pyRegister ERC-8004/Solana-8004 agent with image/version/tags and endpoint binding supportlist_agents.pyList ERC-8004 agents owned by the configured wallet or linked dashboard userlist_my_endpoints.pyList platform endpoints that can be linked to ERC-8004 agentsupdate_agent.pyUpdate existing ERC-8004/Solana-8004 agent metadata, visibility, and endpoint bindingssubmit_feedback.pySubmit on-chain reputation feedback"
      },
      {
        "title": "API Key Verification at Origin (mandatory)",
        "body": "When x402 proxies traffic to your origin, verify:\n\nx-api-key: <YOUR_API_KEY>\n\nReject requests when missing/invalid."
      },
      {
        "title": "Credit Economics (provider side)",
        "body": "Endpoint creation: $1 one-time\nStarting credits: 4,000\nTop-up rate: 500 credits per $1\nConsumption: 1 credit per request\nIf credits hit 0, endpoint stops serving until recharged"
      },
      {
        "title": "A) Pay and Consume",
        "body": "python {baseDir}/scripts/pay_base.py https://api.x402layer.cc/e/weather-data\npython {baseDir}/scripts/pay_solana.py https://api.x402layer.cc/e/weather-data\npython {baseDir}/scripts/consume_credits.py https://api.x402layer.cc/e/weather-data"
      },
      {
        "title": "B) Discover/Search Marketplace",
        "body": "python {baseDir}/scripts/discover_marketplace.py\npython {baseDir}/scripts/discover_marketplace.py search weather"
      },
      {
        "title": "C) Create and Manage Endpoint",
        "body": "python {baseDir}/scripts/create_endpoint.py my-api \"My API\" https://api.example.com 0.01\npython {baseDir}/scripts/manage_endpoint.py list\npython {baseDir}/scripts/manage_endpoint.py update my-api --price 0.02\npython {baseDir}/scripts/topup_endpoint.py my-api 10"
      },
      {
        "title": "D) List/Update in Marketplace",
        "body": "python {baseDir}/scripts/list_on_marketplace.py my-api \\\n  --category ai \\\n  --description \"AI-powered analysis\" \\\n  --logo https://example.com/logo.png \\\n  --banner https://example.com/banner.jpg"
      },
      {
        "title": "E) Webhook Setup and Genuineness Verification",
        "body": "python {baseDir}/scripts/manage_webhook.py set my-api https://my-server.com/webhook\npython {baseDir}/scripts/manage_webhook.py info my-api\npython {baseDir}/scripts/manage_webhook.py remove my-api\n\nWebhook verification helper:\n\npython {baseDir}/scripts/verify_webhook_payment.py \\\n  --body-file ./webhook.json \\\n  --signature 't=1700000000,v1=<hex>' \\\n  --secret '<YOUR_SIGNING_SECRET>' \\\n  --required-source-slug my-api \\\n  --require-receipt"
      },
      {
        "title": "F) Agent Registration + Reputation",
        "body": "python {baseDir}/scripts/list_my_endpoints.py\n\npython {baseDir}/scripts/register_agent.py \\\n  \"My Agent\" \\\n  \"Autonomous service agent\" \\\n  --network baseSepolia \\\n  --image https://example.com/agent.png \\\n  --version 1.4.0 \\\n  --tag finance \\\n  --tag automation \\\n  --endpoint-id <ENDPOINT_UUID> \\\n  --custom-endpoint https://api.example.com/agent\n\npython {baseDir}/scripts/list_agents.py --network baseSepolia\n\npython {baseDir}/scripts/update_agent.py \\\n  --network baseSepolia \\\n  --agent-id 123 \\\n  --version 1.4.1 \\\n  --tag finance \\\n  --tag automation \\\n  --endpoint-id <ENDPOINT_UUID> \\\n  --public\n\n# The same EVM flow also supports:\n#   --network ethereum\n#   --network polygon\n#   --network bsc\n#   --network monad\n\npython {baseDir}/scripts/submit_feedback.py \\\n  --network base \\\n  --agent-id 123 \\\n  --rating 5 \\\n  --comment \"High quality responses\""
      },
      {
        "title": "References",
        "body": "Load only what is needed for the user task:\n\nreferences/pay-per-request.md:\nEIP-712/Solana payment flow and low-level signing details.\nreferences/credit-based.md:\ncredit purchase + consumption behavior and examples.\nreferences/marketplace.md:\nsearch/list/unlist marketplace endpoints.\nreferences/agentic-endpoints.md:\nendpoint creation/top-up/status API behavior.\nreferences/webhooks-verification.md:\nwebhook events, signature verification, and receipt cross-checks.\nreferences/agent-registry-reputation.md:\nERC-8004/Solana-8004 registration, discovery, management, and feedback rules.\nreferences/payment-signing.md:\nexact signing domains/types/header payload details."
      },
      {
        "title": "Environment Reference",
        "body": "VariableRequired forNotesPRIVATE_KEYBase private-key modeEVM signing keyWALLET_ADDRESSMost operationsPrimary walletSOLANA_SECRET_KEYSolana private-key modebase58 secret or JSON array bytesSOLANA_WALLET_ADDRESSSolana overrideoptionalWALLET_ADDRESS_SECONDARYdual-chain endpoint modeoptionalX402_USE_AWALAWAL modeset 1X402_AUTH_MODEauth selectionauto, private-key, awalX402_PREFER_NETWORKnetwork selectionbase, solanaX402_API_BASEAPI overridedefault https://api.x402layer.ccX_API_KEY / API_KEYprovider endpoint/webhook managementendpoint keyWORKER_FEEDBACK_API_KEYreputation feedbackworker auth key"
      },
      {
        "title": "API Base Paths",
        "body": "Endpoints: https://api.x402layer.cc/e/{slug}\nMarketplace: https://api.x402layer.cc/api/marketplace\nCredits: https://api.x402layer.cc/api/credits/*\nAgent routes: https://api.x402layer.cc/agent/*"
      },
      {
        "title": "Resources",
        "body": "Docs: https://studio.x402layer.cc/docs/agentic-access/openclaw-skill\nSDK docs: https://studio.x402layer.cc/docs/developer/sdk-receipts\nGitHub docs repo: https://github.com/ivaavimusic/SGL_DOCS_2025\nx402 Studio: https://studio.x402layer.cc"
      },
      {
        "title": "Known Issue",
        "body": "Solana payments currently have lower reliability than Base due to facilitator-side fee payer infra. Use retry logic in pay_solana.py, and prefer Base for production-critical flows."
      }
    ],
    "body": "x402 Singularity Layer\n\nx402 is a Web3 payment layer where humans and agents can sell/consume APIs and products. This skill covers the full Singularity Layer lifecycle:\n\npay/consume services\ncreate/manage/list endpoints\nreceive and verify webhook payment events\nregister agents and submit on-chain reputation feedback\n\nNetworks: Base, Ethereum, Polygon, BSC, Monad, Solana\nCurrency: USDC\nProtocol: HTTP 402 Payment Required\n\nIntent Router\n\nUse this routing first, then load the relevant reference doc.\n\nUser intent\tPrimary scripts\tReference\nPay/consume endpoint or product\tpay_base.py, pay_solana.py, consume_credits.py, consume_product.py\treferences/pay-per-request.md, references/credit-based.md\nDiscover/search marketplace\tdiscover_marketplace.py\treferences/marketplace.md\nCreate/edit/list endpoint\tcreate_endpoint.py, manage_endpoint.py, list_on_marketplace.py, topup_endpoint.py\treferences/agentic-endpoints.md, references/marketplace.md\nConfigure/verify webhooks\tmanage_webhook.py, verify_webhook_payment.py\treferences/webhooks-verification.md\nRegister/discover/manage/rate agents (ERC-8004/Solana-8004)\tregister_agent.py, list_agents.py, list_my_endpoints.py, update_agent.py, submit_feedback.py\treferences/agent-registry-reputation.md\nQuick Start\n1) Install Skill Dependencies\npip install -r {baseDir}/requirements.txt\n\n2) Choose Wallet Mode\n\nOption A: private keys\n\nexport PRIVATE_KEY=\"0x...\"\nexport WALLET_ADDRESS=\"0x...\"\n# Solana optional\nexport SOLANA_SECRET_KEY=\"base58-or-[1,2,3,...]\"\n\n\nOption B: Coinbase AWAL\n\n# Install Coinbase AWAL skill (shortcut)\nnpx skills add coinbase/agentic-wallet-skills\nexport X402_USE_AWAL=1\n\n\nUse private-key mode for ERC-8004 wallet-first registration. AWAL remains useful for x402 payment flows.\n\nSecurity note: scripts read only explicit process environment variables. .env files are not auto-loaded.\n\nScript Inventory\nConsumer\nScript\tPurpose\npay_base.py\tPay endpoint on Base\npay_solana.py\tPay endpoint on Solana\nconsume_credits.py\tConsume using credits\nconsume_product.py\tPurchase digital products/files\ncheck_credits.py\tCheck credit balance\nrecharge_credits.py\tBuy endpoint credit packs\ndiscover_marketplace.py\tBrowse/search marketplace\nawal_cli.py\tRun AWAL auth/pay/discover commands\nProvider\nScript\tPurpose\ncreate_endpoint.py\tDeploy endpoint ($1 one-time, includes 4,000 credits)\nmanage_endpoint.py\tList/update endpoint settings\ntopup_endpoint.py\tRecharge provider endpoint credits\nlist_on_marketplace.py\tList/unlist/update marketplace listing\nmanage_webhook.py\tSet/remove/check endpoint webhook URL\nverify_webhook_payment.py\tVerify webhook signature + receipt genuineness (PyJWT/JWKS)\nAgent Registry + Reputation\nScript\tPurpose\nregister_agent.py\tRegister ERC-8004/Solana-8004 agent with image/version/tags and endpoint binding support\nlist_agents.py\tList ERC-8004 agents owned by the configured wallet or linked dashboard user\nlist_my_endpoints.py\tList platform endpoints that can be linked to ERC-8004 agents\nupdate_agent.py\tUpdate existing ERC-8004/Solana-8004 agent metadata, visibility, and endpoint bindings\nsubmit_feedback.py\tSubmit on-chain reputation feedback\nCore Security Requirements\nAPI Key Verification at Origin (mandatory)\n\nWhen x402 proxies traffic to your origin, verify:\n\nx-api-key: <YOUR_API_KEY>\n\n\nReject requests when missing/invalid.\n\nCredit Economics (provider side)\nEndpoint creation: $1 one-time\nStarting credits: 4,000\nTop-up rate: 500 credits per $1\nConsumption: 1 credit per request\nIf credits hit 0, endpoint stops serving until recharged\nFast Runbooks\nA) Pay and Consume\npython {baseDir}/scripts/pay_base.py https://api.x402layer.cc/e/weather-data\npython {baseDir}/scripts/pay_solana.py https://api.x402layer.cc/e/weather-data\npython {baseDir}/scripts/consume_credits.py https://api.x402layer.cc/e/weather-data\n\nB) Discover/Search Marketplace\npython {baseDir}/scripts/discover_marketplace.py\npython {baseDir}/scripts/discover_marketplace.py search weather\n\nC) Create and Manage Endpoint\npython {baseDir}/scripts/create_endpoint.py my-api \"My API\" https://api.example.com 0.01\npython {baseDir}/scripts/manage_endpoint.py list\npython {baseDir}/scripts/manage_endpoint.py update my-api --price 0.02\npython {baseDir}/scripts/topup_endpoint.py my-api 10\n\nD) List/Update in Marketplace\npython {baseDir}/scripts/list_on_marketplace.py my-api \\\n  --category ai \\\n  --description \"AI-powered analysis\" \\\n  --logo https://example.com/logo.png \\\n  --banner https://example.com/banner.jpg\n\nE) Webhook Setup and Genuineness Verification\npython {baseDir}/scripts/manage_webhook.py set my-api https://my-server.com/webhook\npython {baseDir}/scripts/manage_webhook.py info my-api\npython {baseDir}/scripts/manage_webhook.py remove my-api\n\n\nWebhook verification helper:\n\npython {baseDir}/scripts/verify_webhook_payment.py \\\n  --body-file ./webhook.json \\\n  --signature 't=1700000000,v1=<hex>' \\\n  --secret '<YOUR_SIGNING_SECRET>' \\\n  --required-source-slug my-api \\\n  --require-receipt\n\nF) Agent Registration + Reputation\npython {baseDir}/scripts/list_my_endpoints.py\n\npython {baseDir}/scripts/register_agent.py \\\n  \"My Agent\" \\\n  \"Autonomous service agent\" \\\n  --network baseSepolia \\\n  --image https://example.com/agent.png \\\n  --version 1.4.0 \\\n  --tag finance \\\n  --tag automation \\\n  --endpoint-id <ENDPOINT_UUID> \\\n  --custom-endpoint https://api.example.com/agent\n\npython {baseDir}/scripts/list_agents.py --network baseSepolia\n\npython {baseDir}/scripts/update_agent.py \\\n  --network baseSepolia \\\n  --agent-id 123 \\\n  --version 1.4.1 \\\n  --tag finance \\\n  --tag automation \\\n  --endpoint-id <ENDPOINT_UUID> \\\n  --public\n\n# The same EVM flow also supports:\n#   --network ethereum\n#   --network polygon\n#   --network bsc\n#   --network monad\n\npython {baseDir}/scripts/submit_feedback.py \\\n  --network base \\\n  --agent-id 123 \\\n  --rating 5 \\\n  --comment \"High quality responses\"\n\nReferences\n\nLoad only what is needed for the user task:\n\nreferences/pay-per-request.md: EIP-712/Solana payment flow and low-level signing details.\nreferences/credit-based.md: credit purchase + consumption behavior and examples.\nreferences/marketplace.md: search/list/unlist marketplace endpoints.\nreferences/agentic-endpoints.md: endpoint creation/top-up/status API behavior.\nreferences/webhooks-verification.md: webhook events, signature verification, and receipt cross-checks.\nreferences/agent-registry-reputation.md: ERC-8004/Solana-8004 registration, discovery, management, and feedback rules.\nreferences/payment-signing.md: exact signing domains/types/header payload details.\nEnvironment Reference\nVariable\tRequired for\tNotes\nPRIVATE_KEY\tBase private-key mode\tEVM signing key\nWALLET_ADDRESS\tMost operations\tPrimary wallet\nSOLANA_SECRET_KEY\tSolana private-key mode\tbase58 secret or JSON array bytes\nSOLANA_WALLET_ADDRESS\tSolana override\toptional\nWALLET_ADDRESS_SECONDARY\tdual-chain endpoint mode\toptional\nX402_USE_AWAL\tAWAL mode\tset 1\nX402_AUTH_MODE\tauth selection\tauto, private-key, awal\nX402_PREFER_NETWORK\tnetwork selection\tbase, solana\nX402_API_BASE\tAPI override\tdefault https://api.x402layer.cc\nX_API_KEY / API_KEY\tprovider endpoint/webhook management\tendpoint key\nWORKER_FEEDBACK_API_KEY\treputation feedback\tworker auth key\nAPI Base Paths\nEndpoints: https://api.x402layer.cc/e/{slug}\nMarketplace: https://api.x402layer.cc/api/marketplace\nCredits: https://api.x402layer.cc/api/credits/*\nAgent routes: https://api.x402layer.cc/agent/*\nResources\nDocs: https://studio.x402layer.cc/docs/agentic-access/openclaw-skill\nSDK docs: https://studio.x402layer.cc/docs/developer/sdk-receipts\nGitHub docs repo: https://github.com/ivaavimusic/SGL_DOCS_2025\nx402 Studio: https://studio.x402layer.cc\nKnown Issue\n\nSolana payments currently have lower reliability than Base due to facilitator-side fee payer infra. Use retry logic in pay_solana.py, and prefer Base for production-critical flows."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ivaavimusic/x402-layer",
    "publisherUrl": "https://clawhub.ai/ivaavimusic/x402-layer",
    "owner": "ivaavimusic",
    "version": "1.4.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/x402-layer",
    "downloadUrl": "https://openagent3.xyz/downloads/x402-layer",
    "agentUrl": "https://openagent3.xyz/skills/x402-layer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/x402-layer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/x402-layer/agent.md"
  }
}