@liberfi.io/ui-trade 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,11 +1,12 @@
1
1
  # @liberfi.io/ui-trade
2
2
 
3
- Trade hooks and swap widget for the Liberfi React SDK. This package provides chain-agnostic swap logic and a ready-to-use swap form component that works across Solana, Ethereum, and BSC.
3
+ Trade hooks and widgets for the Liberfi React SDK. This package provides chain-agnostic swap logic and ready-to-use trade form components that work across Solana, Ethereum, and BSC.
4
4
 
5
- The package is organized in two layers:
5
+ The package is organized in three layers:
6
6
 
7
7
  - **Hooks** (`useSwap`, `useSwapRoutePolling`, `useTxConfirmation`) — pure-logic building blocks with no UI side-effects, designed for IoC.
8
8
  - **Swap Widget** (`SwapWidget` / `useSwapScript` / `SwapUI` / `SwapPreviewModal`) — a full swap form with preview-before-confirm flow, following the Script/Widget/UI three-layer architecture, composable at any level.
9
+ - **Instant Trade** (`InstantTradeWidget` / `InstantTradeProvider` / `PresetFormWidget`) — a configurable quick-trade form with buy/sell tabs, preset management, customizable quick-amount buttons, and trade settings (slippage, priority fee, tip fee, anti-MEV).
9
10
 
10
11
  ## Design Philosophy
11
12
 
@@ -478,11 +479,201 @@ function EvmSwapButton() {
478
479
  }
479
480
  ```
480
481
 
482
+ ### Components (Instant Trade)
483
+
484
+ The instant trade module provides a configurable quick-trade form with preset management and customizable quick-amount buttons.
485
+
486
+ #### `InstantTradeWidget`
487
+
488
+ Full instant-trade form with buy/sell tabs, amount input, quick buttons, preset management, and trade execution.
489
+
490
+ ```tsx
491
+ <InstantTradeWidget
492
+ chain={Chain.SOLANA}
493
+ tokenAddress="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
494
+ onSwapSubmitted={(result) => console.log(result)}
495
+ onSwapError={(error, phase) => console.error(error)}
496
+ />
497
+ ```
498
+
499
+ **Props (`InstantTradeWidgetProps`):**
500
+
501
+ | Name | Type | Description |
502
+ | ------------------- | ------------------------------------------ | ----------------------------------------------------- |
503
+ | `chain` | `Chain` | Target chain. |
504
+ | `tokenAddress` | `string` | Address of the token being traded. |
505
+ | `onSwapSubmitted?` | `(result: SwapResult) => void` | Called when a swap is submitted. |
506
+ | `onSwapError?` | `(error: Error, phase: SwapPhase) => void` | Called on swap error. |
507
+ | `settings?` | `InstantTradeSettings` | Controlled settings (omit for localStorage). |
508
+ | `onSettingsChange?` | `(settings: InstantTradeSettings) => void` | Called when settings change. |
509
+ | `headerExtra?` | `ReactNode` | Slot for extra header content (e.g. wallet switcher). |
510
+ | `className?` | `string` | External style customization. |
511
+
512
+ #### `InstantTradeProvider`
513
+
514
+ Context provider for instant trade state. Use with `InstantTradeAmountInput` and `InstantTradeButton` for compact inline trading.
515
+
516
+ ```tsx
517
+ <InstantTradeProvider chain={Chain.SOLANA} tokenAddress="...">
518
+ <InstantTradeAmountInput
519
+ amount={amount}
520
+ onAmountChange={setAmount}
521
+ preset={preset}
522
+ onPresetChange={setPreset}
523
+ />
524
+ <InstantTradeButton />
525
+ </InstantTradeProvider>
526
+ ```
527
+
528
+ #### `useInstantTradeScript(params)`
529
+
530
+ Script-layer hook for the instant trade form. Must be used inside an `InstantTradeProvider`. Encapsulates token queries, balance queries, form state, and swap execution.
531
+
532
+ #### `InstantTradeAmountInput`
533
+
534
+ Compact amount input with lightning icon, native token avatar, and 3 preset buttons (P1/P2/P3) with tooltips. Must be inside an `InstantTradeProvider`.
535
+
536
+ #### `InstantTradeButton`
537
+
538
+ Trade execution button that reads state from `InstantTradeProvider`. Handles wallet resolution, amount conversion, and swap execution.
539
+
540
+ #### `PresetFormWidget`
541
+
542
+ Standalone widget for editing trade preset values (slippage, priority fee, tip fee, auto fee, anti-MEV, custom RPC).
543
+
544
+ ```tsx
545
+ <PresetFormWidget
546
+ chain={Chain.SOLANA}
547
+ value={presetValues}
548
+ onChange={setPresetValues}
549
+ />
550
+ ```
551
+
552
+ #### `PresetFormUI`
553
+
554
+ Pure presentational preset form. Accepts value/onChange props directly, with optional `nativeSymbol` and `nativeDecimals`.
555
+
556
+ ### Instant Trade Types
557
+
558
+ #### `TradePresetValues`
559
+
560
+ ```typescript
561
+ interface TradePresetValues {
562
+ slippage: number | null;
563
+ priorityFee: number | null;
564
+ tipFee: number | null;
565
+ autoFee: boolean;
566
+ maxAutoFee: number | null;
567
+ antiMev: "off" | "reduced" | "secure";
568
+ customRPC: string | null;
569
+ }
570
+ ```
571
+
572
+ #### `InstantTradeSettings`
573
+
574
+ ```typescript
575
+ interface InstantTradeSettings {
576
+ buy: BuySettings;
577
+ sell: SellSettings;
578
+ }
579
+
580
+ interface BuySettings {
581
+ customAmounts: (number | null)[];
582
+ presets: TradePresetValues[];
583
+ }
584
+
585
+ interface SellSettings {
586
+ customPercentages: (number | null)[];
587
+ presets: TradePresetValues[];
588
+ }
589
+ ```
590
+
591
+ #### `DEFAULT_TRADE_PRESET`
592
+
593
+ Default preset values: slippage=20, priorityFee=0.001, tipFee=0.001, autoFee=false, maxAutoFee=0.1, antiMev="off".
594
+
595
+ #### `DEFAULT_INSTANT_TRADE_SETTINGS`
596
+
597
+ Default settings with 4 buy amounts (0.01, 0.1, 1, 10), 4 sell percentages (10, 25, 50, 100), and 3 default presets each.
598
+
599
+ ## Usage Examples
600
+
601
+ ### InstantTradeWidget (Full Trade Form)
602
+
603
+ ```tsx
604
+ import { Chain } from "@liberfi.io/types";
605
+ import { InstantTradeWidget } from "@liberfi.io/ui-trade";
606
+
607
+ function TokenTradePage({ tokenAddress }: { tokenAddress: string }) {
608
+ return (
609
+ <InstantTradeWidget
610
+ chain={Chain.SOLANA}
611
+ tokenAddress={tokenAddress}
612
+ onSwapSubmitted={(result) => {
613
+ toast.success(`Transaction submitted: ${result.txHash}`);
614
+ }}
615
+ onSwapError={(error, phase) => {
616
+ toast.error(`Swap failed at ${phase}: ${error.message}`);
617
+ }}
618
+ />
619
+ );
620
+ }
621
+ ```
622
+
623
+ ### Compact Inline Trading
624
+
625
+ ```tsx
626
+ import { Chain } from "@liberfi.io/types";
627
+ import {
628
+ InstantTradeProvider,
629
+ InstantTradeAmountInput,
630
+ InstantTradeButton,
631
+ } from "@liberfi.io/ui-trade";
632
+
633
+ function TokenHeader({ tokenAddress }: { tokenAddress: string }) {
634
+ return (
635
+ <InstantTradeProvider chain={Chain.SOLANA} tokenAddress={tokenAddress}>
636
+ <div className="flex items-center gap-2">
637
+ <InstantTradeAmountInput
638
+ amount={undefined}
639
+ onAmountChange={() => {}}
640
+ variant="bordered"
641
+ size="sm"
642
+ />
643
+ <InstantTradeButton />
644
+ </div>
645
+ </InstantTradeProvider>
646
+ );
647
+ }
648
+ ```
649
+
650
+ ### Preset Settings Editor
651
+
652
+ ```tsx
653
+ import { useState } from "react";
654
+ import { Chain } from "@liberfi.io/types";
655
+ import { PresetFormWidget, DEFAULT_TRADE_PRESET } from "@liberfi.io/ui-trade";
656
+
657
+ function TradeSettings() {
658
+ const [preset, setPreset] = useState(DEFAULT_TRADE_PRESET);
659
+
660
+ return (
661
+ <PresetFormWidget
662
+ chain={Chain.SOLANA}
663
+ value={preset}
664
+ onChange={setPreset}
665
+ />
666
+ );
667
+ }
668
+ ```
669
+
481
670
  ## Future Improvements
482
671
 
483
672
  - Add `useSwapQuote` hook for fetching quotes without executing (read-only route info).
484
673
  - Add ERC20 approval detection and `useTokenApproval` hook for EVM chains that don't support permit.
485
674
  - Support `ExactOut` swap mode with output amount estimation.
486
675
  - Add a skeleton loading component (`swap-skeleton.ui.tsx`) for the swap form.
487
- - Add slippage / priority fee / anti-MEV configuration to `SwapWidget` props.
488
676
  - Support token-select callback props on `SwapWidget` for integrating with external token picker UI.
677
+ - Add limit order and advanced trade modes to `InstantTradeWidget`.
678
+ - Add token price conversion display in the instant trade form.
679
+ - Support custom RPC endpoint validation in `PresetFormWidget`.
package/dist/index.d.mts CHANGED
@@ -2,6 +2,8 @@ import * as _liberfi_io_types from '@liberfi.io/types';
2
2
  import { Chain, API, Token, Portfolio } from '@liberfi.io/types';
3
3
  import { WalletAdapter } from '@liberfi.io/wallet-connector';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { ReactNode } from 'react';
6
+ import { PredefinedToken } from '@liberfi.io/utils';
5
7
 
6
8
  /**
7
9
  * Input parameters for the `swap()` function returned by {@link useSwap}.
@@ -61,6 +63,29 @@ interface UseSwapRoutePollingOptions {
61
63
  /** Called when a route fetch fails. */
62
64
  onError?: (error: Error) => void;
63
65
  }
66
+ /** Configuration values for a single trade preset (slippage, fees, MEV). */
67
+ interface TradePresetValues {
68
+ /** Slippage tolerance, 0-100 (percent). `null` = use default. */
69
+ slippage: number | null;
70
+ /** Priority fee in native token units. `null` = use default. */
71
+ priorityFee: number | null;
72
+ /** Tip fee in native token units. `null` = use default. */
73
+ tipFee: number | null;
74
+ /** Whether automatic fee estimation is enabled. */
75
+ autoFee: boolean;
76
+ /** Maximum fee cap when auto-fee is on (native token units). */
77
+ maxAutoFee: number | null;
78
+ /** Anti-MEV protection level. */
79
+ antiMev: "off" | "reduced" | "secure";
80
+ /** Custom RPC endpoint URL. `null` = use default. */
81
+ customRPC: string | null;
82
+ }
83
+ /** Default preset values matching Solana-typical settings. */
84
+ declare const DEFAULT_TRADE_PRESET: TradePresetValues;
85
+ /** Default quick-buy amounts (native token units). */
86
+ declare const DEFAULT_BUY_AMOUNTS: number[];
87
+ /** Default quick-sell percentages. */
88
+ declare const DEFAULT_SELL_PERCENTAGES: number[];
64
89
  /** Confirmation status of a tracked transaction. */
65
90
  type TxConfirmationStatus = "idle" | "pending" | "confirmed" | "failed";
66
91
  /** Options for the {@link useTxConfirmation} hook. */
@@ -317,6 +342,252 @@ declare function SwapUI({ fromToken, toToken, fromBalance, toBalance, amount, am
317
342
  */
318
343
  declare function SwapPreviewModal({ isOpen, onOpenChange, fromToken, toToken, fromBalance, inputAmount, inputAmountInUsd, outputAmount, outputAmountInUsd, route, isRouting, routeError, onConfirm, isSwapping, }: SwapPreviewModalProps): react_jsx_runtime.JSX.Element;
319
344
 
345
+ /** Parameters for {@link useInstantTradeScript}. */
346
+ interface UseInstantTradeScriptParams {
347
+ /** Target chain */
348
+ chain: Chain;
349
+ /** Address of the token being traded (the non-native side) */
350
+ tokenAddress: string;
351
+ /** Called when a swap transaction is successfully submitted */
352
+ onSwapSubmitted?: (result: SwapResult) => void;
353
+ /** Called when a swap error occurs at any phase */
354
+ onSwapError?: (error: Error, phase: SwapPhase) => void;
355
+ }
356
+ /** Return value of {@link useInstantTradeScript}. */
357
+ interface UseInstantTradeScriptResult {
358
+ chain: Chain;
359
+ tokenAddress: string;
360
+ nativeToken: PredefinedToken | undefined;
361
+ tokenInfo: Token | null;
362
+ nativeBalance: Portfolio | null;
363
+ tokenBalance: Portfolio | null;
364
+ direction: "buy" | "sell";
365
+ setDirection: (d: "buy" | "sell") => void;
366
+ amount: number | undefined;
367
+ setAmount: (v: number | undefined) => void;
368
+ buyPreset: number;
369
+ setBuyPreset: (p: number) => void;
370
+ sellPreset: number;
371
+ setSellPreset: (p: number) => void;
372
+ currentPresetValues: TradePresetValues;
373
+ settings: InstantTradeSettings;
374
+ updateBuySettings: (s: BuySettings) => void;
375
+ updateSellSettings: (s: SellSettings) => void;
376
+ showSettings: boolean;
377
+ handlePresetClick: (preset: number) => void;
378
+ swap: () => Promise<void>;
379
+ isSwapping: boolean;
380
+ submitText: string;
381
+ isDisabled: boolean;
382
+ isLoading: boolean;
383
+ }
384
+ /** Props for {@link InstantTradeWidget}. */
385
+ interface InstantTradeWidgetProps {
386
+ /** Target chain */
387
+ chain: Chain;
388
+ /** Address of the token being traded */
389
+ tokenAddress: string;
390
+ /** Called when a swap transaction is submitted */
391
+ onSwapSubmitted?: (result: SwapResult) => void;
392
+ /** Called on swap error */
393
+ onSwapError?: (error: Error, phase: SwapPhase) => void;
394
+ /** Controlled settings (omit for localStorage fallback) */
395
+ settings?: InstantTradeSettings;
396
+ /** Called when settings change */
397
+ onSettingsChange?: (settings: InstantTradeSettings) => void;
398
+ /** Slot rendered next to trade-type tabs (e.g. wallet switcher) */
399
+ headerExtra?: ReactNode;
400
+ /** External style customization */
401
+ className?: string;
402
+ }
403
+ /** Props for {@link InstantTradeUI}. */
404
+ interface InstantTradeUIProps {
405
+ direction: "buy" | "sell";
406
+ onDirectionChange: (d: "buy" | "sell") => void;
407
+ amount: number | undefined;
408
+ onAmountChange: (v: number | undefined) => void;
409
+ customAmounts: (number | null)[];
410
+ customPercentages: (number | null)[];
411
+ onQuickAmountClick: (v: number) => void;
412
+ onQuickPercentageClick: (percent: number) => void;
413
+ onCustomAmountsEdit: (amounts: (number | null)[]) => void;
414
+ onCustomPercentagesEdit: (pcts: (number | null)[]) => void;
415
+ tokenSymbol?: string;
416
+ nativeSymbol?: string;
417
+ nativeDecimals?: number;
418
+ nativeBalance?: string;
419
+ tokenBalance?: string;
420
+ amountConversion?: string;
421
+ preset: number;
422
+ onPresetChange: (p: number) => void;
423
+ presetValues: TradePresetValues;
424
+ onPresetSettingsChange: (v: TradePresetValues) => void;
425
+ showSettings: boolean;
426
+ onPresetClick: (preset: number) => void;
427
+ submitText: string;
428
+ isDisabled: boolean;
429
+ isLoading: boolean;
430
+ onSubmit: () => void;
431
+ className?: string;
432
+ headerExtra?: ReactNode;
433
+ }
434
+ /** Value exposed by {@link InstantTradeContext}. */
435
+ interface InstantTradeContextValue {
436
+ chain: Chain;
437
+ tokenAddress: string;
438
+ nativeToken: PredefinedToken | undefined;
439
+ direction: "buy" | "sell";
440
+ setDirection: (d: "buy" | "sell") => void;
441
+ /** Quick-trade amount (native token units for buy, token units for sell). */
442
+ amount: number | undefined;
443
+ setAmount: (v: number | undefined) => void;
444
+ buyPreset: number;
445
+ setBuyPreset: (p: number) => void;
446
+ sellPreset: number;
447
+ setSellPreset: (p: number) => void;
448
+ settings: InstantTradeSettings;
449
+ updateBuySettings: (s: BuySettings) => void;
450
+ updateSellSettings: (s: SellSettings) => void;
451
+ currentPresetValues: TradePresetValues;
452
+ }
453
+ /** Props for {@link InstantTradeProvider}. */
454
+ interface InstantTradeProviderProps {
455
+ /** Target chain */
456
+ chain: Chain;
457
+ /** Address of the token being traded */
458
+ tokenAddress: string;
459
+ /** Controlled settings (omit for built-in localStorage persistence) */
460
+ settings?: InstantTradeSettings;
461
+ /** Called when settings change */
462
+ onSettingsChange?: (settings: InstantTradeSettings) => void;
463
+ children: ReactNode;
464
+ }
465
+ /** Props for {@link InstantTradeAmountInput}. */
466
+ interface InstantTradeAmountInputProps {
467
+ amount?: number;
468
+ onAmountChange: (amount?: number) => void;
469
+ preset?: number;
470
+ onPresetChange?: (preset: number) => void;
471
+ /** Called when an already-selected preset is clicked (e.g. open settings) */
472
+ onPresetClick?: (preset: number) => void;
473
+ variant?: "default" | "bordered";
474
+ radius?: "full" | "lg" | "md" | "sm";
475
+ size?: "sm" | "lg";
476
+ fullWidth?: boolean;
477
+ className?: string;
478
+ }
479
+ /** Props for {@link InstantTradeButton}. */
480
+ interface InstantTradeButtonProps {
481
+ className?: string;
482
+ children?: ReactNode;
483
+ }
484
+ /** Props for {@link PresetFormUI}. */
485
+ interface PresetFormUIProps {
486
+ value: TradePresetValues;
487
+ onChange: (value: TradePresetValues) => void;
488
+ nativeSymbol?: string;
489
+ nativeDecimals?: number;
490
+ className?: string;
491
+ }
492
+ /** Props for {@link PresetFormWidget}. */
493
+ interface PresetFormWidgetProps {
494
+ value: TradePresetValues;
495
+ onChange: (value: TradePresetValues) => void;
496
+ chain: Chain;
497
+ className?: string;
498
+ }
499
+
500
+ /** Buy-side trade settings. */
501
+ interface BuySettings {
502
+ /** Four customizable quick-amount buttons (native token units) */
503
+ customAmounts: (number | null)[];
504
+ /** Three preset configurations */
505
+ presets: TradePresetValues[];
506
+ }
507
+ /** Sell-side trade settings. */
508
+ interface SellSettings {
509
+ /** Four customizable quick-percentage buttons (0-100) */
510
+ customPercentages: (number | null)[];
511
+ /** Three preset configurations */
512
+ presets: TradePresetValues[];
513
+ }
514
+ /** Combined buy + sell settings for instant trade. */
515
+ interface InstantTradeSettings {
516
+ buy: BuySettings;
517
+ sell: SellSettings;
518
+ }
519
+
520
+ declare const DEFAULT_INSTANT_TRADE_SETTINGS: InstantTradeSettings;
521
+ /** Access the nearest {@link InstantTradeProvider}. Throws if none found. */
522
+ declare function useInstantTrade(): InstantTradeContextValue;
523
+ /**
524
+ * Provides instant-trade state to descendant components.
525
+ *
526
+ * Settings follow a controlled / uncontrolled pattern:
527
+ * - **Controlled**: pass `settings` + `onSettingsChange` props.
528
+ * - **Uncontrolled** (default): settings auto-persist to localStorage keyed by chain.
529
+ */
530
+ declare function InstantTradeProvider({ chain, tokenAddress, settings: controlledSettings, onSettingsChange, children, }: InstantTradeProviderProps): react_jsx_runtime.JSX.Element;
531
+
532
+ /**
533
+ * Script hook that encapsulates all data and state for the instant trade form.
534
+ *
535
+ * Must be used inside an {@link InstantTradeProvider}.
536
+ * Pure TypeScript — no JSX, no UI imports.
537
+ */
538
+ declare function useInstantTradeScript(params: UseInstantTradeScriptParams): UseInstantTradeScriptResult;
539
+
540
+ /**
541
+ * Full instant-trade widget — thin orchestration layer.
542
+ *
543
+ * Wraps `InstantTradeProvider`, calls `useInstantTradeScript` to get all data,
544
+ * and renders `InstantTradeUI` as the presentational layer.
545
+ *
546
+ * For custom UIs, use `useInstantTradeScript` directly inside an
547
+ * `InstantTradeProvider` with your own presentation.
548
+ */
549
+ declare function InstantTradeWidget({ chain, tokenAddress, onSwapSubmitted, onSwapError, settings, onSettingsChange, headerExtra, className, }: InstantTradeWidgetProps): react_jsx_runtime.JSX.Element;
550
+
551
+ /**
552
+ * Preset form widget — thin orchestration layer.
553
+ *
554
+ * Manages local state initialized from `value`, resolves chain-specific
555
+ * native token info, and syncs changes upward via `onChange`.
556
+ */
557
+ declare function PresetFormWidget({ value, onChange, chain, className, }: PresetFormWidgetProps): react_jsx_runtime.JSX.Element;
558
+
559
+ /**
560
+ * Pure presentational component for the instant trade form.
561
+ *
562
+ * Receives all data and callbacks via props — no API calls, no context access.
563
+ * Consumers can replace this component while reusing `useInstantTradeScript`.
564
+ */
565
+ declare function InstantTradeUI({ direction, onDirectionChange, amount, onAmountChange, customAmounts, customPercentages, onQuickAmountClick, onQuickPercentageClick, onCustomAmountsEdit, onCustomPercentagesEdit, tokenSymbol, nativeSymbol, nativeDecimals, nativeBalance, tokenBalance, amountConversion, preset, onPresetChange, presetValues, onPresetSettingsChange, showSettings, onPresetClick, submitText, isDisabled, isLoading, onSubmit, className, headerExtra, }: InstantTradeUIProps): react_jsx_runtime.JSX.Element;
566
+
567
+ /**
568
+ * Pure presentational preset-settings form.
569
+ *
570
+ * Renders inputs for slippage, priority fee, tip fee, auto fee,
571
+ * max auto fee, anti-MEV and custom RPC. All data via props.
572
+ */
573
+ declare function PresetFormUI({ value, onChange, nativeSymbol, nativeDecimals, className, }: PresetFormUIProps): react_jsx_runtime.JSX.Element;
574
+
575
+ /**
576
+ * Compact amount input with preset selector buttons.
577
+ *
578
+ * Designed for inline/header usage (e.g. token detail page).
579
+ * Must be rendered inside an {@link InstantTradeProvider}.
580
+ */
581
+ declare function InstantTradeAmountInput({ amount, onAmountChange, preset, onPresetChange, onPresetClick, variant, radius, size, fullWidth, className, }: InstantTradeAmountInputProps): react_jsx_runtime.JSX.Element;
582
+
583
+ /**
584
+ * Trade execution button that reads state from {@link InstantTradeProvider}.
585
+ *
586
+ * Resolves wallet, token addresses, converts amounts, applies preset
587
+ * settings, and calls `useSwap` from the SDK.
588
+ */
589
+ declare function InstantTradeButton({ className, children, }: InstantTradeButtonProps): react_jsx_runtime.JSX.Element;
590
+
320
591
  declare global {
321
592
  interface Window {
322
593
  __LIBERFI_VERSION__?: {
@@ -324,6 +595,6 @@ declare global {
324
595
  };
325
596
  }
326
597
  }
327
- declare const _default: "0.1.2";
598
+ declare const _default: "0.1.3";
328
599
 
329
- export { type SwapInput, type SwapPhase, SwapPreviewModal, type SwapPreviewModalProps, type SwapResult, SwapUI, type SwapUIProps, SwapWidget, type SwapWidgetProps, type TxConfirmationStatus, type UseSwapOptions, type UseSwapRoutePollingOptions, type UseSwapScriptParams, type UseSwapScriptResult, type UseTxConfirmationOptions, useSwap, useSwapRoutePolling, useSwapScript, useTxConfirmation, _default as version };
600
+ export { type BuySettings, DEFAULT_BUY_AMOUNTS, DEFAULT_INSTANT_TRADE_SETTINGS, DEFAULT_SELL_PERCENTAGES, DEFAULT_TRADE_PRESET, InstantTradeAmountInput, type InstantTradeAmountInputProps, InstantTradeButton, type InstantTradeButtonProps, type InstantTradeContextValue, InstantTradeProvider, type InstantTradeProviderProps, type InstantTradeSettings, InstantTradeUI, type InstantTradeUIProps, InstantTradeWidget, type InstantTradeWidgetProps, PresetFormUI, type PresetFormUIProps, PresetFormWidget, type PresetFormWidgetProps, type SellSettings, type SwapInput, type SwapPhase, SwapPreviewModal, type SwapPreviewModalProps, type SwapResult, SwapUI, type SwapUIProps, SwapWidget, type SwapWidgetProps, type TradePresetValues, type TxConfirmationStatus, type UseInstantTradeScriptParams, type UseInstantTradeScriptResult, type UseSwapOptions, type UseSwapRoutePollingOptions, type UseSwapScriptParams, type UseSwapScriptResult, type UseTxConfirmationOptions, useInstantTrade, useInstantTradeScript, useSwap, useSwapRoutePolling, useSwapScript, useTxConfirmation, _default as version };