Skill: azep-ninja/tator-trader (version 1.0.6)

--- name: tator-trader description: "Execute crypto trades using natural language via Tator's AI trading API. Use when: buying tokens, selling tokens, swapping, bridging cross-chain, sending tokens, wrapping/unwrapping ETH, opening perp positions, betting on prediction markets, launching tokens, registering blockchain names, or managing yield positions. Triggers: 'buy token', 'sell token', 'swap X for Y', 'bridge to', 'send tokens', 'open long', 'open short', 'bet on', 'launch token', 'register name', 'deposit yield', 'wrap ETH'. Supports 24 chains. Returns UNSIGNED transactions — you sign and broadcast. Costs $0.20 USDC per request via x402. Recommended wallet integration: Sponge (SPONGE_API_KEY) or AgentWallet (AGENTWALLET_API_TOKEN) — no raw private keys needed. This skill is a transaction builder and never accesses your private keys or tokens." --- # Tator AI Trading API Trade on 24 chains using natural language. Send a prompt like "Buy 0.1 ETH worth of PEPE on Base" — Tator returns UNSIGNED transactions for you to review, sign, and broadcast. $0.20 USDC per request via x402. Tator never touches your keys. ## Quick Reference | Situation | Action | |-----------|--------| | User wants to buy/sell/swap a token | Build prompt with amount + token + chain, call Tator | | User wants to bridge tokens | Include source chain, destination chain, amount in prompt | | User wants to open a leveraged position | Include leverage, direction, collateral amount, protocol | | User gives a vague prompt ("buy some crypto") | Ask for specifics: which token, how much, which chain | | Response has `type: "transaction"` | **Verify each TX** (check `to`, `value`, `chainId`), then sign and broadcast IN ORDER | | Response has `type: "error"` | Show error message to user, suggest fixes | | Response has `type: "info"` | Display the information to user | | Multiple transactions returned | Execute sequentially — wait for each to confirm before sending next | | Unknown/new token | Use contract address instead of name in prompt | | User hasn't scanned the token yet | **Scan first** with `quickintel-scan` skill ($0.03) before buying | ## Endpoint `POST https://x402.quickintel.io/v1/tator/prompt` ```json { "prompt": "Buy 0.1 ETH worth of PEPE on Base", "walletAddress": "0xYourPublicWalletAddress", "provider": "your-agent-name" } ``` | Field | Required | Description | |-------|----------|-------------| | `prompt` | Yes | Natural language trading instruction | | `walletAddress` | Yes | Your PUBLIC wallet address (receives tokens, signs TX) | | `provider` | Yes | Your agent/app identifier | | `async` | No | Returns job ID to poll. Default: `false` | | `chain` | No | Preferred chain (e.g., "base", "ethereum") | | `slippage` | No | Slippage tolerance %. Default: `1` | **Cost:** $0.20 USDC (200000 atomic units) on any of 14 payment networks. Base recommended for lowest fees. > **⚠️ NEVER paste private keys or seed phrases into prompts.** Tator only needs your PUBLIC wallet address. The `walletAddress` field is your public address — the one you'd share to receive tokens. ## Writing Good Prompts Better prompts = better results. You pay $0.20 regardless of outcome. | Good | Bad | |------|-----| | "Buy 0.1 ETH worth of PEPE on Base" | "Buy some crypto" | | "Swap 100 USDC for ETH on Arbitrum" | "Swap tokens" | | "Bridge 50 USDC from Base to Arbitrum" | "Bridge my tokens" | | "Open 5x long on ETH with 100 USDC on Avantis" | "Go long ETH" | | "Buy 0x1234...abcd on Base" (contract address for obscure tokens) | "Get me that new meme coin" | **Tips:** Always include chain. Specify amounts. Use contract addresses for obscure tokens. For bridging, include source AND destination chain. ## Capabilities | Category | Operations | Example | |----------|-----------|---------| | **Trading** | Buy, sell, swap | "Swap 100 USDC for ETH on Arbitrum" | | **Transfers** | Send, wrap, unwrap, burn | "Send 50 USDC to 0x1234..." | | **Bridging** | Cross-chain via Relay, LiFi, GasZip, deBridge | "Bridge 100 USDC from Base to Arbitrum" | | **Perps** | Long/short via Avantis (Base) | "Open 5x long on ETH with 100 USDC" | | **Prediction Markets** | Bet via Myriad | "Bet $10 on YES for 'Will ETH hit 5k?'" | | **Token Launch** | Clanker (Base, Ethereum, Arbitrum, Unichain), Flaunch (Base), Pump.fun (Solana) | "Launch MYTOKEN with symbol MTK on Clanker" | | **Names** | Basenames, MegaETH, Somnia | "Register myname.base" | | **Yield** | Aave, Morpho, Compound, Yearn | "Deposit 1000 USDC into Aave on Base" | ## Supported Chains (24) ethereum, base, arbitrum, optimism, polygon, avalanche, bsc, linea, sonic, berachain, abstract, unichain, ink, soneium, ronin, worldchain, sei, hyperevm, katana, somnia, plasma, monad, megaeth, solana Use exact chain names as shown (e.g., `"base"` not `"Base"`, `"bsc"` not `"binance"`). ## Handling Responses ### Transaction Response (Most Common) ```json { "type": "transaction", "transactions": [ { "to": "0xContractAddress", "data": "0xCalldata...", "value": "100000000000000000", "chainId": 8453, "description": "Buy PEPE with 0.1 ETH on Base" } ], "message": "Transaction ready. Sign and broadcast to complete." } ``` **Before signing every transaction, verify:** 1. **`to` address** — Should be a known DEX router, bridge contract, or the address YOU specified 2. **`value` field** — Should match the ETH/native amount from your prompt (for ERC-20 swaps this is usually `"0"`) 3. **`chainId`** — Should match the chain you requested 4. **`description`** — Should align with your original prompt 5. **For approvals** (`0x095ea7b3` selector) — Spender should be a known protocol contract If anything looks wrong, **do not sign**. Ask Tator again with a more specific prompt or verify the contract on a block explorer. ### Error Response ```json { "type": "error", "message": "Insufficient balance. You have 0.05 ETH but need 0.1 ETH.", "code": "INSUFFICIENT_BALANCE" } ``` | Code | Fix | |------|-----| | `INSUFFICIENT_BALANCE` | Check token balance before calling | | `UNSUPPORTED_CHAIN` | Use a supported chain from the list | | `TOKEN_NOT_FOUND` | Use contract address instead of name | | `INVALID_PROMPT` | Be more specific | | `SLIPPAGE_TOO_HIGH` | Reduce trade size or increase slippage tolerance | ### Info Response Returned for information queries (prices, balances). Display the `message` to the user. ## Wallet Integration > **⚠️ Wallet Security:** Tator does NOT require your private key. The x402 payment uses YOUR agent's existing wallet. Use a **managed wallet service** to avoid raw key exposure entirely. | Your setup | Use this | Key exposure | |-----------|----------|-------------| | Using Sponge Wallet | **Pattern A** below (recommended) | ✅ No raw keys | | Using AgentWallet (frames.ag) | **Pattern B** below | ✅ No raw keys | | Using Lobster.cash / Crossmint | See `references/REFERENCE.md` | ✅ No raw keys | | Using Vincent Wallet | See `references/REFERENCE.md` | ✅ No raw keys | | Need programmatic signing (viem, ethers, @x402/fetch, Solana) | See `references/REFERENCE.md` | ⚠️ Advanced — read security notes | | Not sure / no wallet | Start with **Pattern A** (Sponge) | ✅ No raw keys | ### Pattern A: Sponge Wallet (Recommended — No Raw Keys) ```bash curl -sS -X POST "https://api.wallet.paysponge.com/api/x402/fetch" \ -H "Authorization: Bearer $SPONGE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://x402.quickintel.io/v1/tator/prompt", "method": "POST", "body": { "prompt": "Buy 0.1 ETH worth of PEPE on Base", "walletAddress": "0xYourSpongeWalletAddress", "provider": "sponge-agent" }, "preferred_chain": "base" }' ``` Sponge handles the 402 payment flow automatically. You still verify and sign the returned trade transactions. Requires: `SPONGE_API_KEY` env var. ### Pattern B: AgentWallet (No Raw Keys) ```javascript const response = await fetch('https://frames.ag/api/wallets/{username}/actions/x402/fetch', { method: 'POST', headers: { 'Authorization': `Bearer ${process.env.AGENTWALLET_API_TOKEN}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ url: 'https://x402.quickintel.io/v1/tator/prompt', method: 'POST', body: { prompt: 'Swap 100 USDC for ETH on Base', walletAddress: agentWalletAddress, provider: 'my-agent' } }) }); const result = await response.json(); // Verify and broadcast via AgentWallet if (result.type === 'transaction') { for (const tx of result.transactions) { // VERIFY before signing — check to, value, chainId, description const broadcast = await fetch( 'https://frames.ag/api/wallets/{username}/actions/send-transaction', { method: 'POST', headers: { 'Authorization': `Bearer ${process.env.AGENTWALLET_API_TOKEN}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ chainId: tx.chainId, to: tx.to, data: tx.data, value: tx.value }) } ); console.log(`TX sent: ${(await broadcast.json()).hash}`); } } ``` > For programmatic signing patterns (@x402/fetch, viem, ethers.js, Solana, Vincent), see `references/REFERENCE.md`. These require a dedicated hot wallet with minimal funds — never use your main wallet. ## Async Mode For long-running operations, add `"async": true` to get a job ID: ```json { "type": "pending", "jobId": "job_abc123", "message": "Poll for result." } ``` Poll (FREE — no payment): `GET https://x402.quickintel.io/v1/tator/jobs/job_abc123` ## Scan Before You Buy **Always scan unknown tokens before trading.** Use the `quickintel-scan` skill ($0.03) to check for honeypots, scams, and rug pull risks: ```javascript // 1. Scan token ($0.03) const scan = await scanToken(chain, tokenAddress); if (scan.tokenDynamicDetails.is_Honeypot) throw new Error('HONEYPOT'); if (scan.quickiAudit.has_Scams) throw new Error('SCAM'); // 2. Only then trade ($0.20) const trade = await callTator(`Buy 0.1 ETH worth of ${tokenAddress} on ${chain}`, wallet); ``` Total cost: $0.23 for a scanned, verified trade. See `references/REFERENCE.md` for the complete scan-then-buy example. ## Security Model ``` YOUR SIDE TATOR'S SIDE ───────────── ───────────── • Private keys (never shared) • Interprets your prompt • Transaction review (before sign) • Constructs unsigned calldata • Signing decision (your wallet) • Returns TXs for your review • Broadcasting (you submit) • Charges $0.20 via x402 Tator NEVER receives your private key. Tator CANNOT execute without your signature. The worst Tator can do is return a bad transaction. The worst YOU can do is sign it without checking. ``` ## Payment Networks (14) Pay on any of these networks: Base (recommended), Ethereum, Arbitrum, Optimism, Polygon, Avalanche, Unichain, Linea, Sonic, HyperEVM, Ink, Monad, MegaETH (USDM), Solana. See `references/REFERENCE.md` for full USDC/USDM addresses per chain. ## Error Handling | Error | Cause | Fix | |-------|-------|-----| | `402 Payment Required` | No payment header | Ensure wallet configured with $0.20+ USDC | | `402 Signature verification failed` | Bad payload structure | Check references/REFERENCE.md common mistakes | | `INSUFFICIENT_BALANCE` | Can't afford trade | Check balance first | | `TOKEN_NOT_FOUND` | Unknown token | Use contract address | ## Important Notes - **Payment charged regardless of outcome.** Use `payment-identifier` extension for safe retries (see references/REFERENCE.md). - **Multi-TX requires sequential execution.** Approvals must confirm before swaps. - **Bridge times vary.** 30 seconds to 30 minutes depending on protocol. - **Perps have liquidation risk.** Leverage trading can lose your collateral. - **Scan results are point-in-time.** Re-scan periodically for held tokens. ## Discovery Endpoint Query accepted payments and schemas: `GET https://x402.quickintel.io/accepted` ## Cross-Reference - **Token security scanning** → `quickintel-scan` skill ($0.03/scan) - **Deep x402 implementation, all wallet patterns, transaction verification** → `references/REFERENCE.md` - **Chain details, RPCs, block explorers** → `references/chains.md` ## About Tator's endpoint (`x402.quickintel.io`) is operated by **Quick Intel LLC**, a registered US-based cryptocurrency security company. Over 50 million token scans processed. APIs power DexTools, DexScreener, and Tator Trader. Operational since April 2023. - Tator Docs: https://docs.quickintel.io/tator - x402 Protocol: https://www.x402.org - Support: https://t.me/tatortrader

path: references/chains.md
content: # Supported Chains Reference

Complete reference for all 24 chains supported by Tator and 63 chains supported by Quick Intel.

## Tator Trading Chains (24)

| Chain | Chain ID | Native Token |
|-------|----------|--------------|
| ethereum | 1 | ETH |
| base | 8453 | ETH |
| arbitrum | 42161 | ETH |
| optimism | 10 | ETH |
| polygon | 137 | MATIC |
| avalanche | 43114 | AVAX |
| bsc | 56 | BNB |
| linea | 59144 | ETH |
| sonic | 146 | S |
| berachain | 80094 | BERA |
| abstract | 2741 | ETH |
| unichain | 130 | ETH |
| ink | 57073 | ETH |
| soneium | 1868 | ETH |
| ronin | 2020 | RON |
| worldchain | 480 | ETH |
| sei | 1329 | SEI |
| hyperevm | 999 | HYPE |
| katana | 747474 | ETH |
| somnia | 5031 | SOMI |
| plasma | 9745 | ETH |
| monad | 143 | MON |
| megaeth | 4326 | ETH |
| solana | — | SOL |

Use exact chain names as shown in prompts (e.g., `"base"` not `"Base"`, `"bsc"` not `"binance"`).

## x402 Payment Networks (14)

These chains accept USDC/USDM for x402 API payments ($0.20 per Tator request, $0.03 per QI scan). Base is recommended for lowest fees.

| Network | CAIP-2 ID | Token | Address |
|---------|-----------|-------|---------|
| Base | `eip155:8453` | USDC | [REDACTED_SECRET] |
| Ethereum | `eip155:1` | USDC | [REDACTED_SECRET] |
| Arbitrum | `eip155:42161` | USDC | [REDACTED_SECRET] |
| Optimism | `eip155:10` | USDC | [REDACTED_SECRET] |
| Polygon | `eip155:137` | USDC | [REDACTED_SECRET] |
| Avalanche | `eip155:43114` | USDC | [REDACTED_SECRET] |
| Unichain | `eip155:130` | USDC | [REDACTED_SECRET] |
| Linea | `eip155:59144` | USDC | [REDACTED_SECRET] |
| Sonic | `eip155:146` | USDC | [REDACTED_SECRET] |
| HyperEVM | `eip155:999` | USDC | [REDACTED_SECRET] |
| Ink | `eip155:57073` | USDC | [REDACTED_SECRET] |
| Monad | `eip155:143` | USDC | [REDACTED_SECRET] |
| MegaETH | `eip155:6342` | USDM | [REDACTED_SECRET] |
| Solana | `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` | USDC | Native USDC SPL |

## Quick Intel Scan Chains (63)

Quick Intel supports security scanning on these chains. Use exact names as shown in the `chain` field:

**EVM:** eth, base, arbitrum, optimism, polygon, bsc, avalanche, fantom, linea, scroll, zksync, blast, mantle, mode, zora, manta, sonic, berachain, unichain, abstract, monad, megaeth, hyperevm, shibarium, pulse, core, opbnb, polygonzkevm, metis, kava, klaytn, astar, oasis, iotex, conflux, canto, velas, grove, lightlink, bitrock, loop, besc, energi, maxx, degen, inevm, viction, nahmii, real, xlayer, worldchain, apechain, morph, ink, soneium, plasma

**Non-EVM:** solana, sui, radix, tron, injective

## Chain-Specific Notes

### Base (Chain ID: 8453)
- Default payment chain for x402 (lowest fees)
- Supports: Clanker token launching, Flaunch token launching, Basenames registration, Avantis perps
- Fast finality (~2 seconds)

### Solana
- Non-EVM — Base58 address format, different transaction structure
- Supports: Pump.fun token launching, SPL token swaps
- x402 payment uses SPL TransferChecked with gateway as feePayer

### Arbitrum (Chain ID: 42161)
- Highest DeFi liquidity among L2s
- Full Aave, Compound support
- 250ms block times

### HyperEVM (Chain ID: 999)
- Hyperliquid's EVM chain
- HYPE as native token
- x402 payment supported via USDC

### Monad (Chain ID: 143)
- High-performance EVM chain
- MON as native token
- x402 payment supported via USDC

### Sonic (Chain ID: 146)
- Fantom successor chain
- S as native token
- x402 payment supported via USDC

### MegaETH (Chain ID: 4326)
- Supports .mega name registration
- Uses USDM (not USDC) for x402 payments
- Emerging L2 with fast finality

### Somnia (Chain ID: 5031)
- Supports .somi name registration
- Gaming-focused L2

### Berachain (Chain ID: 80094)
- BERA as native token
- Proof of Liquidity consensus

## Bridge Protocol Support

Tator uses these bridges for cross-chain transfers:

| Protocol | Typical Time | Notes |
|----------|-------------|-------|
| Relay | 30s - 2 min | Fastest for most routes |
| LiFi | 1 - 15 min | Multi-protocol aggregator |
| GasZip | 1 - 5 min | Gas-efficient bridging |
| deBridge | 5 - 30 min | Deep liquidity routes |

## Yield Protocol Availability

| Protocol | Available Chains |
|----------|-----------------|
| Aave V3 | Ethereum, Base, Arbitrum, Optimism, Polygon, Avalanche |
| Morpho | Ethereum, Base |
| Compound V3 | Ethereum, Base, Arbitrum, Polygon |
| Yearn V3 | Ethereum |

## Perpetuals Availability

| Protocol | Chain | Assets |
|----------|-------|--------|
| Avantis | Base | ETH, BTC, SOL, and more |

## Prediction Markets

| Protocol | Chain | Market Types |
|----------|-------|--------------|
| Myriad | Multiple | Crypto, sports, politics |

## Token Launching

| Platform | Chains | Example |
|----------|--------|---------|
| Clanker | Base, Ethereum, Arbitrum, Unichain | "Launch MYTOKEN with symbol MTK on Clanker" |
| Flaunch | Base | "Launch MYTOKEN on Flaunch" |
| Pump.fun | Solana | "Launch MEME token on pump.fun" |

## Name Registration

| Service | Chain | Example |
|---------|-------|---------|
| Basenames | Base | "Register myname.base" |
| MegaETH Names | MegaETH | "Register myname.mega" |
| Somnia Names | Somnia | "Register myname.somi" |

path: references/REFERENCE.md
content: # Tator x402 Payment & Integration Reference

Complete implementation guide for all wallet types, payment flows, transaction verification, and advanced patterns. Most agents should start with SKILL.md — this reference is for manual integration, debugging, or advanced use cases.

> **⚠️ Security Notice:** For programmatic signing patterns (viem, ethers.js, Solana), refer to the x402 protocol documentation at https://www.x402.org. If you need to handle signing directly, **always use a dedicated hot wallet with minimal funds ($1-5 USDC)**. Never use your main wallet or any wallet holding significant assets. Managed wallet services (Sponge, AgentWallet, Vincent, Lobster.cash) are preferred as they never expose raw keys to your agent.

## x402 Payment Flow

```
1. POST to endpoint → 2. Get 402 response → 3. Sign payment → 4. Retry with header → 5. Get trade result
```

The 402 response contains a `PAYMENT-REQUIRED` header (base64 JSON) with accepted payment networks, amounts, and signing parameters.

## Payment Networks (14)

| Network | CAIP-2 ID | Token | Address |
|---------|-----------|-------|---------|
| Base | `eip155:8453` | USDC | [REDACTED_SECRET] |
| Ethereum | `eip155:1` | USDC | [REDACTED_SECRET] |
| Arbitrum | `eip155:42161` | USDC | [REDACTED_SECRET] |
| Optimism | `eip155:10` | USDC | [REDACTED_SECRET] |
| Polygon | `eip155:137` | USDC | [REDACTED_SECRET] |
| Avalanche | `eip155:43114` | USDC | [REDACTED_SECRET] |
| Unichain | `eip155:130` | USDC | [REDACTED_SECRET] |
| Linea | `eip155:59144` | USDC | [REDACTED_SECRET] |
| Sonic | `eip155:146` | USDC | [REDACTED_SECRET] |
| HyperEVM | `eip155:999` | USDC | [REDACTED_SECRET] |
| Ink | `eip155:57073` | USDC | [REDACTED_SECRET] |
| Monad | `eip155:143` | USDC | [REDACTED_SECRET] |
| MegaETH | `eip155:6342` | USDM | [REDACTED_SECRET] |
| Solana | `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` | USDC | Native USDC SPL |

**Cost:** $0.20 USDC/USDM (200000 atomic units with 6 decimals) on any network. Base recommended for lowest fees.

## PAYMENT-SIGNATURE Payload Structure (Critical)

### EVM Payload (Decoded from base64)

```json
{
  "x402Version": 2,
  "scheme": "exact",
  "network": "eip155:8453",
  "payload": {
    "signature": "0x804f6127...1b",
    "authorization": {
      "from": "0xYourWalletAddress",
      "to": "0xPayToAddressFrom402Response",
      "value": "200000",
      "validAfter": "0",
      "validBefore": "1771454085",
      "nonce": "0xa1b2c3d4...bytes32hex"
    }
  }
}
```

### Solana Payload (Decoded from base64)

```json
{
  "x402Version": 2,
  "scheme": "exact",
  "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
  "payload": {
    "transaction": "base64-encoded-partially-signed-solana-transaction"
  }
}
```

### Field Rules

| Field | Type | Notes |
|-------|------|-------|
| `x402Version` | Number | **Must be `2`** |
| `scheme` | String | Always `"exact"` |
| `network` | String | CAIP-2 ID from 402 response |
| `signature` | String | **Direct child of `payload`, NOT inside `authorization`** |
| `value` | String | **Decimal string** (e.g., `"200000"`) — not hex, not BigInt |
| `validAfter` | String | **Decimal string** Unix timestamp. Use `"0"` for immediate |
| `validBefore` | String | **Decimal string** Unix timestamp. Set ~1 hour future |
| `nonce` | String | `0x`-prefixed bytes32 hex. Must be unique per payment |

### Common Mistakes That Cause Payment Failures

**1. `signature` nested inside `authorization`**
```json
// ❌ WRONG — causes "Cannot read properties of undefined"
{ "payload": { "authorization": { "signature": "0x...", "from": "0x..." } } }

// ✅ CORRECT — signature is a SIBLING of authorization
{ "payload": { "signature": "0x...", "authorization": { "from": "0x..." } } }
```

**2. Missing `x402Version`**
```json
// ❌ WRONG
{ "scheme": "exact", "network": "eip155:8453", "payload": { ... } }

// ✅ CORRECT
{ "x402Version": 2, "scheme": "exact", "network": "eip155:8453", "payload": { ... } }
```

**3. Wrong value format**
```json
// ❌ WRONG — hex or raw numbers
{ "value": "0x30D40" }
{ "value": 200000 }

// ✅ CORRECT — decimal string
{ "value": "200000" }
```

**4. Wrong endpoint**
```
❌ /v1/tator/api/v1/prompt  (internal route)
✅ /v1/tator/prompt          (correct public endpoint)
```

## x402 Headers Reference

| Header | Direction | Description |
|--------|-----------|-------------|
| `PAYMENT-REQUIRED` | Response (402) | Base64 JSON with payment requirements |
| `PAYMENT-SIGNATURE` | Request (retry) | Base64 JSON with signed payment proof |
| `PAYMENT-RESPONSE` | Response (200) | Base64 JSON with settlement tx hash |

Legacy `X-PAYMENT` header accepted for v1 backward compatibility.

## Payment-Identifier (Idempotency)

At $0.20 per request, prevent double-charging on retries:

```javascript
const paymentPayload = {
  x402Version: 2,
  scheme: 'exact',
  network: 'eip155:8453',
  payload: { /* ... */ },
  extensions: {
    'payment-identifier': {
      paymentId: 'pay_' + crypto.randomUUID().replace(/-/g, '')
    }
  }
};
```

IDs must be 16-128 characters, alphanumeric with hyphens and underscores.

## Wallet Integration Patterns

### Pattern 1: Sponge Wallet (Recommended — No Raw Keys)

See SKILL.md Pattern A.

### Pattern 2: AgentWallet (No Raw Keys)

See SKILL.md Pattern B.

### Pattern 3: @x402/fetch (Programmatic Signing)

> For programmatic signing with `@x402/fetch`, `viem`, or `ethers.js`, refer to the x402 protocol documentation at https://www.x402.org and the EVM signing spec at https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_evm.md. Use the PAYMENT-SIGNATURE payload structure documented above in this file to construct the correct payment header. Always use a dedicated hot wallet with minimal funds.

### Pattern 4: Manual EVM Signing (viem / ethers.js)

For manual EVM signing, use the PAYMENT-SIGNATURE payload structure documented above and follow the x402 EVM signing spec: https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_evm.md

The flow is:
1. POST to the Tator endpoint → receive 402 with `PAYMENT-REQUIRED` header
2. Parse the `accepts` array to find your preferred network
3. Sign an EIP-712 `TransferWithAuthorization` message using the parameters from the 402 response
4. Build the PAYMENT-SIGNATURE payload (see structure above — note `signature` is a sibling of `authorization`)
5. Base64-encode the payload and retry the request with the `PAYMENT-SIGNATURE` header
6. Verify and sign the returned trade transactions

> ⚠️ Always use a dedicated hot wallet with minimal funds for x402 payments. Never use your main wallet.

### Pattern 5: Solana Wallet (SVM)

For Solana payment signing, use `@x402/svm` and `@x402/fetch`. The Solana flow differs from EVM — you build an SPL `TransferChecked` transaction with the gateway's `feePayer` address, partially sign it, and send it in the payload.

See the x402 SVM spec and `@x402/svm` package documentation for implementation details.

### Pattern 6: Vincent Wallet (heyvincent.ai)

```javascript
const paymentAuth = await vincent.createX402Payment({
  network: 'eip155:8453',
  amount: '200000',
  [REDACTED_SECRET]'
});

const response = await fetch('https://x402.quickintel.io/v1/tator/prompt', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'PAYMENT-SIGNATURE': paymentAuth.encoded
  },
  body: JSON.stringify({
    prompt: 'Bridge 50 USDC from Base to Arbitrum',
    walletAddress: vincentWalletAddress,
    provider: 'my-agent'
  })
});
const result = await response.json();
// Verify and broadcast via Vincent
```

### Other Compatible Wallets

Any wallet supporting x402 or EIP-3009 works, including Lobster.cash (Crossmint-powered agent wallets with Visa card integration). See their respective documentation.

## Transaction Verification Checklist

**Every transaction Tator returns should be inspected before signing.**

### Quick Checks (Every Time)

1. **`to` address** — Known DEX router, bridge contract, or the address YOU specified
2. **`value` field** — Matches your requested ETH/native amount (for ERC-20 swaps, usually `"0"`)
3. **Approval transactions** (`0x095ea7b3`) — Spender should be a known protocol contract
4. **`chainId`** — Matches the chain you requested
5. **`description`** — Aligns with your original prompt

### Deep Checks (Large Trades)

6. **Decode calldata** — Use openchain.xyz/signatures or 4byte.directory
7. **Verify contracts** — Look up `to` on block explorer (BaseScan, Etherscan, etc.)
8. **Simulate** — Use Tenderly, Blocknative, or wallet simulation

### Common Function Selectors

| Selector | Function |
|----------|----------|
| `0x095ea7b3` | `approve(address,uint256)` |
| `0x38ed1739` | `swapExactTokensForTokens` (Uniswap V2) |
| `0x5ae401dc` | `multicall` (Uniswap V3) |
| `0x3593564c` | `execute` (Uniswap Universal Router) |

### Automated Verification (For Agents)

```javascript
function verifyTatorTransaction(tx, originalPrompt, expectedChainId) {
  const warnings = [];

  if (tx.chainId !== expectedChainId) {
    warnings.push(`CHAIN MISMATCH: Expected ${expectedChainId}, got ${tx.chainId}`);
  }

  const MAX_VALUE_WEI = BigInt('1000000000000000000'); // 1 ETH
  if (BigInt(tx.value || '0') > MAX_VALUE_WEI) {
    warnings.push(`HIGH VALUE: ${tx.value} wei exceeds safety threshold`);
  }

  const KNOWN_ROUTERS = new Set([
    [REDACTED_SECRET], // Uniswap Universal Router (Base)
    [REDACTED_SECRET], // Uniswap V3 Router (Base)
    [REDACTED_SECRET], // Kyberswap (Base)
  ]);

  if (!KNOWN_ROUTERS.has(tx.to.toLowerCase())) {
    warnings.push(`UNKNOWN CONTRACT: ${tx.to} — verify on block explorer`);
  }

  if (tx.data?.startsWith('0x095ea7b3')) {
    const spender = '0x' + tx.data.slice(34, 74);
    if (!KNOWN_ROUTERS.has(spender.toLowerCase())) {
      warnings.push(`APPROVAL TO UNKNOWN SPENDER: ${spender}`);
    }
  }

  return { safe: warnings.length === 0, warnings };
}
```

> **For automated agents:** Never enable fully automatic signing without verification checks. Human-in-the-loop for high-value transactions is strongly recommended.

## Complete Example: Scan Then Buy

Pseudocode showing the recommended flow using your wallet integration of choice:

```
1. SCAN the token using quickintel-scan skill ($0.03)
   POST https://x402.quickintel.io/v1/scan/full
   Body: { chain: "base", tokenAddress: "0x..." }

2. CHECK scan results:
   - If is_Honeypot == true → STOP, do not buy
   - If has_Scams == true → STOP, do not buy
   - If liquidity == false → WARN, verify on DEX aggregator
   - If contract_Renounced == false → CAUTION, owner retains control

3. TRADE using Tator ($0.20)
   POST https://x402.quickintel.io/v1/tator/prompt
   Body: {
     prompt: "Buy 0.1 ETH worth of 0x... on base",
     walletAddress: "your-public-address",
     provider: "your-agent-name"
   }

4. VERIFY each returned transaction:
   - Check `to` address against known DEX routers
   - Check `value` matches your requested amount
   - Check `chainId` matches your requested chain
   - Check `description` aligns with your prompt

5. SIGN and broadcast each transaction in order

Total cost: $0.23 for a scanned, verified trade.
```

For working code implementations of this flow using Sponge or AgentWallet, combine Pattern A or B from SKILL.md with the quickintel-scan skill.

## Full Response Schema

### Transaction Response

```json
{
  "type": "transaction",
  "transactions": [
    {
      "to": "0xContractAddress",
      "data": "0xCalldata...",
      "value": "100000000000000000",
      "chainId": 8453,
      "description": "Buy PEPE with 0.1 ETH on Base"
    }
  ],
  "message": "Transaction ready. Sign and broadcast to complete."
}
```

### Info Response

```json
{
  "type": "info",
  "message": "PEPE is currently trading at $0.00001234 on Base.",
  "data": { "price": "0.00001234", "volume24h": "5200000" }
}
```

### Error Response

```json
{
  "type": "error",
  "message": "Insufficient balance.",
  "code": "INSUFFICIENT_BALANCE"
}
```

### Async Pending Response

```json
{
  "type": "pending",
  "jobId": "job_abc123",
  "message": "Request queued. Poll for result."
}
```

Poll (free): `GET https://x402.quickintel.io/v1/tator/jobs/{jobId}`

## Resources

- Tator Docs: https://docs.quickintel.io/tator
- x402 Protocol: https://www.x402.org
- x402 EVM Spec: https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_evm.md
- Gateway Discovery: https://x402.quickintel.io/accepted
- Quick Intel: https://quickintel.io
- Support: https://t.me/tatortrader

Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)