suidouble 0.0.33 → 0.0.35

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/README.md CHANGED
@@ -22,9 +22,12 @@ Set of provider, package and object classes for javascript representation of Sui
22
22
 
23
23
  | Name | Stack | Online | Github |
24
24
  |----------|---------------|---------|--------|
25
+ | sui-bot-score | Vue + suidouble | [sui-bot-score](https://sui-bot-score-04f61376a410.herokuapp.com/) | [source code](https://github.com/suidouble/suidouble-bot-score) |
25
26
  | suidouble-sample-app | Vue + suidouble | [suidouble-sample-app](https://suidouble-sample-app.herokuapp.com/) | [source code](https://github.com/suidouble/suidouble-sample-app) |
26
27
  | suidouble-color | Vue + suidouble | [suidouble-color](https://suidouble-color.herokuapp.com/) | [source code](https://github.com/suidouble/suidouble-sample-color) |
27
28
 
29
+
30
+
28
31
  ### installation
29
32
 
30
33
  ```
@@ -309,6 +312,10 @@ await testScenario.end();
309
312
 
310
313
  ### Sui Move Connect in browser
311
314
 
315
+ Check out [suidouble Vue component](https://www.npmjs.com/package/vue-sui) to connect your dapp to the Sui blockchain.
316
+
317
+ Or write the one manually, code is framework independed:
318
+
312
319
  ```javascript
313
320
  const { SuiInBrowser } = require('suidouble');
314
321
 
package/lib/SuiMaster.js CHANGED
@@ -288,19 +288,23 @@ class SuiMaster extends SuiCommonMethods {
288
288
  // showBalanceChanges: optional(boolean()),
289
289
  async fetchTransactions(params = {}) {
290
290
  const filter = {};
291
- if (params.fromOrToAddress) {
292
- filter.FromOrToAddress = { addr: params.fromOrToAddress };
291
+ if (params.fromAddress) {
292
+ filter.FromAddress = params.fromAddress;
293
293
  }
294
294
 
295
295
  const queryParams = {
296
296
  descending_order: false,
297
- query: filter,
297
+ filter: filter,
298
298
  options: {
299
- showInput: true,
299
+ // showInput: true,
300
300
  showEffects: true,
301
- showEvents: true,
302
- showObjectChanges: true,
303
- showBalanceChanges: true,
301
+ // showEvents: true,
302
+ // showObjectChanges: true,
303
+ // showBalanceChanges: true,
304
+ // showType: true,
305
+ // showContent: true,
306
+ // showOwner: true,
307
+ // showDisplay: true,
304
308
  },
305
309
  limit: params.limit || 50,
306
310
  };
@@ -142,7 +142,7 @@ class SuiTransaction extends SuiCommonMethods {
142
142
 
143
143
  get timestampMs() {
144
144
  if (this.data.timestampMs) {
145
- return parseInt(this.data.timestampMs, 10);
145
+ return parseInt(''+this.data.timestampMs, 10);
146
146
  } else {
147
147
  return null;
148
148
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suidouble",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
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": {
@@ -89,21 +89,3 @@ test('connecting to different chains', async t => {
89
89
 
90
90
  t.equal(suiMaster4.connectedChain, 'sui:localnet');
91
91
  });
92
-
93
- // test('get transactions', async t => {
94
- // const suiMaster = new SuiMaster({provider: 'main', as: 'somebody'});
95
- // await suiMaster.initialize();
96
-
97
- // const paginatedResponse = await suiMaster.fetchTransactions({
98
- // fromOrToAddress: '0xffc5bc3732f201892df5d2839b86957abcf42dfe66dc79383fe107f6548bc2bf',
99
- // });
100
-
101
- // await paginatedResponse.forEach((suiTransaction)=>{
102
- // // console.log(suiTransaction.results);
103
- // const objects = suiTransaction.results.objects;
104
- // for (const o of objects) {
105
- // // console.log(o.id, o.typeName, o.version);
106
- // }
107
- // }, 10);
108
-
109
- // });