Skip to main content
Gas Station is a 2FA-gated that funds fresh on so they can and .

Why Gas Station exists

A newly generated machine has zero balance. Before it can register an identity (which requires bonding 1 PEAQ), it needs native tokens for . Gas Station solves this bootstrap problem: the enrolls in 2FA once, then funds each machine wallet with a single call.

2FA setup flow

1

Initiate 2FA enrollment

Call setupFaucet2FA with the owner’s address. The faucet returns an otpauthUri for manual entry and a qrImageUrl for scanning.
2

Scan QR code with authenticator app

Open any TOTP-compatible authenticator (Google Authenticator, Authy, 1Password). Scan the QR code or manually enter the otpauthUri. The QR image expires after approximately 2 minutes.
3

Confirm 2FA activation

Submit the current TOTP code from the authenticator app to activate 2FA for this owner address.

Funding a machine wallet

After 2FA is active, fund any machine wallet with fundFromGasStation. The response is a discriminated union: either success (transfer landed) or skipped (wallet already funded).

Success response

JS (camelCase). The SDK retains the idempotency key on the response so callers can persist it for retry recovery: Python (snake_case). The SDK does not echo request_id on the response. If you need it for retry recovery, pass it in explicitly and hold the value yourself:

Skipped response

JS (camelCase): Python (snake_case):

Rate limits and caps

Gas Station enforces three independent throttles to prevent abuse, plus a per-chain minimum balance threshold that decides whether a funding request transfers anything at all:
Exact cap values, rate-limit windows, and the minimum gas balance are configured server-side and are subject to change. Branch on the error codes (or the skipped status) rather than hard-coding numbers.

Error codes

Gas Station defines 20 error codes. Not every endpoint can raise every code; the subset depends on what the endpoint actually does.

POST /2fa/setup: setupFaucet2FA / setup_faucet_2fa

POST /2fa/confirm: confirmFaucet2FA / confirm_faucet_2fa

POST /faucet/fund: fundFromGasStation / fund_from_gas_station

For SDK-owned message strings and HTTP status codes per code, see errors.