agent field. floprouter has two ways to pay: grant and credit. You choose per key (new keys start in grant), and can override per request with "flop": {"payer": "credit"}.
Switch a key’s mode on the account page or with PATCH /v1/auth/keys/{id} and {"payer": "grant"} or {"payer": "credit"}.
Every response says who paid, in
flop.payer:
kind is session-key when your wallet paid through a grant, and router-wallet when the router’s wallet paid.
Grant mode (grant, recommended)
Live
You sign one extrinsic with your wallet: flopSessionKeys.createSession. It names a delegate key held by the router and sets limits: a total spending cap, a per-transaction limit, a daily cap, a duration in blocks, and the pallets the delegate may use. floprouter asks for ComputeChannel and no other pallet.
After that, for each request, the router signs flopSessionKeys.executeViaSession with its delegate key. The chain runs the inner call, opening the channel, as your account. So:
- The channel’s payer on chain is your address, not the router’s. The explorer shows your address as the payer.
- The escrow comes from your wallet.
- Your wallet signs nothing during the session. The router holds the per-channel session key and does everything after the open.
"flop": {"fallback_payer": "credit"}. It is off by default, so your wallet stays the payer unless you ask otherwise.
What the delegate can and cannot do
- It can open compute channels to any miner, at any escrow, within your caps. The chain enforces the caps.
- It cannot transfer your funds or call anything outside
ComputeChannel. - It stops working when the grant expires or when you revoke it with
flopSessionKeys.revokeSession, signed by your wallet.
Limits
The chain limits how long a grant lasts and how many grants one delegate key can hold.GET /v1/grants/params returns the delegate address, the caps the router asks for (amounts), the chain’s limits (limits), and the exact call to sign, both as call (pallet, method, arguments) and as encoded call_data. Without a key, pass ?address=<your address>. GET /v1/grants returns your grant’s state: sessions left and expiry. After you sign, POST /v1/grants/sync asks the router to read it from the chain at once.
Balance mode (credit)
Live
The router’s wallet opens the channel and the cost, escrow plus fee, is taken from your prepaid balance. Nothing to sign per request. On chain, the payer of each session is the router, not you.
What the current server offers
GET /health lists the payer modes the server offers in payer.modes, and the router wallet’s address in payer.router_wallet. Every response says who actually paid, in flop.payer.