Endpoints
All paths are relative to the gateway’sgatewayUrl (e.g. https://gateway.flashnet.xyz).
The bearer token returned from
/auth/verify goes in Authorization: Bearer <token> for /execute and any other authenticated endpoint.
Network info
?forceRefresh=1 (or getNetworkInfo({ forceRefresh: true }) in the SDK) to bypass after a suspected gateway re-key.
Submit intent
The body is flat camelCase. Eitherrecipient (deposit-only) or evmTransaction (deposit-and-execute) is set, never both. The signer is identified by the bearer token; there’s no publicKey field on the body.
The response:
Look up intent status
executionTxHash is null before inclusion. statusMessage is non-null on failure: an EXPIRED intent carries the revert reason, oracle failure, or admission failure.
Canonical intent message
The signed preimage. Order and field names are stable; the signer hashes JSON serialization in this exact shape.transfers (not deposits) and transferId (not sparkTransferId). If you’re constructing the signed preimage by hand, use the names above. If you’re using the SDK, this is hidden from you.
Status enum
SCREAMING_SNAKE_CASE. Returned in the submit response as { submissionId, intentId, status } and on poll as the full IntentStatusResponse (see below). Poll GET /api/v1/intents/{submissionId} to follow transitions.
statusMessage for revert cases includes the raw output bytes:
decodeRevertReason() parses this format.
Auth
Replay and ordering guarantees
- Spark transfer ids can fund at most one finalized intent. Pre-finality, the gateway holds a soft-claim that prevents concurrent submissions but does not survive a rejection.
- EVM nonces are standard. The runtime rejects an out-of-order or replayed transaction even if the intent itself reaches the chain twice.
- Withdrawal nonces on
SparkGatewayare monotonic and reconciled on the settlement side, so a finalized withdrawal never settles twice on Spark.