@skip-go/widget-web-component 0.0.4 → 0.0.6

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 (119) hide show
  1. package/CHANGELOG.md +232 -0
  2. package/README.md +3 -0
  3. package/package.json +7 -11
  4. package/build/chains/index.d.ts +0 -5
  5. package/build/constants/abis.d.ts +0 -61
  6. package/build/constants/defaults.d.ts +0 -5
  7. package/build/constants/finality.d.ts +0 -2
  8. package/build/constants/gas.d.ts +0 -3
  9. package/build/constants/ledger-warning.d.ts +0 -2
  10. package/build/constants/swap-venues.d.ts +0 -4
  11. package/build/constants/wagmi.d.ts +0 -2
  12. package/build/hooks/use-account.d.ts +0 -46
  13. package/build/hooks/use-assets.d.ts +0 -3
  14. package/build/hooks/use-auto-set-address.d.ts +0 -12
  15. package/build/hooks/use-balances-by-chain.d.ts +0 -16
  16. package/build/hooks/use-bridges.d.ts +0 -8
  17. package/build/hooks/use-broadcasted-txs.d.ts +0 -26
  18. package/build/hooks/use-chains.d.ts +0 -11
  19. package/build/hooks/use-finality-time-estimate.d.ts +0 -2
  20. package/build/hooks/use-inject-fonts-to-document-head.d.ts +0 -1
  21. package/build/hooks/use-make-wallets.d.ts +0 -26
  22. package/build/hooks/use-route.d.ts +0 -21
  23. package/build/hooks/use-skip-client.d.ts +0 -10
  24. package/build/hooks/use-swap-widget.d.ts +0 -81
  25. package/build/hooks/use-usd-value.d.ts +0 -9
  26. package/build/index.d.ts +0 -5
  27. package/build/lib/cosmos-kit.d.ts +0 -3
  28. package/build/lib/react-query.d.ts +0 -2
  29. package/build/lib/solana-adapter.d.ts +0 -2
  30. package/build/lib/viem/chains.d.ts +0 -66
  31. package/build/lib/wagmi.d.ts +0 -2
  32. package/build/provider/assets.d.ts +0 -16
  33. package/build/provider/index.d.ts +0 -29
  34. package/build/provider/skip-provider.d.ts +0 -12
  35. package/build/provider/wallet/cosmos.d.ts +0 -6
  36. package/build/provider/wallet/evm.d.ts +0 -8
  37. package/build/provider/wallet/solana.d.ts +0 -6
  38. package/build/store/callbacks.d.ts +0 -31
  39. package/build/store/disclosures.d.ts +0 -44
  40. package/build/store/settings.d.ts +0 -17
  41. package/build/store/swap-widget.d.ts +0 -98
  42. package/build/store/track-wallet.d.ts +0 -24
  43. package/build/store/tx-history.d.ts +0 -36
  44. package/build/styles/fonts.d.ts +0 -1
  45. package/build/ui/AdaptiveLink.d.ts +0 -5
  46. package/build/ui/AssetInput.d.ts +0 -20
  47. package/build/ui/AssetSelect/AssetSelectContent.d.ts +0 -16
  48. package/build/ui/AssetSelect/index.d.ts +0 -11
  49. package/build/ui/AssetValue.d.ts +0 -7
  50. package/build/ui/Button/HistoryButton.d.ts +0 -2
  51. package/build/ui/Button/SettingsButton.d.ts +0 -2
  52. package/build/ui/Button/ShareButton.d.ts +0 -3
  53. package/build/ui/ChainSelect/ChainSelectContent.d.ts +0 -8
  54. package/build/ui/ChainSelect/ChainSelectTrigger.d.ts +0 -7
  55. package/build/ui/ChainSelect/index.d.ts +0 -9
  56. package/build/ui/ChainSymbol.d.ts +0 -5
  57. package/build/ui/ConnectedWalletButton.d.ts +0 -8
  58. package/build/ui/ConversionRate.d.ts +0 -22
  59. package/build/ui/CraftedBySkip.d.ts +0 -1
  60. package/build/ui/Dialog/Dialog.d.ts +0 -7
  61. package/build/ui/Dialog/DialogContent.d.ts +0 -7
  62. package/build/ui/Dialog/DialogTrigger.d.ts +0 -5
  63. package/build/ui/Dialog/context.d.ts +0 -7
  64. package/build/ui/HistoryDialog/DescriptionList.d.ts +0 -5
  65. package/build/ui/HistoryDialog/HistoryClearButton.d.ts +0 -4
  66. package/build/ui/HistoryDialog/HistoryList.d.ts +0 -14
  67. package/build/ui/HistoryDialog/RenderDate.d.ts +0 -5
  68. package/build/ui/HistoryDialog/SyncState.d.ts +0 -4
  69. package/build/ui/HistoryDialog/index.d.ts +0 -1
  70. package/build/ui/Icon/ExpandArrow.d.ts +0 -2
  71. package/build/ui/Icon/GearIcon.d.ts +0 -1
  72. package/build/ui/Icon/HistoryIcon.d.ts +0 -2
  73. package/build/ui/Icon/ShareIcon.d.ts +0 -1
  74. package/build/ui/Icon/SkipLogo.d.ts +0 -2
  75. package/build/ui/Icon/SpinnerIcon.d.ts +0 -2
  76. package/build/ui/JsonDialog.d.ts +0 -1
  77. package/build/ui/PreviewRoute/AlertCollapse.d.ts +0 -13
  78. package/build/ui/PreviewRoute/ChainStep.d.ts +0 -30
  79. package/build/ui/PreviewRoute/SetAddressDialog.d.ts +0 -12
  80. package/build/ui/PreviewRoute/index.d.ts +0 -25
  81. package/build/ui/PreviewRoute/make-actions.d.ts +0 -29
  82. package/build/ui/PreviewRoute/make-chain-ids-with-actions.d.ts +0 -11
  83. package/build/ui/PreviewRoute/make-step-state.d.ts +0 -17
  84. package/build/ui/PreviewRoute/types.d.ts +0 -21
  85. package/build/ui/PriceImpactWarning.d.ts +0 -7
  86. package/build/ui/SettingsDialog/GasSetting.d.ts +0 -1
  87. package/build/ui/SettingsDialog/PurgeSetting.d.ts +0 -1
  88. package/build/ui/SettingsDialog/SaveIndicator.d.ts +0 -1
  89. package/build/ui/SettingsDialog/SlippageSetting.d.ts +0 -1
  90. package/build/ui/SettingsDialog/index.d.ts +0 -1
  91. package/build/ui/SimpleTooltip.d.ts +0 -11
  92. package/build/ui/StyledComponents/Buttons.d.ts +0 -3
  93. package/build/ui/StyledComponents/Input.d.ts +0 -2
  94. package/build/ui/StyledComponents/Theme.d.ts +0 -8
  95. package/build/ui/SwapDetails.d.ts +0 -11
  96. package/build/ui/TransactionDialog.d.ts +0 -13
  97. package/build/ui/UsdValue.d.ts +0 -27
  98. package/build/ui/WalletModal/PraxWalletIndex.d.ts +0 -4
  99. package/build/ui/WalletModal/WalletListItem.d.ts +0 -9
  100. package/build/ui/WalletModal/WalletModal.d.ts +0 -10
  101. package/build/ui/WalletModal/context.d.ts +0 -13
  102. package/build/ui/WalletModal/index.d.ts +0 -3
  103. package/build/ui/Widget.d.ts +0 -6
  104. package/build/ui/WithStyledShadowDom.d.ts +0 -4
  105. package/build/ui/index.d.ts +0 -12
  106. package/build/ui/theme.d.ts +0 -20
  107. package/build/utils/assert.d.ts +0 -2
  108. package/build/utils/clients.d.ts +0 -4
  109. package/build/utils/error.d.ts +0 -1
  110. package/build/utils/intl.d.ts +0 -4
  111. package/build/utils/ledger-warning.d.ts +0 -3
  112. package/build/utils/link.d.ts +0 -4
  113. package/build/utils/number.d.ts +0 -4
  114. package/build/utils/os.d.ts +0 -3
  115. package/build/utils/random.d.ts +0 -1
  116. package/build/utils/ui.d.ts +0 -2
  117. package/build/utils/usd.d.ts +0 -5
  118. package/build/utils/wallet.d.ts +0 -7
  119. package/build/web-component.d.ts +0 -15
@@ -1,2 +0,0 @@
1
- import { CoinbaseWalletAdapter, LedgerWalletAdapter, PhantomWalletAdapter, SolflareWalletAdapter, TrustWalletAdapter } from '@solana/wallet-adapter-wallets';
2
- export declare const solanaWallets: (PhantomWalletAdapter | SolflareWalletAdapter | CoinbaseWalletAdapter | TrustWalletAdapter | LedgerWalletAdapter)[];
@@ -1,66 +0,0 @@
1
- export declare const forma: {
2
- blockExplorers: {
3
- readonly default: {
4
- readonly name: "Forma Explorer";
5
- readonly url: "https://explorer.forma.art";
6
- };
7
- };
8
- contracts: {
9
- readonly multicall3: {
10
- readonly address: "0xd53C6FFB123F7349A32980F87faeD8FfDc9ef079";
11
- readonly blockCreated: 252705;
12
- };
13
- };
14
- id: 984122;
15
- name: "Forma";
16
- nativeCurrency: {
17
- readonly name: "TIA";
18
- readonly symbol: "TIA";
19
- readonly decimals: 18;
20
- };
21
- rpcUrls: {
22
- readonly default: {
23
- readonly http: readonly ["https://rpc.forma.art"];
24
- };
25
- };
26
- sourceId?: number | undefined;
27
- testnet: false;
28
- custom?: Record<string, unknown> | undefined;
29
- fees?: import("viem").ChainFees<undefined> | undefined;
30
- formatters?: undefined;
31
- serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
32
- };
33
- export declare const formaTestnet: {
34
- blockExplorers: {
35
- readonly default: {
36
- readonly name: "Forma Explorer";
37
- readonly url: "https://explorer.sketchpad-1.forma.art";
38
- };
39
- };
40
- contracts?: {
41
- [x: string]: import("viem").ChainContract | {
42
- [sourceId: number]: import("viem").ChainContract | undefined;
43
- } | undefined;
44
- ensRegistry?: import("viem").ChainContract | undefined;
45
- ensUniversalResolver?: import("viem").ChainContract | undefined;
46
- multicall3?: import("viem").ChainContract | undefined;
47
- } | undefined;
48
- id: 984123;
49
- name: "Forma Testnet";
50
- nativeCurrency: {
51
- readonly name: "TIA";
52
- readonly symbol: "TIA";
53
- readonly decimals: 18;
54
- };
55
- rpcUrls: {
56
- readonly default: {
57
- readonly http: readonly ["https://rpc.sketchpad-1.forma.art"];
58
- };
59
- };
60
- sourceId?: number | undefined;
61
- testnet: true;
62
- custom?: Record<string, unknown> | undefined;
63
- fees?: import("viem").ChainFees<undefined> | undefined;
64
- formatters?: undefined;
65
- serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
66
- };
@@ -1,2 +0,0 @@
1
- import { Config } from 'wagmi';
2
- export declare const config: Config;
@@ -1,16 +0,0 @@
1
- import { Asset } from '@skip-go/client';
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 {};
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import { ChainAffiliates, SkipClientOptions } from '@skip-go/client';
3
- import { DefaultRouteConfig } from '../hooks/use-swap-widget';
4
- import { RouteConfig } from '../hooks/use-route';
5
- import { MinimalWallet } from '../hooks/use-make-wallets';
6
- import { Config } from 'wagmi';
7
- interface WalletProviderProps {
8
- wagmiConfig?: Config;
9
- children: React.ReactNode;
10
- }
11
- export interface WidgetConfig {
12
- defaultRoute?: DefaultRouteConfig;
13
- routeConfig?: RouteConfig;
14
- }
15
- export interface SwapWidgetProviderProps extends SkipAPIProviderProps {
16
- wagmiConfig?: Config;
17
- children: React.ReactNode;
18
- }
19
- export interface SkipAPIProviderProps {
20
- children: React.ReactNode;
21
- endpointOptions?: SkipClientOptions['endpointOptions'];
22
- apiURL?: string;
23
- makeDestinationWallets?: (chainID: string) => MinimalWallet[];
24
- chainIDsToAffiliates?: Record<string, ChainAffiliates>;
25
- }
26
- export declare const WalletProvider: React.FC<WalletProviderProps>;
27
- export declare const SkipAPIProvider: React.FC<SkipAPIProviderProps>;
28
- export declare const SwapWidgetProvider: React.FC<SwapWidgetProviderProps>;
29
- export {};
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import { ChainAffiliates, SkipClient, SkipClientOptions } from '@skip-go/client';
3
- import { MinimalWallet } from '../hooks/use-make-wallets';
4
- import { SkipAPIProviderProps } from './index';
5
- export declare const SkipContext: import("react").Context<{
6
- skipClient: SkipClient;
7
- apiURL?: string | undefined;
8
- endpointOptions?: SkipClientOptions['endpointOptions'];
9
- makeDestinationWallets?: ((chainID: string) => MinimalWallet[]) | undefined;
10
- chainIDsToAffiliates?: Record<string, ChainAffiliates> | undefined;
11
- } | undefined>;
12
- export declare function SkipProvider({ children, apiURL, endpointOptions, makeDestinationWallets, chainIDsToAffiliates, }: SkipAPIProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- interface CosmosProviderProps {
3
- children: React.ReactNode;
4
- }
5
- export declare const CosmosProvider: React.FC<CosmosProviderProps>;
6
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { Config } from 'wagmi';
3
- interface EVMProviderProps {
4
- children: React.ReactNode;
5
- wagmiConfig?: Config;
6
- }
7
- export declare const EVMProvider: React.FC<EVMProviderProps>;
8
- export {};
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface SolanaProviderProps {
3
- children: React.ReactNode;
4
- }
5
- export declare const SolanaProvider: React.FC<SolanaProviderProps>;
6
- export {};
@@ -1,31 +0,0 @@
1
- type OnWalletConnected = {
2
- walletName: string;
3
- chainId: string;
4
- address?: string;
5
- };
6
- type OnWalletDisconnected = {
7
- chainType?: string;
8
- };
9
- type OnTransactionBroadcasted = {
10
- txHash: string;
11
- chainId: string;
12
- explorerLink: string;
13
- };
14
- type OnTransactionComplete = {
15
- txHash: string;
16
- chainId: string;
17
- explorerLink: string;
18
- };
19
- type OnTransactionFailed = {
20
- error: string;
21
- };
22
- export type CallbackStore = {
23
- onWalletConnected?: (props: OnWalletConnected) => void;
24
- onWalletDisconnected?: (props: OnWalletDisconnected) => void;
25
- onTransactionBroadcasted?: (props: OnTransactionBroadcasted) => void;
26
- onTransactionComplete?: (props: OnTransactionComplete) => void;
27
- onTransactionFailed?: (props: OnTransactionFailed) => void;
28
- };
29
- export declare const defaultValues: CallbackStore;
30
- export declare const useCallbackStore: import("zustand").UseBoundStore<import("zustand").StoreApi<CallbackStore>>;
31
- export {};
@@ -1,44 +0,0 @@
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 {};
@@ -1,17 +0,0 @@
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 {};
@@ -1,98 +0,0 @@
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 {};
@@ -1,24 +0,0 @@
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 {};
@@ -1,36 +0,0 @@
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
- };
@@ -1 +0,0 @@
1
- export declare const fonts: string;
@@ -1,5 +0,0 @@
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;
@@ -1,20 +0,0 @@
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;
@@ -1,16 +0,0 @@
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>>;
@@ -1,11 +0,0 @@
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;
@@ -1,7 +0,0 @@
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 {};
@@ -1,2 +0,0 @@
1
- import { ComponentProps } from 'react';
2
- export declare const HistoryButton: ({ className, ...props }: ComponentProps<'button'>) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { ComponentProps } from 'react';
2
- export declare const SettingsButton: ({ className, ...props }: ComponentProps<'button'>) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- export declare const ShareButton: ({ shareableLink }: {
2
- shareableLink: string;
3
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
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;
@@ -1,7 +0,0 @@
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;
@@ -1,9 +0,0 @@
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;
@@ -1,5 +0,0 @@
1
- interface Props {
2
- chainId: string;
3
- }
4
- export declare const ChainSymbol: ({ chainId }: Props) => import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,8 +0,0 @@
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 {};
@@ -1,22 +0,0 @@
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 {};
@@ -1 +0,0 @@
1
- export declare const CraftedBySkip: () => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
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 {};
@@ -1,7 +0,0 @@
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 {};
@@ -1,5 +0,0 @@
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 {};
@@ -1,7 +0,0 @@
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>;
@@ -1,5 +0,0 @@
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;
@@ -1,4 +0,0 @@
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 {};
@@ -1,14 +0,0 @@
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 {};
@@ -1,5 +0,0 @@
1
- interface Props {
2
- date: Date | string;
3
- }
4
- export declare const RenderDate: ({ date }: Props) => import("react/jsx-runtime").JSX.Element;
5
- export {};