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

MethodDurationUse Case
API KeyPermanentServer-to-server, CI/CD, backend apps
JWT Session24 hoursWeb apps, dashboards, interactive use
Inference Pass30 days / N requestsPrepaid access, agent wallets
x402 (no auth)Per requestWallet-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

ChainSignatureVerification
Solanaed25519nacl.sign.detached.verify
Base / EVMsecp256k1 (EIP-191)viem recoverMessageAddress

Endpoints

MethodEndpointDescription
GET/api/siwx/challengeGet nonce + sign message
POST/api/siwx/sessionCreate JWT session from signed message
POST/api/siwx/pass/purchaseBuy inference pass (N requests / 30 days)
GET/api/siwx/pass/statusCheck pass remaining requests