@skip-go/widget-web-component 0.0.3 → 0.0.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 (125) hide show
  1. package/build/chains/index.d.ts +5 -0
  2. package/build/constants/abis.d.ts +61 -0
  3. package/build/constants/defaults.d.ts +5 -0
  4. package/build/constants/finality.d.ts +2 -0
  5. package/build/constants/gas.d.ts +3 -0
  6. package/build/constants/ledger-warning.d.ts +2 -0
  7. package/build/constants/swap-venues.d.ts +4 -0
  8. package/build/constants/wagmi.d.ts +2 -0
  9. package/build/hooks/use-account.d.ts +46 -0
  10. package/build/hooks/use-assets.d.ts +3 -0
  11. package/build/hooks/use-auto-set-address.d.ts +12 -0
  12. package/build/hooks/use-balances-by-chain.d.ts +16 -0
  13. package/build/hooks/use-bridges.d.ts +8 -0
  14. package/build/hooks/use-broadcasted-txs.d.ts +26 -0
  15. package/build/hooks/use-chains.d.ts +11 -0
  16. package/build/hooks/use-finality-time-estimate.d.ts +2 -0
  17. package/build/hooks/use-inject-fonts-to-document-head.d.ts +1 -0
  18. package/build/hooks/use-make-wallets.d.ts +26 -0
  19. package/build/hooks/use-route.d.ts +21 -0
  20. package/build/hooks/use-skip-client.d.ts +10 -0
  21. package/build/hooks/use-swap-widget.d.ts +81 -0
  22. package/build/hooks/use-usd-value.d.ts +9 -0
  23. package/build/index.d.ts +5 -0
  24. package/build/lib/cosmos-kit.d.ts +3 -0
  25. package/build/lib/react-query.d.ts +2 -0
  26. package/build/lib/solana-adapter.d.ts +2 -0
  27. package/build/lib/viem/chains.d.ts +66 -0
  28. package/build/lib/wagmi.d.ts +2 -0
  29. package/build/provider/assets.d.ts +16 -0
  30. package/build/provider/index.d.ts +29 -0
  31. package/build/provider/skip-provider.d.ts +12 -0
  32. package/build/provider/wallet/cosmos.d.ts +6 -0
  33. package/build/provider/wallet/evm.d.ts +8 -0
  34. package/build/provider/wallet/solana.d.ts +6 -0
  35. package/build/store/callbacks.d.ts +31 -0
  36. package/build/store/disclosures.d.ts +44 -0
  37. package/build/store/settings.d.ts +17 -0
  38. package/build/store/swap-widget.d.ts +98 -0
  39. package/build/store/track-wallet.d.ts +24 -0
  40. package/build/store/tx-history.d.ts +36 -0
  41. package/build/styles/fonts.d.ts +1 -0
  42. package/build/ui/AdaptiveLink.d.ts +5 -0
  43. package/build/ui/AssetInput.d.ts +20 -0
  44. package/build/ui/AssetSelect/AssetSelectContent.d.ts +16 -0
  45. package/build/ui/AssetSelect/index.d.ts +11 -0
  46. package/build/ui/AssetValue.d.ts +7 -0
  47. package/build/ui/Button/HistoryButton.d.ts +2 -0
  48. package/build/ui/Button/SettingsButton.d.ts +2 -0
  49. package/build/ui/Button/ShareButton.d.ts +3 -0
  50. package/build/ui/ChainSelect/ChainSelectContent.d.ts +8 -0
  51. package/build/ui/ChainSelect/ChainSelectTrigger.d.ts +7 -0
  52. package/build/ui/ChainSelect/index.d.ts +9 -0
  53. package/build/ui/ChainSymbol.d.ts +5 -0
  54. package/build/ui/ConnectedWalletButton.d.ts +8 -0
  55. package/build/ui/ConversionRate.d.ts +22 -0
  56. package/build/ui/CraftedBySkip.d.ts +1 -0
  57. package/build/ui/Dialog/Dialog.d.ts +7 -0
  58. package/build/ui/Dialog/DialogContent.d.ts +7 -0
  59. package/build/ui/Dialog/DialogTrigger.d.ts +5 -0
  60. package/build/ui/Dialog/context.d.ts +7 -0
  61. package/build/ui/HistoryDialog/DescriptionList.d.ts +5 -0
  62. package/build/ui/HistoryDialog/HistoryClearButton.d.ts +4 -0
  63. package/build/ui/HistoryDialog/HistoryList.d.ts +14 -0
  64. package/build/ui/HistoryDialog/RenderDate.d.ts +5 -0
  65. package/build/ui/HistoryDialog/SyncState.d.ts +4 -0
  66. package/build/ui/HistoryDialog/index.d.ts +1 -0
  67. package/build/ui/Icon/ExpandArrow.d.ts +2 -0
  68. package/build/ui/Icon/GearIcon.d.ts +1 -0
  69. package/build/ui/Icon/HistoryIcon.d.ts +2 -0
  70. package/build/ui/Icon/ShareIcon.d.ts +1 -0
  71. package/build/ui/Icon/SkipLogo.d.ts +2 -0
  72. package/build/ui/Icon/SpinnerIcon.d.ts +2 -0
  73. package/build/ui/JsonDialog.d.ts +1 -0
  74. package/build/ui/PreviewRoute/AlertCollapse.d.ts +13 -0
  75. package/build/ui/PreviewRoute/ChainStep.d.ts +30 -0
  76. package/build/ui/PreviewRoute/SetAddressDialog.d.ts +12 -0
  77. package/build/ui/PreviewRoute/index.d.ts +25 -0
  78. package/build/ui/PreviewRoute/make-actions.d.ts +29 -0
  79. package/build/ui/PreviewRoute/make-chain-ids-with-actions.d.ts +11 -0
  80. package/build/ui/PreviewRoute/make-step-state.d.ts +17 -0
  81. package/build/ui/PreviewRoute/types.d.ts +21 -0
  82. package/build/ui/PriceImpactWarning.d.ts +7 -0
  83. package/build/ui/SettingsDialog/GasSetting.d.ts +1 -0
  84. package/build/ui/SettingsDialog/PurgeSetting.d.ts +1 -0
  85. package/build/ui/SettingsDialog/SaveIndicator.d.ts +1 -0
  86. package/build/ui/SettingsDialog/SlippageSetting.d.ts +1 -0
  87. package/build/ui/SettingsDialog/index.d.ts +1 -0
  88. package/build/ui/SimpleTooltip.d.ts +11 -0
  89. package/build/ui/StyledComponents/Buttons.d.ts +3 -0
  90. package/build/ui/StyledComponents/Input.d.ts +2 -0
  91. package/build/ui/StyledComponents/Theme.d.ts +8 -0
  92. package/build/ui/SwapDetails.d.ts +11 -0
  93. package/build/ui/TransactionDialog.d.ts +13 -0
  94. package/build/ui/UsdValue.d.ts +27 -0
  95. package/build/ui/WalletModal/PraxWalletIndex.d.ts +4 -0
  96. package/build/ui/WalletModal/WalletListItem.d.ts +9 -0
  97. package/build/ui/WalletModal/WalletModal.d.ts +10 -0
  98. package/build/ui/WalletModal/context.d.ts +13 -0
  99. package/build/ui/WalletModal/index.d.ts +3 -0
  100. package/build/ui/Widget.d.ts +6 -0
  101. package/build/ui/WithStyledShadowDom.d.ts +4 -0
  102. package/build/ui/index.d.ts +12 -0
  103. package/build/ui/theme.d.ts +20 -0
  104. package/build/utils/assert.d.ts +2 -0
  105. package/build/utils/clients.d.ts +4 -0
  106. package/build/utils/error.d.ts +1 -0
  107. package/build/utils/intl.d.ts +4 -0
  108. package/build/utils/ledger-warning.d.ts +3 -0
  109. package/build/utils/link.d.ts +4 -0
  110. package/build/utils/number.d.ts +4 -0
  111. package/build/utils/os.d.ts +3 -0
  112. package/build/utils/random.d.ts +1 -0
  113. package/build/utils/ui.d.ts +2 -0
  114. package/build/utils/usd.d.ts +5 -0
  115. package/build/utils/wallet.d.ts +7 -0
  116. package/build/web-component.d.ts +15 -0
  117. package/package.json +8 -90
  118. /package/{dist → build}/17.index.js +0 -0
  119. /package/{dist → build}/414.index.js +0 -0
  120. /package/{dist → build}/544.index.js +0 -0
  121. /package/{dist → build}/700.index.js +0 -0
  122. /package/{dist → build}/772.index.js +0 -0
  123. /package/{dist → build}/854.index.js +0 -0
  124. /package/{dist → build}/index.js +0 -0
  125. /package/{dist → build}/index.js.LICENSE.txt +0 -0
@@ -0,0 +1,17 @@
1
+ interface SettingsStore {
2
+ customGasAmount: string;
3
+ slippage: string;
4
+ }
5
+ export declare const defaultValues: SettingsStore;
6
+ export declare const useSettingsStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SettingsStore>, "persist"> & {
7
+ persist: {
8
+ setOptions: (options: Partial<import("zustand/middleware").PersistOptions<SettingsStore, SettingsStore>>) => void;
9
+ clearStorage: () => void;
10
+ rehydrate: () => void | Promise<void>;
11
+ hasHydrated: () => boolean;
12
+ onHydrate: (fn: (state: SettingsStore) => void) => () => void;
13
+ onFinishHydration: (fn: (state: SettingsStore) => void) => () => void;
14
+ getOptions: () => Partial<import("zustand/middleware").PersistOptions<SettingsStore, SettingsStore>>;
15
+ };
16
+ }>;
17
+ export {};
@@ -0,0 +1,98 @@
1
+ import { DefaultRouteConfig } from '../hooks/use-swap-widget';
2
+ import { RouteConfig } from '../hooks/use-route';
3
+ import { PersistOptions } from 'zustand/middleware';
4
+ interface SwapWidgetStore {
5
+ onlyTestnet?: boolean;
6
+ defaultRoute?: DefaultRouteConfig;
7
+ routeConfig?: RouteConfig;
8
+ /**
9
+ * Filter chains and assets in selection
10
+ *
11
+ * Record<chainID, assetDenoms>
12
+ * if assetDenoms is undefined, all assets are allowed
13
+ * @example
14
+ * ```ts
15
+ * {
16
+ * source: {
17
+ * 'noble-1': undefined,
18
+ * },
19
+ * destination: {
20
+ * 'cosmoshub-4': [
21
+ * 'uatom',
22
+ * 'ibc/2181AAB0218EAC24BC9F86BD1364FBBFA3E6E3FCC25E88E3E68C15DC6E752D86',
23
+ * ],
24
+ * 'agoric-3': [
25
+ * 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9',
26
+ * ],
27
+ * 'osmosis-1': undefined,
28
+ * }
29
+ * ```
30
+ */
31
+ filter?: {
32
+ source?: Record<string, string[] | undefined>;
33
+ destination?: Record<string, string[] | undefined>;
34
+ };
35
+ }
36
+ export declare const swapWidgetDefaultValues: SwapWidgetStore;
37
+ export declare const useSwapWidgetUIStore: import("zustand").UseBoundStore<Omit<Omit<import("zustand").StoreApi<SwapWidgetStore>, "subscribe"> & {
38
+ subscribe: {
39
+ (listener: (selectedState: SwapWidgetStore, previousSelectedState: SwapWidgetStore) => void): () => void;
40
+ <U>(selector: (state: SwapWidgetStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
41
+ equalityFn?: ((a: U, b: U) => boolean) | undefined;
42
+ fireImmediately?: boolean | undefined;
43
+ } | undefined): () => void;
44
+ };
45
+ }, "persist"> & {
46
+ persist: {
47
+ setOptions: (options: Partial<PersistOptions<SwapWidgetStore, Pick<SwapWidgetStore, "defaultRoute">>>) => void;
48
+ clearStorage: () => void;
49
+ rehydrate: () => void | Promise<void>;
50
+ hasHydrated: () => boolean;
51
+ onHydrate: (fn: (state: SwapWidgetStore) => void) => () => void;
52
+ onFinishHydration: (fn: (state: SwapWidgetStore) => void) => () => void;
53
+ getOptions: () => Partial<PersistOptions<SwapWidgetStore, Pick<SwapWidgetStore, "defaultRoute">>>;
54
+ };
55
+ }>;
56
+ export interface ConfigureSwapWidgetArgs {
57
+ settings?: {
58
+ /**
59
+ * gas amount for validation
60
+ * @default 200_000
61
+ */
62
+ customGasAmount?: number;
63
+ /**
64
+ * percentage of slippage 0-100
65
+ * @default 3
66
+ */
67
+ slippage?: number;
68
+ };
69
+ onlyTestnet?: boolean;
70
+ defaultRoute?: DefaultRouteConfig;
71
+ routeConfig?: RouteConfig;
72
+ /**
73
+ * Filter chains and assets in selection
74
+ *
75
+ * Record<chainID, assetDenoms>
76
+ * if assetDenoms is undefined, all assets are allowed
77
+ * @example
78
+ * ```ts
79
+ * {
80
+ * source: {
81
+ * 'noble-1': undefined,
82
+ * },
83
+ * destination: {
84
+ * 'cosmoshub-4': [
85
+ * 'uatom',
86
+ * 'ibc/2181AAB0218EAC24BC9F86BD1364FBBFA3E6E3FCC25E88E3E68C15DC6E752D86',
87
+ * ],
88
+ * 'agoric-3': [
89
+ * 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9',
90
+ * ],
91
+ * 'osmosis-1': undefined,
92
+ * }
93
+ * ```
94
+ */
95
+ filter?: SwapWidgetStore['filter'];
96
+ }
97
+ export declare const configureSwapWidget: (args: ConfigureSwapWidgetArgs) => void;
98
+ export {};
@@ -0,0 +1,24 @@
1
+ export type TrackWalletCtx = 'evm' | 'cosmos' | 'svm';
2
+ interface WalletState {
3
+ walletName: string;
4
+ chainType: string;
5
+ }
6
+ interface TrackWalletStore {
7
+ evm?: WalletState;
8
+ cosmos?: WalletState;
9
+ svm?: WalletState;
10
+ }
11
+ export declare const trackWallet: {
12
+ track: (ctx: TrackWalletCtx, walletName: string, chainType: string) => void;
13
+ untrack: (ctx: TrackWalletCtx) => void;
14
+ get: () => TrackWalletStore;
15
+ subscribe: {
16
+ (listener: (selectedState: TrackWalletStore, previousSelectedState: TrackWalletStore) => void): () => void;
17
+ <U>(selector: (state: TrackWalletStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
18
+ equalityFn?: ((a: U, b: U) => boolean) | undefined;
19
+ fireImmediately?: boolean | undefined;
20
+ } | undefined): () => void;
21
+ };
22
+ };
23
+ export declare function useTrackWallet(ctx?: TrackWalletCtx): WalletState | undefined;
24
+ export {};
@@ -0,0 +1,36 @@
1
+ import { RouteResponse } from '@skip-go/client';
2
+ export interface TxStatus {
3
+ chainId: string;
4
+ txHash: string;
5
+ explorerLink: string;
6
+ axelarscanLink?: string;
7
+ }
8
+ export interface TxHistoryItem {
9
+ route: RouteResponse;
10
+ txStatus: TxStatus[];
11
+ timestamp: string;
12
+ status: 'pending' | 'success' | 'failed';
13
+ }
14
+ export type TxHistoryItemInput = Pick<TxHistoryItem, 'route'>;
15
+ export type TxHistoryState = Record<string, TxHistoryItem>;
16
+ export declare const useTxHistory: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<TxHistoryState>, "persist"> & {
17
+ persist: {
18
+ setOptions: (options: Partial<import("zustand/middleware").PersistOptions<TxHistoryState, TxHistoryState>>) => void;
19
+ clearStorage: () => void;
20
+ rehydrate: () => void | Promise<void>;
21
+ hasHydrated: () => boolean;
22
+ onHydrate: (fn: (state: TxHistoryState) => void) => () => void;
23
+ onFinishHydration: (fn: (state: TxHistoryState) => void) => () => void;
24
+ getOptions: () => Partial<import("zustand/middleware").PersistOptions<TxHistoryState, TxHistoryState>>;
25
+ };
26
+ }>;
27
+ export declare const txHistory: {
28
+ add: (input: TxHistoryItemInput) => readonly [string, TxHistoryItem];
29
+ update: (id: string, input: Partial<TxHistoryItem>) => void;
30
+ success: (id: string) => void;
31
+ fail: (id: string) => void;
32
+ remove: (id: string) => void;
33
+ addStatus: (id: string, route: RouteResponse, txStatus: TxStatus) => void;
34
+ updateStatus: (id: string, txStatus: TxStatus) => void;
35
+ clear: () => void;
36
+ };
@@ -0,0 +1 @@
1
+ export declare const fonts: string;
@@ -0,0 +1,5 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ export type AdaptiveLinkProps = ComponentPropsWithoutRef<"a"> & {
3
+ isExternal?: boolean;
4
+ };
5
+ export declare function AdaptiveLink({ href, isExternal, rel, target, ...props }: AdaptiveLinkProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { Asset } from '@skip-go/client';
2
+ import { MouseEventHandler } from 'react';
3
+ import { Chain } from '../hooks/use-chains';
4
+ interface Props {
5
+ amount: string;
6
+ amountUSD?: string;
7
+ diffPercentage?: number;
8
+ onAmountChange?: (amount: string) => void;
9
+ onAmountMax?: MouseEventHandler<HTMLButtonElement>;
10
+ asset?: Asset;
11
+ onAssetChange?: (asset: Asset) => void;
12
+ chain?: Chain;
13
+ onChainChange?: (chain: Chain) => void;
14
+ chains: Chain[];
15
+ context: 'source' | 'destination';
16
+ isError?: string | boolean;
17
+ isLoading?: boolean;
18
+ }
19
+ declare function AssetInput({ amount, amountUSD, diffPercentage, onAmountChange, onAmountMax, asset, onAssetChange, chain, chains, onChainChange, context, isError, isLoading, }: Props): import("react/jsx-runtime").JSX.Element;
20
+ export default AssetInput;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import * as ScrollArea from '@radix-ui/react-scroll-area';
3
+ import { Asset } from '@skip-go/client';
4
+ interface Props {
5
+ assets?: Asset[];
6
+ balances: Record<string, string>;
7
+ onChange?: (asset: Asset) => void;
8
+ onClose: () => void;
9
+ showChainInfo?: boolean;
10
+ isBalancesLoading?: boolean;
11
+ }
12
+ declare function AssetSelectContent({ assets, balances, onChange, onClose, showChainInfo, isBalancesLoading, }: Props): import("react/jsx-runtime").JSX.Element;
13
+ export default AssetSelectContent;
14
+ export declare const StyledScrollAreaRoot: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<ScrollArea.ScrollAreaProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
15
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
16
+ }, never>> & string & Omit<import("react").ForwardRefExoticComponent<ScrollArea.ScrollAreaProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
@@ -0,0 +1,11 @@
1
+ import { Asset } from '@skip-go/client';
2
+ interface Props {
3
+ asset?: Asset;
4
+ assets?: Asset[];
5
+ balances?: Record<string, string>;
6
+ onChange?: (asset: Asset) => void;
7
+ showChainInfo?: boolean;
8
+ isBalancesLoading?: boolean;
9
+ }
10
+ declare function AssetSelect({ asset, assets, balances, onChange, showChainInfo, isBalancesLoading, }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export default AssetSelect;
@@ -0,0 +1,7 @@
1
+ interface Props {
2
+ chainId: string;
3
+ denom: string;
4
+ value: string;
5
+ }
6
+ export declare function AssetValue({ chainId, denom, value }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ComponentProps } from 'react';
2
+ export declare const HistoryButton: ({ className, ...props }: ComponentProps<'button'>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ComponentProps } from 'react';
2
+ export declare const SettingsButton: ({ className, ...props }: ComponentProps<'button'>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const ShareButton: ({ shareableLink }: {
2
+ shareableLink: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Chain } from '../../hooks/use-chains';
2
+ interface Props {
3
+ chains: Chain[];
4
+ onChange: (chain: Chain) => void;
5
+ onClose: () => void;
6
+ }
7
+ declare function ChainSelectContent({ chains, onChange, onClose }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export default ChainSelectContent;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { Chain } from '../../hooks/use-chains';
3
+ interface Props {
4
+ chain?: Chain;
5
+ }
6
+ declare const ChainSelectTrigger: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLButtonElement>>;
7
+ export default ChainSelectTrigger;
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { Chain } from '../../hooks/use-chains';
3
+ interface Props {
4
+ chain?: Chain;
5
+ chains: Chain[];
6
+ onChange?: (chain: Chain) => void;
7
+ }
8
+ declare const ChainSelect: FC<Props>;
9
+ export default ChainSelect;
@@ -0,0 +1,5 @@
1
+ interface Props {
2
+ chainId: string;
3
+ }
4
+ export declare const ChainSymbol: ({ chainId }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ComponentProps } from 'react';
2
+ type Props = ComponentProps<'button'> & {
3
+ address: string;
4
+ walletName: string;
5
+ walletLogo?: string;
6
+ };
7
+ export declare const ConnectedWalletButton: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
8
+ export {};
@@ -0,0 +1,22 @@
1
+ import { Asset } from '@skip-go/client';
2
+ import { ReactNode } from 'react';
3
+ export interface Props {
4
+ srcAsset: Asset;
5
+ destAsset: Asset;
6
+ amountIn: string;
7
+ amountOut: string;
8
+ defaultDirection?: ConvDirection;
9
+ children: (args: RenderArgs) => ReactNode;
10
+ }
11
+ interface RenderArgs {
12
+ left: Asset;
13
+ right: Asset;
14
+ conversion: number;
15
+ toggle: () => void;
16
+ }
17
+ export declare const ConversionRate: ({ srcAsset: src, destAsset: dest, amountIn, amountOut, defaultDirection, children, }: Props) => ReactNode;
18
+ export declare enum ConvDirection {
19
+ DEST_SRC = "dest-src",
20
+ SRC_DEST = "src-dest"
21
+ }
22
+ export {};
@@ -0,0 +1 @@
1
+ export declare const CraftedBySkip: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren } from 'react';
2
+ interface Props extends PropsWithChildren {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ }
6
+ export declare function Dialog({ children, open, onOpenChange }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { DialogContentProps } from '@radix-ui/react-dialog';
2
+ import { PropsWithChildren } from 'react';
3
+ interface Props extends PropsWithChildren {
4
+ onInteractOutside?: DialogContentProps['onInteractOutside'];
5
+ }
6
+ export declare function DialogContent({ children, onInteractOutside }: Props): import("react/jsx-runtime").JSX.Element | null;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from "react";
2
+ interface Props extends PropsWithChildren {
3
+ }
4
+ export declare const DialogTrigger: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLButtonElement>>;
5
+ export {};
@@ -0,0 +1,7 @@
1
+ import { RefObject } from "react";
2
+ export interface DialogContext {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ container: RefObject<HTMLDivElement>;
6
+ }
7
+ export declare const DialogContext: import("react").Context<DialogContext>;
@@ -0,0 +1,5 @@
1
+ import { ComponentProps } from 'react';
2
+ export declare const Root: ({ className, ...props }: ComponentProps<'dl'>) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const Row: ({ className, ...props }: ComponentProps<'div'>) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const Dt: ({ className, ...props }: ComponentProps<'dt'>) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const Dd: ({ className, ...props }: ComponentProps<'dd'>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ComponentProps } from 'react';
2
+ type Props = ComponentProps<'button'>;
3
+ export declare const HistoryClearButton: ({ className, ...props }: Props) => import("react/jsx-runtime").JSX.Element | null;
4
+ export {};
@@ -0,0 +1,14 @@
1
+ import * as Accordion from '@radix-ui/react-accordion';
2
+ import { ComponentPropsWithoutRef } from 'react';
3
+ import { TxHistoryItem } from '../../store/tx-history';
4
+ type RootProps = Omit<Accordion.AccordionSingleProps, 'type'>;
5
+ export declare const Root: import("react").ForwardRefExoticComponent<RootProps & import("react").RefAttributes<HTMLDivElement>>;
6
+ type StatusIconProps = ComponentPropsWithoutRef<'svg'> & {
7
+ status: TxHistoryItem['status'];
8
+ };
9
+ export declare const StatusIcon: ({ status, ...props }: StatusIconProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const Item: import("react").ForwardRefExoticComponent<Omit<Accordion.AccordionItemProps, "value"> & {
11
+ id: string;
12
+ data: TxHistoryItem;
13
+ } & import("react").RefAttributes<HTMLDivElement>>;
14
+ export {};
@@ -0,0 +1,5 @@
1
+ interface Props {
2
+ date: Date | string;
3
+ }
4
+ export declare const RenderDate: ({ date }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare function useSyncState(): (skipIfOlderThanMinutes?: number) => Promise<void>;
2
+ export declare function SyncState({ skipIfOlderThanMinutes, }: {
3
+ skipIfOlderThanMinutes?: number;
4
+ }): null;
@@ -0,0 +1 @@
1
+ export declare const HistoryDialog: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ComponentProps } from "react";
2
+ export declare const ExpandArrow: ({ className, ...props }: ComponentProps<"svg">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const GearIcon: (props: any) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ComponentProps } from 'react';
2
+ export declare const HistoryIcon: (props: ComponentProps<'svg'>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const ShareIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ declare function SvgComponent(props: any): import("react/jsx-runtime").JSX.Element;
2
+ export default SvgComponent;
@@ -0,0 +1,2 @@
1
+ import type { ComponentProps } from "react";
2
+ export declare const SpinnerIcon: (props: ComponentProps<"svg">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const JsonDialog: () => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,13 @@
1
+ import { ComponentProps } from 'react';
2
+ interface ContextType {
3
+ type: 'error' | 'warning' | 'info' | 'success';
4
+ isOpen: boolean;
5
+ toggle: () => void;
6
+ }
7
+ export declare const Root: ({ className, type, initialOpen, ...props }: import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
8
+ type?: "error" | "success" | "warning" | "info" | undefined;
9
+ initialOpen?: boolean | undefined;
10
+ }) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const Trigger: ({ className, children, onClick, ...props }: ComponentProps<'button'>) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const Content: ({ className, ...props }: ComponentProps<'div'>) => import("react/jsx-runtime").JSX.Element | null;
13
+ export {};
@@ -0,0 +1,30 @@
1
+ import { RouteResponse } from '@skip-go/client';
2
+ import { Dispatch, SetStateAction } from 'react';
3
+ import { SwapAction, TransferAction } from './make-actions';
4
+ import { ChainIDWithAction } from './make-chain-ids-with-actions';
5
+ import { BroadcastedTx, ChainAddresses, SetChainAddressesParam } from './types';
6
+ export declare const ChainStep: ({ chainID, index, transferAction, swapAction, route, chainIDsWithAction, isOpen, broadcastedTxs, mutationStatus, setShowLedgerWarning, isSetAddressDialogOpen, setIsAddressDialogOpen, isExpanded, setIsExpanded, chainAddresses, setChainAddresses, }: {
7
+ chainID: string;
8
+ index: number;
9
+ transferAction?: TransferAction | undefined;
10
+ swapAction?: SwapAction | undefined;
11
+ route: RouteResponse;
12
+ chainIDsWithAction: ChainIDWithAction[];
13
+ isOpen: boolean;
14
+ broadcastedTxs: BroadcastedTx[];
15
+ mutationStatus: {
16
+ isPending: boolean;
17
+ isSuccess: boolean;
18
+ isError: boolean;
19
+ };
20
+ setShowLedgerWarning: Dispatch<SetStateAction<{
21
+ cctp: boolean;
22
+ ethermint: boolean;
23
+ }>>;
24
+ isSetAddressDialogOpen: boolean;
25
+ setIsAddressDialogOpen: (v: number | undefined) => void;
26
+ isExpanded: boolean;
27
+ setIsExpanded: Dispatch<SetStateAction<boolean>>;
28
+ chainAddresses: ChainAddresses;
29
+ setChainAddresses: (v: SetChainAddressesParam) => void;
30
+ }) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,12 @@
1
+ import { Chain } from '@skip-go/client';
2
+ import { ChainAddresses, SetChainAddressesParam } from './types';
3
+ export declare const SetAddressDialog: ({ open, onOpen, chain, index, signRequired, isDestination, chainAddresses, setChainAddresses, }: {
4
+ open: boolean;
5
+ onOpen: (v: boolean) => void;
6
+ chain: Chain;
7
+ index: number;
8
+ signRequired: boolean;
9
+ isDestination: boolean;
10
+ chainAddresses: ChainAddresses;
11
+ setChainAddresses: (v: SetChainAddressesParam) => void;
12
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { RouteResponse } from '@skip-go/client';
2
+ import { useDisclosureKey } from '../../store/disclosures';
3
+ export interface Wallet {
4
+ walletName: string;
5
+ walletPrettyName: string;
6
+ walletInfo: {
7
+ logo?: string | {
8
+ major: string;
9
+ minor: string;
10
+ };
11
+ };
12
+ isLedger?: boolean | null;
13
+ }
14
+ export declare const PreviewRoute: ({ route, disclosure, isAmountError, }: {
15
+ route: RouteResponse;
16
+ disclosure: readonly [boolean, {
17
+ open: ({ closeAll }?: {
18
+ closeAll?: boolean | undefined;
19
+ }) => void;
20
+ close: () => void;
21
+ toggle: () => void;
22
+ set: (value: boolean) => void;
23
+ }];
24
+ isAmountError?: string | boolean | undefined;
25
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import { BridgeType, RouteResponse } from '@skip-go/client';
2
+ export interface TransferAction {
3
+ type: 'TRANSFER';
4
+ denomIn: string;
5
+ denomOut: string;
6
+ fromChainID: string;
7
+ toChainID: string;
8
+ id: string;
9
+ bridgeID?: BridgeType;
10
+ signRequired: boolean;
11
+ amountIn: string;
12
+ amountOut: string;
13
+ txIndex: number;
14
+ }
15
+ export interface SwapAction {
16
+ type: 'SWAP';
17
+ denomIn: string;
18
+ denomOut: string;
19
+ chainID: string;
20
+ id: string;
21
+ signRequired: boolean;
22
+ amountIn: string;
23
+ amountOut: string;
24
+ txIndex: number;
25
+ }
26
+ export type Action = TransferAction | SwapAction;
27
+ export declare const makeActions: ({ route }: {
28
+ route: RouteResponse;
29
+ }) => Action[];
@@ -0,0 +1,11 @@
1
+ import { RouteResponse } from '@skip-go/client';
2
+ import { Action, SwapAction, TransferAction } from './make-actions';
3
+ export interface ChainIDWithAction {
4
+ chainID: string;
5
+ transferAction?: TransferAction | undefined;
6
+ swapAction: SwapAction | undefined;
7
+ }
8
+ export declare const makeChainIDsWithAction: ({ route, actions, }: {
9
+ route: RouteResponse;
10
+ actions: Action[];
11
+ }) => ChainIDWithAction[];
@@ -0,0 +1,17 @@
1
+ import { useBroadcastedTxsStatus } from '../../hooks/use-broadcasted-txs';
2
+ interface Props {
3
+ statusData?: ReturnType<typeof useBroadcastedTxsStatus>['data'];
4
+ isDestination: boolean;
5
+ index: number;
6
+ }
7
+ export declare const makeStepState: (props: Props) => {
8
+ isSuccess: boolean;
9
+ isLoading: boolean;
10
+ isError: boolean;
11
+ state: import("@skip-go/client/dist/types").TransferState | undefined;
12
+ explorerLink: {
13
+ link: string;
14
+ shorthand: string;
15
+ } | null | undefined;
16
+ };
17
+ export {};
@@ -0,0 +1,21 @@
1
+ import { Wallet } from '.';
2
+ import { TrackWalletCtx } from '../../store/track-wallet';
3
+ export type ChainAddress = {
4
+ chainID: string;
5
+ chainType?: TrackWalletCtx;
6
+ address?: string;
7
+ source?: 'input' | Wallet;
8
+ };
9
+ export type ChainAddresses = Record<number, ChainAddress | undefined>;
10
+ export interface SetChainAddressesParam {
11
+ index: number;
12
+ chainID: string;
13
+ chainType: TrackWalletCtx;
14
+ address: string;
15
+ source: 'input' | Wallet;
16
+ }
17
+ export interface BroadcastedTx {
18
+ chainID: string;
19
+ txHash: string;
20
+ explorerLink: string;
21
+ }
@@ -0,0 +1,7 @@
1
+ interface Props {
2
+ onGoBack: () => void;
3
+ message?: string;
4
+ title?: string;
5
+ }
6
+ export declare const PriceImpactWarning: ({ onGoBack, message, title, }: Props) => import("react/jsx-runtime").JSX.Element | null;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare const GasSetting: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function PurgeSetting(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const SaveIndicator: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const SlippageSetting: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const SettingsDialog: () => import("react/jsx-runtime").JSX.Element;