# Send x402 Singularity Layer 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": "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": {
    "downloadUrl": "/downloads/x402-layer",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x402-layer",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "requirements.txt",
      "SKILL.md",
      "scripts/manage_webhook.py",
      "scripts/awal_cli.py",
      "scripts/wallet_signing.py",
      "scripts/erc8004_wallet_client.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "x402-layer",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-12T22:50:40.325Z",
      "expiresAt": "2026-05-19T22:50:40.325Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x402-layer",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x402-layer",
        "contentDisposition": "attachment; filename=\"x402-layer-1.12.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "x402-layer"
      },
      "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/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."
      ]
    }
  },
  "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"
  }
}
```
## Documentation

### x402 Singularity Layer

x402 is a Web3 payment layer where humans and agents can sell/consume APIs and products.
This skill covers the full Singularity Layer lifecycle:

pay/consume services
create/manage/list endpoints
receive and verify webhook payment events
register agents and submit on-chain reputation feedback

Networks: Base, Ethereum, Polygon, BSC, Monad, Solana
Currency: USDC
Protocol: HTTP 402 Payment Required

### Intent Router

Use this routing first, then load the relevant reference doc.

User 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

### 1) Install Skill Dependencies

pip install -r {baseDir}/requirements.txt

### 2) Choose Wallet Mode

Option A: private keys

export PRIVATE_KEY="0x..."
export WALLET_ADDRESS="0x..."
# Solana optional
export SOLANA_SECRET_KEY="base58-or-[1,2,3,...]"

Option B: Coinbase AWAL

# Install Coinbase AWAL skill (shortcut)
npx skills add coinbase/agentic-wallet-skills
export X402_USE_AWAL=1

Use private-key mode for ERC-8004 wallet-first registration. AWAL remains useful for x402 payment flows.

Security note: scripts read only explicit process environment variables. .env files are not auto-loaded.

### Consumer

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

### Provider

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)

### Agent Registry + Reputation

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

### API Key Verification at Origin (mandatory)

When x402 proxies traffic to your origin, verify:

x-api-key: <YOUR_API_KEY>

Reject requests when missing/invalid.

### Credit Economics (provider side)

Endpoint creation: $1 one-time
Starting credits: 4,000
Top-up rate: 500 credits per $1
Consumption: 1 credit per request
If credits hit 0, endpoint stops serving until recharged

### A) Pay and Consume

python {baseDir}/scripts/pay_base.py https://api.x402layer.cc/e/weather-data
python {baseDir}/scripts/pay_solana.py https://api.x402layer.cc/e/weather-data
python {baseDir}/scripts/consume_credits.py https://api.x402layer.cc/e/weather-data

### B) Discover/Search Marketplace

python {baseDir}/scripts/discover_marketplace.py
python {baseDir}/scripts/discover_marketplace.py search weather

### C) Create and Manage Endpoint

python {baseDir}/scripts/create_endpoint.py my-api "My API" https://api.example.com 0.01
python {baseDir}/scripts/manage_endpoint.py list
python {baseDir}/scripts/manage_endpoint.py update my-api --price 0.02
python {baseDir}/scripts/topup_endpoint.py my-api 10

### D) List/Update in Marketplace

python {baseDir}/scripts/list_on_marketplace.py my-api \\
  --category ai \\
  --description "AI-powered analysis" \\
  --logo https://example.com/logo.png \\
  --banner https://example.com/banner.jpg

### E) Webhook Setup and Genuineness Verification

python {baseDir}/scripts/manage_webhook.py set my-api https://my-server.com/webhook
python {baseDir}/scripts/manage_webhook.py info my-api
python {baseDir}/scripts/manage_webhook.py remove my-api

Webhook verification helper:

python {baseDir}/scripts/verify_webhook_payment.py \\
  --body-file ./webhook.json \\
  --signature 't=1700000000,v1=<hex>' \\
  --secret '<YOUR_SIGNING_SECRET>' \\
  --required-source-slug my-api \\
  --require-receipt

### F) Agent Registration + Reputation

python {baseDir}/scripts/list_my_endpoints.py

python {baseDir}/scripts/register_agent.py \\
  "My Agent" \\
  "Autonomous service agent" \\
  --network baseSepolia \\
  --image https://example.com/agent.png \\
  --version 1.4.0 \\
  --tag finance \\
  --tag automation \\
  --endpoint-id <ENDPOINT_UUID> \\
  --custom-endpoint https://api.example.com/agent

python {baseDir}/scripts/list_agents.py --network baseSepolia

python {baseDir}/scripts/update_agent.py \\
  --network baseSepolia \\
  --agent-id 123 \\
  --version 1.4.1 \\
  --tag finance \\
  --tag automation \\
  --endpoint-id <ENDPOINT_UUID> \\
  --public

# The same EVM flow also supports:
#   --network ethereum
#   --network polygon
#   --network bsc
#   --network monad

python {baseDir}/scripts/submit_feedback.py \\
  --network base \\
  --agent-id 123 \\
  --rating 5 \\
  --comment "High quality responses"

### References

Load only what is needed for the user task:

references/pay-per-request.md:
EIP-712/Solana payment flow and low-level signing details.
references/credit-based.md:
credit purchase + consumption behavior and examples.
references/marketplace.md:
search/list/unlist marketplace endpoints.
references/agentic-endpoints.md:
endpoint creation/top-up/status API behavior.
references/webhooks-verification.md:
webhook events, signature verification, and receipt cross-checks.
references/agent-registry-reputation.md:
ERC-8004/Solana-8004 registration, discovery, management, and feedback rules.
references/payment-signing.md:
exact signing domains/types/header payload details.

### Environment Reference

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

### API Base Paths

Endpoints: https://api.x402layer.cc/e/{slug}
Marketplace: https://api.x402layer.cc/api/marketplace
Credits: https://api.x402layer.cc/api/credits/*
Agent routes: https://api.x402layer.cc/agent/*

### Resources

Docs: https://studio.x402layer.cc/docs/agentic-access/openclaw-skill
SDK docs: https://studio.x402layer.cc/docs/developer/sdk-receipts
GitHub docs repo: https://github.com/ivaavimusic/SGL_DOCS_2025
x402 Studio: https://studio.x402layer.cc

### Known Issue

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.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: ivaavimusic
- Version: 1.4.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-12T22:50:40.325Z
- Expires at: 2026-05-19T22:50:40.325Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/x402-layer)
- [Send to Agent page](https://openagent3.xyz/skills/x402-layer/agent)
- [JSON manifest](https://openagent3.xyz/skills/x402-layer/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/x402-layer/agent.md)
- [Download page](https://openagent3.xyz/downloads/x402-layer)