@skip-go/widget 1.2.1-alpha.7 → 1.2.2

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 (131) hide show
  1. package/README.md +167 -167
  2. package/build/ast/_constants.d.ts +1 -0
  3. package/build/ast/_types.d.ts +14 -0
  4. package/build/ast/get-chains-paths.d.ts +6 -0
  5. package/build/ast/parse-asset-list-json.d.ts +7 -0
  6. package/build/ast/parse-chain-json.d.ts +7 -0
  7. package/build/ast/parse-chain-paths.d.ts +9 -0
  8. package/build/ast/validate-chains-paths.d.ts +6 -0
  9. package/build/ast/write-entrypoints.d.ts +7 -0
  10. package/build/chains/assets.d.ts +3 -0
  11. package/build/chains/chain-infos.d.ts +3 -0
  12. package/build/chains/chains.d.ts +3 -0
  13. package/build/chains/explorers.d.ts +3 -0
  14. package/build/chains/index.d.ts +7 -0
  15. package/build/chains/pretty.d.ts +2 -0
  16. package/build/chains/types.d.ts +6 -0
  17. package/build/constants/abis.d.ts +2 -0
  18. package/build/constants/defaults.d.ts +5 -0
  19. package/build/constants/finality.d.ts +2 -0
  20. package/build/constants/gas.d.ts +3 -0
  21. package/build/constants/ledger-warning.d.ts +2 -0
  22. package/build/constants/swap-venues.d.ts +4 -0
  23. package/build/constants/wagmi.d.ts +2 -0
  24. package/build/hooks/use-account.d.ts +46 -0
  25. package/build/hooks/use-assets.d.ts +4 -0
  26. package/build/hooks/use-auto-set-address.d.ts +11 -0
  27. package/build/hooks/use-balances-by-chain.d.ts +15 -0
  28. package/build/hooks/use-bridges.d.ts +7 -0
  29. package/build/hooks/use-broadcasted-txs.d.ts +24 -0
  30. package/build/hooks/use-chains.d.ts +10 -0
  31. package/build/hooks/use-finality-time-estimate.d.ts +2 -0
  32. package/build/hooks/use-fix-radix-ui-wheel-event.d.ts +1 -0
  33. package/build/hooks/use-inject-fonts-to-document-head.d.ts +1 -0
  34. package/build/hooks/use-make-wallets.d.ts +21 -0
  35. package/build/hooks/use-route.d.ts +20 -0
  36. package/build/hooks/use-skip-client.d.ts +9 -0
  37. package/build/hooks/use-swap-widget.d.ts +81 -0
  38. package/build/hooks/use-usd-value.d.ts +8 -0
  39. package/build/index.d.ts +5 -0
  40. package/build/index.es.js +5201 -0
  41. package/build/index.es.js.map +1 -0
  42. package/build/lib/cosmos-kit.d.ts +3 -0
  43. package/build/lib/react-query.d.ts +2 -0
  44. package/build/lib/solana-adapter.d.ts +2 -0
  45. package/build/lib/viem/chains.d.ts +66 -0
  46. package/build/lib/wagmi.d.ts +8986 -0
  47. package/build/provider/assets.d.ts +16 -0
  48. package/build/provider/index.d.ts +25 -0
  49. package/build/provider/skip-provider.d.ts +12 -0
  50. package/build/provider/wallet/cosmos.d.ts +6 -0
  51. package/build/provider/wallet/evm.d.ts +6 -0
  52. package/build/provider/wallet/solana.d.ts +6 -0
  53. package/build/scripts/codegen.d.ts +1 -0
  54. package/build/store/disclosures.d.ts +44 -0
  55. package/build/store/settings.d.ts +17 -0
  56. package/build/store/swap-widget.d.ts +107 -0
  57. package/build/store/track-wallet.d.ts +24 -0
  58. package/build/store/tx-history.d.ts +36 -0
  59. package/build/styles/fonts.d.ts +1 -0
  60. package/build/ui/AdaptiveLink.d.ts +5 -0
  61. package/build/ui/AssetInput.d.ts +20 -0
  62. package/build/ui/AssetSelect/AssetSelectContent.d.ts +11 -0
  63. package/build/ui/AssetSelect/index.d.ts +11 -0
  64. package/build/ui/AssetValue.d.ts +7 -0
  65. package/build/ui/Button/HistoryButton.d.ts +2 -0
  66. package/build/ui/Button/SettingsButton.d.ts +2 -0
  67. package/build/ui/Button/ShareButton.d.ts +3 -0
  68. package/build/ui/ChainSelect/ChainSelectContent.d.ts +8 -0
  69. package/build/ui/ChainSelect/ChainSelectTrigger.d.ts +7 -0
  70. package/build/ui/ChainSelect/index.d.ts +9 -0
  71. package/build/ui/ChainSymbol.d.ts +5 -0
  72. package/build/ui/ConnectedWalletButton.d.ts +8 -0
  73. package/build/ui/ConversionRate.d.ts +22 -0
  74. package/build/ui/CraftedBySkip.d.ts +1 -0
  75. package/build/ui/Dialog/Dialog.d.ts +7 -0
  76. package/build/ui/Dialog/DialogContent.d.ts +7 -0
  77. package/build/ui/Dialog/DialogTrigger.d.ts +5 -0
  78. package/build/ui/Dialog/context.d.ts +7 -0
  79. package/build/ui/HistoryDialog/DescriptionList.d.ts +5 -0
  80. package/build/ui/HistoryDialog/HistoryClearButton.d.ts +4 -0
  81. package/build/ui/HistoryDialog/HistoryList.d.ts +14 -0
  82. package/build/ui/HistoryDialog/RenderDate.d.ts +5 -0
  83. package/build/ui/HistoryDialog/SyncState.d.ts +4 -0
  84. package/build/ui/HistoryDialog/index.d.ts +1 -0
  85. package/build/ui/Icon/ExpandArrow.d.ts +2 -0
  86. package/build/ui/Icon/GearIcon.d.ts +1 -0
  87. package/build/ui/Icon/HistoryIcon.d.ts +2 -0
  88. package/build/ui/Icon/ShareIcon.d.ts +2 -0
  89. package/build/ui/Icon/SkipLogo.d.ts +2 -0
  90. package/build/ui/Icon/SpinnerIcon.d.ts +2 -0
  91. package/build/ui/JsonDialog.d.ts +1 -0
  92. package/build/ui/PreviewRoute/AlertCollapse.d.ts +13 -0
  93. package/build/ui/PreviewRoute/ChainStep.d.ts +30 -0
  94. package/build/ui/PreviewRoute/SetAddressDialog.d.ts +12 -0
  95. package/build/ui/PreviewRoute/index.d.ts +25 -0
  96. package/build/ui/PreviewRoute/make-actions.d.ts +29 -0
  97. package/build/ui/PreviewRoute/make-chain-ids-with-actions.d.ts +11 -0
  98. package/build/ui/PreviewRoute/make-step-state.d.ts +17 -0
  99. package/build/ui/PreviewRoute/types.d.ts +21 -0
  100. package/build/ui/PriceImpactWarning.d.ts +7 -0
  101. package/build/ui/SettingsDialog/GasSetting.d.ts +1 -0
  102. package/build/ui/SettingsDialog/PurgeSetting.d.ts +1 -0
  103. package/build/ui/SettingsDialog/SaveIndicator.d.ts +1 -0
  104. package/build/ui/SettingsDialog/SlippageSetting.d.ts +1 -0
  105. package/build/ui/SettingsDialog/index.d.ts +1 -0
  106. package/build/ui/SimpleTooltip.d.ts +11 -0
  107. package/build/ui/SwapDetails.d.ts +11 -0
  108. package/build/ui/TransactionDialog.d.ts +13 -0
  109. package/build/ui/UsdValue.d.ts +27 -0
  110. package/build/ui/WalletModal/WalletListItem.d.ts +8 -0
  111. package/build/ui/WalletModal/WalletModal.d.ts +10 -0
  112. package/build/ui/WalletModal/context.d.ts +13 -0
  113. package/build/ui/WalletModal/index.d.ts +3 -0
  114. package/build/ui/WebComponent.d.ts +16 -0
  115. package/build/ui/Widget.d.ts +1 -0
  116. package/build/ui/index.d.ts +5 -0
  117. package/build/utils/assert.d.ts +2 -0
  118. package/build/utils/chain.d.ts +9 -0
  119. package/build/utils/clients.d.ts +4 -0
  120. package/build/utils/error.d.ts +1 -0
  121. package/build/utils/explorer.d.ts +5 -0
  122. package/build/utils/intl.d.ts +4 -0
  123. package/build/utils/ledger-warning.d.ts +3 -0
  124. package/build/utils/link.d.ts +4 -0
  125. package/build/utils/number.d.ts +4 -0
  126. package/build/utils/os.d.ts +3 -0
  127. package/build/utils/random.d.ts +1 -0
  128. package/build/utils/ui.d.ts +2 -0
  129. package/build/utils/usd.d.ts +5 -0
  130. package/build/utils/wallet.d.ts +7 -0
  131. package/package.json +2 -6
@@ -0,0 +1,16 @@
1
+ import { Asset } from '@skip-go/core';
2
+ import { ReactNode } from 'react';
3
+ interface AssetsContext {
4
+ assets: Record<string, Asset[]>;
5
+ assetsByChainID: (chainID?: string, filterDenoms?: string[]) => Asset[];
6
+ getAsset(denom: string, chainID: string): Asset | undefined;
7
+ getFeeAsset(chainID: string): Promise<Asset | undefined>;
8
+ getNativeAssets(): Asset[];
9
+ isReady: boolean;
10
+ }
11
+ export declare const AssetsContext: import("react").Context<AssetsContext>;
12
+ export declare const AssetsProvider: ({ children }: {
13
+ children: ReactNode;
14
+ }) => import("react/jsx-runtime").JSX.Element;
15
+ export declare function useAssets(): AssetsContext;
16
+ export {};
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { SkipRouterOptions } from '@skip-go/core';
3
+ import { ToasterProps } from 'react-hot-toast';
4
+ import { DefaultRouteConfig } from '../hooks/use-swap-widget';
5
+ import { RouteConfig } from '../hooks/use-route';
6
+ interface WalletProviderProps {
7
+ children: React.ReactNode;
8
+ }
9
+ export interface WidgetConfig {
10
+ defaultRoute?: DefaultRouteConfig;
11
+ routeConfig?: RouteConfig;
12
+ }
13
+ export interface SwapWidgetProviderProps extends SkipAPIProviderProps {
14
+ children: React.ReactNode;
15
+ toasterProps?: ToasterProps;
16
+ }
17
+ export interface SkipAPIProviderProps {
18
+ children: React.ReactNode;
19
+ endpointOptions?: SkipRouterOptions['endpointOptions'];
20
+ apiURL?: string;
21
+ }
22
+ export declare const WalletProvider: React.FC<WalletProviderProps>;
23
+ export declare const SkipAPIProvider: React.FC<SkipAPIProviderProps>;
24
+ export declare const SwapWidgetProvider: React.FC<SwapWidgetProviderProps>;
25
+ export {};
@@ -0,0 +1,12 @@
1
+ import { SkipRouter, SkipRouterOptions } from '@skip-go/core';
2
+ import { ReactNode } from 'react';
3
+ export declare const SkipContext: import("react").Context<{
4
+ skipClient: SkipRouter;
5
+ apiURL?: string | undefined;
6
+ endpointOptions?: SkipRouterOptions['endpointOptions'];
7
+ } | undefined>;
8
+ export declare function SkipProvider({ children, apiURL, endpointOptions, }: {
9
+ children: ReactNode;
10
+ apiURL?: string;
11
+ endpointOptions?: SkipRouterOptions['endpointOptions'];
12
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface CosmosProviderProps {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare const CosmosProvider: React.FC<CosmosProviderProps>;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface EVMProviderProps {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare const EVMProvider: React.FC<EVMProviderProps>;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ interface SolanaProviderProps {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare const SolanaProvider: React.FC<SolanaProviderProps>;
6
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,44 @@
1
+ declare const defaultValues: {
2
+ confirmSwapDialog: boolean;
3
+ historyDialog: boolean;
4
+ priceImpactDialog: boolean;
5
+ settingsDialog: boolean;
6
+ destinationDialog: boolean;
7
+ embedDialog: boolean;
8
+ };
9
+ export type DisclosureStore = typeof defaultValues & {
10
+ json?: {
11
+ title?: string;
12
+ data: unknown;
13
+ };
14
+ };
15
+ export type DisclosureKey = keyof typeof defaultValues;
16
+ export declare const disclosure: {
17
+ open: (key: DisclosureKey, { closeAll }?: {
18
+ closeAll?: boolean | undefined;
19
+ }) => void;
20
+ openJson: (json: NonNullable<DisclosureStore["json"]>) => void;
21
+ close: (key: DisclosureKey) => void;
22
+ closeJson: () => void;
23
+ toggle: (key: DisclosureKey) => void;
24
+ set: (key: DisclosureKey, value: boolean) => void;
25
+ closeAll: () => void;
26
+ rehydrate: () => void | Promise<void>;
27
+ };
28
+ export declare function useDisclosureKey(key: DisclosureKey): readonly [boolean, {
29
+ open: ({ closeAll }?: {
30
+ closeAll?: boolean | undefined;
31
+ }) => void;
32
+ close: () => void;
33
+ toggle: () => void;
34
+ set: (value: boolean) => void;
35
+ }];
36
+ export declare function useJsonDisclosure(): readonly [{
37
+ title?: string | undefined;
38
+ data: unknown;
39
+ } | undefined, {
40
+ open: (json: NonNullable<DisclosureStore["json"]>) => void;
41
+ close: () => void;
42
+ }];
43
+ export declare function useAnyDisclosureOpen(): boolean;
44
+ export {};
@@ -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,107 @@
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
+ colors: {
6
+ primary?: string;
7
+ };
8
+ onlyTestnet?: boolean;
9
+ defaultRoute?: DefaultRouteConfig;
10
+ routeConfig?: RouteConfig;
11
+ /**
12
+ * Filter chains and assets in selection
13
+ *
14
+ * Record<chainID, assetDenoms>
15
+ * if assetDenoms is undefined, all assets are allowed
16
+ * @example
17
+ * ```ts
18
+ * {
19
+ * source: {
20
+ * 'noble-1': undefined,
21
+ * },
22
+ * destination: {
23
+ * 'cosmoshub-4': [
24
+ * 'uatom',
25
+ * 'ibc/2181AAB0218EAC24BC9F86BD1364FBBFA3E6E3FCC25E88E3E68C15DC6E752D86',
26
+ * ],
27
+ * 'agoric-3': [
28
+ * 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9',
29
+ * ],
30
+ * 'osmosis-1': undefined,
31
+ * }
32
+ * ```
33
+ */
34
+ filter?: {
35
+ source?: Record<string, string[] | undefined>;
36
+ destination?: Record<string, string[] | undefined>;
37
+ };
38
+ }
39
+ export declare const swapWidgetDefaultValues: SwapWidgetStore;
40
+ export declare const useSwapWidgetUIStore: import("zustand").UseBoundStore<Omit<Omit<import("zustand").StoreApi<SwapWidgetStore>, "subscribe"> & {
41
+ subscribe: {
42
+ (listener: (selectedState: SwapWidgetStore, previousSelectedState: SwapWidgetStore) => void): () => void;
43
+ <U>(selector: (state: SwapWidgetStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
44
+ equalityFn?: ((a: U, b: U) => boolean) | undefined;
45
+ fireImmediately?: boolean | undefined;
46
+ } | undefined): () => void;
47
+ };
48
+ }, "persist"> & {
49
+ persist: {
50
+ setOptions: (options: Partial<PersistOptions<SwapWidgetStore, Pick<SwapWidgetStore, "defaultRoute">>>) => void;
51
+ clearStorage: () => void;
52
+ rehydrate: () => void | Promise<void>;
53
+ hasHydrated: () => boolean;
54
+ onHydrate: (fn: (state: SwapWidgetStore) => void) => () => void;
55
+ onFinishHydration: (fn: (state: SwapWidgetStore) => void) => () => void;
56
+ getOptions: () => Partial<PersistOptions<SwapWidgetStore, Pick<SwapWidgetStore, "defaultRoute">>>;
57
+ };
58
+ }>;
59
+ export interface ConfigureSwapWidgetArgs {
60
+ colors?: {
61
+ /**
62
+ * @default '#FF486E'
63
+ */
64
+ primary?: string;
65
+ };
66
+ settings?: {
67
+ /**
68
+ * gas amount for validation
69
+ * @default 200_000
70
+ */
71
+ customGasAmount?: number;
72
+ /**
73
+ * percentage of slippage 0-100
74
+ * @default 3
75
+ */
76
+ slippage?: number;
77
+ };
78
+ onlyTestnet?: boolean;
79
+ defaultRoute?: DefaultRouteConfig;
80
+ routeConfig?: RouteConfig;
81
+ /**
82
+ * Filter chains and assets in selection
83
+ *
84
+ * Record<chainID, assetDenoms>
85
+ * if assetDenoms is undefined, all assets are allowed
86
+ * @example
87
+ * ```ts
88
+ * {
89
+ * source: {
90
+ * 'noble-1': undefined,
91
+ * },
92
+ * destination: {
93
+ * 'cosmoshub-4': [
94
+ * 'uatom',
95
+ * 'ibc/2181AAB0218EAC24BC9F86BD1364FBBFA3E6E3FCC25E88E3E68C15DC6E752D86',
96
+ * ],
97
+ * 'agoric-3': [
98
+ * 'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9',
99
+ * ],
100
+ * 'osmosis-1': undefined,
101
+ * }
102
+ * ```
103
+ */
104
+ filter?: SwapWidgetStore['filter'];
105
+ }
106
+ export declare const configureSwapWidget: (args: ConfigureSwapWidgetArgs) => void;
107
+ 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/core';
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/core';
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,11 @@
1
+ import { Asset } from '@skip-go/core';
2
+ interface Props {
3
+ assets?: Asset[];
4
+ balances: Record<string, string>;
5
+ onChange?: (asset: Asset) => void;
6
+ onClose: () => void;
7
+ showChainInfo?: boolean;
8
+ isBalancesLoading?: boolean;
9
+ }
10
+ declare function AssetSelectContent({ assets, balances, onChange, onClose, showChainInfo, isBalancesLoading, }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export default AssetSelectContent;
@@ -0,0 +1,11 @@
1
+ import { Asset } from '@skip-go/core';
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/core';
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,2 @@
1
+ import * as React from 'react';
2
+ 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" | "warning" | "info" | "success" | 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/core';
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/core';
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;