← Back to Skills
Automation

Spraay Openclaw

Plag Tech By Plag Tech 👁 1 views ▲ 0 votes

Full Spraay x402 gateway interface for AI agents. Payments, DeFi, AI inference, and blockchain data in one skill. Batch payments and payroll, swap quotes, token prices, balance queries, 43+ AI models via Bittensor, ENS resolution, and chain data across Base, Ethereum, Arbitrum, Solana, and 7 more chains. Use when the user wants comprehensive Spraay gateway access covering payments, DeFi operations, AI generation, or on-chain queries.

GitHub
---
name: spraay-openclaw
description: >-
  Full Spraay x402 gateway interface for AI agents. Payments, DeFi, AI
  inference, and blockchain data in one skill. Batch payments and payroll,
  swap quotes, token prices, balance queries, 43+ AI models via Bittensor,
  ENS resolution, and chain data across Base, Ethereum, Arbitrum, Solana,
  and 7 more chains. Use when the user wants comprehensive Spraay gateway
  access covering payments, DeFi operations, AI generation, or on-chain
  queries.
version: 1.1.0
homepage: https://spraay.app
metadata:
  openclaw:
    emoji: "💧"
    requires:
      bins:
        - curl
        - jq
      env:
        - SPRAAY_GATEWAY_URL
    primaryEnv: SPRAAY_GATEWAY_URL
    envVars:
      - name: SPRAAY_GATEWAY_URL
        required: true
        description: >-
          Spraay x402 gateway base URL (https://gateway.spraay.app).
          All API calls go exclusively to this single endpoint.
---

# Spraay Openclaw 💧

Full Spraay x402 gateway interface. Payments, DeFi, AI, and blockchain data —
everything the Spraay gateway offers, in one skill.

All requests go exclusively to the user's configured `SPRAAY_GATEWAY_URL`.
No data is sent to any other external endpoint.

**When to use this vs the specialized Spraay skills:**

- Need everything? Install **spraay-openclaw** (this skill).
- Only need batch payments? Install **spraay-payments**.
- Only need AI inference? Install **spraay-compute-futures**.
- Only need DeFi data? Install **defi-intelligence**.

## Important Warnings

**Blockchain transactions are irreversible.** Payments, swaps, and transfers
executed on-chain cannot be undone. Always confirm with the user before
executing any financial transaction.

**Real funds are involved.** Batch payments move real tokens. Swaps execute
real trades. The agent must confirm amounts, addresses, chains, and slippage
with the user before proceeding.

**x402 micropayment fees apply** to paid endpoints. Each call costs a small
USDC micropayment on Base. Free endpoints are marked below.

**AI responses are generated by third-party models** via Bittensor Subnet 64.
Review generated content before relying on it for decisions.

## Setup

```
SPRAAY_GATEWAY_URL=https://gateway.spraay.app
```

No API key needed. Uses x402 pay-per-call micropayments with USDC on Base.
Requires an x402-compatible wallet (Coinbase CDP or similar).

## Supported Chains

Base (primary), Ethereum, Arbitrum, Polygon, BNB Chain, Avalanche, Solana,
Unichain, Plasma, BOB, Bittensor.

Payment contract (Base): `0x1646452F98E36A3c9Cfc3eDD8868221E207B5eEC`

---

## Payments

### Batch Payment

Send tokens to multiple wallets in one transaction. 60-80% gas savings.

**Confirm recipients, amounts, token, and chain with the user first.**

```bash
curl -X POST "$SPRAAY_GATEWAY_URL/api/batch-payment" \
  -H "Content-Type: application/json" \
  -d '{
    "recipients": [
      {"address": "alice.eth", "amount": "3000"},
      {"address": "bob.base", "amount": "2500"},
      {"address": "0xCCC...999", "amount": "4000"}
    ],
    "token": "USDC",
    "chain": "base",
    "memo": "March 2026 payroll"
  }'
```

### Create Invoice

```bash
curl -X POST "$SPRAAY_GATEWAY_URL/api/create-invoice" \
  -H "Content-Type: application/json" \
  -d '{
    "recipient": "0xABC...123",
    "amount": "500",
    "token": "USDC",
    "chain": "base",
    "memo": "March consulting"
  }'
```

### Check Balance

```bash
curl "$SPRAAY_GATEWAY_URL/api/balance?address=0xABC...&chain=base"
```

---

## DeFi

### Swap Quote

Get a quote without executing. Read-only — no funds move.

```bash
curl -X POST "$SPRAAY_GATEWAY_URL/api/swap-quote" \
  -H "Content-Type: application/json" \
  -d '{
    "tokenIn": "ETH",
    "tokenOut": "USDC",
    "amount": "1.0",
    "chain": "base"
  }'
```

**To execute a swap, confirm token pair, amount, chain, and slippage
tolerance with the user first.**

### Token Price (Free)

```bash
curl "$SPRAAY_GATEWAY_URL/api/price?symbol=ETH"
```

### Multi-Token Price Check

```bash
curl "$SPRAAY_GATEWAY_URL/api/price?symbol=ETH"
curl "$SPRAAY_GATEWAY_URL/api/price?symbol=BTC"
curl "$SPRAAY_GATEWAY_URL/api/price?symbol=SOL"
```

---

## AI Inference

43+ language models via Bittensor Subnet 64 (Chutes AI). OpenAI-compatible API.

### Chat Completion

```bash
curl -X POST "$SPRAAY_GATEWAY_URL/bittensor/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "unsloth/Llama-3.3-70B-Instruct",
    "messages": [
      {"role": "user", "content": "Explain DeFi yield farming in simple terms"}
    ],
    "temperature": 0.7,
    "max_tokens": 500
  }'
```

### List Available Models (Free)

```bash
curl "$SPRAAY_GATEWAY_URL/bittensor/v1/models"
```

---

## Blockchain Data

### Resolve ENS / Basename (Free)

```bash
curl "$SPRAAY_GATEWAY_URL/api/resolve?name=vitalik.eth"
```

### Supported Chains (Free)

```bash
curl "$SPRAAY_GATEWAY_URL/api/chains"
```

### Available Endpoints (Free)

```bash
curl "$SPRAAY_GATEWAY_URL/api/endpoints"
```

---

## Free Endpoints

No x402 payment required:

- `GET /api/price?symbol=ETH` — Token prices
- `GET /api/resolve?name=vitalik.eth` — ENS/Basename resolution
- `GET /api/chains` — Supported chains
- `GET /api/endpoints` — Available endpoints
- `GET /api/health` — Gateway health check
- `GET /bittensor/v1/models` — Available AI models

## x402 Payment Flow

1. Call any paid endpoint.
2. Receive HTTP 402 with payment details.
3. Agent wallet sends micropayment (fractions of a cent in USDC on Base).
4. Retry with `X-PAYMENT` proof header.
5. Receive the response.

## Error Handling

- `402` — Payment required. Follow response body instructions.
- `400` — Bad request. Check parameters.
- `404` — Endpoint or model not found.
- `500` — Server error. Retry after a moment.

## Tips

- Always confirm with the user before any financial transaction.
- Use `/api/price` to show USD values before payments or swaps.
- Resolve ENS/Basenames to validate addresses before sending.
- Chain defaults to `base` if not specified.
- Token defaults to `USDC` if not specified.
- For AI: lower temperature (0.3) for factual, higher (0.8+) for creative.

## Links

- App: https://spraay.app
- Gateway: https://gateway.spraay.app
- Docs: https://docs.spraay.app
- MCP Server: https://smithery.ai/server/@plagtech/spraay-x402-mcp
- GitHub: https://github.com/plagtech
x402 spraay payments defi ai-inference batch-payments crypto swap base ethereum solana gateway mcp

Comments

Sign in to leave a comment

Loading comments...