{"success":true,"data":{"prompt":"# ONE Protocol - Payment Infrastructure for AI Agents\n\nYou can accept crypto payments and OWN the wallets (you get the private keys).\nStart accepting payments in 60 seconds with zero upfront cost.\n\n---\n\n## 🚀 QUICK START: 3 Steps to Accept Payments\n\n### Step 1: Generate Your Wallet Locally (You Hold the Keys)\n\nGenerate a keypair in your own runtime. The server never derives, sees, or returns a private key.\n\n```ts\nimport { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';\nconst keypair = new Ed25519Keypair();\nconst address = keypair.toSuiAddress();       // your public Sui address\nconst suiPrivateKey = keypair.getSecretKey(); // stays in YOUR process — never sent anywhere\n```\n\n⚠️ **CRITICAL: The private key lives only in your runtime. Store it yourself. No server can recover it for you.**\n\n---\n\n### Step 2: Create a Payment Link\n\nUse your wallet addresses as treasury addresses, and use the evmPrivateKey as merchantKey:\n\n```bash\ncurl -X POST https://pay.one.ie \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"protocol\": \"payment_link_create\",\n    \"data\": {\n      \"amount\": 999,\n      \"unit\": \"usd\",\n      \"product\": \"AI Agent Service\",\n      \"merchantSlug\": \"my-ai-agent\",\n      \"merchantKey\": \"YOUR_EVM_PRIVATE_KEY\",\n      \"chains\": [\"SUI\"],\n      \"treasuries\": {\n        \"SUI\": \"YOUR_SUI_ADDRESS\"\n      }\n    }\n  }'\n```\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"url\": \"https://pay.one.ie/l/eyJ2IjoxLCJtIjo...LONG_ENCODED_LINK\",\n    \"short\": \"https://pay.one.ie/s/AbC12345\",\n    \"shortCode\": \"AbC12345\",\n    \"decoded\": {\n      \"a\": 999,\n      \"u\": \"usd\",\n      \"p\": \"AI Agent Service\",\n      \"c\": [\"SUI\"],\n      \"t\": {\"SUI\": \"0x...\"}\n    }\n  }\n}\n```\n\n---\n\n### Step 3: Share the Payment Link\n\nSend the **url** (long form) to your customer. They'll see a beautiful checkout page showing:\n- Your product name\n- Price in USD ($9.99)\n- Payment options (SUI, ETH, SOL, etc.)\n- Your wallet address to receive payment\n\n**Customer pays → Crypto arrives in YOUR wallet → You own the private key → You can withdraw anytime**\n\n---\n\n## 💡 IMPORTANT CONCEPTS\n\n### You OWN the Wallet\nUnlike traditional payment processors, YOU control the private keys:\n- Generate wallet → Get private keys\n- Customer pays → Funds go to your address\n- You access funds → Using your private key\n- No intermediary, no custody, no approval needed\n\n### Payment Link is Self-Contained\nThe payment link URL contains ALL the configuration:\n- Product name, price, chains\n- Your wallet addresses (treasuries)\n- Cryptographic signature (merchantKey)\n- No database needed - the link IS the config\n\n### Multiple Chains (Upgrade for More)\n- **FREE**: 1 wallet, SUI only\n- **STARTER ($9/mo)**: 3 wallets, SUI/ETH/SOL\n- **PRO ($29/mo)**: 6 wallets, all major chains\n- **UNLIMITED ($99/mo)**: Unlimited wallets and chains\n\n---\n\n## 📋 COMPLETE EXAMPLE (Copy-Paste Ready)\n\n```bash\n#!/bin/bash\n# AI Agent Payment Setup Script\nBASE=\"https://pay.one.ie\"\n\n# Step 1: Generate a wallet LOCALLY (keys never touch the server)\n# Use any keypair library in your own runtime, e.g. Node/Bun:\n#   import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';\n#   const kp = new Ed25519Keypair();\n#   const SUI_ADDRESS = kp.toSuiAddress();\n#   const SUI_KEY = kp.getSecretKey();  // keep this in your own secret store\necho \"Generate your keypair locally, then set SUI_ADDRESS to its public address.\"\n\n# Step 2: Create payment link for $9.99\necho \"\"\necho \"Creating payment link...\"\nLINK=$(curl -s -X POST \"$BASE\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\n    \\\"protocol\\\": \\\"payment_link_create\\\",\n    \\\"data\\\": {\n      \\\"amount\\\": 999,\n      \\\"unit\\\": \\\"usd\\\",\n      \\\"product\\\": \\\"AI Premium Access\\\",\n      \\\"merchantSlug\\\": \\\"my-agent\\\",\n      \\\"merchantKey\\\": \\\"$EVM_KEY\\\",\n      \\\"chains\\\": [\\\"SUI\\\"],\n      \\\"treasuries\\\": {\\\"SUI\\\": \\\"$SUI_ADDRESS\\\"}\n    }\n  }\")\n\nPAYMENT_URL=$(echo \"$LINK\" | jq -r '.data.url')\necho \"\"\necho \"✅ Payment Link: $PAYMENT_URL\"\necho \"\"\necho \"Share this link with customers!\"\n```\n\n---\n\n## 🔧 API REFERENCE\n\n**Endpoint:** POST https://pay.one.ie\n**Format:** `{ \"protocol\": \"name\", \"data\": {...} }`\n\n### Essential Protocols\n\n| Protocol | What it does |\n|----------|--------------|\n| `payment_link_create` | Create payment link with your wallets |\n| `prices_get` | Get current crypto prices |\n| `agent_tiers` | See pricing tiers |\n\n### payment_link_create\n```json\n{\n  \"protocol\": \"payment_link_create\",\n  \"data\": {\n    \"amount\": 999,\n    \"unit\": \"usd\",\n    \"product\": \"Product Name\",\n    \"merchantSlug\": \"your-id\",\n    \"merchantKey\": \"your-evm-private-key\",\n    \"chains\": [\"SUI\", \"ETH\", \"SOL\"],\n    \"treasuries\": {\n      \"SUI\": \"your-sui-address\",\n      \"ETH\": \"your-evm-address\",\n      \"SOL\": \"your-solana-address\"\n    }\n  }\n}\n```\n\n### prices_get\n```json\n{\"protocol\": \"prices_get\", \"data\": {\"symbols\": [\"SUI\", \"ETH\", \"SOL\"]}}\n```\nReturns current USD prices for each crypto\n\n---\n\n## ⚠️ ERROR CODES\n\n| Code | Meaning |\n|------|---------|\n| VALIDATION_ERROR | Invalid input - check format |\n| NOT_FOUND | Resource not found |\n| QUOTA_EXCEEDED | Upgrade tier for more |\n| INTERNAL_ERROR | Retry request |\n\n---\n\n## 🔗 MORE INFO\n\n- Protocol details: GET https://pay.one.ie/protocol/{name}\n- All protocols: GET https://pay.one.ie/protocols\n- Prices: POST with `prices_get` protocol\n\n**Start now: Generate a wallet and create your first payment link!**","endpoint":"https://pay.one.ie","method":"POST","format":"{ \"protocol\": \"name\", \"data\": {...} }","capabilities":{"payments":["x402_quote","x402_claim","payment_link_create","payment_link_quote","payment_link_claim"],"identity":["merchant_config","merchant_stats","identity_derive","identity_nonce","identity_resolve","group_create","group_get","group_list","person_create","person_get","person_update","thing_create","thing_get","thing_list","connection_create","connection_get","connection_list","connection_update","event_log","event_list","knowledge_add","knowledge_search","journey_advance","course_enroll","lesson_complete","token_rewards","credential_issue","credential_verify","credential_list","skill_add","skill_verify"],"access":["gatekeeper_check","gatekeeper_tier","access_sign","access_verify"],"subscriptions":["subscription_status","subscription_plan","subscription_verify"],"credits":["credits_balance","credits_ledger"],"prices":["prices_get","prices_convert"],"agents":["agent_onboard","agent_upgrade","agent_status","agent_tiers","agent_challenge","agent_token","spend_cap_register","wallet_mint","product_create","subscription_create","gas_fund","rpc_access_grant"]},"moreInfo":"GET https://pay.one.ie/protocol/{name}","protocolCount":66},"meta":{"protocol":"system_discovery","version":"1.0","requestId":"e20ec3b1-bcd0-48d2-b752-d4bf5bef5c2d","latencyMs":0}}