This reference is verified against the published
@spicenet-io/spiceflow-ui package by
tools/check-sdk-drift.mjs on every change. The check verifies export and prop names; examples and behavioral guidance target stable SDK 4.10.0.SpiceFlowProvider
The root provider for chain configuration, theming, and execution mode. It reads wallet state from Privy, wagmi, and react-query — mount those above it in your app (see Quick Start Step 2).Usage
Props
Examples
SpiceDeposit
The main deposit flow. Handles everything: Privy login, external wallet connection, token selection, escrow deposit, 7702 signing, and solver execution. UseSpiceSupply for a protocol action; this component handles account deposits.
Usage
Props
To restrict which tokens appear, set
allowedTokens on SpiceFlowProvider (lowercase symbols), not on
SpiceDeposit.With
swapper={{ enabled: true }} on SpiceFlowProvider, the modal opens with a Wallet / Card / Exchange
chooser so users can fund by debit card or from an exchange. Off by default. See
Card and Exchange Deposits for where the funds land in each
wallet mode.depositBatches
ThedepositBatches prop defines what happens on the destination chain after the deposit. It can be a static array or an async function that returns batches based on the deposit amount:
SpiceSupply
Runs a deposit / supply / stake action end to end: token selection, funding, fee quoting, and execution, driven by abuildActionCalls callback that returns your destination-chain calls. This is
the stock presentation of useSpiceSupply. Keep your existing UI with that controller when a stock
modal does not fit. See Custom UI Integration.
Usage
buildActionCalls takes (amount, ctx) in that order. ctx (BuildActionCallsContext) carries
userAddress, executorAddress, beneficiary, chainId, destinationToken, and fee fields.
The bigint is in destination-token units; honor it after swaps and fee allocation. Read the current prop and context
shapes from the installed package (SpiceSupplyProps, BuildActionCallsContext).buildSpicenetBatch and feeExecutionMode are deprecated
compatibility props; leave them unset in new integrations. Existing values remain supported.
Props
onPayExecute blocks execution until migrated. Define the calls with buildActionCalls and use
onSuccess for app updates. See Migration for direct versus routed execution.
SpiceWithdraw
Withdraw assets from the user’s Spice balance back to their wallet.Usage
Props
SpiceLock
Lock tokens for a duration (veToken style), using the shared input-inclusive Supply controller. The amount and duration inputs are driven by hooks you create withuseAssetInput and useLockDuration and pass in,
so you can read the live selection for your own preview UI.
Usage
Props
SpiceLock also accepts hoistable input hooks (sourceAssetInputHook, lockDurationHook) and
escrowAddress. The builder receives destination-token amountWei, beneficiary and executorAddress;
the SDK supplies conversion and delivery. onLockExecute blocks execution until moved into the
builder and success callback. See SpiceLockModalProps for the full shape.SpiceAccount
ComposesAccountDisplay, SpiceDeposit and SpiceWithdraw, including open/close state and the
selected withdrawal asset. It has zero required props inside the provider stack.
depositProps and withdrawProps customize the nested flows without their visibility props.
It also accepts the display’s branding, extra assets, token prices and mode-toggle props, but owns
onDepositClick / onWithdrawClick itself. Keep AccountDisplay if your app needs to own those modals.
AccountDisplay
A popover for wallet and Spice balances and deposit/withdraw actions. It uses shared inventory and policy.extraAssets can add metadata or undiscovered positions but cannot override an SDK-acquired
balance, including zero. Host tokenPrices are display-only fallbacks, not execution prices.
Usage
Props
SelectChainModal
The source-chain picker on its own, for when you want the chain-selection step outside the full deposit flow. SeeSelectChainModal in the installed package for its current props.
ProviderLogin
Wallet connection button for the configured provider (Privy).Usage
Props
Next Steps
Hooks
Build custom UIs with React hooks
Styling
Customize component appearance
Configuration
Configure chains and providers
Examples
See complete examples
