@dodoex/widgets 3.0.2-zetachain.110 → 3.0.2-zetachain.110.ton.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/README.md +4 -0
- package/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/{helper-CJc1NZsE.js → helper-BTJpgu2t.js} +1 -1
- package/dist/{helper-Icjt-nM-.cjs → helper-DIkbm_U5.cjs} +1 -1
- package/dist/{index-CpNePMVd.cjs → index-6EYQJsAq.cjs} +3 -3
- package/dist/{index-lqV8m1n6.js → index-8hgb8akZ.js} +4 -4
- package/dist/index-BENIDbsM.js +34 -0
- package/dist/index-CpuninTL.cjs +34 -0
- package/dist/{index-DMnEQWAS.cjs → index-DR4KO5Dk.cjs} +2 -2
- package/dist/{index-CnFdLztg.js → index-DwtxxFKB.js} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/types/constants/address.d.ts +2 -0
- package/dist/types/constants/chainList.d.ts +2 -0
- package/dist/types/hooks/Swap/useCrossSwapOrderList.d.ts +6 -6
- package/dist/types/index.d.ts +2 -1
- package/dist/types/tests/1-get-account-state.d.ts +1 -0
- package/dist/types/tests/1-send-ton.d.ts +1 -0
- package/dist/types/utils/CaipNetworksUtil.d.ts +5 -0
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/reown-types.d.ts +28 -0
- package/dist/types/utils/sui_test.d.ts +1 -0
- package/dist/types/utils/ton.d.ts +3 -0
- package/dist/types/utils/ton_test.d.ts +1 -0
- package/dist/types/utils/wallet.d.ts +1 -1
- package/package.json +14 -6
- package/dist/index-C_rSA4Uo.js +0 -31
- package/dist/index-CycqF7c5.cjs +0 -31
package/dist/types/index.d.ts
CHANGED
|
@@ -19,15 +19,16 @@ export { PageType, useRouterStore } from './router';
|
|
|
19
19
|
export type { Page } from './router';
|
|
20
20
|
export { getEtherscanPage } from './utils/address';
|
|
21
21
|
export { formatPercentageNumber, formatReadableNumber, formatShortNumber, formatTokenAmountNumber, } from './utils/formatter';
|
|
22
|
+
export type { AppKitNetworkExtend, CaipAddressExtend, CaipNetworkExtend, CaipNetworkIdExtend, ChainNamespaceExtend, UseAppKitAccountReturnExtend, } from './utils/reown-types';
|
|
22
23
|
export { Pool } from './widgets/PoolWidget';
|
|
23
24
|
export { default as AMMV2Create } from './widgets/PoolWidget/AMMV2Create';
|
|
24
25
|
export { default as AddLiquidityV3 } from './widgets/PoolWidget/AMMV3/AddLiquidityV3';
|
|
25
26
|
export { AMMV3PositionManage } from './widgets/PoolWidget/AMMV3/AMMV3PositionManage';
|
|
26
27
|
export { AMMV3PositionsView } from './widgets/PoolWidget/AMMV3/AMMV3PositionsView';
|
|
28
|
+
export { CurvePoolDetail } from './widgets/PoolWidget/curve/CurvePoolDetail';
|
|
27
29
|
export { usePoolBalanceInfo } from './widgets/PoolWidget/hooks/usePoolBalanceInfo';
|
|
28
30
|
export { default as PoolCreate } from './widgets/PoolWidget/PoolCreate';
|
|
29
31
|
export { default as PoolDetail } from './widgets/PoolWidget/PoolDetail';
|
|
30
|
-
export { CurvePoolDetail } from './widgets/PoolWidget/curve/CurvePoolDetail';
|
|
31
32
|
export { default as PoolList } from './widgets/PoolWidget/PoolList';
|
|
32
33
|
export { default as PoolModify } from './widgets/PoolWidget/PoolModify';
|
|
33
34
|
export { PoolOperate, default as PoolOperateDialog, } from './widgets/PoolWidget/PoolOperate';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AppKitNetworkExtend, type CaipNetworkExtend } from './reown-types';
|
|
2
|
+
export declare const CaipNetworksUtil: {
|
|
3
|
+
isCaipNetwork(network: AppKitNetworkExtend): network is CaipNetworkExtend;
|
|
4
|
+
getChainNamespace(network: AppKitNetworkExtend): import("./reown-types").ChainNamespaceExtend;
|
|
5
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type BaseNetwork, ChainId, ChainNamespace, type CaipNetwork } from '@reown/appkit-common';
|
|
2
|
+
import type { NamespaceTypeMap, UseAppKitAccountReturn } from '@reown/appkit/react';
|
|
3
|
+
export type ChainNamespaceExtend = ChainNamespace | 'ton' | 'sui';
|
|
4
|
+
export type CaipNetworkIdExtend = `${ChainNamespaceExtend}:${ChainId}`;
|
|
5
|
+
export type CaipAddressExtend = `${ChainNamespaceExtend}:${ChainId}:${string}`;
|
|
6
|
+
type NamespaceTypeMapExtend = NamespaceTypeMap & {
|
|
7
|
+
ton: 'eoa';
|
|
8
|
+
sui: 'eoa';
|
|
9
|
+
};
|
|
10
|
+
type AccountTypeMapExtend = {
|
|
11
|
+
[K in ChainNamespaceExtend]: {
|
|
12
|
+
namespace: K;
|
|
13
|
+
address: string;
|
|
14
|
+
type: NamespaceTypeMapExtend[K];
|
|
15
|
+
publicKey?: K extends 'bip122' ? string : never;
|
|
16
|
+
path?: K extends 'bip122' ? string : never;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
type AccountTypeExtend = AccountTypeMapExtend[ChainNamespaceExtend];
|
|
20
|
+
export type UseAppKitAccountReturnExtend = {
|
|
21
|
+
allAccounts: AccountTypeExtend[];
|
|
22
|
+
caipAddress: CaipAddressExtend | undefined;
|
|
23
|
+
} & Pick<UseAppKitAccountReturn, 'address' | 'isConnected' | 'embeddedWalletInfo' | 'status'>;
|
|
24
|
+
export type CaipNetworkExtend = Omit<CaipNetwork, 'chainNamespace'> & {
|
|
25
|
+
chainNamespace: ChainNamespaceExtend;
|
|
26
|
+
};
|
|
27
|
+
export type AppKitNetworkExtend = BaseNetwork | CaipNetworkExtend;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,4 +7,4 @@ export declare const isETHChain: (chainId?: number) => {
|
|
|
7
7
|
isGor: boolean;
|
|
8
8
|
};
|
|
9
9
|
export declare const reloadWindow: (interval?: number) => void;
|
|
10
|
-
export declare function namespaceToTitle(chainId: ChainId | undefined): "polkadot" | "cosmos" | "Solana" | "Bitcoin" | "" | "a" | "EVM";
|
|
10
|
+
export declare function namespaceToTitle(chainId: ChainId | undefined): "polkadot" | "cosmos" | "Solana" | "Bitcoin" | "" | "a" | "EVM" | "TON" | "Sui";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/widgets",
|
|
3
|
-
"version": "3.0.2-zetachain.110",
|
|
3
|
+
"version": "3.0.2-zetachain.110.ton.1",
|
|
4
4
|
"description": "DODO Widgets",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"release.npm-publish": "npm publish --access public",
|
|
26
26
|
"release.npm-publish-beta": "yarn run build && npm publish --tag beta",
|
|
27
27
|
"test": "jest src",
|
|
28
|
-
"test:e2e": "jest e2e"
|
|
28
|
+
"test:e2e": "jest e2e",
|
|
29
|
+
"test:ton": "ts-node --transpile-only --compiler-options '{\"module\":\"commonjs\"}' ./src/tests/1-send-ton.ts"
|
|
29
30
|
},
|
|
30
31
|
"author": "",
|
|
31
32
|
"publishConfig": {
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
"dependencies": {
|
|
60
61
|
"@babel/runtime": "^7.17.0",
|
|
61
62
|
"@bitcoinerlab/secp256k1": "1.2.0",
|
|
62
|
-
"@dodoex/api": "3.0.3-zetachain.
|
|
63
|
+
"@dodoex/api": "3.0.3-zetachain.24.ton.2",
|
|
63
64
|
"@dodoex/components": "3.0.3-zetachain.14",
|
|
64
65
|
"@dodoex/contract-request": "^1.3.0",
|
|
65
66
|
"@dodoex/dodo-contract-request": "1.19.0-alpha.4",
|
|
@@ -99,15 +100,21 @@
|
|
|
99
100
|
},
|
|
100
101
|
"peerDependencies": {
|
|
101
102
|
"@babel/runtime": ">=7.17.0",
|
|
103
|
+
"@dodoex/btc-connect-react": "^1.5.10",
|
|
104
|
+
"@ethersproject/providers": "^5.8.0",
|
|
105
|
+
"@mysten/dapp-kit": "^0.18.0",
|
|
106
|
+
"@mysten/sui": "^1.38.0",
|
|
102
107
|
"@reown/appkit": "^1.7.5",
|
|
103
108
|
"@reown/appkit-adapter-solana": "^1.7.5",
|
|
104
|
-
"@reown/appkit-utils": "^1.7.5",
|
|
105
109
|
"@reown/appkit-common": "^1.7.5",
|
|
110
|
+
"@reown/appkit-utils": "^1.7.5",
|
|
106
111
|
"@solana/spl-token": "^0.4.13",
|
|
107
112
|
"@solana/web3.js": "1.98.2",
|
|
113
|
+
"@ton/core": "^0.61.0",
|
|
114
|
+
"@ton/crypto": "^3.3.0",
|
|
115
|
+
"@ton/ton": "^15.3.1",
|
|
116
|
+
"@tonconnect/ui-react": "^2.3.0",
|
|
108
117
|
"bitcoinjs-lib": "6.1.7",
|
|
109
|
-
"@dodoex/btc-connect-react": "^1.5.10",
|
|
110
|
-
"@ethersproject/providers": "^5.8.0",
|
|
111
118
|
"react": "^18.0.0",
|
|
112
119
|
"react-dom": "^18.0.0"
|
|
113
120
|
},
|
|
@@ -151,6 +158,7 @@
|
|
|
151
158
|
"rollup-plugin-import-css": "^3.5.5",
|
|
152
159
|
"svg-jest": "^1.0.1",
|
|
153
160
|
"ts-jest": "^29.0.1",
|
|
161
|
+
"ts-node": "^10.8.1",
|
|
154
162
|
"typescript": "^5.6.3"
|
|
155
163
|
}
|
|
156
164
|
}
|