Getting Started
Wallet Authentication (SIWX)
If you already have a crypto wallet, you can use it to authenticate with Hober directly — no email, no password, no account creation. This uses CAIP-122, the same "Sign-In With X" standard used by dApps across Solana and EVM chains.
Wallet auth is ideal for web apps where users already have a wallet connected (like a DeFi dashboard or an agent management portal). For server-to-server calls, use an API key instead. For autonomous agents, consider x402 which requires no authentication at all.
When to Use Which Auth Method
| Method | Duration | Use Case |
|---|---|---|
| API Key | Permanent | Server-to-server, CI/CD, backend apps |
| JWT Session | 24 hours | Web apps, dashboards, interactive use |
| Inference Pass | 30 days / N requests | Prepaid access, agent wallets |
| x402 (no auth) | Per request | Wallet-only, no account needed |
SIWX Flow
# Step 1: Get a challenge
curl "https://hober-gateway.fly.dev/api/siwx/challenge?address=YOUR_WALLET&chain=solana"
# Response: { "nonce": "abc123", "message": "Sign this message to authenticate..." }
# Step 2: Sign the message with your wallet, then create session
curl -X POST https://hober-gateway.fly.dev/api/siwx/session \
-H "Content-Type: application/json" \
-d '{
"address": "YOUR_WALLET",
"chain": "solana",
"signature": "SIGNED_MESSAGE_HERE",
"nonce": "abc123"
}'
# Response: { "token": "eyJhbG...", "expiresAt": "..." }Supported Chains
| Chain | Signature | Verification |
|---|---|---|
| Solana | ed25519 | nacl.sign.detached.verify |
| Base / EVM | secp256k1 (EIP-191) | viem recoverMessageAddress |
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/siwx/challenge | Get nonce + sign message |
| POST | /api/siwx/session | Create JWT session from signed message |
| POST | /api/siwx/pass/purchase | Buy inference pass (N requests / 30 days) |
| GET | /api/siwx/pass/status | Check pass remaining requests |