Skip to main content

BIP-322 Wallet Auth

OrdsBot uses BIP-322 message signing — the Bitcoin standard for proving address ownership without exposing private keys. The flow:
Challenges expire after 5 minutes. Sessions are server-side and invalidated on logout.

Beta Whitelist

During beta, only whitelisted addresses can sign in. If an address is not whitelisted, the challenge endpoint returns 403 with:
Admin addresses (configured in server settings) bypass the whitelist.

Session Token

After successful verification, the server returns a session token. Include it in requests as a Bearer token:

Endpoints

POST /api/auth/challenge

Request a sign-in challenge for a Bitcoin address. Request:
Response:

POST /api/auth/verify

Submit the signed challenge to create a session. Request:
Response:

POST /api/auth/logout

Invalidate the current session. Requires auth.

GET /api/auth/me

Returns the current user’s profile, plan details, and usage stats. Requires auth. Response: