Production: https://vip.betbitsports.com/api
Most endpoints require a JWT Bearer token in the Authorization header:
Copy Authorization: Bearer <jwt_token> Tokens are issued on signup and login.
Returns server status. No authentication required.
Response:
Copy {
" status " : " ok " ,
" timestamp " : " 2026-03-09T12:00:00.000Z "
} Sign Up
Creates a new user account.
Body:
Response: User object + JWT token.
Login
Body:
Response: User object + JWT token + wallet credentials (if linked).
Link Wallet
Links a smart wallet address and passkey credentials to the authenticated user. Called after passkey registration.
Body:
Create Wager Metadata
Stores off-chain metadata and generates a shareable link. Called before the on-chain createWager transaction.
Body:
Response:
Get Wager
Returns wager metadata merged with on-chain state.
Link On-Chain Wager ID
After the on-chain createWager transaction confirms, links the real wagerId to the metadata.
Body:
Submit Outcome Description
Stores an optional text description alongside the on-chain outcome submission.
Body:
Get Invite
Returns wager details for the shareable invite page. No authentication required.
Get User Profile
Update User Profile
Body:
Database Schema
The backend stores six tables of off-chain data:
users: Wallet address, passkey credentials, email, display name, notification preferences
wager_metadata: Descriptions, metadata hash (matches on-chain keccak256), creator address, deadlines
shareable_links: Invite slugs mapped to wager IDs with signed tokens
mediator_tokens: Time-limited, address-bound tokens for dispute resolution
outcome_descriptions: Optional text descriptions accompanying outcome submissions
notification_log: Audit trail for notifications sent across channels
All API endpoints are rate-limited per IP. Authentication endpoints have stricter limits to prevent brute force attacks. Rate limit responses return HTTP 429.
Last updated 7 minutes ago