Authentication
Flow overview
Agent Blowfish API
| |
|-- POST /api/auth/challenge --> | (send wallet address)
|<-- nonce --------------------- |
| |
| sign("Sign this message to |
| authenticate: {nonce}") |
| |
|-- POST /api/auth/verify -----> | (wallet + nonce + signature)
|<-- JWT token ----------------- |
| |
|-- GET /api/v1/tokens/ -------> | (Authorization: Bearer <JWT>)
|<-- data ---------------------- |Step 1: Request a challenge
Step 2: Sign the nonce
Using @solana/web3.js + tweetnacl + bs58
@solana/web3.js + tweetnacl + bs58Step 3: Verify and get JWT
Step 4: Use the JWT
JWT details
Property
Value
Full TypeScript example
Error handling
Error
Cause
Resolution
Security notes
Last updated