User Flow & Gateway
This page walks the runtime path of a session on the hosted platform — from connecting a wallet to running GPU workloads — and how the gate, scheduler, and billing loop interact. For the static component map, see Architecture.
1. Wallet authentication and credits
Users prove wallet ownership with an EIP-191 challenge signature. Once authenticated, the gate returns the user's ledger balance and any applicable AXGT holder tier. A first-time hosted user then selects USDC, ETH, or AXGT when enabled, enters an amount, and reviews server-calculated credits and runtime before approving the transaction.
Connect wallet
The UI requests a challenge: GET /api/auth/challenge?wallet_address=0x….
Sign the challenge
The wallet signs with personal_sign; the gate verifies the signature matches the
address and issues an auth token.
Choose a payment and review the quote
The payment wizard requests server-side pricing, applies the supported holder tier or direct AXGT bonus, and shows credits and estimated runtime. The browser never supplies the trusted price.
Deposit & verify
After wallet approval, the gate verifies sender, recipient, amount, status, and confirmations, then credits the ledger once. Automatic polling is bounded; the transaction-hash Credit deposit flow recovers an interrupted or long-pending verification.
User → UI: Connect wallet
UI → Gate: GET /api/auth/challenge?wallet_address=0x…
Gate → UI: signed challenge message
User → UI: personal_sign(challenge)
UI → Gate: POST /api/auth/verify-wallet (signature) → auth token
UI → Gate: GET /api/discount/quote?wallet_address=0x…
Gate → Eth: balanceOf(wallet) → AXGT balance
Gate → UI: discount quote (min ETH, expected minutes)
User → Chain: approve selected ETH or ERC-20 payment → tx_hash
UI → Gate: submit tx_hash for server-side verification
bounded poll: Gate → Chain: transaction/log + confirmations
Gate → DB: record verified tx, credit minutes
Gate → UI: verified: true, remaining_minutes
2. GPU session scheduler
The hosted launcher lets the user choose a browser desktop or SSH-only session, then a resource
profile (Small / Medium / Large / Max). An SSH-only claim returns a generated command using the
hosted SSH hostname axonconsole.io and a per-session assigned port; users copy that exact command
rather than browsing to the hostname. The scheduler uses short atomic reservations to assign
physical GPUs exclusively. If capacity is not
available, the claim returns immediately; the current launcher has no global automatic-start queue.
User → UI: Claim session (profile)
UI → SM: POST /api/session/claim (requested_profile)
SM → DB: query remaining_minutes
if credits insufficient → error
else if free GPUs ≥ profile GPUs:
SM assigns exclusive GPU IDs
SM → SL: launch session
SL → Docker: run --gpus '"device=ID1,ID2"'
SM → UI: launch details + WebSocket token
else:
SM → UI: capacity unavailable (choose another profile or retry)
3. Billing heartbeat
During an active session the client sends heartbeats; the manager deducts elapsed minutes weighted by the profile's GPU count. When credit reaches zero the session is stopped.
loop every 30s:
UI → SM: POST /api/session/heartbeat (session_id)
SM → DB: deduct elapsed_minutes × GPU_weight
if remaining_minutes ≤ 0:
SM → DB: mark credit_grace; stop compute billing and viewer access
SM → UI: top up to reconnect to the same running container
after configured grace: SL → Docker stop & remove
else:
SM → UI: ok, remaining_minutes
Operators can enable bounded invite-only guest demos with ephemeral storage and restricted profiles. Normal wallet sessions still require server-ledger credit; guest mode is disabled unless explicitly configured.
Endpoints at a glance
| Endpoint | Method | Purpose |
|---|---|---|
/api/auth/challenge | GET | Issue an EIP-191 challenge for a wallet |
/api/auth/verify-wallet | POST | Verify the signature, issue an auth token |
/api/discount/quote | GET | Tier + discount quote from on-chain AXGT balance |
/api/auth/verify-deposit | POST | Verify a deposit tx and credit minutes |
/api/session/claim | POST | Atomically claim a GPU profile or return capacity status |
/api/session/heartbeat | POST | Keep the session alive and bill credits |
/api/config | GET | Public chain/UI configuration |
Continue to Tokenomics & AXGT for the pricing and discount model.