@spicenet-io/spiceflow-ui@4.10.0. See the
migration guide when upgrading an existing integration.
Installation
Install the Spice Flow SDK using npm, yarn, or pnpm:Peer Dependencies
The SDK requires the following peer dependencies. Install based on your wallet provider:Required Dependencies
These are always required:A peer-dependency conflict on a fresh install is expected (the SDK declares React 18 while some peers
accept 18 or 19). Use
--legacy-peer-deps and keep the app on React 18.Wallet Provider
The SDK uses Privy for wallet connections:Complete Installation
Basic Setup
1. Mount the Provider Stack
SpiceFlowProvider reads wallet state from Privy, wagmi, and react-query — it does not mount them.
Your app provides all four, in this order. The SDK injects its stylesheet automatically in the browser;
an existing explicit styles.css import remains supported:
PrivyProvider — add the chains you enable to its
supportedChains and your wagmi config.
2. Add Wallet Connection
Use theProviderLogin component to let users connect their wallet:
3. Add an Action and Account Menu
UseSpiceSupply for protocol calls, or useSpiceSupply for your own UI. See the complete
Quick Start example.
For account funding and Spice-balance withdrawals, the combined component needs no modal wiring:
Next.js Considerations
If you’re using Next.js with Server-Side Rendering (SSR), wrap components that use Spice Flow in a client component:Environment Variables
Store your provider credentials in environment variables:PrivyProvider. SpiceFlowProvider has a privyAppId prop, but it has no effect.
Next Steps
Components
Learn about all available components and their props
Hooks
Use React hooks to build custom UIs
Configuration
Configure wallet providers, chains, and more
Quick Start Guide
Build your first Spice Flow app step-by-step
