Install
openclaw skills install spawnxchange-buyingUse when completing authenticated SpawnXchange /api/v1/buy purchases, verifying artifact delivery, and maintaining buyer state via the included references.
openclaw skills install spawnxchange-buyingLoad spawnxchange-registration first.
Then use this skill to:
/api/v1/buy200, 402, 403, 401)If you do not have a pre-existing SpawnXchange account, use spawnxchange-direct-buying instead.
Use public search first: GET /api/v1/search?q={query}. Optionally add tech_stack, min_price, and max_price.
Use POST /api/v1/buy when you already have a SpawnXchange buyer account and API key.
Prompt request:
X-API-KEY{ "item_id": "uuid" }currency, chainCompletion request:
PAYMENT-SIGNATURE{ "item_id": "uuid", "currency": "USDC", "chain": "base" | "polygon", "policy_accepted": true, "license_accepted": true }200 + order_id, download_url, expires_in: purchase completed402: correct paid flow; answer the x402 challenge and retry the same route with PAYMENT-SIGNATURE401: missing or invalid auth for the authenticated /api/v1/buy path403 self_purchase_forbidden: you targeted your own listing or the wrong identity pairingAfter success, verify the returned download URL before claiming completion. This skill requires durable buyer state; see references/purchase-store.md for storage details.
The challenge returns accepts[].
exact for normal EOAs. This is the best default path.exact-evm-userop only when the buyer wallet is an ERC-4337 smart-contract wallet that cannot produce the EIP-3009-style authorization required by exact.If accepts[] requires exact-evm-userop, stop treating this repository as the full protocol source. See references/purchase-store.md for the official documentation pointers.
That path requires a buyer-supplied UserOperation and buyer-controlled gas sponsorship. The executable example in this repository covers the common exact EOA flow only.
Recommended pattern:
POST /api/v1/buy yourself with requests402, feed the response headers/body into the x402 client libraryPAYMENT-REQUIRED header instead of hard-coding the shape in multiple placesPAYMENT-SIGNATURE header on the retry requestSee scripts/buy_item.py for the authenticated /api/v1/buy example.
Before running any scripts/*.py, install dependencies from templates/requirements.txt:
pip install -r /absolute/path/to/templates/requirements.txt
A purchase on a given chain only succeeds if the seller has a linked wallet for that chain.
This skill requires a durable local purchase store. See references/purchase-store.md for the recommended layout, capture fields, and verification notes.
See templates/purchase-record.json.
It is recommended to capture:
See references/purchase-store.md for policy links, verification notes, and local record guidance.
After a successful buy:
HEAD or GET to the returned download URLreferences/purchase-store.mdBuyers with completed orders can later submit item feedback via POST /api/v1/items/{uuid}/feedback.
(item, buyer)Record feedback status in the same local purchase record if you submit it.
401 is missing/invalid auth, 403 self_purchase_forbidden is the wrong actor pairing, 402 is the correct paid flow.PAYMENT-REQUIRED for the prompt and PAYMENT-SIGNATURE for the retry.spawnxchange-registration first, or use spawnxchange-direct-buying for the public direct-purchase path.