@skip-go/widget-web-component 0.0.2 → 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.
- package/build/17.index.js +1 -0
- package/build/414.index.js +1 -0
- package/build/544.index.js +1 -0
- package/build/700.index.js +1 -0
- package/build/772.index.js +1 -0
- package/build/854.index.js +1 -0
- package/build/chains/index.d.ts +5 -0
- package/build/constants/abis.d.ts +61 -0
- package/build/constants/defaults.d.ts +5 -0
- package/build/constants/finality.d.ts +2 -0
- package/build/constants/gas.d.ts +3 -0
- package/build/constants/ledger-warning.d.ts +2 -0
- package/build/constants/swap-venues.d.ts +4 -0
- package/build/constants/wagmi.d.ts +2 -0
- package/build/hooks/use-account.d.ts +46 -0
- package/build/hooks/use-assets.d.ts +3 -0
- package/build/hooks/use-auto-set-address.d.ts +12 -0
- package/build/hooks/use-balances-by-chain.d.ts +16 -0
- package/build/hooks/use-bridges.d.ts +8 -0
- package/build/hooks/use-broadcasted-txs.d.ts +26 -0
- package/build/hooks/use-chains.d.ts +11 -0
- package/build/hooks/use-finality-time-estimate.d.ts +2 -0
- package/build/hooks/use-inject-fonts-to-document-head.d.ts +1 -0
- package/build/hooks/use-make-wallets.d.ts +26 -0
- package/build/hooks/use-route.d.ts +21 -0
- package/build/hooks/use-skip-client.d.ts +10 -0
- package/build/hooks/use-swap-widget.d.ts +81 -0
- package/build/hooks/use-usd-value.d.ts +9 -0
- package/build/index.d.ts +5 -0
- package/build/index.js +278 -0
- package/build/index.js.LICENSE.txt +166 -0
- package/build/lib/cosmos-kit.d.ts +3 -0
- package/build/lib/react-query.d.ts +2 -0
- package/build/lib/solana-adapter.d.ts +2 -0
- package/build/lib/viem/chains.d.ts +66 -0
- package/build/lib/wagmi.d.ts +2 -0
- package/build/provider/assets.d.ts +16 -0
- package/build/provider/index.d.ts +29 -0
- package/build/provider/skip-provider.d.ts +12 -0
- package/build/provider/wallet/cosmos.d.ts +6 -0
- package/build/provider/wallet/evm.d.ts +8 -0
- package/build/provider/wallet/solana.d.ts +6 -0
- package/build/store/callbacks.d.ts +31 -0
- package/build/store/disclosures.d.ts +44 -0
- package/build/store/settings.d.ts +17 -0
- package/build/store/swap-widget.d.ts +98 -0
- package/build/store/track-wallet.d.ts +24 -0
- package/build/store/tx-history.d.ts +36 -0
- package/build/styles/fonts.d.ts +1 -0
- package/build/ui/AdaptiveLink.d.ts +5 -0
- package/build/ui/AssetInput.d.ts +20 -0
- package/build/ui/AssetSelect/AssetSelectContent.d.ts +16 -0
- package/build/ui/AssetSelect/index.d.ts +11 -0
- package/build/ui/AssetValue.d.ts +7 -0
- package/build/ui/Button/HistoryButton.d.ts +2 -0
- package/build/ui/Button/SettingsButton.d.ts +2 -0
- package/build/ui/Button/ShareButton.d.ts +3 -0
- package/build/ui/ChainSelect/ChainSelectContent.d.ts +8 -0
- package/build/ui/ChainSelect/ChainSelectTrigger.d.ts +7 -0
- package/build/ui/ChainSelect/index.d.ts +9 -0
- package/build/ui/ChainSymbol.d.ts +5 -0
- package/build/ui/ConnectedWalletButton.d.ts +8 -0
- package/build/ui/ConversionRate.d.ts +22 -0
- package/build/ui/CraftedBySkip.d.ts +1 -0
- package/build/ui/Dialog/Dialog.d.ts +7 -0
- package/build/ui/Dialog/DialogContent.d.ts +7 -0
- package/build/ui/Dialog/DialogTrigger.d.ts +5 -0
- package/build/ui/Dialog/context.d.ts +7 -0
- package/build/ui/HistoryDialog/DescriptionList.d.ts +5 -0
- package/build/ui/HistoryDialog/HistoryClearButton.d.ts +4 -0
- package/build/ui/HistoryDialog/HistoryList.d.ts +14 -0
- package/build/ui/HistoryDialog/RenderDate.d.ts +5 -0
- package/build/ui/HistoryDialog/SyncState.d.ts +4 -0
- package/build/ui/HistoryDialog/index.d.ts +1 -0
- package/build/ui/Icon/ExpandArrow.d.ts +2 -0
- package/build/ui/Icon/GearIcon.d.ts +1 -0
- package/build/ui/Icon/HistoryIcon.d.ts +2 -0
- package/build/ui/Icon/ShareIcon.d.ts +1 -0
- package/build/ui/Icon/SkipLogo.d.ts +2 -0
- package/build/ui/Icon/SpinnerIcon.d.ts +2 -0
- package/build/ui/JsonDialog.d.ts +1 -0
- package/build/ui/PreviewRoute/AlertCollapse.d.ts +13 -0
- package/build/ui/PreviewRoute/ChainStep.d.ts +30 -0
- package/build/ui/PreviewRoute/SetAddressDialog.d.ts +12 -0
- package/build/ui/PreviewRoute/index.d.ts +25 -0
- package/build/ui/PreviewRoute/make-actions.d.ts +29 -0
- package/build/ui/PreviewRoute/make-chain-ids-with-actions.d.ts +11 -0
- package/build/ui/PreviewRoute/make-step-state.d.ts +17 -0
- package/build/ui/PreviewRoute/types.d.ts +21 -0
- package/build/ui/PriceImpactWarning.d.ts +7 -0
- package/build/ui/SettingsDialog/GasSetting.d.ts +1 -0
- package/build/ui/SettingsDialog/PurgeSetting.d.ts +1 -0
- package/build/ui/SettingsDialog/SaveIndicator.d.ts +1 -0
- package/build/ui/SettingsDialog/SlippageSetting.d.ts +1 -0
- package/build/ui/SettingsDialog/index.d.ts +1 -0
- package/build/ui/SimpleTooltip.d.ts +11 -0
- package/build/ui/StyledComponents/Buttons.d.ts +3 -0
- package/build/ui/StyledComponents/Input.d.ts +2 -0
- package/build/ui/StyledComponents/Theme.d.ts +8 -0
- package/build/ui/SwapDetails.d.ts +11 -0
- package/build/ui/TransactionDialog.d.ts +13 -0
- package/build/ui/UsdValue.d.ts +27 -0
- package/build/ui/WalletModal/PraxWalletIndex.d.ts +4 -0
- package/build/ui/WalletModal/WalletListItem.d.ts +9 -0
- package/build/ui/WalletModal/WalletModal.d.ts +10 -0
- package/build/ui/WalletModal/context.d.ts +13 -0
- package/build/ui/WalletModal/index.d.ts +3 -0
- package/build/ui/Widget.d.ts +6 -0
- package/build/ui/WithStyledShadowDom.d.ts +4 -0
- package/build/ui/index.d.ts +12 -0
- package/build/ui/theme.d.ts +20 -0
- package/build/utils/assert.d.ts +2 -0
- package/build/utils/clients.d.ts +4 -0
- package/build/utils/error.d.ts +1 -0
- package/build/utils/intl.d.ts +4 -0
- package/build/utils/ledger-warning.d.ts +3 -0
- package/build/utils/link.d.ts +4 -0
- package/build/utils/number.d.ts +4 -0
- package/build/utils/os.d.ts +3 -0
- package/build/utils/random.d.ts +1 -0
- package/build/utils/ui.d.ts +2 -0
- package/build/utils/usd.d.ts +5 -0
- package/build/utils/wallet.d.ts +7 -0
- package/build/web-component.d.ts +15 -0
- package/package.json +8 -90
|
@@ -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,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 { 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,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 @@
|
|
|
1
|
+
export declare const HistoryDialog: () => 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 @@
|
|
|
1
|
+
export declare const ShareIcon: (props: React.SVGProps<SVGSVGElement>) => 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 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as Tooltip from '@radix-ui/react-tooltip';
|
|
2
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
|
+
type Props = Tooltip.TooltipProps & {
|
|
4
|
+
type?: 'default' | 'warning' | 'brand';
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
_content?: ComponentPropsWithoutRef<'div'>;
|
|
9
|
+
};
|
|
10
|
+
export declare const SimpleTooltip: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledThemedButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
3
|
+
export declare const StyledHighlightButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledSearchInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledThemedDiv: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const StyledBrandDiv: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
+
export declare const StyledBorderDiv: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
|
+
export declare const StyledApproveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
|
|
6
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
7
|
+
}, never>> & string;
|
|
8
|
+
export declare const StyledCancelButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BridgeType, RouteResponse } from '@skip-go/client';
|
|
2
|
+
import { SwapWidgetStore } from '../hooks/use-swap-widget';
|
|
3
|
+
type Props = SwapWidgetStore & {
|
|
4
|
+
amountOut: string;
|
|
5
|
+
onBridgesChange: (bridges: BridgeType[]) => void;
|
|
6
|
+
priceImpactPercent: number;
|
|
7
|
+
priceImpactThresholdReached: boolean;
|
|
8
|
+
route: RouteResponse;
|
|
9
|
+
};
|
|
10
|
+
export declare const SwapDetails: ({ amountIn, amountOut, destinationAsset, destinationChain, gasRequired, priceImpactPercent, priceImpactThresholdReached, route, sourceAsset, sourceChain, sourceFeeAsset, }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RouteResponse } from '@skip-go/client';
|
|
2
|
+
export type ActionType = 'NONE' | 'TRANSFER' | 'SWAP';
|
|
3
|
+
interface Props {
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
route?: RouteResponse;
|
|
6
|
+
isAmountError?: boolean | string;
|
|
7
|
+
shouldShowPriceImpactWarning?: boolean;
|
|
8
|
+
routeWarningMessage?: string;
|
|
9
|
+
routeWarningTitle?: string;
|
|
10
|
+
onAllTransactionComplete?: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare function TransactionDialog({ isLoading, route, isAmountError, shouldShowPriceImpactWarning, routeWarningMessage, routeWarningTitle, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default TransactionDialog;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Args } from '../hooks/use-usd-value';
|
|
3
|
+
type UsdValueProps = Args & {
|
|
4
|
+
error?: ReactNode;
|
|
5
|
+
loading?: ReactNode;
|
|
6
|
+
context?: 'src' | 'dest';
|
|
7
|
+
};
|
|
8
|
+
export declare const UsdValue: ({ error, loading, context, ...args }: UsdValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
type UsdDiffValueProps = {
|
|
10
|
+
src: Args;
|
|
11
|
+
dest: Args;
|
|
12
|
+
onLoading?: ReactNode;
|
|
13
|
+
onUndefined?: ReactNode;
|
|
14
|
+
children?: (args: {
|
|
15
|
+
isLoading: boolean;
|
|
16
|
+
percentage: number;
|
|
17
|
+
}) => ReactNode;
|
|
18
|
+
};
|
|
19
|
+
export declare const UsdDiffValue: (props: UsdDiffValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const UsdDiff: {
|
|
21
|
+
Provider: ({ children }: {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
Value: (props: Omit<UsdDiffValueProps, 'src' | 'dest'>) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
};
|
|
26
|
+
export declare const useUsdDiffReset: () => () => void;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
export declare function useTotalWallets(): number;
|
|
3
|
+
type Props = ComponentProps<'div'> & {
|
|
4
|
+
chainType: string;
|
|
5
|
+
walletName: string;
|
|
6
|
+
walletChainType: 'evm' | 'cosmos' | 'svm';
|
|
7
|
+
};
|
|
8
|
+
export declare const WalletListItem: ({ children, chainType, walletName, walletChainType, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MinimalWallet } from '../../hooks/use-make-wallets';
|
|
2
|
+
interface Props {
|
|
3
|
+
chainType: string;
|
|
4
|
+
wallets: MinimalWallet[];
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
chainID: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function WalletModal({ chainType, onClose, wallets }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function WalletModalWithContext(): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export default WalletModalWithContext;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface WalletModalContext {
|
|
3
|
+
chainID: string;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
6
|
+
openWalletModal: (chainID: string) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const WalletModalContext: import("react").Context<WalletModalContext | undefined>;
|
|
9
|
+
export declare function useWalletModal(): WalletModalContext;
|
|
10
|
+
export declare function WalletModalProvider({ children }: {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ToasterProps } from 'react-hot-toast';
|
|
2
|
+
export type SwapWidgetUIProps = Pick<React.HTMLAttributes<HTMLDivElement>, 'className' | 'style'> & {
|
|
3
|
+
toasterProps?: ToasterProps;
|
|
4
|
+
persistSwapWidgetState?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const SwapWidgetUI: ({ className, style, toasterProps, persistSwapWidgetState, }: SwapWidgetUIProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SwapWidgetProviderProps } from '../provider';
|
|
3
|
+
import { ConfigureSwapWidgetArgs } from '../store/swap-widget';
|
|
4
|
+
import { SwapWidgetUIProps } from './Widget';
|
|
5
|
+
import { PartialTheme } from './theme';
|
|
6
|
+
import { CallbackStore } from '../store/callbacks';
|
|
7
|
+
export type SwapWidgetWithoutProvidersProps = SwapWidgetUIProps & ConfigureSwapWidgetArgs & CallbackStore & {
|
|
8
|
+
theme?: PartialTheme;
|
|
9
|
+
};
|
|
10
|
+
export type SwapWidgetProps = SwapWidgetWithoutProvidersProps & Partial<SwapWidgetProviderProps>;
|
|
11
|
+
export declare const SwapWidgetWithoutProviders: React.FC<SwapWidgetWithoutProvidersProps>;
|
|
12
|
+
export declare const SwapWidget: React.FC<SwapWidgetProps>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import 'styled-components';
|
|
2
|
+
export declare const defaultTheme: {
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
textColor: string;
|
|
5
|
+
borderColor: string;
|
|
6
|
+
brandColor: string;
|
|
7
|
+
highlightColor: string;
|
|
8
|
+
};
|
|
9
|
+
export type PartialTheme = Partial<Theme> | undefined;
|
|
10
|
+
export type Theme = {
|
|
11
|
+
backgroundColor: string;
|
|
12
|
+
textColor: string;
|
|
13
|
+
borderColor: string;
|
|
14
|
+
brandColor: string;
|
|
15
|
+
highlightColor: string;
|
|
16
|
+
};
|
|
17
|
+
declare module 'styled-components' {
|
|
18
|
+
interface DefaultTheme extends Theme {
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate';
|
|
2
|
+
import { StargateClient } from '@cosmjs/stargate';
|
|
3
|
+
export declare function getStargateClientForChainID(chainID: string, rpcURL: string): Promise<StargateClient>;
|
|
4
|
+
export declare function getCosmWasmClientForChainID(chainID: string, rpcURL: string): Promise<CosmWasmClient>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isUserRejectedRequestError(input: unknown): input is Error;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function formatMaxFraction(amount: string | number, fraction?: number): string;
|
|
2
|
+
export declare function formatPercent(amount: string | number): string;
|
|
3
|
+
export declare function formatShortDate(date: string | Date): string;
|
|
4
|
+
export declare function formatUSD(amount: string | number): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function formatNumberWithCommas(str: string | number): string;
|
|
2
|
+
export declare function formatNumberWithoutCommas(str: string | number): string;
|
|
3
|
+
export declare function getAmountWei(amount?: string, decimals?: number): string;
|
|
4
|
+
export declare function parseAmountWei(amount?: string, decimals?: number): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function randomId(length?: number): string;
|