@0xsquid/ui 0.17.2 → 0.17.4

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.
Files changed (47) hide show
  1. package/dist/cjs/index.js +78 -78
  2. package/dist/cjs/types/components/badges/LoadingSkeleton.d.ts +1 -1
  3. package/dist/cjs/types/components/buttons/FilterButton.d.ts +2 -1
  4. package/dist/cjs/types/components/icons/SquidIcons.d.ts +1 -0
  5. package/dist/cjs/types/components/layout/AppContainer.d.ts +7 -0
  6. package/dist/cjs/types/components/layout/ExploreLayout.d.ts +3 -7
  7. package/dist/cjs/types/components/layout/Menu.d.ts +1 -3
  8. package/dist/cjs/types/components/layout/Toast.d.ts +10 -0
  9. package/dist/cjs/types/components/layout/TransactionFilters.d.ts +9 -9
  10. package/dist/cjs/types/components/layout/TransactionHeader/TransactionHeaderLayout.d.ts +3 -2
  11. package/dist/cjs/types/components/layout/TransactionSearch.d.ts +2 -1
  12. package/dist/cjs/types/components/lists/TransactionAction/FeesAction.d.ts +3 -2
  13. package/dist/cjs/types/components/lists/TransactionAction/SuccessAction.d.ts +3 -3
  14. package/dist/cjs/types/components/lists/TransactionAction/SwapAction.d.ts +3 -3
  15. package/dist/cjs/types/components/typography/HeadingText.d.ts +2 -1
  16. package/dist/cjs/types/core/utils.d.ts +3 -0
  17. package/dist/cjs/types/stories/data/actions.d.ts +6 -4
  18. package/dist/cjs/types/stories/layout/AppContainer.stories.d.ts +6 -0
  19. package/dist/cjs/types/stories/layout/Menu.stories.d.ts +2 -3
  20. package/dist/cjs/types/stories/layout/Toast.stories.d.ts +10 -0
  21. package/dist/esm/index.js +79 -80
  22. package/dist/esm/types/components/badges/LoadingSkeleton.d.ts +1 -1
  23. package/dist/esm/types/components/buttons/FilterButton.d.ts +2 -1
  24. package/dist/esm/types/components/icons/SquidIcons.d.ts +1 -0
  25. package/dist/esm/types/components/layout/AppContainer.d.ts +7 -0
  26. package/dist/esm/types/components/layout/ExploreLayout.d.ts +3 -7
  27. package/dist/esm/types/components/layout/Menu.d.ts +1 -3
  28. package/dist/esm/types/components/layout/Toast.d.ts +10 -0
  29. package/dist/esm/types/components/layout/TransactionFilters.d.ts +9 -9
  30. package/dist/esm/types/components/layout/TransactionHeader/TransactionHeaderLayout.d.ts +3 -2
  31. package/dist/esm/types/components/layout/TransactionSearch.d.ts +2 -1
  32. package/dist/esm/types/components/lists/TransactionAction/FeesAction.d.ts +3 -2
  33. package/dist/esm/types/components/lists/TransactionAction/SuccessAction.d.ts +3 -3
  34. package/dist/esm/types/components/lists/TransactionAction/SwapAction.d.ts +3 -3
  35. package/dist/esm/types/components/typography/HeadingText.d.ts +2 -1
  36. package/dist/esm/types/core/utils.d.ts +3 -0
  37. package/dist/esm/types/stories/data/actions.d.ts +6 -4
  38. package/dist/esm/types/stories/layout/AppContainer.stories.d.ts +6 -0
  39. package/dist/esm/types/stories/layout/Menu.stories.d.ts +2 -3
  40. package/dist/esm/types/stories/layout/Toast.stories.d.ts +10 -0
  41. package/dist/index.css +1 -1
  42. package/dist/index.d.ts +40 -41
  43. package/package.json +2 -1
  44. package/dist/cjs/types/stories/data/transaction.d.ts +0 -49
  45. package/dist/cjs/types/types/data.d.ts +0 -155
  46. package/dist/esm/types/stories/data/transaction.d.ts +0 -49
  47. package/dist/esm/types/types/data.d.ts +0 -155
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import * as React$1 from 'react';
4
- import React__default, { ReactNode, ComponentProps } from 'react';
3
+ import * as react from 'react';
4
+ import react__default, { ReactNode, ComponentProps } from 'react';
5
5
 
6
6
  interface BadgeImageProps {
7
7
  imageUrl?: string;
@@ -71,7 +71,7 @@ interface ImageIconProps {
71
71
  }
72
72
  declare function ImageIcon({ src, variant, size, className: propsClassName, }: ImageIconProps): react_jsx_runtime.JSX.Element;
73
73
 
74
- declare const LoadingProvider: React$1.Provider<boolean | null>;
74
+ declare const LoadingProvider: react.Provider<boolean | null>;
75
75
  interface LoadingSkeletonProps {
76
76
  className?: string;
77
77
  height?: string;
@@ -79,7 +79,7 @@ interface LoadingSkeletonProps {
79
79
  children?: React.ReactNode;
80
80
  width?: string;
81
81
  }
82
- declare function LoadingSkeleton({ className, height, isLoading: isLoadingProp, children, width, }: LoadingSkeletonProps): string | number | boolean | react_jsx_runtime.JSX.Element | Iterable<React$1.ReactNode> | null | undefined;
82
+ declare function LoadingSkeleton({ className, height, isLoading: isLoadingProp, children, width, }: LoadingSkeletonProps): string | number | true | Iterable<react.ReactNode> | react_jsx_runtime.JSX.Element;
83
83
 
84
84
  declare const statusBgClassMap: Record<ActionStatus, string>;
85
85
  declare const statusTextClassMap: Record<ActionStatus, string>;
@@ -165,8 +165,9 @@ declare function FeeButton({ feeInUsd, chipLabel, className, ...props }: FeeButt
165
165
  interface FilterButtonProps {
166
166
  selected: boolean;
167
167
  numApplied?: number;
168
+ onClick?: () => void;
168
169
  }
169
- declare function FilterButton({ selected, numApplied }: FilterButtonProps): react_jsx_runtime.JSX.Element;
170
+ declare function FilterButton({ selected, numApplied, onClick, }: FilterButtonProps): react_jsx_runtime.JSX.Element;
170
171
 
171
172
  interface SettingsButtonProps {
172
173
  label: string;
@@ -243,8 +244,8 @@ declare function Switch({ checked, onChange, size, disabled, }: SwitchProps): re
243
244
  type TooltipWidth = 'max' | 'container';
244
245
  type TooltipThreshold = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
245
246
  interface TooltipProps {
246
- children: React__default.ReactNode;
247
- tooltipContent: React__default.ReactNode;
247
+ children: react__default.ReactNode;
248
+ tooltipContent: react__default.ReactNode;
248
249
  threshold?: TooltipThreshold;
249
250
  tooltipWidth?: TooltipWidth;
250
251
  containerClassName?: string;
@@ -554,8 +555,9 @@ interface FeesLinesProps {
554
555
  declare function FeesLines({ status, lines, showTimeline, }: FeesLinesProps): react_jsx_runtime.JSX.Element;
555
556
  interface FeesRowProps {
556
557
  label: string;
557
- usd: string;
558
- eth: string;
558
+ amount: number | string;
559
+ symbol: string;
560
+ usd: number | string;
559
561
  collapsed?: boolean;
560
562
  }
561
563
 
@@ -651,9 +653,9 @@ declare function StartAction({ status, nextStatus, showTimeline, showBody, times
651
653
 
652
654
  interface SuccessActionProps extends BaseActionProps {
653
655
  description?: string;
654
- timestamp: number;
655
- hash: string;
656
- url: string;
656
+ timestamp?: number;
657
+ hash?: string;
658
+ url?: string;
657
659
  }
658
660
  declare function SuccessAction({ nextStatus, status, description, showTimeline, showBody, timestamp, hash, url, }: SuccessActionProps): react_jsx_runtime.JSX.Element;
659
661
 
@@ -670,9 +672,9 @@ interface SwapActionProps extends BaseActionProps {
670
672
  logoURI: string;
671
673
  name: string;
672
674
  };
673
- timestamp: number;
674
- hash: string;
675
- url: string;
675
+ timestamp?: number;
676
+ hash?: string;
677
+ url?: string;
676
678
  }
677
679
  declare function SwapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }: SwapActionProps): react_jsx_runtime.JSX.Element;
678
680
 
@@ -760,11 +762,8 @@ type ErrorMessageProps = {
760
762
  };
761
763
  declare function ErrorMessage({ message, showIcon }: ErrorMessageProps): react_jsx_runtime.JSX.Element;
762
764
 
763
- interface ExploreLayoutProps {
764
- navigation?: ReactNode;
765
- children?: ReactNode;
766
- }
767
- declare function ExploreLayout({ navigation, children }: ExploreLayoutProps): react_jsx_runtime.JSX.Element;
765
+ declare const ExploreLayout: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<react.ElementType<"div">>>;
766
+ declare const ExploreNav: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<react.ElementType<"div">>>;
768
767
 
769
768
  interface HashLinkProps {
770
769
  showTx?: boolean;
@@ -789,15 +788,13 @@ interface JoinProps {
789
788
  declare function Join({ children, glue }: JoinProps): react_jsx_runtime.JSX.Element[] | null | undefined;
790
789
 
791
790
  type Rounded = 'sm' | 'lg';
792
- interface MenuProps extends React__default.ComponentProps<'div'> {
791
+ interface MenuProps extends react__default.ComponentProps<'div'> {
793
792
  containerClassName?: string;
794
793
  contentClassName?: string;
795
- title?: string;
796
- displayControls?: boolean;
797
794
  rounded?: Rounded;
798
- menuRef?: React__default.RefObject<HTMLDivElement>;
795
+ menuRef?: react__default.RefObject<HTMLDivElement>;
799
796
  }
800
- declare function Menu({ children, containerClassName, contentClassName, title, displayControls, rounded, menuRef, ...props }: MenuProps): react_jsx_runtime.JSX.Element;
797
+ declare function Menu({ children, containerClassName, contentClassName, rounded, menuRef, ...props }: MenuProps): react_jsx_runtime.JSX.Element;
801
798
 
802
799
  interface ModalProps {
803
800
  children: React.ReactNode;
@@ -893,7 +890,7 @@ interface SwapStepsCollapsedProps {
893
890
  onClose?: () => void;
894
891
  footerButton?: SwapStepsCollapsedFooterButton;
895
892
  }
896
- declare const SwapStepsCollapsed: React$1.ForwardRefExoticComponent<SwapStepsCollapsedProps & React$1.RefAttributes<{
893
+ declare const SwapStepsCollapsed: react.ForwardRefExoticComponent<SwapStepsCollapsedProps & react.RefAttributes<{
897
894
  handleToggleRouteSteps: () => void;
898
895
  }>>;
899
896
 
@@ -912,16 +909,16 @@ interface TokenPairProps {
912
909
  declare function TokenPair({ firstToken, secondToken, variant, size, }: TokenPairProps): react_jsx_runtime.JSX.Element;
913
910
 
914
911
  interface TransactionFiltersProps {
915
- chainType: ChainTypeFilter;
912
+ chainType?: ChainTypeFilter;
916
913
  setChainType: (chainType: ChainTypeFilter) => void;
917
- chain: string | null;
918
- setChain: (chain: string | null) => void;
919
- fromDate: Date | null;
920
- setFromDate: (fromDate: Date | null) => void;
921
- toDate: Date | null;
922
- setToDate: (toDate: Date | null) => void;
923
- status: StatusFilter[];
924
- setStatus: (status: StatusFilter[]) => void;
914
+ chain?: string;
915
+ setChain: (chain?: string) => void;
916
+ fromDate?: Date;
917
+ setFromDate: (fromDate?: Date) => void;
918
+ toDate?: Date;
919
+ setToDate: (toDate?: Date) => void;
920
+ status?: StatusFilter[];
921
+ setStatus: (status?: StatusFilter[]) => void;
925
922
  chains: {
926
923
  name: string;
927
924
  logoURI: string;
@@ -1003,11 +1000,12 @@ declare function TransactionHeader({ type, props }: TransactionHeaderProps): rea
1003
1000
 
1004
1001
  interface TransactionHeaderLayoutProps {
1005
1002
  status?: ActionStatus;
1006
- title: string;
1003
+ title?: string;
1007
1004
  image?: ReactNode;
1008
1005
  children?: ReactNode;
1006
+ isLoading?: boolean;
1009
1007
  }
1010
- declare function TransactionHeaderLayout({ status, title, image, children, }: TransactionHeaderLayoutProps): react_jsx_runtime.JSX.Element;
1008
+ declare function TransactionHeaderLayout({ status, title, image, children, isLoading, }: TransactionHeaderLayoutProps): react_jsx_runtime.JSX.Element;
1011
1009
 
1012
1010
  interface BridgePropertiesProps {
1013
1011
  amount: string;
@@ -1129,8 +1127,9 @@ interface TransactionSearchProps {
1129
1127
  query: string;
1130
1128
  setQuery: (query: string) => void;
1131
1129
  children?: ReactNode;
1130
+ className?: string;
1132
1131
  }
1133
- declare function TransactionSearch({ query, setQuery, children, }: TransactionSearchProps): react_jsx_runtime.JSX.Element;
1132
+ declare function TransactionSearch({ query, setQuery, children, className, }: TransactionSearchProps): react_jsx_runtime.JSX.Element;
1134
1133
 
1135
1134
  interface FromToProps {
1136
1135
  isLoading?: boolean;
@@ -1154,7 +1153,7 @@ interface CaptionProps extends React.HTMLAttributes<HTMLSpanElement> {
1154
1153
  declare function CaptionText({ children, bold, ...props }: CaptionProps): react_jsx_runtime.JSX.Element;
1155
1154
 
1156
1155
  interface HeadingTextProps {
1157
- children: string;
1156
+ children?: ReactNode;
1158
1157
  size: TextSize;
1159
1158
  bold?: boolean;
1160
1159
  className?: string;
@@ -1187,7 +1186,7 @@ interface AssetsViewProps {
1187
1186
  }[];
1188
1187
  }
1189
1188
  declare function AssetsView({ chains, favoriteTokens, popularTokens, userTokens, }: AssetsViewProps): react_jsx_runtime.JSX.Element;
1190
- declare const List: ({ children }: React__default.PropsWithChildren) => react_jsx_runtime.JSX.Element;
1189
+ declare const List: ({ children }: react__default.PropsWithChildren) => react_jsx_runtime.JSX.Element;
1191
1190
 
1192
1191
  declare function MainView(): react_jsx_runtime.JSX.Element;
1193
1192
 
@@ -1394,4 +1393,4 @@ declare function useDropdownMenu(props?: {
1394
1393
  openDropdownButtonRef: React.RefObject<HTMLButtonElement>;
1395
1394
  };
1396
1395
 
1397
- export { ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, type ActionStatus, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, ApproveAction, ArrowButton, AssetsButton, AssetsView, BadgeImage, type BaseActionProps, type BaseTransactionViewProps, BodyText, Boost, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CaptionText, Chip, Collapse, DescriptionBlocks, DetailsToolbar, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, ErrorMessage, ExploreLayout, FeeButton, FeesAction, type FeesActionProps, FeesLines, FeesTotal, FilterButton, HashLink, HeadingText, HistoryItem, type HistoryItemStatus, IconLabel, ImageIcon, IncompleteAction, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, List, ListItem, LoadingProvider, LoadingSkeleton, MainView, Menu, MenuItem, Modal, ModalContent, ModalContentDivider, NavigationBar, NumericInput, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, type PropertyListItemProps, ReceiveNFTAction, ReceiveTokensAction, RecipientView, STEP_ITEM_HEIGHT, SectionTitle, SendTokensAction, SettingsButton, type SettingsButtonProps, type SettingsControl, SettingsItem, type SettingsItemProps, SettingsSlider, type SettingsSliderProps, SizeTransition, SquidConfigProvider, type SquidTheme, StakeAction, StartAction, SuccessAction, SwapAction, SwapConfiguration, SwapDetailsView, SwapHeader, type SwapHeaderProps, SwapProgressView, SwapProgressViewHeader, SwapProperties, type SwapPropertiesProps, SwapState, type SwapStep, SwapStepItem, SwapStepsCollapsed, type SwapStepsCollapsedFooterButton, SwapTransactionView, Switch, type ThemeType, Timestamp, TokenPair, Tooltip, type TooltipProps, type TooltipThreshold, type TooltipWidth, TransactionAction, type TransactionActionProps, type TransactionActionType, TransactionFilters, TransactionHeader, TransactionHeaderLayout, type TransactionHeaderProps, type TransactionHeaderType, TransactionItem, TransactionProperties, type TransactionPropertiesProps, type TransactionPropertiesType, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, type TransactionViewProps, type TransactionViewType, Transfer, UsdAmount, WalletLink, WalletsView, WrapAction, linkActionTimelineProps, statusBgClassMap, statusColorClassMap, statusTextClassMap, useDropdownMenu };
1396
+ export { ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, type ActionStatus, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, ApproveAction, ArrowButton, AssetsButton, AssetsView, BadgeImage, type BaseActionProps, type BaseTransactionViewProps, BodyText, Boost, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CaptionText, Chip, Collapse, DescriptionBlocks, DetailsToolbar, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, ErrorMessage, ExploreLayout, ExploreNav, FeeButton, FeesAction, type FeesActionProps, FeesLines, FeesTotal, FilterButton, HashLink, HeadingText, HistoryItem, type HistoryItemStatus, IconLabel, ImageIcon, IncompleteAction, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, List, ListItem, LoadingProvider, LoadingSkeleton, MainView, Menu, MenuItem, Modal, ModalContent, ModalContentDivider, NavigationBar, NumericInput, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, type PropertyListItemProps, ReceiveNFTAction, ReceiveTokensAction, RecipientView, STEP_ITEM_HEIGHT, SectionTitle, SendTokensAction, SettingsButton, type SettingsButtonProps, type SettingsControl, SettingsItem, type SettingsItemProps, SettingsSlider, type SettingsSliderProps, SizeTransition, SquidConfigProvider, type SquidTheme, StakeAction, StartAction, SuccessAction, SwapAction, SwapConfiguration, SwapDetailsView, SwapHeader, type SwapHeaderProps, SwapProgressView, SwapProgressViewHeader, SwapProperties, type SwapPropertiesProps, SwapState, type SwapStep, SwapStepItem, SwapStepsCollapsed, type SwapStepsCollapsedFooterButton, SwapTransactionView, Switch, type ThemeType, Timestamp, TokenPair, Tooltip, type TooltipProps, type TooltipThreshold, type TooltipWidth, TransactionAction, type TransactionActionProps, type TransactionActionType, TransactionFilters, TransactionHeader, TransactionHeaderLayout, type TransactionHeaderProps, type TransactionHeaderType, TransactionItem, TransactionProperties, type TransactionPropertiesProps, type TransactionPropertiesType, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, type TransactionViewProps, type TransactionViewType, Transfer, UsdAmount, WalletLink, WalletsView, WrapAction, linkActionTimelineProps, statusBgClassMap, statusColorClassMap, statusTextClassMap, useDropdownMenu };
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "git+https://github.com/0xsquid/squid-ui.git"
6
6
  },
7
7
  "description": "Squid's UI components",
8
- "version": "0.17.2",
8
+ "version": "0.17.4",
9
9
  "author": "",
10
10
  "license": "MIT",
11
11
  "resolutions": {
@@ -33,6 +33,7 @@
33
33
  "clsx": "2.1.0",
34
34
  "color": "4.2.3",
35
35
  "date-fns": "^3.6.0",
36
+ "framer-motion": "^11.2.12",
36
37
  "react-day-picker": "^8.10.1",
37
38
  "tailwind-merge": "2.3.0"
38
39
  },
@@ -1,49 +0,0 @@
1
- import { TransactionData } from '../../types/data';
2
- export declare const rawTransactionData: TransactionData;
3
- export declare const ethereumChainData: {
4
- axelarChainName: string;
5
- networkIdentifier: string;
6
- chainType: string;
7
- rpc: string;
8
- networkName: string;
9
- chainId: string;
10
- nativeCurrency: {
11
- name: string;
12
- symbol: string;
13
- decimals: number;
14
- icon: string;
15
- };
16
- swapAmountForGas: string;
17
- sameChainSwapsSupported: boolean;
18
- chainIconURI: string;
19
- blockExplorerUrls: string[];
20
- chainNativeContracts: {
21
- wrappedNativeToken: string;
22
- ensRegistry: string;
23
- multicall: string;
24
- usdcToken: string;
25
- };
26
- bridges: {
27
- axelar: {
28
- gateway: string;
29
- itsService: string;
30
- };
31
- cctp: {
32
- cctpDomain: number;
33
- tokenMessenger: string;
34
- messageTransmitter: string;
35
- };
36
- };
37
- squidContracts: {
38
- squidRouter: string;
39
- defaultCrosschainToken: string;
40
- squidMulticall: string;
41
- squidFeeCollector: string;
42
- };
43
- compliance: {
44
- trmIdentifier: string;
45
- };
46
- estimatedRouteDuration: number;
47
- estimatedBoostRouteDuration: number;
48
- enableBoostByDefault: boolean;
49
- };
@@ -1,155 +0,0 @@
1
- export interface TokenData {
2
- type: string;
3
- chainId: string;
4
- address: string;
5
- name: string;
6
- symbol: string;
7
- disabled?: boolean;
8
- axelarNetworkSymbol?: string;
9
- subGraphIds?: string[];
10
- subGraphOnly?: boolean;
11
- decimals: number;
12
- logoURI: string;
13
- coingeckoId: string;
14
- usdPrice: number;
15
- }
16
- export interface BaseActionData {
17
- status: string;
18
- explorerURL: string;
19
- txHash: string;
20
- toAmountReceived: string;
21
- toAmountReceivedUSD: string;
22
- exchangeRateReceived: string;
23
- timestamp: number;
24
- chainType: string;
25
- type: string;
26
- data: unknown;
27
- fromChain: string;
28
- toChain: string;
29
- fromToken: TokenData;
30
- toToken: TokenData;
31
- fromAmount: string;
32
- toAmount: string;
33
- toAmountMin: string;
34
- exchangeRate: string;
35
- priceImpact: string;
36
- stage: number;
37
- provider: string;
38
- description: string;
39
- logoURI?: string;
40
- }
41
- export interface WrapActionData extends BaseActionData {
42
- type: 'wrap';
43
- data: {
44
- address: string;
45
- chainId: string;
46
- type: string;
47
- path: string[];
48
- name: string;
49
- logoURI: string;
50
- target: string;
51
- direction: string;
52
- };
53
- }
54
- export interface SwapActionData extends BaseActionData {
55
- type: 'swap';
56
- data: {
57
- address: string;
58
- chainId: string;
59
- coinAddresses: string[];
60
- dex: string;
61
- enabled: boolean;
62
- tickSpacing?: number;
63
- path: string[];
64
- slippage: number;
65
- target: string;
66
- };
67
- }
68
- export interface BridgeActionData extends BaseActionData {
69
- type: 'bridge';
70
- duration: number;
71
- estimatedDuration: number;
72
- data: {
73
- name: string;
74
- provider: string;
75
- type: string;
76
- logoURI: string;
77
- };
78
- }
79
- export type ActionData = WrapActionData | SwapActionData | BridgeActionData;
80
- export interface FeeCostData {
81
- amount: string;
82
- amountUsd: string;
83
- description: string;
84
- gasLimit?: string;
85
- gasMultiplier?: number;
86
- name: string;
87
- token: TokenData;
88
- }
89
- export interface GasCostData {
90
- type: string;
91
- token: TokenData;
92
- amount: string;
93
- gasLimit: string;
94
- amountUsd: string;
95
- }
96
- export interface TransactionData {
97
- status: {
98
- results: {
99
- actions: ActionData[];
100
- fromAmount: string;
101
- toAmount: string;
102
- toAmountMin: string;
103
- toAmountReceived: string;
104
- sendAmount: string;
105
- exchangeRate: string;
106
- exchangeRateReceived: string;
107
- aggregatePriceImpact: string;
108
- fromAmountUSD: string;
109
- toAmountUSD: string;
110
- toAmountMinUSD: string;
111
- toAmountReceivedUSD: string;
112
- aggregateSlippage: number;
113
- onChainQuoting: boolean;
114
- index: number;
115
- fromToken: TokenData;
116
- toToken: TokenData;
117
- toTokenReceived: TokenData;
118
- isBoostSupported: boolean;
119
- feeCosts: FeeCostData[];
120
- gasCosts: GasCostData[];
121
- gasUsed: GasCostData[];
122
- estimatedRouteDuration: number;
123
- routeDuration: number;
124
- routeMetrics: {
125
- bestRoute: string;
126
- bestComparedToOne: string;
127
- bestComparedToTwo: string;
128
- };
129
- };
130
- transactionRequest: {
131
- routeType: string;
132
- target: string;
133
- data: string;
134
- value: string;
135
- gasLimit: string;
136
- lastBaseFeePerGas: string;
137
- maxFeePerGas: string;
138
- maxPriorityFeePerGas: string;
139
- gasPrice: string;
140
- requestId: string;
141
- };
142
- params: {
143
- fromChain: string;
144
- fromToken: string;
145
- fromAddress: string;
146
- fromAmount: string;
147
- toChain: string;
148
- toToken: string;
149
- toAddress: string;
150
- quoteOnly: boolean;
151
- enableBoost: boolean;
152
- onChainQuoting: boolean;
153
- };
154
- };
155
- }
@@ -1,49 +0,0 @@
1
- import { TransactionData } from '../../types/data';
2
- export declare const rawTransactionData: TransactionData;
3
- export declare const ethereumChainData: {
4
- axelarChainName: string;
5
- networkIdentifier: string;
6
- chainType: string;
7
- rpc: string;
8
- networkName: string;
9
- chainId: string;
10
- nativeCurrency: {
11
- name: string;
12
- symbol: string;
13
- decimals: number;
14
- icon: string;
15
- };
16
- swapAmountForGas: string;
17
- sameChainSwapsSupported: boolean;
18
- chainIconURI: string;
19
- blockExplorerUrls: string[];
20
- chainNativeContracts: {
21
- wrappedNativeToken: string;
22
- ensRegistry: string;
23
- multicall: string;
24
- usdcToken: string;
25
- };
26
- bridges: {
27
- axelar: {
28
- gateway: string;
29
- itsService: string;
30
- };
31
- cctp: {
32
- cctpDomain: number;
33
- tokenMessenger: string;
34
- messageTransmitter: string;
35
- };
36
- };
37
- squidContracts: {
38
- squidRouter: string;
39
- defaultCrosschainToken: string;
40
- squidMulticall: string;
41
- squidFeeCollector: string;
42
- };
43
- compliance: {
44
- trmIdentifier: string;
45
- };
46
- estimatedRouteDuration: number;
47
- estimatedBoostRouteDuration: number;
48
- enableBoostByDefault: boolean;
49
- };
@@ -1,155 +0,0 @@
1
- export interface TokenData {
2
- type: string;
3
- chainId: string;
4
- address: string;
5
- name: string;
6
- symbol: string;
7
- disabled?: boolean;
8
- axelarNetworkSymbol?: string;
9
- subGraphIds?: string[];
10
- subGraphOnly?: boolean;
11
- decimals: number;
12
- logoURI: string;
13
- coingeckoId: string;
14
- usdPrice: number;
15
- }
16
- export interface BaseActionData {
17
- status: string;
18
- explorerURL: string;
19
- txHash: string;
20
- toAmountReceived: string;
21
- toAmountReceivedUSD: string;
22
- exchangeRateReceived: string;
23
- timestamp: number;
24
- chainType: string;
25
- type: string;
26
- data: unknown;
27
- fromChain: string;
28
- toChain: string;
29
- fromToken: TokenData;
30
- toToken: TokenData;
31
- fromAmount: string;
32
- toAmount: string;
33
- toAmountMin: string;
34
- exchangeRate: string;
35
- priceImpact: string;
36
- stage: number;
37
- provider: string;
38
- description: string;
39
- logoURI?: string;
40
- }
41
- export interface WrapActionData extends BaseActionData {
42
- type: 'wrap';
43
- data: {
44
- address: string;
45
- chainId: string;
46
- type: string;
47
- path: string[];
48
- name: string;
49
- logoURI: string;
50
- target: string;
51
- direction: string;
52
- };
53
- }
54
- export interface SwapActionData extends BaseActionData {
55
- type: 'swap';
56
- data: {
57
- address: string;
58
- chainId: string;
59
- coinAddresses: string[];
60
- dex: string;
61
- enabled: boolean;
62
- tickSpacing?: number;
63
- path: string[];
64
- slippage: number;
65
- target: string;
66
- };
67
- }
68
- export interface BridgeActionData extends BaseActionData {
69
- type: 'bridge';
70
- duration: number;
71
- estimatedDuration: number;
72
- data: {
73
- name: string;
74
- provider: string;
75
- type: string;
76
- logoURI: string;
77
- };
78
- }
79
- export type ActionData = WrapActionData | SwapActionData | BridgeActionData;
80
- export interface FeeCostData {
81
- amount: string;
82
- amountUsd: string;
83
- description: string;
84
- gasLimit?: string;
85
- gasMultiplier?: number;
86
- name: string;
87
- token: TokenData;
88
- }
89
- export interface GasCostData {
90
- type: string;
91
- token: TokenData;
92
- amount: string;
93
- gasLimit: string;
94
- amountUsd: string;
95
- }
96
- export interface TransactionData {
97
- status: {
98
- results: {
99
- actions: ActionData[];
100
- fromAmount: string;
101
- toAmount: string;
102
- toAmountMin: string;
103
- toAmountReceived: string;
104
- sendAmount: string;
105
- exchangeRate: string;
106
- exchangeRateReceived: string;
107
- aggregatePriceImpact: string;
108
- fromAmountUSD: string;
109
- toAmountUSD: string;
110
- toAmountMinUSD: string;
111
- toAmountReceivedUSD: string;
112
- aggregateSlippage: number;
113
- onChainQuoting: boolean;
114
- index: number;
115
- fromToken: TokenData;
116
- toToken: TokenData;
117
- toTokenReceived: TokenData;
118
- isBoostSupported: boolean;
119
- feeCosts: FeeCostData[];
120
- gasCosts: GasCostData[];
121
- gasUsed: GasCostData[];
122
- estimatedRouteDuration: number;
123
- routeDuration: number;
124
- routeMetrics: {
125
- bestRoute: string;
126
- bestComparedToOne: string;
127
- bestComparedToTwo: string;
128
- };
129
- };
130
- transactionRequest: {
131
- routeType: string;
132
- target: string;
133
- data: string;
134
- value: string;
135
- gasLimit: string;
136
- lastBaseFeePerGas: string;
137
- maxFeePerGas: string;
138
- maxPriorityFeePerGas: string;
139
- gasPrice: string;
140
- requestId: string;
141
- };
142
- params: {
143
- fromChain: string;
144
- fromToken: string;
145
- fromAddress: string;
146
- fromAmount: string;
147
- toChain: string;
148
- toToken: string;
149
- toAddress: string;
150
- quoteOnly: boolean;
151
- enableBoost: boolean;
152
- onChainQuoting: boolean;
153
- };
154
- };
155
- }