@cetusprotocol/terminal 0.3.2 → 1.0.1
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/dist/cetus-swap.cjs.js +45 -45
- package/dist/cetus-swap.cjs.js.gz +0 -0
- package/dist/cetus-swap.es.js +20228 -18562
- package/dist/cetus-swap.es.js.gz +0 -0
- package/dist/cetus-swap.umd.js +45 -45
- package/dist/cetus-swap.umd.js.gz +0 -0
- package/dist/components/common/CopyButton.d.ts +1 -0
- package/dist/components/common/PowerByCetus.d.ts +3 -0
- package/dist/components/common/SlippageButton.d.ts +5 -2
- package/dist/components/common/TokenImage.d.ts +4 -1
- package/dist/components/common/Tooltip.d.ts +4 -1
- package/dist/components/common/TooltipV2.d.ts +2 -1
- package/dist/components/common/TransactionModeSetting.d.ts +11 -0
- package/dist/components/common/wallet/ConnectButton.d.ts +3 -1
- package/dist/components/common/wallet/TriggerButton.d.ts +1 -0
- package/dist/components/export/ExportModal.d.ts +2 -1
- package/dist/components/export/ExportWidgetBtn.d.ts +2 -2
- package/dist/components/swap/CurrentPriceBlock.d.ts +2 -1
- package/dist/components/swap/SwapHeader.d.ts +2 -1
- package/dist/components/swap/SwapWidget.d.ts +2 -1
- package/dist/components/swap/ThemeProvider.d.ts +7 -0
- package/dist/components/swap/WidgetHeader.d.ts +2 -1
- package/dist/components/theme/CustomLogo.d.ts +1 -0
- package/dist/components/theme/MenuCustomTheme.d.ts +1 -0
- package/dist/config/provider.d.ts +2 -1
- package/dist/data/all-pools.json +74058 -0
- package/dist/data/all-pools.json.gz +0 -0
- package/dist/hooks/common/resolveCoinBalance.d.ts +3 -0
- package/dist/hooks/common/useFastModeTransaction.d.ts +7 -0
- package/dist/hooks/common/useGetPoolListByCoinType.d.ts +1 -0
- package/dist/hooks/common/useTransaction.d.ts +1 -1
- package/dist/hooks/swap/usePriceImpact.d.ts +1 -1
- package/dist/hooks/useGetPoolList.d.ts +1 -0
- package/dist/images/icon_shio@2x.png +0 -0
- package/dist/images/logo_light@2x.png +0 -0
- package/dist/images/logo_pyth.png +0 -0
- package/dist/stores/demo.d.ts +7 -1
- package/dist/stores/global.d.ts +13 -0
- package/dist/style.css +1 -1
- package/dist/style.css.gz +0 -0
- package/dist/types/common.d.ts +3 -0
- package/dist/types/config.d.ts +24 -0
- package/dist/utils/color.d.ts +8 -0
- package/dist/utils/common.d.ts +1 -0
- package/dist/utils/error.d.ts +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +9 -5
|
Binary file
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { BuildTransactionOptions, TransactionDataBuilder } from '@mysten/sui/transactions';
|
|
2
|
+
export declare const COIN_WITH_BALANCE = "CoinWithBalance";
|
|
3
|
+
export declare function resolveCoinBalance(transactionData: TransactionDataBuilder, buildOptions: BuildTransactionOptions, next: () => Promise<void>): Promise<void>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export default function useFastModeTransaction(): {
|
|
2
|
+
getFastModeTx: (tx: any, maxCapForGas: string, customGasPrice: string) => Promise<{
|
|
3
|
+
result: import('@mysten/sui/client').SuiTransactionBlockResponse;
|
|
4
|
+
startExecuteTime: number;
|
|
5
|
+
transactionBlockBytes: string;
|
|
6
|
+
}>;
|
|
7
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ToastType, TransactionOption } from '../../types';
|
|
2
2
|
import { Transaction } from '@mysten/sui/transactions';
|
|
3
3
|
export default function useTransaction(): {
|
|
4
|
-
signAndExecuteTransaction: (tx: Transaction, toastType: ToastType, option?: TransactionOption) => Promise<any>;
|
|
4
|
+
signAndExecuteTransaction: (tx: Transaction | (() => Promise<Transaction>), toastType: ToastType, option?: TransactionOption) => Promise<any>;
|
|
5
5
|
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/stores/demo.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefaultPairType, DefaultSlippageType, DisplayMode, WidgetBtnSize, WidgetDirection } from '../types';
|
|
1
|
+
import { DefaultPairType, DefaultSlippageType, DisplayMode, ThemeType, WidgetBtnSize, WidgetDirection, WidgetTheme } from '../types';
|
|
2
2
|
interface DemoState {
|
|
3
3
|
defaultPairType: DefaultPairType;
|
|
4
4
|
setDefaultPairType: (value: DefaultPairType) => void;
|
|
@@ -22,6 +22,12 @@ interface DemoState {
|
|
|
22
22
|
setWidgetBtnSize: (value: WidgetBtnSize) => void;
|
|
23
23
|
isOpenSwapWidgetModal: boolean;
|
|
24
24
|
setIsOpenSwapWidgetModal: (value: boolean) => void;
|
|
25
|
+
currentTheme: ThemeType;
|
|
26
|
+
setCurrentTheme: (value: ThemeType) => void;
|
|
27
|
+
customColor: WidgetTheme;
|
|
28
|
+
setCustomColor: (value: WidgetTheme) => void;
|
|
29
|
+
logoUrl: string;
|
|
30
|
+
setLogoUrl: (value: string) => void;
|
|
25
31
|
}
|
|
26
32
|
declare const useDemoStore: import('zustand').UseBoundStore<import('zustand').StoreApi<DemoState>>;
|
|
27
33
|
export default useDemoStore;
|
package/dist/stores/global.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AggregatorProvider } from '../config/provider';
|
|
2
2
|
import { ConfigLinkItem } from '../types';
|
|
3
|
+
export type TransactionMode = "Default" | "Fast Mode";
|
|
3
4
|
interface GlobalState {
|
|
4
5
|
currentExplorer: string;
|
|
5
6
|
setCurrentExplorer: (value: string) => void;
|
|
@@ -19,6 +20,12 @@ interface GlobalState {
|
|
|
19
20
|
setPoolApiMap: (key: string, poolAddress: any[]) => void;
|
|
20
21
|
mevProtect: boolean;
|
|
21
22
|
setMevProtect: (value: boolean) => void;
|
|
23
|
+
transactionMode: TransactionMode;
|
|
24
|
+
setTransctionMode: (value: TransactionMode) => void;
|
|
25
|
+
maxCapForGas: string;
|
|
26
|
+
setMaxCapForGas: (value: string) => void;
|
|
27
|
+
customGasPrice: string;
|
|
28
|
+
setCustomGasPrice: (value: string) => void;
|
|
22
29
|
ignoreWarnTokenMap: Record<string, boolean>;
|
|
23
30
|
setIgnoreWarnToken: (coin_type: string) => void;
|
|
24
31
|
}
|
|
@@ -32,6 +39,9 @@ declare const useGlobalStore: import('zustand').UseBoundStore<Omit<import('zusta
|
|
|
32
39
|
providers: AggregatorProvider[];
|
|
33
40
|
mevProtect: boolean;
|
|
34
41
|
ignoreWarnTokenMap: Record<string, boolean>;
|
|
42
|
+
transactionMode: TransactionMode;
|
|
43
|
+
maxCapForGas: string;
|
|
44
|
+
customGasPrice: string;
|
|
35
45
|
}>>) => void;
|
|
36
46
|
clearStorage: () => void;
|
|
37
47
|
rehydrate: () => Promise<void> | void;
|
|
@@ -46,6 +56,9 @@ declare const useGlobalStore: import('zustand').UseBoundStore<Omit<import('zusta
|
|
|
46
56
|
providers: AggregatorProvider[];
|
|
47
57
|
mevProtect: boolean;
|
|
48
58
|
ignoreWarnTokenMap: Record<string, boolean>;
|
|
59
|
+
transactionMode: TransactionMode;
|
|
60
|
+
maxCapForGas: string;
|
|
61
|
+
customGasPrice: string;
|
|
49
62
|
}>>;
|
|
50
63
|
};
|
|
51
64
|
}>;
|