Use this skill when an OpenClaw agent must:
x402 request against a merchant endpoint.
x402 settlement back to Ghost for GhostRank.
This published skill bundle includes the helper scripts it references. Use {baseDir} when invoking them so the commands work after clawhub install openclaw-ghost-pay.
GHOST_SIGNER_PRIVATE_KEY (required): trusted signing key for x402 calls and settlement reporting.
Optional:
GHOST_OPENCLAW_BASE_URL (default: https://ghostprotocol.cc)
GHOST_OPENCLAW_CHAIN_ID (default: 8453)
GHOST_OPENCLAW_SERVICE_SLUG (optional default service slug)
GHOST_OPENCLAW_AGENT_ID (optional default agent id for settlement reporting)
GHOST_OPENCLAW_X402_URL (optional default merchant endpoint URL for call-x402.mjs)
GHOST_OPENCLAW_TIMEOUT_MS (default: 15000)
GHOSTWIRE_PROVIDER_ADDRESSGHOSTWIRE_EVALUATOR_ADDRESSGHOSTWIRE_PRINCIPAL_AMOUNTGHOSTWIRE_CLIENT_ADDRESSGHOSTWIRE_SPEC_HASH (optional explicit override; otherwise derive from request)GHOSTWIRE_REQUEST_PROMPTGHOSTWIRE_REQUEST_JSONGHOSTWIRE_REQUEST_WALLETGHOSTWIRE_REQUEST_METADATA_JSONGHOSTWIRE_METADATA_URIGHOSTWIRE_APPROVAL_MODENever put private keys in prompts, plaintext config screenshots, or frontend output.
node {baseDir}/bin/get-payment-requirements.mjs --service agent-18755
This calls Ghost read-only MCP and resolves:
x402 metadata block
node {baseDir}/bin/call-x402.mjs --url https://merchant.example.com/ask --method POST --body-json "{\"prompt\":\"hello\"}" --dry-run true
node {baseDir}/bin/call-x402.mjs --url https://merchant.example.com/ask --method POST --body-json "{\"prompt\":\"hello\"}"
This helper runs the real 402 -> payment -> retry flow against the merchant endpoint.
node {baseDir}/bin/report-x402-settlement.mjs --agent-id 18755 --service agent-18755 --request-id req_123 --payment-reference 0xabc123 --payer-identity 0xpayer --amount-atomic 1000000 --success true --status-code 200
This is the step that makes successful x402 usage visible to GhostRank.
node {baseDir}/bin/get-wire-quote.mjs --client 0x... --provider 0x... --evaluator 0x... --principal-amount 1000000
node {baseDir}/bin/create-wire-job-from-quote.mjs --quote-id wq_... --client 0x... --provider 0x... --evaluator 0x... --request-prompt "Roast my wallet honestly."
node {baseDir}/bin/get-wire-job-status.mjs --job-id wj_... --wait-terminal true
--dry-run true before the first live paid request in a new runtime.402 as a payment challenge or policy failure, not a transport failure.--request-prompt / --request-json; keep --metadata-uri for the merchant deliverable locator.共 2 个版本