BCH BLAZEDeck ↗Code ↗
Build

The gas relayer

Hashi's one server route: it pays Base gas for a USDC authorisation into a waiting NEAR deposit, and refuses everything else.

POST /api/relay takes a signed USDC transferWithAuthorization (EIP-3009) and submits it on Base, paying the gas. The USDC moves straight from the signer to the NEAR Intents deposit address; the relayer only pays for the transaction.

CheckRule
Set uprefuses with 503 until its key is configured
ChainBase only
Timealready valid, and valid for at most one hour
Amountmore than zero, and at least what the NEAR quote needs
Destinationa NEAR Intents deposit address that is waiting for a deposit of Base USDC
Replayan authorisation already used is refused (409)
Rate3 per payer and 10 per IP every 10 minutes (429)
Safetysimulated before it is sent

GET /api/relay tells the app whether the relayer is ready: the swap screen offers Pay no gas only when it holds at least 0.00005 ETH on Base. Today it holds none, so gasless is off.