# Agent curl flow — production OpenAPI purchase path

API base: `https://api.sima-prime.com`

```bash
# 1. Wallet nonce
curl -s -X POST "$API_BASE_URL/agent/wallet/nonce" \
  -H "Content-Type: application/json" \
  -d '{"chain":"SOLANA","walletAddress":"YOUR_WALLET_ADDRESS"}'

# 2. Verify (after signing message outside curl)
curl -s -X POST "$API_BASE_URL/agent/wallet/verify" \
  -H "Content-Type: application/json" \
  -d '{"chain":"SOLANA","walletAddress":"YOUR_WALLET_ADDRESS","message":"SIGNED_MESSAGE","signature":"YOUR_SIGNATURE"}'

# 3. Protection offer (asset-denominated)
curl -s -X POST "$API_BASE_URL/agent/protection/offer" \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "chain":"SOLANA",
    "walletAddress":"YOUR_WALLET_ADDRESS",
    "assetAddress":"YOUR_ASSET_ADDRESS",
    "assetSymbol":"EXAMPLE",
    "assetType":"TOKEN",
    "protectedAmount":"1000"
  }'

# 4. Purchase
curl -s -X POST "$API_BASE_URL/agent/protection/purchase" \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "chain":"SOLANA",
    "walletAddress":"YOUR_WALLET_ADDRESS",
    "assetAddress":"YOUR_ASSET_ADDRESS",
    "assetType":"TOKEN",
    "protectedAmount":"1000",
    "offerId":"OFFER_UUID",
    "protectionDecision":"PURCHASE_PROTECTION"
  }'

# 5. Payment intent
curl -s "$API_BASE_URL/agent/protection/certificates/CERT_UUID/payment-intent" \
  -H "Authorization: Bearer ACCESS_TOKEN"

# 6. Caller sends SOL on-chain, then confirm
curl -s -X POST "$API_BASE_URL/agent/protection/certificates/CERT_UUID/confirm-payment" \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"paymentReference":"PAYMENT_REF","transactionSignature":"ON_CHAIN_SIG"}'
```
