{
  "name": "Bank of Clawd",
  "description": "Financial infrastructure for AI agents on Solana. Provides banking (checking, savings), yield earning via Kamino Finance, collateral-based credit, x402 agent-to-agent payments, and credit lines. Agents can deposit/withdraw USDC and SOL, earn yield, borrow against savings, and make payments to other agents.",
  "version": "1.0.0",
  "instructions": {
    "message": "To open a Bank of Clawd account and start banking, fetch the onboarding endpoint below.",
    "fetch": "https://bankofclawd.com/api/v1/agent/onboard",
    "method": "GET",
    "returns": "Step-by-step instructions for wallet authentication, depositing funds, and using all banking services"
  },
  "url": "https://bankofclawd.com/api/v1/agent",
  "protocolVersion": "0.3.0",
  "preferredTransport": "HTTP",
  "provider": {
    "name": "Bank of Clawd",
    "url": "https://bankofclawd.com",
    "contact": "https://x.com/bankofclawd"
  },
  "capabilities": {
    "streaming": false,
    "pushNotifications": false,
    "multiTurn": false
  },
  "defaultInputModes": ["application/json"],
  "defaultOutputModes": ["application/json"],
  "authentication": {
    "schemes": ["wallet_signature"],
    "description": "Sign a challenge message with your Solana wallet private key to receive a JWT token",
    "flow": {
      "step1": {
        "method": "POST",
        "endpoint": "/auth/challenge",
        "body": { "wallet": "YOUR_SOLANA_WALLET_ADDRESS" },
        "returns": { "challenge": "string", "expiresIn": 300 }
      },
      "step2": {
        "action": "Sign the challenge message using nacl.sign.detached() with your wallet private key"
      },
      "step3": {
        "method": "POST",
        "endpoint": "/auth/verify",
        "body": {
          "wallet": "YOUR_WALLET_ADDRESS",
          "signature": "BASE58_ENCODED_SIGNATURE",
          "message": "THE_CHALLENGE_MESSAGE"
        },
        "returns": { "token": "JWT_TOKEN", "expiresIn": 86400 }
      }
    },
    "tokenHeader": "Authorization: Bearer <token>",
    "tokenExpiry": "24 hours"
  },
  "skills": [
    {
      "id": "get_account",
      "name": "Get Account",
      "description": "Get your agent bank account overview including checking, savings, and collateral balances",
      "tags": ["banking", "account", "balance"],
      "endpoint": "GET /account",
      "authRequired": true
    },
    {
      "id": "deposit",
      "name": "Deposit Funds",
      "description": "Record a deposit to checking account. Send funds to treasury on-chain first, then call this with the tx signature.",
      "tags": ["banking", "deposit"],
      "endpoint": "POST /account/deposit",
      "authRequired": true,
      "parameters": {
        "amount": { "type": "number", "required": true },
        "token": { "type": "string", "enum": ["USDC", "SOL"], "required": true },
        "tx_signature": { "type": "string", "required": true }
      }
    },
    {
      "id": "withdraw",
      "name": "Withdraw Funds",
      "description": "Request withdrawal from checking account. Daily limit: $1000 USD equivalent.",
      "tags": ["banking", "withdraw"],
      "endpoint": "POST /account/withdraw",
      "authRequired": true,
      "parameters": {
        "amount": { "type": "number", "required": true },
        "token": { "type": "string", "enum": ["USDC", "SOL"], "required": true },
        "destination": { "type": "string", "required": false }
      }
    },
    {
      "id": "deposit_to_savings",
      "name": "Deposit to Savings",
      "description": "Move funds from checking to savings account to earn yield via Kamino Finance. USDC ~1.7% APY, SOL ~5.2% APY.",
      "tags": ["savings", "yield", "kamino"],
      "endpoint": "POST /account/savings/deposit",
      "authRequired": true,
      "parameters": {
        "amount": { "type": "number", "required": true },
        "token": { "type": "string", "enum": ["USDC", "SOL"], "required": true }
      }
    },
    {
      "id": "withdraw_from_savings",
      "name": "Withdraw from Savings",
      "description": "Move funds from savings back to checking. Must maintain collateral if you have a loan.",
      "tags": ["savings", "withdraw"],
      "endpoint": "POST /account/savings/withdraw",
      "authRequired": true,
      "parameters": {
        "amount": { "type": "number", "required": true },
        "token": { "type": "string", "enum": ["USDC", "SOL"], "required": true }
      }
    },
    {
      "id": "borrow_against_savings",
      "name": "Borrow Against Savings",
      "description": "Instantly borrow USDC against your savings. No application needed. Max 70% LTV at 8% APR.",
      "tags": ["credit", "collateral", "borrow", "instant"],
      "endpoint": "POST /account/collateral/borrow",
      "authRequired": true,
      "parameters": {
        "amount": { "type": "number", "required": true, "description": "USDC amount to borrow" }
      }
    },
    {
      "id": "repay_collateral_loan",
      "name": "Repay Collateral Loan",
      "description": "Repay your collateral loan from checking balance",
      "tags": ["credit", "repay"],
      "endpoint": "POST /account/collateral/repay",
      "authRequired": true,
      "parameters": {
        "amount": { "type": "number", "required": true }
      }
    },
    {
      "id": "x402_pay",
      "name": "x402 Payment",
      "description": "Pay an external service via x402 protocol. Deducts from checking and returns receipt for retry.",
      "tags": ["x402", "payment", "agent-to-agent"],
      "endpoint": "POST /account/x402/pay",
      "authRequired": true,
      "parameters": {
        "recipient": { "type": "string", "required": true, "description": "Solana wallet address" },
        "amount": { "type": "number", "required": true },
        "token": { "type": "string", "enum": ["USDC", "SOL"], "required": true },
        "service_url": { "type": "string", "required": false },
        "memo": { "type": "string", "required": false }
      }
    },
    {
      "id": "x402_receive",
      "name": "x402 Receive Payment",
      "description": "Verify and credit an incoming x402 payment to your checking account",
      "tags": ["x402", "receive"],
      "endpoint": "POST /account/x402/receive",
      "authRequired": true,
      "parameters": {
        "tx_signature": { "type": "string", "required": true }
      }
    },
    {
      "id": "get_credit_profile",
      "name": "Get Credit Profile",
      "description": "Get your agent credit score (300-850), risk category, and credit limit",
      "tags": ["credit", "profile", "score"],
      "endpoint": "GET /profile",
      "authRequired": true
    },
    {
      "id": "check_eligibility",
      "name": "Check Loan Eligibility",
      "description": "Check if you're eligible for an uncollateralized loan and get suggested terms",
      "tags": ["credit", "eligibility", "loan"],
      "endpoint": "GET /eligibility",
      "authRequired": true,
      "parameters": {
        "amount": { "type": "number", "required": false },
        "purpose": {
          "type": "string",
          "required": false,
          "enum": ["task", "working_capital", "liquidity_provision", "trading"]
        }
      }
    },
    {
      "id": "apply_for_loan",
      "name": "Apply for Loan",
      "description": "Apply for an uncollateralized credit line. Requires human review. APR 18-65%, credit lines $100-$10,000.",
      "tags": ["credit", "loan", "apply"],
      "endpoint": "POST /loans",
      "authRequired": true,
      "parameters": {
        "amount": { "type": "number", "required": true, "description": "Loan amount in USDC" },
        "purpose": {
          "type": "string",
          "required": true,
          "enum": ["task", "working_capital", "liquidity_provision", "trading"]
        },
        "duration": { "type": "number", "required": true, "description": "Duration in days" }
      }
    },
    {
      "id": "list_loans",
      "name": "List Loans",
      "description": "Get all your loans with status and balances",
      "tags": ["credit", "loans", "list"],
      "endpoint": "GET /loans",
      "authRequired": true
    },
    {
      "id": "repay_loan",
      "name": "Repay Loan",
      "description": "Make a repayment on an uncollateralized loan",
      "tags": ["credit", "repay"],
      "endpoint": "POST /loans/{id}/repay",
      "authRequired": true,
      "parameters": {
        "amount": { "type": "number", "required": true }
      }
    }
  ],
  "treasury": {
    "address": "G3siTv4xEEo9i3UJgnPaVq3TbyGeyNLATk74VvKXaadV",
    "network": "solana-mainnet",
    "tokens": ["USDC", "SOL"]
  },
  "mcp": {
    "endpoint": "https://bankofclawd.com/api/mcp",
    "protocol": "JSON-RPC 2.0",
    "methods": ["initialize", "tools/list", "tools/call"],
    "description": "MCP server for native tool discovery and execution"
  },
  "documentation": {
    "onboard": "https://bankofclawd.com/api/v1/agent/onboard",
    "skills": "https://bankofclawd.com/api/v1/skills",
    "openapi": "https://bankofclawd.com/.well-known/openapi.json",
    "human_docs": "https://bankofclawd.com/docs"
  },
  "contact": {
    "twitter": "https://x.com/bankofclawd",
    "website": "https://bankofclawd.com"
  }
}
