For the complete documentation index, see llms.txt. This page is also available as Markdown.

Auth

Authenticate user with BIP322 signature verification

post

Authenticates a user by verifying their BIP322 signature and creates a wallet with JWT tokens

Body
messagestringRequired

The message that was signed

Example: Sign this message to authenticate with the system
signaturestringRequired

The BIP322 signature of the message

Example: base64-encoded-signature
addressstringRequired

The Bitcoin address that signed the message

Example: bc1p...
publicKeystringRequired

The public key used for signing

Example: 02a1b2c3d4e5f6...
Responses
200

User authenticated successfully

application/json
codestringRequiredExample: 1
messagestringRequiredExample: common.success
dataobjectRequired
post/api/auth/authenticate

Refresh access token using refresh token

post
Body
refreshTokenstringRequired

Refresh token to generate new access token

Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Responses
200

New access token and rotated refresh token generated successfully

No content

post/api/auth/refresh-token

No content

Get WebAuthn challenge for passkey registration or login

get
Responses
200Success

No content

get/api/auth/webauthn/challenge
200Success

No content

Request email OTP for registration — sends a 6-digit code to the given email address

post
Body
emailstringRequired

Email address to send OTP to

Responses
200

OTP queued

No content

post/api/auth/email-verification/request

No content

Register a new bound wallet account

post
Body
emailstringOptional

Required for SRP. Optional for passkey/wallet; validated when present.

otpstringOptional

Email OTP. Required whenever an email is supplied (any authType).

authTypestring · enumRequiredPossible values:
referralCodestringOptional

Referral code (base64url-encoded referrer accountId). Throws if invalid.

Responses
201

Account registered successfully

No content

post/api/auth/register
201

Account registered successfully

No content

Login with passkey or password

post
Body
credentialIdstringRequired
challengeIdstringRequired
Responses
200

Login successful

No content

post/api/auth/passkey/login
200

Login successful

No content

SRP step 1 — get salt and server public key

post

Client sends email. Server returns salt and serverPublic (B) for SRP-6a authentication.

Body
emailstringRequired

Account email

Responses
200

Returns sessionId, salt, and serverPublic (B)

No content

post/api/auth/srp/init
200

Returns sessionId, salt, and serverPublic (B)

No content

Logout — revoke current session and refresh token

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

Logged out successfully

No content

post/api/auth/logout
200

Logged out successfully

No content

SRP step 2 — verify client proof and complete login

post

Client sends clientPublic (A) and clientProof (M1). Server verifies and returns serverProof (M2) plus tokens.

Body
sessionIdstringRequired

Session ID returned by srp/init

clientPublicstringRequired

Client ephemeral public key A = g^a mod N (base64)

clientProofstringRequired

Client proof M1 = H(H(N)⊕H(g) || H(I) || salt || A || B || K) (base64)

Responses
200

Login successful — returns serverProof, tokens, and encryptedBlob

No content

post/api/auth/srp/verify
200

Login successful — returns serverProof, tokens, and encryptedBlob

No content

Wallet auth — issue a fresh login nonce for an auth wallet address

get
Query parameters
addressstringRequired

Auth wallet address to issue a login nonce for

Responses
200

Returns challengeId, challenge (nonce), expiresAt

No content

get/api/auth/wallet/challenge
200

Returns challengeId, challenge (nonce), expiresAt

No content

Wallet auth — log in by signing the issued nonce

post
Body
addressstringRequired

Registered auth wallet address

challengeIdstringRequired

challengeId from GET /auth/wallet/challenge

signaturestringRequired

Wallet signature over the issued server nonce

Responses
200

Login successful — tokens, encryptedBlob, account, wallets

No content

post/api/auth/wallet/login
200

Login successful — tokens, encryptedBlob, account, wallets

No content

2FA TOTP verify — exchange pending token + OTP code for full JWT pair

post

Accepts the pendingToken returned by srp/verify when 2FA is enabled, plus the current TOTP code. Returns the full login response.

Body
object · TotpVerifyDtoOptional
Responses
200

OTP verified — returns accessToken, refreshToken, encryptedBlob, account, wallets

No content

post/api/auth/2fa/verify

No content

Last updated