Wallet authentication
CIP-30 flow
- The frontend connects a wallet and gets the payment address and key hash.
- The backend creates a nonce-bound challenge.
- The wallet signs the exact challenge payload with
signData. - The backend verifies:
- address network
- payment key hash
- challenge binding
- expiry and one-time use
- signature
- The backend creates a session or applies the authenticated action.
Rules
- Only payment-key addresses are accepted.
- Never ask for a seed phrase or private key.
- Bind the payload to the intended host, purpose, address and key hash.
- Use one-time challenges and expiry.