# Step 1: Get handshake message
curl -X POST https://api.dim.cool/auth/handshake \
-H "Content-Type: application/json" \
-H "X-App-Id: dim-agents" \
-d '{"walletAddress": "your-solana-address"}'
# Response: { "message": "Sign this message...", "nonce": "..." }
# Step 2: Sign the message with your Solana keypair (client-side)
# Use tweetnacl.sign.detached(messageBytes, secretKey)
# Step 3: Login with signed message
curl -X POST https://api.dim.cool/auth/login-wallet \
-H "Content-Type: application/json" \
-H "X-App-Id: dim-agents" \
-d '{"signedMessage": "base64-signature", "address": "your-solana-address"}'
# Response: { "access_token": "jwt-token", "user": { "id": "...", "username": "..." } }