Configuration Options
Trails is easy to get started, however we have deep configuration options to address most use cases.Core Props
Prop | Type | Required | Default | Description |
---|---|---|---|---|
projectAccessKey | string | No | — | Your project access key provided by Sequence |
mode | "pay" | "fund" | "earn" | "swap" | "receive" | No | "pay" | Widget operation mode |
toAddress | string | No | — | Destination address for payments |
toAmount | string | No | — | Exact amount for payments (used in pay mode) |
toChainId | number | string | No | — | Destination chain ID |
toToken | string | No | — | Destination token symbol or contract address |
toCalldata | string | No | — | Custom calldata for contract interactions |
UI & Rendering Options
Prop | Type | Required | Default | Description |
---|---|---|---|---|
renderInline | boolean | No | false | Render widget inline instead of as a modal |
children | React.ReactNode | No | — | Custom button content (when not renderInline) |
buttonText | string | No | Auto-generated | Custom text for the trigger button |
theme | "light" | "dark" | "auto" | No | "auto" | Color theme; auto follows system preference |
customCss | string | Record<string, string> | No | — | Custom CSS styles to apply to the component |
Wallet & Connection Options
Prop | Type | Required | Default | Description |
---|---|---|---|---|
walletConnectProjectId | string | No | — | WalletConnect project ID for WalletConnect integration |
Transaction Options
Prop | Type | Required | Default | Description |
---|---|---|---|---|
gasless | boolean | No | false | Enable gasless transactions |
paymasterUrls | Array<{ chainId: number; url: string }> | No | — | Configure per-chain paymaster endpoints for gasless transactions |
quoteProvider | string | No | "auto" | Preferred quote provider (“lifi”, “auto”, etc.) |
slippageTolerance | number | string | No | — | Slippage tolerance for swaps |
Sequence Configuration
Prop | Type | Required | Default | Description |
---|---|---|---|---|
sequenceUseV3Relayers | boolean | No | — | Use Sequence v3 relayers |
sequenceIndexerUrl | string | No | — | Custom Sequence indexer URL |
sequenceApiUrl | string | No | — | Custom Sequence API URL |
sequenceEnv | "local" | "cors-anywhere" | "dev" | "prod" | No | — | Sequence environment configuration |
Event Handlers
Prop | Type | Required | Default | Description |
---|---|---|---|---|
onOriginConfirmation | (data: { txHash: string; chainId: number; sessionId: string }) => void | No | — | Called when origin transaction is confirmed |
onDestinationConfirmation | (data: { txHash: string; chainId: number; sessionId: string }) => void | No | — | Called when destination transaction is confirmed |
onCheckoutStart | (data: { sessionId: string }) => void | No | — | Called when checkout process starts |
onCheckoutQuote | (data: { sessionId: string; quote: any }) => void | No | — | Called when quote is received |
onCheckoutComplete | (data: { sessionId: string }) => void | No | — | Called when checkout completes successfully |
onCheckoutError | (data: { sessionId: string; error: string }) => void | No | — | Called when checkout encounters an error |
onCheckoutStatusUpdate | (data: { sessionId: string; transactionStates: TransactionState[] }) => void | No | — | Called when transaction status updates |