@clonegod/ttd-sui-common 1.0.59 → 1.0.61
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/dist/rpc/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SuiClient } from "@mysten/sui/
|
|
1
|
+
import { SuiClient } from "@mysten/sui/client";
|
|
2
2
|
export declare function get_all_objects_in_wallet(suiClient: SuiClient, walletAddress: string, limit?: number): Promise<any[]>;
|
|
3
3
|
export declare function print_group_objects(allObjects: any[]): Promise<void>;
|
|
@@ -9,6 +9,4 @@ export declare class SuiTxSender {
|
|
|
9
9
|
send_tx: (signedTxBytes: string, signature: string, txDigest: string, send_grpc?: boolean, read_mask_fields?: string[]) => Promise<void>;
|
|
10
10
|
private sendTxByGrpc;
|
|
11
11
|
private sendTxByRpc;
|
|
12
|
-
send_tx_fast: (signedTxBytes: string, signature: string, txDigest: string, send_grpc?: boolean) => Promise<void>;
|
|
13
|
-
send_tx_safe: (signedTxBytes: string, signature: string, txDigest: string, send_grpc?: boolean) => Promise<void>;
|
|
14
12
|
}
|
|
@@ -23,12 +23,6 @@ class SuiTxSender {
|
|
|
23
23
|
}
|
|
24
24
|
(0, dist_1.log_info)(`send_tx, txid=${txDigest}, send_grpc=${send_grpc}, cost=${Date.now() - start_time}ms`);
|
|
25
25
|
});
|
|
26
|
-
this.send_tx_fast = (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 = true) {
|
|
27
|
-
return this.send_tx(signedTxBytes, signature, txDigest, send_grpc, ['transaction']);
|
|
28
|
-
});
|
|
29
|
-
this.send_tx_safe = (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 = true) {
|
|
30
|
-
return this.send_tx(signedTxBytes, signature, txDigest, send_grpc, ['transaction', 'finality']);
|
|
31
|
-
});
|
|
32
26
|
this.appConfig = appConfig;
|
|
33
27
|
this.sui_client = sui_client;
|
|
34
28
|
this.grpcClient = grpcClient;
|
|
@@ -42,8 +36,8 @@ class SuiTxSender {
|
|
|
42
36
|
this.appConfig.emit(`SUI_TX_RESULT_${txDigest}`, response);
|
|
43
37
|
}
|
|
44
38
|
catch (error) {
|
|
45
|
-
(0, dist_1.
|
|
46
|
-
|
|
39
|
+
(0, dist_1.log_warn)(`send tx by grpc failed!!! txid=${txDigest}, error=${error.message}`);
|
|
40
|
+
throw error;
|
|
47
41
|
}
|
|
48
42
|
});
|
|
49
43
|
}
|
|
@@ -63,7 +57,8 @@ class SuiTxSender {
|
|
|
63
57
|
this.appConfig.emit(`SUI_TX_RESULT_${txDigest}`, txDigest);
|
|
64
58
|
}
|
|
65
59
|
catch (error) {
|
|
66
|
-
(0, dist_1.
|
|
60
|
+
(0, dist_1.log_warn)(`send tx by rpc failed!!! txid=${txDigest}, error=${error.message}`);
|
|
61
|
+
throw error;
|
|
67
62
|
}
|
|
68
63
|
});
|
|
69
64
|
}
|