@skip-go/widget 1.2.1-alpha.6 → 1.2.1-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -1
- package/build/ast/_constants.d.ts +0 -1
- package/build/ast/_types.d.ts +0 -14
- package/build/ast/get-chains-paths.d.ts +0 -6
- package/build/ast/parse-asset-list-json.d.ts +0 -7
- package/build/ast/parse-chain-json.d.ts +0 -7
- package/build/ast/parse-chain-paths.d.ts +0 -9
- package/build/ast/validate-chains-paths.d.ts +0 -6
- package/build/ast/write-entrypoints.d.ts +0 -7
- package/build/chains/assets.d.ts +0 -3
- package/build/chains/chain-infos.d.ts +0 -3
- package/build/chains/chains.d.ts +0 -3
- package/build/chains/explorers.d.ts +0 -3
- package/build/chains/index.d.ts +0 -7
- package/build/chains/pretty.d.ts +0 -2
- package/build/chains/types.d.ts +0 -6
- package/build/constants/abis.d.ts +0 -2
- package/build/constants/defaults.d.ts +0 -5
- package/build/constants/finality.d.ts +0 -2
- package/build/constants/gas.d.ts +0 -3
- package/build/constants/ledger-warning.d.ts +0 -2
- package/build/constants/swap-venues.d.ts +0 -4
- package/build/constants/wagmi.d.ts +0 -2
- package/build/hooks/use-account.d.ts +0 -46
- package/build/hooks/use-assets.d.ts +0 -4
- package/build/hooks/use-auto-set-address.d.ts +0 -11
- package/build/hooks/use-balances-by-chain.d.ts +0 -15
- package/build/hooks/use-bridges.d.ts +0 -7
- package/build/hooks/use-broadcasted-txs.d.ts +0 -24
- package/build/hooks/use-chains.d.ts +0 -10
- package/build/hooks/use-finality-time-estimate.d.ts +0 -2
- package/build/hooks/use-fix-radix-ui-wheel-event.d.ts +0 -1
- package/build/hooks/use-inject-fonts-to-document-head.d.ts +0 -1
- package/build/hooks/use-make-wallets.d.ts +0 -21
- package/build/hooks/use-route.d.ts +0 -20
- package/build/hooks/use-skip-client.d.ts +0 -9
- package/build/hooks/use-swap-widget.d.ts +0 -81
- package/build/hooks/use-usd-value.d.ts +0 -8
- package/build/index.d.ts +0 -5
- package/build/index.es.js +0 -121585
- package/build/index.es.js.map +0 -1
- package/build/lib/cosmos-kit.d.ts +0 -3
- package/build/lib/react-query.d.ts +0 -2
- package/build/lib/solana-adapter.d.ts +0 -2
- package/build/lib/viem/chains.d.ts +0 -66
- package/build/lib/wagmi.d.ts +0 -8986
- package/build/provider/assets.d.ts +0 -16
- package/build/provider/index.d.ts +0 -25
- package/build/provider/skip-provider.d.ts +0 -12
- package/build/provider/wallet/cosmos.d.ts +0 -6
- package/build/provider/wallet/evm.d.ts +0 -6
- package/build/provider/wallet/solana.d.ts +0 -6
- package/build/scripts/codegen.d.ts +0 -1
- package/build/store/disclosures.d.ts +0 -44
- package/build/store/settings.d.ts +0 -17
- package/build/store/swap-widget.d.ts +0 -107
- package/build/store/track-wallet.d.ts +0 -24
- package/build/store/tx-history.d.ts +0 -36
- package/build/styles/fonts.d.ts +0 -1
- package/build/ui/AdaptiveLink.d.ts +0 -5
- package/build/ui/AssetInput.d.ts +0 -20
- package/build/ui/AssetSelect/AssetSelectContent.d.ts +0 -11
- package/build/ui/AssetSelect/index.d.ts +0 -11
- package/build/ui/AssetValue.d.ts +0 -7
- package/build/ui/Button/HistoryButton.d.ts +0 -2
- package/build/ui/Button/SettingsButton.d.ts +0 -2
- package/build/ui/Button/ShareButton.d.ts +0 -3
- package/build/ui/ChainSelect/ChainSelectContent.d.ts +0 -8
- package/build/ui/ChainSelect/ChainSelectTrigger.d.ts +0 -7
- package/build/ui/ChainSelect/index.d.ts +0 -9
- package/build/ui/ChainSymbol.d.ts +0 -5
- package/build/ui/ConnectedWalletButton.d.ts +0 -8
- package/build/ui/ConversionRate.d.ts +0 -22
- package/build/ui/CraftedBySkip.d.ts +0 -1
- package/build/ui/Dialog/Dialog.d.ts +0 -7
- package/build/ui/Dialog/DialogContent.d.ts +0 -7
- package/build/ui/Dialog/DialogTrigger.d.ts +0 -5
- package/build/ui/Dialog/context.d.ts +0 -7
- package/build/ui/HistoryDialog/DescriptionList.d.ts +0 -5
- package/build/ui/HistoryDialog/HistoryClearButton.d.ts +0 -4
- package/build/ui/HistoryDialog/HistoryList.d.ts +0 -14
- package/build/ui/HistoryDialog/RenderDate.d.ts +0 -5
- package/build/ui/HistoryDialog/SyncState.d.ts +0 -4
- package/build/ui/HistoryDialog/index.d.ts +0 -1
- package/build/ui/Icon/ExpandArrow.d.ts +0 -2
- package/build/ui/Icon/GearIcon.d.ts +0 -1
- package/build/ui/Icon/HistoryIcon.d.ts +0 -2
- package/build/ui/Icon/ShareIcon.d.ts +0 -2
- package/build/ui/Icon/SkipLogo.d.ts +0 -2
- package/build/ui/Icon/SpinnerIcon.d.ts +0 -2
- package/build/ui/JsonDialog.d.ts +0 -1
- package/build/ui/PreviewRoute/AlertCollapse.d.ts +0 -13
- package/build/ui/PreviewRoute/ChainStep.d.ts +0 -30
- package/build/ui/PreviewRoute/SetAddressDialog.d.ts +0 -12
- package/build/ui/PreviewRoute/index.d.ts +0 -25
- package/build/ui/PreviewRoute/make-actions.d.ts +0 -29
- package/build/ui/PreviewRoute/make-chain-ids-with-actions.d.ts +0 -11
- package/build/ui/PreviewRoute/make-step-state.d.ts +0 -17
- package/build/ui/PreviewRoute/types.d.ts +0 -21
- package/build/ui/PriceImpactWarning.d.ts +0 -7
- package/build/ui/SettingsDialog/GasSetting.d.ts +0 -1
- package/build/ui/SettingsDialog/PurgeSetting.d.ts +0 -1
- package/build/ui/SettingsDialog/SaveIndicator.d.ts +0 -1
- package/build/ui/SettingsDialog/SlippageSetting.d.ts +0 -1
- package/build/ui/SettingsDialog/index.d.ts +0 -1
- package/build/ui/SimpleTooltip.d.ts +0 -11
- package/build/ui/SwapDetails.d.ts +0 -11
- package/build/ui/TransactionDialog.d.ts +0 -13
- package/build/ui/UsdValue.d.ts +0 -27
- package/build/ui/WalletModal/WalletListItem.d.ts +0 -8
- package/build/ui/WalletModal/WalletModal.d.ts +0 -10
- package/build/ui/WalletModal/context.d.ts +0 -13
- package/build/ui/WalletModal/index.d.ts +0 -3
- package/build/ui/WebComponent.d.ts +0 -16
- package/build/ui/Widget.d.ts +0 -1
- package/build/ui/index.d.ts +0 -5
- package/build/utils/assert.d.ts +0 -2
- package/build/utils/chain.d.ts +0 -9
- package/build/utils/clients.d.ts +0 -4
- package/build/utils/error.d.ts +0 -1
- package/build/utils/explorer.d.ts +0 -5
- package/build/utils/intl.d.ts +0 -4
- package/build/utils/ledger-warning.d.ts +0 -3
- package/build/utils/link.d.ts +0 -4
- package/build/utils/number.d.ts +0 -4
- package/build/utils/os.d.ts +0 -3
- package/build/utils/random.d.ts +0 -1
- package/build/utils/ui.d.ts +0 -2
- package/build/utils/usd.d.ts +0 -5
- package/build/utils/wallet.d.ts +0 -7
|
@@ -1,16 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,25 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,12 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
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,107 +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
|
-
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 {};
|
|
@@ -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/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
|
-
};
|
package/build/styles/fonts.d.ts
DELETED
|
@@ -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;
|
package/build/ui/AssetInput.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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;
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
package/build/ui/AssetValue.d.ts
DELETED
|
@@ -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,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/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 {};
|
|
@@ -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 { 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,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 +0,0 @@
|
|
|
1
|
-
export declare const HistoryDialog: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const GearIcon: (props: any) => import("react/jsx-runtime").JSX.Element;
|
package/build/ui/JsonDialog.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const JsonDialog: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,13 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,30 +0,0 @@
|
|
|
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;
|
|
@@ -1,12 +0,0 @@
|
|
|
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;
|