Wallet API

Document key endpoints for initiating 2FA-bound transactions, querying wallet profiles, and subscribing to device auth events. Include cURL, JavaScript, and Python snippets once endpoints are finalized.

Planned Endpoints

  • POST /v1/wallets/{id}/transactions — create a transaction request bound to validator 2FA shards.
  • GET /v1/wallets/{id} — fetch balances, staking positions, and device registrations.
  • POST /v1/devices/register — enroll or rotate hardware factors.
  • GET /v1/events/stream — SSE/WebSocket feed for confirmations.

Image placeholder: diagram showing user → wallet extension → validators. Reuse qp_wallet.png as background.

Sample Transaction Initiation

curl -X POST https://api.quantumproof.example/v1/wallets/<WALLET_ID>/transactions \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
        "asset": "QP",
        "amount": "1250",
        "destination": "qp1r0x...secur3",
        "memo": "Treasury Top-up",
        "2fa": {"device_id": "ledger-01"}
      }'

Add language tabs (JS/Python) and error payload examples during full draft.