@clonegod/ttd-sui-common 1.0.64 → 1.0.66

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.
@@ -106,7 +106,7 @@ class AbstractSuiDexTradePlus extends dist_1.AbastrcatTrade {
106
106
  if (!wallet) {
107
107
  continue;
108
108
  }
109
- const tokenAsset = (_b = assets.tokens) === null || _b === void 0 ? void 0 : _b.find((token) => (0, index_1.normalizeSuiTokenAddress)(token.address.toLowerCase()) === (0, index_1.normalizeSuiTokenAddress)(inputToken.address.toLowerCase()));
109
+ const tokenAsset = (_b = assets.tokens) === null || _b === void 0 ? void 0 : _b.find((token) => (0, index_1.normalizeSuiTokenAddress)(token.address) === (0, index_1.normalizeSuiTokenAddress)(inputToken.address));
110
110
  let tokenBalance = (tokenAsset === null || tokenAsset === void 0 ? void 0 : tokenAsset.balance) || '0';
111
111
  const balanceDecimal = new decimal_js_1.default(tokenBalance);
112
112
  if (balanceDecimal.gte(requiredAmount)) {
@@ -22,3 +22,4 @@ export interface PoolObjectInfo {
22
22
  digest: string;
23
23
  initialSharedVersion?: string;
24
24
  }
25
+ export * from './wallet_assets_type';
@@ -1,2 +1,17 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./wallet_assets_type"), exports);
@@ -0,0 +1,37 @@
1
+ export interface TokenInfo {
2
+ address: string;
3
+ name: string;
4
+ symbol: string;
5
+ decimals: number;
6
+ }
7
+ export interface AddressGroup {
8
+ [groupName: string]: string[];
9
+ }
10
+ export interface MonitorConfig {
11
+ wsUrl?: string;
12
+ rpcUrl: string;
13
+ addressGroups: AddressGroup;
14
+ logToFile?: boolean;
15
+ logFilePath?: string;
16
+ chainNameLower: string;
17
+ }
18
+ export interface WalletAssetType {
19
+ address: string;
20
+ tokens: TokenAssetsType[];
21
+ lastUpdated: string;
22
+ source: string;
23
+ }
24
+ export interface TokenAssetsType {
25
+ address: string;
26
+ symbol: string;
27
+ total_raw_balance: string;
28
+ balance: string;
29
+ lastUpdateTime: string;
30
+ objects: TokenObjectType[];
31
+ }
32
+ export interface TokenObjectType {
33
+ objectId: string;
34
+ version: string;
35
+ digest: string;
36
+ raw_balance: string;
37
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-sui-common",
3
- "version": "1.0.64",
3
+ "version": "1.0.66",
4
4
  "description": "Sui common library",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",