Xpersona
G

Ghost Protocol OpenClaw Pay

CLAWHUB · Unverified

Discover Ghost payment requirements, execute real x402 calls, report x402 settlements, and run GhostWire quote/prepare/status flows for direct escrow.

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s1735gygy0jgw5zv2y3n14471h83kamw:openclaw-ghost-pay
  1. Install using `clawhub skill install s1735gygy0jgw5zv2y3n14471h83kamw:openclaw-ghost-pay` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/ghostprotoinfra/openclaw-ghost-pay before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-ghostprotoinfra-openclaw-ghost-pay/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

106,263 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: openclaw-ghost-pay
description: Discover Ghost payment requirements, execute real x402 calls, report x402 settlements, and run GhostWire quote/prepare/status flows for direct escrow.
version: 1.5.0
metadata: {"clawdis":{"homepage":"https://github.com/Ghost-Protocol-Infrastructure/GHOST_PROTOCOL/tree/main/integrations/openclaw-ghost-pay","os":["darwin","linux","win32"],"requires":{"env":["GHOST_SIGNER_PRIVATE_KEY"],"bins":["node"]},"primaryEnv":"GHOST_SIGNER_PRIVATE_KEY","install":[{"id":"viem","kind":"node","package":"viem","label":"Install viem (required for settlement reporting)"}]}}
---

# OpenClaw Ghost Pay

Use this skill when an OpenClaw agent must:

1. Discover Ghost payment requirements for a service.
2. Execute a real `x402` request against a merchant endpoint.
3. Report a verified `x402` settlement back to Ghost for GhostRank.
4. Optionally run GhostWire quote/prepare/status flows.

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

## Required environment

- `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_ADDRESS`
- `GHOSTWIRE_EVALUATOR_ADDRESS`
- `GHOSTWIRE_PRINCIPAL_AMOUNT`
- `GHOSTWIRE_CLIENT_ADDRESS`
- `GHOSTWIRE_SPEC_HASH` (optional explicit override; otherwise derive from request)
- `GHOSTWIRE_REQUEST_PROMPT`
- `GHOSTWIRE_REQUEST_JSON`
- `GHOSTWIRE_REQUEST_WALLET`
- `GHOSTWIRE_REQUEST_METADATA_JSON`
- `GHOSTWIRE_METADATA_URI`
- `GHOSTWIRE_APPROVAL_MODE`

Never put private keys in prompts, plaintext config screenshots, or frontend output.

## Flow

### 1. Get payment requirements

```bash
node {baseDir}/bin/get-payment-requirements.mjs --service agent-18755
```

This calls Ghost read-only MCP and resolves:

- Express gate endpoint
- chain id
- request cost credits
- Ghost's canonical `x402` metadata block

### 2. Dry run a real x402 request

```bash
node {baseDir}/bin/call-x402.mjs --url https://merchant.example.com/ask --method POST --body-json "{\"prompt\":\"hello\"}" --dry-run true
```

### 3. Execute a live x402 request

```bash
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.

### 4. Report the verified settlement back to Ghost

```bash
node {baseDir}/bin/report-x402-settlement.mjs --agent-id 1875

README.md

# OpenClaw Ghost Pay

This package bridges OpenClaw agents to Ghost Protocol's existing stack:

- Discovery + pricing via read-only MCP (`/api/mcp/read-only`)
- Real `x402` calls against merchant endpoints
- Merchant settlement reporting for GhostRank
- GhostWire quote + direct job-prepare + job-status flows for escrow-mode workflows

This bundle does not use the removed GhostGate x402-compat envelope. `call-x402.mjs` runs the real `402 -> payment -> retry` flow.

Default recommendation:

- if your OpenClaw agent fronts a long-lived Node or Python merchant runtime, use the Ghost SDK auto-reporting wrappers in that runtime as the primary GhostRank path
- keep `report-x402-settlement.mjs` as the fallback/manual recovery path for custom, short-lived, or unsupported runtimes

## ClawHub publish path

If you want a real ClawHub bundle with helper scripts included, publish the folder root:

```bash
clawhub publish ./integrations/openclaw-ghost-pay --slug openclaw-ghost-pay --name "Ghost Protocol OpenClaw Pay" --version 1.5.0 --tags latest,agents,eip712,ghostprotocol,ghostwire,mcp,openclaw,payments,x402
```

Do not rely on a web-form-only publish if it only captures `SKILL.md`; the installable bundle needs the helper scripts under `bin/`.

If `clawhub` returns `fetch failed` from this machine/network, run the bundled wrapper that applies the registry DNS shim:

```powershell
powershell -ExecutionPolicy Bypass -File ./integrations/openclaw-ghost-pay/scripts/clawhub.ps1 whoami
powershell -ExecutionPolicy Bypass -File ./integrations/openclaw-ghost-pay/scripts/clawhub.ps1 publish ./integrations/openclaw-ghost-pay --slug openclaw-ghost-pay --name "Ghost Protocol OpenClaw Pay" --version 1.5.0 --tags latest,agents,eip712,ghostprotocol,ghostwire,mcp,openclaw,payments,x402
```

## Contents

- `openclaw.plugin.json` - plugin descriptor with local skill path
- `skills/openclaw-ghost-pay/SKILL.md` - skill instructions for OpenClaw
- `bin/get-payment-requirements.mjs` - MCP-based payment requirement lookup
- `bin/call-x402.mjs` - real `x402` client helper for merchant endpoints
- `bin/report-x402-settlement.mjs` - manual merchant-signed settlement report helper for GhostRank fallback/recovery
- `bin/get-wire-quote.mjs` - MCP wrapper for GhostWire quote creation
- `bin/create-wire-job-from-quote.mjs` - direct GhostWire job preparation from an issued quote with a consumer-authored request
- `bin/get-wire-job-status.mjs` - MCP wrapper for GhostWire job status polling

## Usage

From repo root:

```bash
node integrations/openclaw-ghost-pay/bin/get-payment-requirements.mjs --service agent-18755
```

```bash
node integrations/openclaw-ghost-pay/bin/call-x402.mjs --url https://merchant.example.com/ask --method POST --body-json "{\"prompt\":\"hello\"}" --dry-run true
```

```bash
node integrations/openclaw-ghost-pay/bin/call-x402.mjs --url https://merchant.example.com/ask --method POST --body-json "{\"prompt\":\"hello\"}"
```

```bash

_meta.json

{
  "ownerId": "kn751eansm1fyp4w96hpnjqc1x82n879",
  "slug": "openclaw-ghost-pay",
  "version": "1.5.0",
  "publishedAt": 1774574477714
}

INSTALL.md

# OpenClaw Ghost Pay Install

## Requirements

- Node.js 20+ runtime
- Trusted server/runtime environment
- `GHOST_SIGNER_PRIVATE_KEY` set as a secret

## 1. Install dependencies

For local repo use:

```bash
npm install
```

For package-only local use:

```bash
cd integrations/openclaw-ghost-pay
npm install
```

For ClawHub publish/install, publish the folder root so the helper scripts ship with the skill bundle:

```bash
clawhub publish ./integrations/openclaw-ghost-pay --slug openclaw-ghost-pay --name "Ghost Protocol OpenClaw Pay" --version 1.5.0 --tags latest,agents,eip712,ghostprotocol,ghostwire,mcp,openclaw,payments,x402
```

If `clawhub` fails with `fetch failed` in this environment, use the bundled wrapper:

```powershell
powershell -ExecutionPolicy Bypass -File ./integrations/openclaw-ghost-pay/scripts/clawhub.ps1 publish ./integrations/openclaw-ghost-pay --slug openclaw-ghost-pay --name "Ghost Protocol OpenClaw Pay" --version 1.5.0 --tags latest,agents,eip712,ghostprotocol,ghostwire,mcp,openclaw,payments,x402
```

## 2. Set runtime env

Required:

```bash
GHOST_SIGNER_PRIVATE_KEY=0x...
```

Optional:

```bash
GHOST_OPENCLAW_BASE_URL=https://ghostprotocol.cc
GHOST_OPENCLAW_CHAIN_ID=8453
GHOST_OPENCLAW_SERVICE_SLUG=agent-18755
GHOST_OPENCLAW_AGENT_ID=18755
GHOST_OPENCLAW_X402_URL=https://merchant.example.com/ask
GHOST_OPENCLAW_TIMEOUT_MS=15000
GHOSTWIRE_PROVIDER_ADDRESS=0x...
GHOSTWIRE_EVALUATOR_ADDRESS=0x...
GHOSTWIRE_PRINCIPAL_AMOUNT=1000000
GHOSTWIRE_CLIENT_ADDRESS=0x...
GHOSTWIRE_REQUEST_PROMPT=Roast my wallet honestly.
GHOSTWIRE_APPROVAL_MODE=exact
```

## 3. Register plugin in local OpenClaw config

Use the package root:

```json
{
  "plugins": {
    "ghost-protocol-openclaw": {
      "path": "./integrations/openclaw-ghost-pay",
      "enabled": true,
      "skills": {
        "entries": {
          "openclaw-ghost-pay": {
            "enabled": true
          }
        }
      }
    }
  }
}
```

## 4. Validate installation

```bash
node integrations/openclaw-ghost-pay/bin/get-payment-requirements.mjs --service agent-18755
```

If that succeeds, run paid dry run:

```bash
node integrations/openclaw-ghost-pay/bin/call-x402.mjs --url https://merchant.example.com/ask --method POST --body-json "{\"prompt\":\"hello\"}" --dry-run true
```

Then report a verified settlement when a real request succeeds:

```bash
node integrations/openclaw-ghost-pay/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
```

Optional GhostWire wrappers:

```bash
node integrations/openclaw-ghost-pay/bin/get-wire-quote.mjs --client 0x... --provider 0x... --evaluator 0x... --principal-amount 1000000
```

```bash
node integrations/openclaw-ghost-pay/bin/create-wire-job-from-quote.mjs --quote-id wq_... --client 0x... --provi

QUICKSTART.md

# OpenClaw Ghost Pay Quickstart

Copy/paste commands from repo root.

Published ClawHub installs should use `{baseDir}` from the installed skill folder instead of the repo-local `integrations/openclaw-ghost-pay` path.

## 1. Discover payment requirements

```bash
node integrations/openclaw-ghost-pay/bin/get-payment-requirements.mjs --service agent-18755
```

## 2. Dry run paid request

```bash
node integrations/openclaw-ghost-pay/bin/call-x402.mjs --url https://merchant.example.com/ask --method POST --body-json "{\"prompt\":\"hello\"}" --dry-run true
```

## 3. Live paid request

```bash
node integrations/openclaw-ghost-pay/bin/call-x402.mjs --url https://merchant.example.com/ask --method POST --body-json "{\"prompt\":\"hello\"}"
```

## 4. Report verified settlement for GhostRank

```bash
node integrations/openclaw-ghost-pay/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
```

## 5. Minimal env (required)

```bash
GHOST_SIGNER_PRIVATE_KEY=0x...
```

## 6. Optional env defaults

```bash
GHOST_OPENCLAW_BASE_URL=https://ghostprotocol.cc
GHOST_OPENCLAW_CHAIN_ID=8453
GHOST_OPENCLAW_AGENT_ID=18755
GHOST_OPENCLAW_X402_URL=https://merchant.example.com/ask
GHOST_OPENCLAW_TIMEOUT_MS=15000
```

## 7. GhostWire quote helper (optional)

```bash
node integrations/openclaw-ghost-pay/bin/get-wire-quote.mjs --client 0x... --provider 0x... --evaluator 0x... --principal-amount 1000000
```

## 8. GhostWire prepare from quote (optional)

```bash
node integrations/openclaw-ghost-pay/bin/create-wire-job-from-quote.mjs --quote-id wq_... --client 0x... --provider 0x... --evaluator 0x... --request-prompt "Roast my wallet honestly."
```

The command returns wallet-ready direct GhostWire transaction requests. The client wallet still sends the on-chain transactions, and the request prompt becomes part of the prepared GhostWire job metadata.

## 9. GhostWire job status helper (optional)

```bash
node integrations/openclaw-ghost-pay/bin/get-wire-job-status.mjs --job-id wj_...
```

Sponsored

Ads related to Ghost Protocol OpenClaw Pay and adjacent AI workflows.