Skip to main content
Spice Flow lets an application define a protocol action while the SDK manages asset selection, quotes, fees, funding and execution. Integrate through the stock components or controlled hooks; direct API integration is an advanced option.

One action, several possible routes

  1. The application supplies the destination chain, asset, beneficiary and protocol calls.
  2. The SDK builds an eligible route from the user’s selected wallet or account position and prepares the amount, fees and minimum output for review.
  3. After consent, the SDK obtains the required wallet signatures and transactions. An eligible same-chain, matching-asset External-mode action can execute directly from that wallet. Routed actions can fund the account and execute through Spicenet.
  4. The SDK reports progress and awaits any required application finalization before completing the action.
Cash funding belongs inside the requested action. Users should not have to move money manually between wallet and escrow balances first. See Cash Funding for supported sources and budgeting.

Actions, intents and steps

A signed intent digest, an API intent ID and a transaction hash identify different things. Preserve all identifiers returned by the SDK when diagnosing an action.

Submission and execution

POST /actions validates and persists the submitted definition. Creating a record is not confirmation that funds moved or the destination action completed. For manually driven actions, POST /actions/{actionId}/intents/{intentIndex}/steps/{stepIndex} executes the next eligible step. Steps run in order. Supported fully signed actions can instead request backend automatic continuation; check /actions/capabilities and use the SDK to manage this contract. There are two usable action modes:
  • 7702: a relayer submits execution using the signed intent and any required EIP-7702 delegation authorizations.
  • non-7702:on-demand: the wallet submits a transaction and the API verifies its hash before continuing supported fulfillment.
non-7702:presign exists in the API schema but is not implemented for execution. The UI SDK’s executionMode configuration is a separate contract; do not infer API mode names from it.

Execution and settlement are separate

Source funding, account credit, destination broadcast, a successful destination receipt and backend settlement are distinct milestones. A source deposit or accepted order does not prove destination completion. For a final EVM destination, supported APIs can return executionStatus from a matching receipt while step settlement remains pending. The SDK can report the destination result at that point and still await application finalization. This does not release backend reservations or stop settlement processing.
A batch can revert atomically within one EVM transaction. Transactions on different chains are separate transactions. A later failure does not roll back an earlier confirmed source transfer or destination transaction. Direct external calls can also be sequential transactions.

Interruption and recovery

Accepted, fully authorized backend actions can continue without the browser when automatic continuation is supported. Reopening the SDK reads existing action, step and receipt state. A step requiring a fresh wallet signature cannot be completed by the backend without that signature. After a timeout or lost response, reconcile the original submission and transaction before creating another action or sending funds again. The API exposes submission lookup, wallet action discovery and intent recovery status in the status reference. No separate browser transaction journal is needed.

Conditional execution

Conditional intents register a signed execution plan with trigger terms. The configured evaluator signs a matching, fresh signal; the backend claims and executes the authorized plan. Registration or signal acceptance is not a fill. Cancellation and replacement can lose a race with an execution that has already been claimed. For delegation details, see EIP-7702 and the Delegate Contract.