suidouble 1.6.0-2 → 1.9.0

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/lib/SuiMaster.js CHANGED
@@ -241,12 +241,28 @@ class SuiMaster extends SuiCommonMethods {
241
241
  }
242
242
 
243
243
  async signAndExecuteTransaction(params) {
244
+ let txResults = null;
244
245
  if (this._keypair) {
245
246
  params.signer = this._keypair;
246
- return this._client.signAndExecuteTransaction(params);
247
+ txResults = await this._client.signAndExecuteTransaction(params);
247
248
  } else if (this._signer) {
248
- return this._signer.signAndExecuteTransaction(params);
249
+ txResults = await this._signer.signAndExecuteTransaction(params);
249
250
  }
251
+
252
+ try {
253
+ if (params && params.requestType && params.requestType == 'WaitForLocalExecution') {
254
+ const detailedResults = await this.client.waitForTransaction({
255
+ digest: txResults.digest,
256
+ options: (params.options || {}),
257
+ });
258
+
259
+ return detailedResults;
260
+ }
261
+ } catch (e) {
262
+ this.log(e);
263
+ }
264
+
265
+ return txResults;
250
266
  }
251
267
 
252
268
  async requestSuiFromFaucet() {
package/lib/SuiPackage.js CHANGED
@@ -422,6 +422,13 @@ class SuiPackage extends SuiObject {
422
422
  },
423
423
  });
424
424
 
425
+ // const suiTransaction = new this._suiMaster.SuiTransaction({
426
+ // suiMaster: this._suiMaster,
427
+ // debug: this._debug,
428
+ // data: result,
429
+ // });
430
+ // await suiTransaction.waitForTransaction();
431
+
425
432
  const success = await this.storeInfoFromPublishResult(result);
426
433
 
427
434
  if (success) {
@@ -473,7 +480,7 @@ class SuiPackage extends SuiObject {
473
480
  arguments: [cap, receipt],
474
481
  });
475
482
 
476
- console.log(tx);
483
+ // console.log(tx);
477
484
 
478
485
  const result = await this._suiMaster.signAndExecuteTransaction({
479
486
  transaction: tx,
@@ -196,12 +196,12 @@ class SuiPackageModule extends SuiCommonMethods {
196
196
  showDisplay: true,
197
197
  },
198
198
  });
199
+
199
200
  const suiTransaction = new this._suiMaster.SuiTransaction({
200
201
  suiMaster: this._suiMaster,
201
202
  debug: this._debug,
202
203
  data: result,
203
204
  });
204
-
205
205
  const status = suiTransaction.status;
206
206
 
207
207
  const listCreated = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suidouble",
3
- "version": "1.6.0-2",
3
+ "version": "1.9.0",
4
4
  "description": "Set of provider, package and object classes for javascript representation of Sui Move smart contracts. Use same code for publishing, upgrading, integration testing, interaction with smart contracts and integration in browser web3 dapps",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  "author": "Jeka Kiselyov <jeka911@gmail.com> (https://github.com/jeka-kiselyov)",
22
22
  "license": "Apache-2.0",
23
23
  "dependencies": {
24
- "@mysten/sui": "^1.6.0",
24
+ "@mysten/sui": "^1.9.0",
25
25
  "@wallet-standard/core": "^1.0.3",
26
26
  "websocket": "^1.0.35"
27
27
  },