@clonegod/ttd-sui-common 1.0.61 → 1.0.62
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.
|
@@ -35,20 +35,20 @@ class AbstractSuiDexTradePlus extends dist_1.AbastrcatTrade {
|
|
|
35
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
36
|
this.initSuiClient();
|
|
37
37
|
yield this.initConfigs();
|
|
38
|
-
const walletGroupIds = process.env.SUI_WALLET_GROUP_IDS || '';
|
|
38
|
+
const walletGroupIds = process.env.SUI_WALLET_GROUP_IDS || process.env.WALLET_GROUP_IDS || '';
|
|
39
39
|
this.walletMode = walletGroupIds && walletGroupIds.trim().split(',').length > 0 ? 'multi' : 'single';
|
|
40
40
|
if (this.walletMode === 'multi') {
|
|
41
41
|
let wallet_infos = (0, dist_1.load_wallet_multi)(walletGroupIds.split(','), false);
|
|
42
42
|
this.group_wallets = wallet_infos.map(info => ed25519_1.Ed25519Keypair.fromSecretKey(info.private_key));
|
|
43
43
|
this.walletAddresses = this.group_wallets.map(keypair => keypair.getPublicKey().toSuiAddress());
|
|
44
|
-
(0, dist_1.log_info)(
|
|
44
|
+
(0, dist_1.log_info)(`init wallet mode: multi, wallet count: ${this.group_wallets.length}, walletAddresses: ${this.walletAddresses}`);
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
47
|
const { private_key } = this.appConfig.trade_runtime.wallet;
|
|
48
48
|
this.wallet = ed25519_1.Ed25519Keypair.fromSecretKey(private_key);
|
|
49
49
|
this.currentWalletAddress = this.wallet.getPublicKey().toSuiAddress();
|
|
50
50
|
this.walletAddresses = [this.currentWalletAddress];
|
|
51
|
-
(0, dist_1.log_info)(
|
|
51
|
+
(0, dist_1.log_info)(`init wallet mode: single, walletAddress= ${this.currentWalletAddress}`);
|
|
52
52
|
}
|
|
53
53
|
this.transactionSender = new index_1.SuiTxSender(this.appConfig, this.sui_client, this.grpcClient);
|
|
54
54
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clonegod/ttd-sui-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.62",
|
|
4
4
|
"description": "Sui common library",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"push": "npm run build && npm publish"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@clonegod/ttd-core": "2.0.
|
|
18
|
+
"@clonegod/ttd-core": "2.0.67",
|
|
19
19
|
"@grpc/grpc-js": "^1.13.4",
|
|
20
20
|
"@grpc/proto-loader": "^0.8.0",
|
|
21
21
|
"@mysten/sui": "^1.37.5",
|
|
22
|
-
"axios": "^1.
|
|
22
|
+
"axios": "^1.12.0",
|
|
23
23
|
"dotenv": "^16.4.7",
|
|
24
24
|
"google-protobuf": "^4.0.0",
|
|
25
25
|
"protobufjs": "^7.5.4"
|