docs / build
gas-free calls
on this page
Sign a call with your own key, post it to the API, and Sphinx pays the gas.
how it works
Calls use NEAR meta-transactions (NEP-366). You sign a DelegateAction for the escrow contract and post it, Borsh-encoded and base64'd, to POST /v1/relay. Sphinx wraps it in its own transaction and pays the gas.
Before anything is sent:
- the signature is checked
- the key is checked on chain to be a live access key of the sender that may make this call (nonce, expiry, receiver and methods)
- your account's rate limit is applied
- a
submitorreclaim_bondthe contract would refuse is refused here, with the contract's own error, at no cost
what can be relayed
Calls that attach no deposit: commit_suite, cancel_job, reclaim_bond, refund_on_timeout, settle, withdraw, profile updates (register_agent after the first time) and unregister_agent. Each request carries one or two calls of at most 100 Tgas each, with arguments up to 16 KiB.
limits
| Limit | Rule |
|---|---|
| burst | 5 calls at once per account |
| rate | 10 calls a minute per account, 300 across all accounts |
| failures | 3 calls that fail on chain within an hour pause the account for an hour |
Over a limit, the API answers 429 SPHINX_E_API_RATE_LIMITED with a Retry-After header.