@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
package/dist/style.css.gz
CHANGED
|
Binary file
|
package/dist/types/common.d.ts
CHANGED
|
@@ -67,6 +67,9 @@ export type TransactionOption = {
|
|
|
67
67
|
useDevInspect?: boolean;
|
|
68
68
|
useMev?: boolean;
|
|
69
69
|
txAction?: "signTransactionBlock" | "signAndExecuteTransactionBlock";
|
|
70
|
+
useFastMode?: boolean;
|
|
71
|
+
maxCapForGas?: string;
|
|
72
|
+
customGasPrice?: string;
|
|
70
73
|
};
|
|
71
74
|
export type SwapRouterFormat = {
|
|
72
75
|
router_summery: string;
|
package/dist/types/config.d.ts
CHANGED
|
@@ -11,3 +11,27 @@ export type EnvConfig = {
|
|
|
11
11
|
api: string;
|
|
12
12
|
aggregatorUrl: string;
|
|
13
13
|
};
|
|
14
|
+
export type InitProps = {
|
|
15
|
+
defaultFromToken?: string;
|
|
16
|
+
defaultToToken?: string;
|
|
17
|
+
defaultSlippage?: string;
|
|
18
|
+
customRpcList?: string[];
|
|
19
|
+
defaultRpc?: string;
|
|
20
|
+
independentWallet?: boolean;
|
|
21
|
+
partner?: string;
|
|
22
|
+
theme?: WidgetTheme;
|
|
23
|
+
themeType?: "Dark" | "Light";
|
|
24
|
+
logo?: string;
|
|
25
|
+
};
|
|
26
|
+
export type WidgetTheme = {
|
|
27
|
+
bg_primary: string;
|
|
28
|
+
primary: string;
|
|
29
|
+
text_primary: string;
|
|
30
|
+
text_secondary: string;
|
|
31
|
+
success: string;
|
|
32
|
+
warning: string;
|
|
33
|
+
error: string;
|
|
34
|
+
btn_text: string;
|
|
35
|
+
[key: string]: string;
|
|
36
|
+
};
|
|
37
|
+
export type ThemeType = "Dark" | "Light";
|
package/dist/utils/common.d.ts
CHANGED
|
@@ -12,3 +12,4 @@ export declare function getCdnAssets(path: string): string;
|
|
|
12
12
|
export declare const textEllipses: (text: string, decimals?: number) => string;
|
|
13
13
|
export declare const coinTypeEquals: (tokenA?: string, tokenB?: string) => boolean;
|
|
14
14
|
export declare const isAvailableObject: (obj: unknown) => boolean;
|
|
15
|
+
export declare function normalizeCoinType(coin_type: string): string;
|
package/dist/utils/error.d.ts
CHANGED
|
@@ -6,4 +6,6 @@
|
|
|
6
6
|
export declare function isUserRejectedError(error: any): any;
|
|
7
7
|
export declare function isPriceSlippageError(error: any): boolean;
|
|
8
8
|
export declare function isNotFindTxHashError(error: any): boolean;
|
|
9
|
+
export declare function isMaxCapError(error: any): boolean;
|
|
10
|
+
export declare function isFastModeServiceError(error: any): boolean;
|
|
9
11
|
export declare function handleErrorMessages(error: any): string;
|
package/dist/utils/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cetusprotocol/terminal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "dist/cetus-swap.cjs.js",
|
|
6
6
|
"module": "dist/cetus-swap.es.js",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"@mysten/dapp-kit": ">=0.
|
|
12
|
+
"@mysten/dapp-kit": ">=0.16.0",
|
|
13
|
+
"@mysten/sui": ">=1.16.0",
|
|
13
14
|
"react": ">=18.2.0",
|
|
14
15
|
"react-dom": ">=18.2.0"
|
|
15
16
|
},
|
|
@@ -17,11 +18,11 @@
|
|
|
17
18
|
"dev": "vite",
|
|
18
19
|
"build": "vite build",
|
|
19
20
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
20
|
-
"preview": "vite preview"
|
|
21
|
+
"preview": "vite preview",
|
|
22
|
+
"publish:test": "node ./version.mjs && npm publish --tag experimental"
|
|
21
23
|
},
|
|
22
24
|
"dependencies": {
|
|
23
|
-
"@cetusprotocol/aggregator-sdk": "^0.
|
|
24
|
-
"@mysten/sui": "^1.16.0",
|
|
25
|
+
"@cetusprotocol/aggregator-sdk": "^0.10.0",
|
|
25
26
|
"@radix-ui/colors": "^3.0.0",
|
|
26
27
|
"@radix-ui/react-icons": "^1.3.0",
|
|
27
28
|
"@radix-ui/themes": "^2.0.0",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"react-number-format": "^5.4.2",
|
|
36
37
|
"react-syntax-highlighter": "^15.6.1",
|
|
37
38
|
"react-window": "^1.8.11",
|
|
39
|
+
"shio-fast-sdk": "^0.0.6",
|
|
38
40
|
"shio-sdk": "^1.0.8",
|
|
39
41
|
"suihoneypot": "^0.0.6",
|
|
40
42
|
"uuid": "^11.0.2",
|
|
@@ -44,6 +46,7 @@
|
|
|
44
46
|
},
|
|
45
47
|
"devDependencies": {
|
|
46
48
|
"@mysten/dapp-kit": "^0.14.40",
|
|
49
|
+
"@mysten/sui": "^1.16.0",
|
|
47
50
|
"@rollup/plugin-strip": "^3.0.4",
|
|
48
51
|
"@types/bn.js": "^5.1.6",
|
|
49
52
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -62,6 +65,7 @@
|
|
|
62
65
|
"postcss-nested": "^7.0.2",
|
|
63
66
|
"prettier": "^3.0.0",
|
|
64
67
|
"react": "^18.2.0",
|
|
68
|
+
"react-colorful": "^5.6.1",
|
|
65
69
|
"react-dom": "^18.2.0",
|
|
66
70
|
"rollup-plugin-terser": "^7.0.2",
|
|
67
71
|
"rollup-plugin-visualizer": "^5.12.0",
|