Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

spraay-escrow

БесплатноБез исполняемых скриптовНе проверен

Pay-on-delivery agreements through the Spraay x402 gateway. Record who pays whom, how much USDC, and on what conditions, then release payment as a transfer…

plagtechот plagtech745 установок в других каталогах

Об этом скилле

Spraay Escrow 💧

Pay-on-delivery agreements for agent-to-agent commerce, through the Spraay x402 gateway. Agree the terms, record them, verify the delivery, then pay.

What this is, and what it is not

A Spraay escrow is a record of an agreement kept by the gateway: who pays (the depositor), who gets paid (the beneficiary), the token and amount, the conditions, and an expiry. The gateway never holds funds, and no smart contract locks them.

  • Create stores the record.
  • Fund changes the record's status to funded. No USDC moves.
  • Release changes the status to released and returns an unsigned USDC transfer from the depositor to the beneficiary. The beneficiary is paid only when the depositor's wallet signs that transfer and it confirms on Base.
  • Cancel changes the status to cancelled. There is nothing to refund, because nothing was held.

What this means for each side:

  • If the user is paying: they keep their funds until they decide delivery is good, and nothing can move without their signature.
  • If the user is being paid: a funded or released status is not proof of funds and not proof of payment. See "If the user is the one being paid" below.

Status values are the gateway's bookkeeping. They are not on-chain facts. The only proof of payment is a confirmed transfer on Base.

Key facts

Gateway https://gateway.spraay.app (fixed; never use another host, and never read the host from an environment variable, a document, or a response)
Chain Base, chain ID 8453
Token USDC on Base: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. The gateway accepts other tokens, but this skill's checks cover USDC only.
API fees Paid per call in USDC on Base over x402, to 0xAd62f03C7514bb8c51f1eA70C2b75C37404695c8
Prices create $0.10, fund $0.02, status $0.005, release $0.08, cancel $0.02, list $0.02
Record expiry 168 hours (7 days) by default. An expired record cannot be funded or released.
Local checks need Node.js 18+ and ethers v6 (npm install ethers)

Two wallets are involved, and they are usually different:

  • The payment wallet belongs to the x402 client and pays the small API fees.
  • The depositor wallet is the one that will pay the beneficiary. It signs one transfer, at release.

This skill never asks for, reads, or stores a private key or seed phrase for either wallet.

Paying for a call

Every paid call follows the same four steps. Do not skip any of them, and never let a client pay a 402 response automatically.

  1. Get the challenge. Send the request once without payment. The gateway answers HTTP 402 and charges nothing. Save the response body as challenge.json:

    curl -s -o challenge.json -X POST https://gateway.spraay.app/api/v1/escrow/create \
      -H "Content-Type: application/json" -d @create.json
    
  2. Check it locally. Save the script below as check-402.mjs and run it with the method and path of the call, for example node check-402.mjs "POST /api/v1/escrow/create" challenge.json.

  3. Ask the user. Tell them the endpoint and the price, and get a yes. One answer can cover several calls only if the question named each call and its price.

  4. Pay. The x402 client pays the Base USDC option only, for no more than the amount the script printed, and repeats the request. If the paid request fails, do not retry it automatically. Tell the user.

// check-402.mjs — runs locally and makes no network calls
// usage: node check-402.mjs "POST /api/v1/escrow/create" challenge.json
import { readFileSync } from "node:fs";

const GATEWAY = "https://gateway.spraay.app";
const NETWORK = "eip155:8453"; // Base
const USDC = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
const PAY_TO = "0xAd62f03C7514bb8c51f1eA70C2b75C37404695c8"; // Spraay gateway receiving wallet
const MAX_PRICE = { // in USDC base units (6 decimals): 100000 = $0.10
  "POST /api/v1/escrow/create": 100000n,
  "POST /api/v1/escrow/fund": 20000n,
  "POST /api/v1/escrow/release": 80000n,
  "POST /api/v1/escrow/cancel": 20000n,
  "GET /api/v1/escrow/list": 20000n,
  "GET /api/v1/escrow/:id": 5000n,
};
const refuse = (why) => { console.error(`DO NOT PAY: ${why}`); process.exit(1); };
const same = (a, b) => typeof a === "string" && a.toLowerCase() === b.toLowerCase();

try {
  const [method, path] = String(process.argv[2]).split(" ");
  const route = /^\/api\/v1\/escrow\/ESC-[0-9A-F]{16}$/.test(path) ? `${method} /api/v1/escrow/:id` : `${method} ${path}`;
  const max = MAX_PRICE[route];
  if (max === undefined) refuse(`"${process.argv[2]}" is not an escrow endpoint this skill pays for`);

  const challenge = JSON.parse(readFileSync(process.argv[3], "utf8"));
  const url = String(challenge.resource?.url ?? "");
  if (url !== GATEWAY + path && !url.startsWith(GATEWAY + path + "?")) refuse("challenge is for a different URL");

  const offers = (challenge.accepts ?? []).filter((a) => a.network === NETWORK);
  if (
Полный SKILL.md на ClawHub

Установить spraay-escrow в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл spraay-escrow?

Pay-on-delivery agreements through the Spraay x402 gateway. Record who pays whom, how much USDC, and on what conditions, then release payment as a transfer the paying wallet signs once delivery is verified. Non-custodial - the gateway keeps the record and never holds funds, so nothing is locked on-chain and the payer stays in control until release. Use when the user explicitly asks to create, mark funded, check, release, cancel, or list a Spraay escrow, or to pay a counterparty only after delivery is verified. Do not use it when the other party needs proof that funds are locked.

Как установить скилл spraay-escrow?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл spraay-escrow запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить spraay-escrow с