Skip to main content

Wallet Providers

Spice Flow supports two wallet providers. Choose the one that fits your needs.

Privy

Best for embedded wallets and social logins. This is the recommended provider for most integrations.
<SpiceFlowProvider
  provider="privy"
  network="mainnet"
  nativeChainId={8453}
>
  {children}
</SpiceFlowProvider>
Configuration:
OptionTypeDescription
privyAppIdstringYour Privy application ID (required for Privy)
embeddedWalletConfigobjectEmbedded wallet behavior
embeddedWalletConfig.createOnLogin"off" | "users-without-wallets" | "all-users"When to create embedded wallets
Get Your Privy App ID:
  1. Sign up at privy.io
  2. Create a new app
  3. Copy your App ID from the dashboard

Dynamic

Best for multi wallet support and flexible authentication.
<SpiceFlowProvider
  provider="dynamic"
  dynamicEnvironmentId="your-environment-id"
  network="mainnet"
  nativeChainId={8453}
>
  {children}
</SpiceFlowProvider>
Get Your Dynamic Environment ID:
  1. Sign up at dynamic.xyz
  2. Create a new project
  3. Copy your Environment ID from settings

Execution Modes

Spice Flow supports three execution modes.

7702 Mode (Default)

Uses EIP 7702 with embedded wallets. The solver executes transactions on behalf of the user via delegate contracts. This is the default and recommended mode for most chains.
<SpiceFlowProvider
  provider="privy"
  network="mainnet"
  nativeChainId={8453}
  mode="7702"
>
  {children}
</SpiceFlowProvider>

Presign Mode

Users sign all transactions upfront using their external wallet. Used for chains that don’t support EIP 7702.
<SpiceFlowProvider
  provider="privy"
  mode="presign"
  nativeChainId={688689}
>
  {children}
</SpiceFlowProvider>

Ondemand Mode

Each transaction is signed on demand during execution. The app handles execution via onDepositExecute / onWithdrawExecute callbacks.
<SpiceFlowProvider
  provider="privy"
  mode="ondemand"
  nativeChainId={688689}
>
  {children}
</SpiceFlowProvider>
In presign and ondemand modes, the embedded wallet flow is skipped. Components use callback props (like onDepositExecute) instead of the solver execution path.

Network Configuration

Set the network to control which chains are available:
<SpiceFlowProvider network="mainnet" nativeChainId={8453}>

Default Chains by Network

Mainnet: Ethereum (1), Base (8453), Arbitrum (42161), Citrea (4114) Testnet: Sepolia (11155111), Arbitrum Sepolia (421614), Citrea Testnet (5115), Base Sepolia (84532)

Custom Chain IDs

Override the defaults with supportedChainIds:
<SpiceFlowProvider
  provider="privy"
  network="mainnet"
  nativeChainId={8453}
  supportedChainIds={[8453, 4114]}
>
  {children}
</SpiceFlowProvider>

Theming

Set your app’s visual identity through the theme prop. All SDK components inherit these values.
<SpiceFlowProvider
  provider="privy"
  network="mainnet"
  nativeChainId={8453}
  theme={{
    primaryColor: "#f97316",
    dark: true,
    appName: "MyApp",
  }}
>
  {children}
</SpiceFlowProvider>
See Styling for the full theming reference.

API URL Override

By default, the SDK connects to the Spicenet relayer. Override this if you’re proxying requests or using a custom deployment:
<SpiceFlowProvider
  provider="privy"
  network="mainnet"
  apiUrl="/api/relayer"
>
  {children}
</SpiceFlowProvider>

Complete Provider Reference

PropTypeDefaultDescription
provider"privy" | "dynamic"RequiredWallet provider
network"mainnet" | "testnet""testnet"Network environment
nativeChainIdnumberUser’s default chain
themeSpiceThemeColors, dark mode, surfaces, fonts, app name
privyAppIdstringPrivy app ID
dynamicEnvironmentIdstringDynamic environment ID
supportedChainIdsnumber[]Per networkOverride supported chains
mode"7702" | "presign" | "ondemand""7702"Execution mode
appNamestring"Spicenet"Application name
apiUrlstringOverride relayer API URL
embeddedWalletConfigobjectEmbedded wallet settings

Next Steps

Styling

Customize component appearance

Components

Explore available components

Examples

See complete examples

Best Practices

Security and integration patterns