@clonegod/ttd-sui-common 1.0.72 → 1.0.73

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_type: "grpc" | "rpc" | "all", read_mask_fields?: string[]) => Promise<void>;
9
+ send_tx: (signedTxBytes: string, signature: string, txDigest: string, send_type: string, read_mask_fields?: string[]) => Promise<void>;
10
10
  private sendTxByGrpc;
11
11
  private sendTxByRpc;
12
12
  }
@@ -15,10 +15,11 @@ class SuiTxSender {
15
15
  constructor(appConfig, sui_client, grpcClient) {
16
16
  this.send_tx = (signedTxBytes_1, signature_1, txDigest_1, send_type_1, ...args_1) => __awaiter(this, [signedTxBytes_1, signature_1, txDigest_1, send_type_1, ...args_1], void 0, function* (signedTxBytes, signature, txDigest, send_type, read_mask_fields = ['transaction']) {
17
17
  const start_time = Date.now();
18
- if (send_type === 'grpc') {
18
+ send_type = (send_type || 'ALL').toUpperCase();
19
+ if (send_type === 'GRPC') {
19
20
  yield this.sendTxByGrpc(signedTxBytes, signature, txDigest, read_mask_fields);
20
21
  }
21
- else if (send_type === 'rpc') {
22
+ else if (send_type === 'RPC') {
22
23
  yield this.sendTxByRpc(signedTxBytes, signature, txDigest);
23
24
  }
24
25
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-sui-common",
3
- "version": "1.0.72",
3
+ "version": "1.0.73",
4
4
  "description": "Sui common library",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",