@skip-go/widget 1.2.1-alpha.5 → 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.
Files changed (130) hide show
  1. package/package.json +4 -1
  2. package/build/ast/_constants.d.ts +0 -1
  3. package/build/ast/_types.d.ts +0 -14
  4. package/build/ast/get-chains-paths.d.ts +0 -6
  5. package/build/ast/parse-asset-list-json.d.ts +0 -7
  6. package/build/ast/parse-chain-json.d.ts +0 -7
  7. package/build/ast/parse-chain-paths.d.ts +0 -9
  8. package/build/ast/validate-chains-paths.d.ts +0 -6
  9. package/build/ast/write-entrypoints.d.ts +0 -7
  10. package/build/chains/assets.d.ts +0 -3
  11. package/build/chains/chain-infos.d.ts +0 -3
  12. package/build/chains/chains.d.ts +0 -3
  13. package/build/chains/explorers.d.ts +0 -3
  14. package/build/chains/index.d.ts +0 -7
  15. package/build/chains/pretty.d.ts +0 -2
  16. package/build/chains/types.d.ts +0 -6
  17. package/build/constants/abis.d.ts +0 -2
  18. package/build/constants/defaults.d.ts +0 -5
  19. package/build/constants/finality.d.ts +0 -2
  20. package/build/constants/gas.d.ts +0 -3
  21. package/build/constants/ledger-warning.d.ts +0 -2
  22. package/build/constants/swap-venues.d.ts +0 -4
  23. package/build/constants/wagmi.d.ts +0 -2
  24. package/build/hooks/use-account.d.ts +0 -46
  25. package/build/hooks/use-assets.d.ts +0 -4
  26. package/build/hooks/use-auto-set-address.d.ts +0 -11
  27. package/build/hooks/use-balances-by-chain.d.ts +0 -15
  28. package/build/hooks/use-bridges.d.ts +0 -7
  29. package/build/hooks/use-broadcasted-txs.d.ts +0 -24
  30. package/build/hooks/use-chains.d.ts +0 -10
  31. package/build/hooks/use-finality-time-estimate.d.ts +0 -2
  32. package/build/hooks/use-fix-radix-ui-wheel-event.d.ts +0 -1
  33. package/build/hooks/use-inject-fonts-to-document-head.d.ts +0 -1
  34. package/build/hooks/use-make-wallets.d.ts +0 -21
  35. package/build/hooks/use-route.d.ts +0 -20
  36. package/build/hooks/use-skip-client.d.ts +0 -9
  37. package/build/hooks/use-swap-widget.d.ts +0 -81
  38. package/build/hooks/use-usd-value.d.ts +0 -8
  39. package/build/index.d.ts +0 -5
  40. package/build/index.es.js +0 -5211
  41. package/build/index.es.js.map +0 -1
  42. package/build/lib/cosmos-kit.d.ts +0 -3
  43. package/build/lib/react-query.d.ts +0 -2
  44. package/build/lib/solana-adapter.d.ts +0 -2
  45. package/build/lib/viem/chains.d.ts +0 -66
  46. package/build/lib/wagmi.d.ts +0 -8986
  47. package/build/provider/assets.d.ts +0 -16
  48. package/build/provider/index.d.ts +0 -25
  49. package/build/provider/skip-provider.d.ts +0 -12
  50. package/build/provider/wallet/cosmos.d.ts +0 -6
  51. package/build/provider/wallet/evm.d.ts +0 -6
  52. package/build/provider/wallet/solana.d.ts +0 -6
  53. package/build/scripts/codegen.d.ts +0 -1
  54. package/build/store/disclosures.d.ts +0 -44
  55. package/build/store/settings.d.ts +0 -17
  56. package/build/store/swap-widget.d.ts +0 -107
  57. package/build/store/track-wallet.d.ts +0 -24
  58. package/build/store/tx-history.d.ts +0 -36
  59. package/build/styles/fonts.d.ts +0 -1
  60. package/build/ui/AdaptiveLink.d.ts +0 -5
  61. package/build/ui/AssetInput.d.ts +0 -20
  62. package/build/ui/AssetSelect/AssetSelectContent.d.ts +0 -11
  63. package/build/ui/AssetSelect/index.d.ts +0 -11
  64. package/build/ui/AssetValue.d.ts +0 -7
  65. package/build/ui/Button/HistoryButton.d.ts +0 -2
  66. package/build/ui/Button/SettingsButton.d.ts +0 -2
  67. package/build/ui/Button/ShareButton.d.ts +0 -3
  68. package/build/ui/ChainSelect/ChainSelectContent.d.ts +0 -8
  69. package/build/ui/ChainSelect/ChainSelectTrigger.d.ts +0 -7
  70. package/build/ui/ChainSelect/index.d.ts +0 -9
  71. package/build/ui/ChainSymbol.d.ts +0 -5
  72. package/build/ui/ConnectedWalletButton.d.ts +0 -8
  73. package/build/ui/ConversionRate.d.ts +0 -22
  74. package/build/ui/CraftedBySkip.d.ts +0 -1
  75. package/build/ui/Dialog/Dialog.d.ts +0 -7
  76. package/build/ui/Dialog/DialogContent.d.ts +0 -7
  77. package/build/ui/Dialog/DialogTrigger.d.ts +0 -5
  78. package/build/ui/Dialog/context.d.ts +0 -7
  79. package/build/ui/HistoryDialog/DescriptionList.d.ts +0 -5
  80. package/build/ui/HistoryDialog/HistoryClearButton.d.ts +0 -4
  81. package/build/ui/HistoryDialog/HistoryList.d.ts +0 -14
  82. package/build/ui/HistoryDialog/RenderDate.d.ts +0 -5
  83. package/build/ui/HistoryDialog/SyncState.d.ts +0 -4
  84. package/build/ui/HistoryDialog/index.d.ts +0 -1
  85. package/build/ui/Icon/ExpandArrow.d.ts +0 -2
  86. package/build/ui/Icon/GearIcon.d.ts +0 -1
  87. package/build/ui/Icon/HistoryIcon.d.ts +0 -2
  88. package/build/ui/Icon/ShareIcon.d.ts +0 -2
  89. package/build/ui/Icon/SkipLogo.d.ts +0 -2
  90. package/build/ui/Icon/SpinnerIcon.d.ts +0 -2
  91. package/build/ui/JsonDialog.d.ts +0 -1
  92. package/build/ui/PreviewRoute/AlertCollapse.d.ts +0 -13
  93. package/build/ui/PreviewRoute/ChainStep.d.ts +0 -30
  94. package/build/ui/PreviewRoute/SetAddressDialog.d.ts +0 -12
  95. package/build/ui/PreviewRoute/index.d.ts +0 -25
  96. package/build/ui/PreviewRoute/make-actions.d.ts +0 -29
  97. package/build/ui/PreviewRoute/make-chain-ids-with-actions.d.ts +0 -11
  98. package/build/ui/PreviewRoute/make-step-state.d.ts +0 -17
  99. package/build/ui/PreviewRoute/types.d.ts +0 -21
  100. package/build/ui/PriceImpactWarning.d.ts +0 -7
  101. package/build/ui/SettingsDialog/GasSetting.d.ts +0 -1
  102. package/build/ui/SettingsDialog/PurgeSetting.d.ts +0 -1
  103. package/build/ui/SettingsDialog/SaveIndicator.d.ts +0 -1
  104. package/build/ui/SettingsDialog/SlippageSetting.d.ts +0 -1
  105. package/build/ui/SettingsDialog/index.d.ts +0 -1
  106. package/build/ui/SimpleTooltip.d.ts +0 -11
  107. package/build/ui/SwapDetails.d.ts +0 -11
  108. package/build/ui/TransactionDialog.d.ts +0 -13
  109. package/build/ui/UsdValue.d.ts +0 -27
  110. package/build/ui/WalletModal/WalletListItem.d.ts +0 -8
  111. package/build/ui/WalletModal/WalletModal.d.ts +0 -10
  112. package/build/ui/WalletModal/context.d.ts +0 -13
  113. package/build/ui/WalletModal/index.d.ts +0 -3
  114. package/build/ui/WebComponent.d.ts +0 -16
  115. package/build/ui/Widget.d.ts +0 -1
  116. package/build/ui/index.d.ts +0 -5
  117. package/build/utils/assert.d.ts +0 -2
  118. package/build/utils/chain.d.ts +0 -9
  119. package/build/utils/clients.d.ts +0 -4
  120. package/build/utils/error.d.ts +0 -1
  121. package/build/utils/explorer.d.ts +0 -5
  122. package/build/utils/intl.d.ts +0 -4
  123. package/build/utils/ledger-warning.d.ts +0 -3
  124. package/build/utils/link.d.ts +0 -4
  125. package/build/utils/number.d.ts +0 -4
  126. package/build/utils/os.d.ts +0 -3
  127. package/build/utils/random.d.ts +0 -1
  128. package/build/utils/ui.d.ts +0 -2
  129. package/build/utils/usd.d.ts +0 -5
  130. package/build/utils/wallet.d.ts +0 -7
@@ -1,25 +0,0 @@
1
- import { RouteResponse } from '@skip-go/core';
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;
@@ -1,29 +0,0 @@
1
- import { BridgeType, RouteResponse } from '@skip-go/core';
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[];
@@ -1,11 +0,0 @@
1
- import { RouteResponse } from '@skip-go/core';
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[];
@@ -1,17 +0,0 @@
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/core/dist/types").TransferState | undefined;
12
- explorerLink: {
13
- link: string;
14
- shorthand: string;
15
- } | null | undefined;
16
- };
17
- export {};
@@ -1,21 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
1
- interface Props {
2
- onGoBack: () => void;
3
- message?: string;
4
- title?: string;
5
- }
6
- export declare const PriceImpactWarning: ({ onGoBack, message, title, }: Props) => import("react/jsx-runtime").JSX.Element | null;
7
- export {};
@@ -1 +0,0 @@
1
- export declare const GasSetting: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function PurgeSetting(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const SaveIndicator: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const SlippageSetting: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const SettingsDialog: () => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
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 {};
@@ -1,11 +0,0 @@
1
- import { BridgeType, RouteResponse } from '@skip-go/core';
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 {};
@@ -1,13 +0,0 @@
1
- import { RouteResponse } from '@skip-go/core';
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;
@@ -1,27 +0,0 @@
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 {};
@@ -1,8 +0,0 @@
1
- import { ComponentProps } from 'react';
2
- export declare function useTotalWallets(): number;
3
- type Props = ComponentProps<'div'> & {
4
- chainType: string;
5
- walletName: string;
6
- };
7
- export declare const WalletListItem: ({ children, chainType, walletName, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,10 +0,0 @@
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;
@@ -1,13 +0,0 @@
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 {};
@@ -1,3 +0,0 @@
1
- export * from "./context";
2
- import WalletModal from "./WalletModal";
3
- export { WalletModal };
@@ -1,16 +0,0 @@
1
- import { SwapWidgetProps } from './index';
2
- import { SwapWidgetProviderProps } from '../provider';
3
- type WebComponentProps = SwapWidgetProps & SwapWidgetProviderProps;
4
- declare const WEB_COMPONENT_NAME = "skip-widget";
5
- export declare const initializeSwapWidget: () => void;
6
- type Stringify<T> = {
7
- [K in keyof T]?: string;
8
- };
9
- declare global {
10
- namespace JSX {
11
- interface IntrinsicElements {
12
- [WEB_COMPONENT_NAME]: Stringify<WebComponentProps>;
13
- }
14
- }
15
- }
16
- export {};
@@ -1 +0,0 @@
1
- export declare const SwapWidgetUI: ({ className, style, }: Pick<React.HTMLAttributes<HTMLDivElement>, 'className' | 'style'>) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { SwapWidgetProviderProps } from '../provider';
3
- import { ConfigureSwapWidgetArgs } from '../store/swap-widget';
4
- export type SwapWidgetProps = Pick<React.HTMLAttributes<HTMLDivElement>, 'className' | 'style'> & ConfigureSwapWidgetArgs & Partial<SwapWidgetProviderProps>;
5
- export declare const SwapWidget: React.FC<SwapWidgetProps>;
@@ -1,2 +0,0 @@
1
- export declare function ignore(): never;
2
- export declare function raise(message?: string): never;
@@ -1,9 +0,0 @@
1
- import { FeeAsset } from '@skip-go/core';
2
- import { GasPrice } from '@cosmjs/stargate';
3
- /**
4
- * - deprio denoms start with 'ibc/' and 'factory/'
5
- * - prio denoms start with 'u' or 'uu'
6
- */
7
- export declare function sortFeeAssets(a: FeeAsset, b: FeeAsset): 1 | -1 | 0;
8
- export declare const getChainFeeAssets: (chainID: string) => FeeAsset[];
9
- export declare const getChainGasPrice: (chainID: string) => GasPrice | null;
@@ -1,4 +0,0 @@
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>;
@@ -1 +0,0 @@
1
- export declare function isUserRejectedRequestError(input: unknown): input is Error;
@@ -1,5 +0,0 @@
1
- export interface ChainExplorerResponse {
2
- evm: boolean;
3
- explorer: string;
4
- }
5
- export declare function getExplorerUrl(chainId: string): ((txHash: string) => string) | null;
@@ -1,4 +0,0 @@
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;
@@ -1,3 +0,0 @@
1
- import { RouteResponse } from '@skip-go/core';
2
- export declare const isCCTPLedgerBrokenInOperation: (route: RouteResponse) => boolean;
3
- export declare const isEthermintLedgerInOperation: (route: RouteResponse) => boolean;
@@ -1,4 +0,0 @@
1
- export declare const makeExplorerLink: (link: string) => {
2
- link: string;
3
- shorthand: string;
4
- };
@@ -1,4 +0,0 @@
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;
@@ -1,3 +0,0 @@
1
- export declare function isAndroid(): boolean;
2
- export declare function isIos(): false | RegExpMatchArray | null;
3
- export declare function isMobile(): boolean;
@@ -1 +0,0 @@
1
- export declare function randomId(length?: number): string;
@@ -1,2 +0,0 @@
1
- import { type ClassValue } from "clsx";
2
- export declare function cn(...inputs: ClassValue[]): string;
@@ -1,5 +0,0 @@
1
- interface Args {
2
- coingeckoID: string;
3
- }
4
- export declare function getUsdPrice({ coingeckoID }: Args): Promise<number>;
5
- export {};
@@ -1,7 +0,0 @@
1
- import { ChainWalletBase } from '@cosmos-kit/core';
2
- import { MergedWalletClient } from '../lib/cosmos-kit';
3
- export declare function gracefullyConnect(wallet: ChainWalletBase, { onAddChainError, }?: {
4
- onAddChainError?: (err: unknown) => void | Promise<void>;
5
- }): Promise<void>;
6
- export declare function isWalletClientUsingLedger<T extends MergedWalletClient>(walletClient: T, chainID: string): Promise<boolean>;
7
- export declare function isReadyToCheckLedger<T extends MergedWalletClient>(walletClient: T): boolean;