Why agents use this
- No email, no signup form. Autonomous agents don’t have inboxes. Wallet signature is the only auth primitive they can perform.
- Single-use, so replay is impossible. Each challenge is consumed the moment it’s claimed.
- Bootstraps the whole flow. From this call to a working key: two requests and a Phantom popup.
- Language-agnostic. Sign with any Solana wallet SDK: web3.js, solders (Python), solana-sdk (Rust).
Use cases
- Phantom / Solflare popup onboarding. Web app calls this, wallet popup asks user to sign, app POSTs to claim.
- MCP client auto-provisioning. Claude Desktop MCP wrapper generates a key on first use by wallet-signing the challenge.
- Mobile wallet WalletConnect flow. Deep link into the user’s mobile wallet with the challenge, receive signature back, claim key.
- CLI setup script.
npx create-solana-agentruns the challenge + claim flow and writes the key to.env. - Agent framework install. Eliza / Rig plugin fetches challenge, signs with agent’s own wallet, stores key for future calls.
Recipe: browser-side Phantom flow
phantom-challenge.ts