@clonegod/ttd-sui-common 1.0.39 → 1.0.40
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.
|
@@ -16,8 +16,8 @@ export declare abstract class AbstractSuiDexTradePlus extends AbastrcatTrade {
|
|
|
16
16
|
currentWalletAddress: string;
|
|
17
17
|
protected chainNameLower: string;
|
|
18
18
|
constructor(appConfig: AppConfig, grpcClient: SuiGrpcClient);
|
|
19
|
-
private initSuiClient;
|
|
20
19
|
init(): Promise<void>;
|
|
20
|
+
private initSuiClient;
|
|
21
21
|
protected getWalletMode(): 'single' | 'multi';
|
|
22
22
|
protected getSingleWallet(): Ed25519Keypair;
|
|
23
23
|
protected getGroupWallets(): Ed25519Keypair[];
|
|
@@ -30,11 +30,6 @@ class AbstractSuiDexTradePlus extends dist_1.AbastrcatTrade {
|
|
|
30
30
|
this.chainNameLower = this.appConfig.env_args.chain_id.toLowerCase();
|
|
31
31
|
this.redisClient = new redis_1.SimpleRedisClient(`${this.chainNameLower}:tx`);
|
|
32
32
|
}
|
|
33
|
-
initSuiClient() {
|
|
34
|
-
const sui_rpc_url = process.env.SUI_RPC_URL || 'https://fullnode.mainnet.sui.io:443';
|
|
35
|
-
this.sui_client = new client_1.SuiClient({ url: sui_rpc_url });
|
|
36
|
-
(0, dist_1.log_info)(`Sui客户端已初始化: ${sui_rpc_url}`);
|
|
37
|
-
}
|
|
38
33
|
init() {
|
|
39
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
35
|
this.initSuiClient();
|
|
@@ -57,6 +52,11 @@ class AbstractSuiDexTradePlus extends dist_1.AbastrcatTrade {
|
|
|
57
52
|
this.transactionSender = new index_1.SuiTxSender(this.appConfig, this.sui_client, this.grpcClient);
|
|
58
53
|
});
|
|
59
54
|
}
|
|
55
|
+
initSuiClient() {
|
|
56
|
+
const sui_rpc_url = process.env.SUI_RPC_URL || process.env.RPC_URL || 'https://fullnode.mainnet.sui.io:443';
|
|
57
|
+
this.sui_client = new client_1.SuiClient({ url: sui_rpc_url });
|
|
58
|
+
(0, dist_1.log_info)(`init sui client, rpc_url: ${sui_rpc_url}`);
|
|
59
|
+
}
|
|
60
60
|
getWalletMode() {
|
|
61
61
|
return this.walletMode;
|
|
62
62
|
}
|