@clonegod/ttd-sui-common 1.0.55 → 1.0.56
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.
|
@@ -6,7 +6,7 @@ export declare class SuiTxSender {
|
|
|
6
6
|
sui_client: SuiClient;
|
|
7
7
|
grpcClient: SuiGrpcClient;
|
|
8
8
|
constructor(appConfig: AppConfig, sui_client: SuiClient, grpcClient: SuiGrpcClient);
|
|
9
|
-
send_tx: (signedTxBytes: string, signature: string, txDigest: string, send_grpc?: boolean) => Promise<void>;
|
|
9
|
+
send_tx: (signedTxBytes: string, signature: string, txDigest: string, send_grpc?: boolean, read_mask_fileds?: string[]) => Promise<void>;
|
|
10
10
|
private sendTxByGrpc;
|
|
11
11
|
private sendTxByRpc;
|
|
12
12
|
}
|
|
@@ -13,10 +13,10 @@ exports.SuiTxSender = void 0;
|
|
|
13
13
|
const dist_1 = require("@clonegod/ttd-core/dist");
|
|
14
14
|
class SuiTxSender {
|
|
15
15
|
constructor(appConfig, sui_client, grpcClient) {
|
|
16
|
-
this.send_tx = (signedTxBytes_1, signature_1, txDigest_1, ...args_1) => __awaiter(this, [signedTxBytes_1, signature_1, txDigest_1, ...args_1], void 0, function* (signedTxBytes, signature, txDigest, send_grpc = false) {
|
|
17
|
-
(0, dist_1.log_info)(`send tx
|
|
16
|
+
this.send_tx = (signedTxBytes_1, signature_1, txDigest_1, ...args_1) => __awaiter(this, [signedTxBytes_1, signature_1, txDigest_1, ...args_1], void 0, function* (signedTxBytes, signature, txDigest, send_grpc = false, read_mask_fileds = null) {
|
|
17
|
+
(0, dist_1.log_info)(`send tx, txid=${txDigest}, send_grpc=${send_grpc}`);
|
|
18
18
|
if (send_grpc) {
|
|
19
|
-
yield this.sendTxByGrpc(signedTxBytes, signature, txDigest);
|
|
19
|
+
yield this.sendTxByGrpc(signedTxBytes, signature, txDigest, read_mask_fileds);
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
22
22
|
yield this.sendTxByRpc(signedTxBytes, signature, txDigest);
|
|
@@ -26,12 +26,12 @@ class SuiTxSender {
|
|
|
26
26
|
this.sui_client = sui_client;
|
|
27
27
|
this.grpcClient = grpcClient;
|
|
28
28
|
}
|
|
29
|
-
sendTxByGrpc(
|
|
30
|
-
return __awaiter(this,
|
|
29
|
+
sendTxByGrpc(signedTxBytes_1, signature_1, txDigest_1) {
|
|
30
|
+
return __awaiter(this, arguments, void 0, function* (signedTxBytes, signature, txDigest, read_mask_fileds = null) {
|
|
31
31
|
const bcsBytes = Buffer.from(signedTxBytes, 'base64');
|
|
32
32
|
const signatureBytes = Buffer.from(signature, 'base64');
|
|
33
33
|
try {
|
|
34
|
-
let response = yield this.grpcClient.transactionService.executeTransaction(bcsBytes, signatureBytes);
|
|
34
|
+
let response = yield this.grpcClient.transactionService.executeTransaction(bcsBytes, signatureBytes, read_mask_fileds);
|
|
35
35
|
this.appConfig.emit(`SUI_TX_RESULT_${txDigest}`, response);
|
|
36
36
|
}
|
|
37
37
|
catch (error) {
|