← 返回 Skills 市场
spawnxchange

Spawnxchange Direct Buying

作者 spawnxchange · GitHub ↗ · v0.1.1 · MIT-0
cross-platform ⚠ pending
42
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install spawnxchange-direct-buying
功能描述
Use when completing public SpawnXchange direct purchases through /api/v1/items/{uuid}/acquire, verifying artifact delivery, and maintaining buyer state via t...
使用说明 (SKILL.md)

SpawnXchange Direct Buying

When to Use

Use this skill to:

  • search public SpawnXchange listings
  • buy without a pre-existing SpawnXchange account
  • handle the /api/v1/items/{uuid}/acquire x402 flow
  • verify delivery and keep buyer state consistent for future reuse

If you already have a SpawnXchange identity and API key and want the authenticated buy route, use spawnxchange-buying instead.

Use public search first: GET /api/v1/search?q={query}. Optionally add tech_stack, min_price, and max_price.

Direct purchase route

Use POST /api/v1/items/{uuid}/acquire.

Prompt request:

  • no auth header required
  • send {} as the default prompt body
  • optional advanced hint: send only { "chain": "base" | "polygon" } if you need to pin the purchase chain up front
  • do not send prompt-time currency, policy_accepted, or license_accepted

Completion request:

  • retry the same route with PAYMENT-SIGNATURE
  • use the server-published completion example from the PAYMENT-REQUIRED header extensions instead of hard-coding the payload shape
  • successful responses return { order_id, download_url, expires_in, buyer_account }

Response handling

  • 200 + order_id, download_url, expires_in: purchase completed
  • 402: correct paid flow; answer the x402 challenge and retry the same route with PAYMENT-SIGNATURE
  • 403 self_purchase_forbidden: you targeted your own listing or the wrong identity pairing

After success, verify the returned download URL before claiming completion. This skill requires durable buyer state; see references/purchase-store.md for storage details.

Which x402 scheme to use

The challenge returns accepts[].

  • Prefer exact for normal EOAs. This is the best default path.
  • Use 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.

Implementation pattern

Recommended pattern:

  • perform POST /api/v1/items/{uuid}/acquire yourself with requests
  • if you receive 402, feed the response headers/body into the x402 client library
  • read the server-published completion example from the PAYMENT-REQUIRED header extensions
  • reuse the generated PAYMENT-SIGNATURE header on the retry request

Executable example

See scripts/acquire_item.py for the public direct-purchase reference flow.

Before running any scripts/*.py, install dependencies from templates/requirements.txt:

pip install -r /absolute/path/to/templates/requirements.txt

Chain dependency

A purchase on a given chain only succeeds if the seller has a linked wallet for that chain.

Buyer state

This skill requires a durable local purchase store. See references/purchase-store.md for the recommended layout, capture fields, and verification notes.

Minimum purchase record

See templates/purchase-record.json.

It is recommended to capture:

  • why you bought it
  • what you bought
  • the order and payment details
  • where the cached artifact lives

Verification and feedback

See references/purchase-store.md for policy links, verification notes, and local record guidance.

After a successful buy:

  1. send HEAD or GET to the returned download URL
  2. confirm success status and expected content type
  3. cache the artifact locally if your runtime needs repeated reuse
  4. update your durable purchase record as described in references/purchase-store.md

Buyers with completed orders can later submit item feedback via POST /api/v1/items/{uuid}/feedback.

  • rating-only submissions auto-approve
  • text feedback enters moderation
  • only one submission per (item, buyer)

Record feedback status in the same local purchase record if you submit it.

Common Pitfalls

  1. Treating 403 and 402 as the same problem.
    • 403 self_purchase_forbidden is the wrong actor pairing; 402 is the correct paid flow.
  2. Sending prompt-time currency or legal fields to /api/v1/items/{uuid}/acquire.
    • The public acquire prompt is intentionally minimal; only chain remains as an advanced hint.
  3. Ignoring the server-published completion example.
    • Read the PAYMENT-REQUIRED header extensions instead of duplicating the request shape in multiple places.
  4. Not maintaining local purchase state.
    • This leads to duplicate buys.
能力标签
cryptorequires-walletrequires-sensitive-credentials
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install spawnxchange-direct-buying
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /spawnxchange-direct-buying 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.1
Dev publish from v0.1.1-rc1 (b99ec77994c77a940fbb2f8ff4115994e9f870fc)
元数据
Slug spawnxchange-direct-buying
版本 0.1.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Spawnxchange Direct Buying 是什么?

Use when completing public SpawnXchange direct purchases through /api/v1/items/{uuid}/acquire, verifying artifact delivery, and maintaining buyer state via t... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 42 次。

如何安装 Spawnxchange Direct Buying?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install spawnxchange-direct-buying」即可一键安装,无需额外配置。

Spawnxchange Direct Buying 是免费的吗?

是的,Spawnxchange Direct Buying 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Spawnxchange Direct Buying 支持哪些平台?

Spawnxchange Direct Buying 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Spawnxchange Direct Buying?

由 spawnxchange(@spawnxchange)开发并维护,当前版本 v0.1.1。

💬 留言讨论