@skip-go/widget 2.3.7 → 2.3.8

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.
@@ -1,4 +1,4 @@
1
- import { AssetsRequest } from '@skip-go/core';
1
+ import { AssetsRequest } from '@skip-go/client';
2
2
  export declare function useAssets(options?: AssetsRequest): import("@tanstack/react-query/build/legacy/types").UseQueryResult<{
3
- [k: string]: import("@skip-go/core/dist/shared-UW-rSz3r").a[];
3
+ [k: string]: import("@skip-go/client/dist/shared-CvoSvr3u").a[];
4
4
  }, Error>;
@@ -1,4 +1,4 @@
1
- import { Chain } from '@skip-go/core';
1
+ import { Chain } from '@skip-go/client';
2
2
  import { ChainAddresses, SetChainAddressesParam } from '../ui/PreviewRoute/types';
3
3
  export declare const useAutoSetAddress: ({ chain, chainID, index, enabled, signRequired, chainAddresses, setChainAddresses, }: {
4
4
  chain?: Chain | undefined;
@@ -1,4 +1,4 @@
1
- import { Asset, SkipRouter } from '@skip-go/core';
1
+ import { Asset, SkipRouter } from '@skip-go/client';
2
2
  import { PublicClient } from 'viem';
3
3
  import { Chain } from './use-chains';
4
4
  interface Args {
@@ -1,4 +1,4 @@
1
- import { Bridge } from '@skip-go/core';
1
+ import { Bridge } from '@skip-go/client';
2
2
  export type UseBridgesQueryArgs<T = Bridge[]> = {
3
3
  enabled?: boolean;
4
4
  select?: (arr?: Bridge[]) => T;
@@ -1,4 +1,4 @@
1
- import { ChainTransaction, TransferState, StatusState } from '@skip-go/core';
1
+ import { ChainTransaction, TransferState, StatusState } from '@skip-go/client';
2
2
  interface TransferSequence {
3
3
  srcChainID: string;
4
4
  destChainID: string;
@@ -1,4 +1,4 @@
1
- import { Chain as SkipChain } from '@skip-go/core';
1
+ import { Chain as SkipChain } from '@skip-go/client';
2
2
  export type Chain = SkipChain & {
3
3
  prettyName: string;
4
4
  };
@@ -1,2 +1,2 @@
1
- import { RouteResponse } from '@skip-go/core';
1
+ import { RouteResponse } from '@skip-go/client';
2
2
  export declare function useFinalityTimeEstimate(route: RouteResponse): string;
@@ -1,4 +1,4 @@
1
- import { BridgeType, ExperimentalFeature, SmartSwapOptions, SwapVenueRequest } from '@skip-go/core';
1
+ import { BridgeType, ExperimentalFeature, SmartSwapOptions, SwapVenueRequest } from '@skip-go/client';
2
2
  export interface RouteConfig {
3
3
  experimentalFeatures?: ExperimentalFeature[];
4
4
  allowMultiTx?: boolean;
@@ -16,5 +16,5 @@ interface UseRouteArgs extends RouteConfig {
16
16
  destinationAssetChainID?: string;
17
17
  enabled?: boolean;
18
18
  }
19
- export declare function useRoute({ direction, amount, sourceAsset, sourceAssetChainID, destinationAsset, destinationAssetChainID, enabled, swapVenues, bridges, experimentalFeatures, allowMultiTx, allowUnsafe, smartSwapOptions, }: UseRouteArgs): import("@tanstack/react-query/build/legacy/types").UseQueryResult<import("@skip-go/core/dist/shared-UW-rSz3r").R | undefined, Error>;
19
+ export declare function useRoute({ direction, amount, sourceAsset, sourceAssetChainID, destinationAsset, destinationAssetChainID, enabled, swapVenues, bridges, experimentalFeatures, allowMultiTx, allowUnsafe, smartSwapOptions, }: UseRouteArgs): import("@tanstack/react-query/build/legacy/types").UseQueryResult<import("@skip-go/client/dist/shared-CvoSvr3u").R | undefined, Error>;
20
20
  export {};
@@ -1,8 +1,8 @@
1
- export declare function useSkipClient(): import("@skip-go/core").SkipRouter;
1
+ export declare function useSkipClient(): import("@skip-go/client").SkipRouter;
2
2
  export declare function useSkipConfig(): {
3
3
  apiURL: string | undefined;
4
4
  endpointOptions: {
5
- endpoints?: Record<string, import("@skip-go/core").EndpointOptions> | undefined;
5
+ endpoints?: Record<string, import("@skip-go/client").EndpointOptions> | undefined;
6
6
  getRpcEndpointForChain?: ((chainID: string) => Promise<string>) | undefined;
7
7
  getRestEndpointForChain?: ((chainID: string) => Promise<string>) | undefined;
8
8
  } | undefined;
@@ -1,5 +1,5 @@
1
1
  import { GasPrice } from '@cosmjs/stargate';
2
- import { Asset, BridgeType } from '@skip-go/core';
2
+ import { Asset, BridgeType } from '@skip-go/client';
3
3
  import { MouseEvent } from 'react';
4
4
  import { Chain } from './use-chains';
5
5
  export interface DefaultRouteConfig {
@@ -31,7 +31,7 @@ export declare function useSwapWidget(persistSwapWidgetState?: boolean): {
31
31
  onSourceAssetChange: (asset: Asset) => void;
32
32
  onSourceChainChange: (chain: Chain, injectAsset?: Asset) => Promise<void>;
33
33
  priceImpactThresholdReached: boolean;
34
- route: import("@skip-go/core/dist/shared-UW-rSz3r").R | undefined;
34
+ route: import("@skip-go/client/dist/shared-CvoSvr3u").R | undefined;
35
35
  routeError: string;
36
36
  routeLoading: boolean;
37
37
  routeWarningMessage: string | undefined;
package/build/index.es.js CHANGED
@@ -14,7 +14,7 @@ import { arbitrum, avalanche, base, bsc, celo, fantom, filecoin, kava, linea, ma
14
14
  import { QueryClient, QueryClientProvider, useQuery, useMutation } from '@tanstack/react-query';
15
15
  import { WalletProvider as WalletProvider$1, useWallet } from '@solana/wallet-adapter-react';
16
16
  import { PhantomWalletAdapter, SolflareWalletAdapter, CoinbaseWalletAdapter, TrustWalletAdapter, LedgerWalletAdapter } from '@solana/wallet-adapter-wallets';
17
- import { SkipRouter } from '@skip-go/core';
17
+ import { SkipRouter } from '@skip-go/client';
18
18
  import { getWalletClient } from '@wagmi/core';
19
19
  import { createContext, useContext, useMemo, useCallback, useRef, useState, useEffect, forwardRef, Fragment as Fragment$1 } from 'react';
20
20
  import { create } from 'zustand';
@@ -1,4 +1,4 @@
1
- import { Asset } from '@skip-go/core';
1
+ import { Asset } from '@skip-go/client';
2
2
  import { ReactNode } from 'react';
3
3
  interface AssetsContext {
4
4
  assets: Record<string, Asset[]>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { SkipRouterOptions } from '@skip-go/core';
2
+ import { SkipRouterOptions } from '@skip-go/client';
3
3
  import { DefaultRouteConfig } from '../hooks/use-swap-widget';
4
4
  import { RouteConfig } from '../hooks/use-route';
5
5
  import { MinimalWallet } from '../hooks/use-make-wallets';
@@ -1,4 +1,4 @@
1
- import { SkipRouter, SkipRouterOptions } from '@skip-go/core';
1
+ import { SkipRouter, SkipRouterOptions } from '@skip-go/client';
2
2
  import { ReactNode } from 'react';
3
3
  import { MinimalWallet } from '../hooks/use-make-wallets';
4
4
  export declare const SkipContext: import("react").Context<{
@@ -1,4 +1,4 @@
1
- import { RouteResponse } from '@skip-go/core';
1
+ import { RouteResponse } from '@skip-go/client';
2
2
  export interface TxStatus {
3
3
  chainId: string;
4
4
  txHash: string;
@@ -1,4 +1,4 @@
1
- import { Asset } from '@skip-go/core';
1
+ import { Asset } from '@skip-go/client';
2
2
  import { MouseEventHandler } from 'react';
3
3
  import { Chain } from '../hooks/use-chains';
4
4
  interface Props {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import * as ScrollArea from '@radix-ui/react-scroll-area';
3
- import { Asset } from '@skip-go/core';
3
+ import { Asset } from '@skip-go/client';
4
4
  interface Props {
5
5
  assets?: Asset[];
6
6
  balances: Record<string, string>;
@@ -1,4 +1,4 @@
1
- import { Asset } from '@skip-go/core';
1
+ import { Asset } from '@skip-go/client';
2
2
  interface Props {
3
3
  asset?: Asset;
4
4
  assets?: Asset[];
@@ -1,4 +1,4 @@
1
- import { Asset } from '@skip-go/core';
1
+ import { Asset } from '@skip-go/client';
2
2
  import { ReactNode } from 'react';
3
3
  export interface Props {
4
4
  srcAsset: Asset;
@@ -1,4 +1,4 @@
1
- import { RouteResponse } from '@skip-go/core';
1
+ import { RouteResponse } from '@skip-go/client';
2
2
  import { Dispatch, SetStateAction } from 'react';
3
3
  import { SwapAction, TransferAction } from './make-actions';
4
4
  import { ChainIDWithAction } from './make-chain-ids-with-actions';
@@ -1,4 +1,4 @@
1
- import { Chain } from '@skip-go/core';
1
+ import { Chain } from '@skip-go/client';
2
2
  import { ChainAddresses, SetChainAddressesParam } from './types';
3
3
  export declare const SetAddressDialog: ({ open, onOpen, chain, index, signRequired, isDestination, chainAddresses, setChainAddresses, }: {
4
4
  open: boolean;
@@ -1,4 +1,4 @@
1
- import { RouteResponse } from '@skip-go/core';
1
+ import { RouteResponse } from '@skip-go/client';
2
2
  import { useDisclosureKey } from '../../store/disclosures';
3
3
  export interface Wallet {
4
4
  walletName: string;
@@ -1,4 +1,4 @@
1
- import { BridgeType, RouteResponse } from '@skip-go/core';
1
+ import { BridgeType, RouteResponse } from '@skip-go/client';
2
2
  export interface TransferAction {
3
3
  type: 'TRANSFER';
4
4
  denomIn: string;
@@ -1,4 +1,4 @@
1
- import { RouteResponse } from '@skip-go/core';
1
+ import { RouteResponse } from '@skip-go/client';
2
2
  import { Action, SwapAction, TransferAction } from './make-actions';
3
3
  export interface ChainIDWithAction {
4
4
  chainID: string;
@@ -8,7 +8,7 @@ export declare const makeStepState: (props: Props) => {
8
8
  isSuccess: boolean;
9
9
  isLoading: boolean;
10
10
  isError: boolean;
11
- state: import("@skip-go/core/dist/types").TransferState | undefined;
11
+ state: import("@skip-go/client/dist/types").TransferState | undefined;
12
12
  explorerLink: {
13
13
  link: string;
14
14
  shorthand: string;
@@ -1,4 +1,4 @@
1
- import { BridgeType, RouteResponse } from '@skip-go/core';
1
+ import { BridgeType, RouteResponse } from '@skip-go/client';
2
2
  import { SwapWidgetStore } from '../hooks/use-swap-widget';
3
3
  type Props = SwapWidgetStore & {
4
4
  amountOut: string;
@@ -1,4 +1,4 @@
1
- import { RouteResponse } from '@skip-go/core';
1
+ import { RouteResponse } from '@skip-go/client';
2
2
  export type ActionType = 'NONE' | 'TRANSFER' | 'SWAP';
3
3
  interface Props {
4
4
  isLoading?: boolean;
@@ -1,3 +1,3 @@
1
- import { RouteResponse } from '@skip-go/core';
1
+ import { RouteResponse } from '@skip-go/client';
2
2
  export declare const isCCTPLedgerBrokenInOperation: (route: RouteResponse) => boolean;
3
3
  export declare const isEthermintLedgerInOperation: (route: RouteResponse) => boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@skip-go/widget",
3
3
  "description": "Swap widget",
4
- "version": "2.3.7",
4
+ "version": "2.3.8",
5
5
  "repository": "https://github.com/skip-mev/widget",
6
6
  "type": "module",
7
7
  "exports": {
@@ -62,7 +62,7 @@
62
62
  "@radix-ui/react-scroll-area": "^1.0.5",
63
63
  "@radix-ui/react-switch": "^1.0.3",
64
64
  "@radix-ui/react-tooltip": "^1.0.7",
65
- "@skip-go/core": "0.4.4",
65
+ "@skip-go/client": "0.5.1",
66
66
  "@solana/spl-token": "^0.4.6",
67
67
  "@solana/wallet-adapter-react": "^0.15.35",
68
68
  "@solana/wallet-adapter-wallets": "^0.19.32",