@alephium/web3 0.2.0-rc.11 → 0.2.0-rc.13
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/alephium-web3.min.js +1 -1
- package/dist/alephium-web3.min.js.map +1 -1
- package/dist/src/api/api-alephium.d.ts +72 -11
- package/dist/src/api/api-alephium.js +130 -80
- package/dist/src/api/api-explorer.js +24 -33
- package/dist/src/api/utils.d.ts +6 -0
- package/dist/{scripts/stop-devnet.js → src/api/utils.js} +9 -12
- package/dist/src/contract/contract.d.ts +6 -4
- package/dist/src/contract/contract.js +32 -30
- package/dist/src/utils/utils.d.ts +0 -7
- package/dist/src/utils/utils.js +1 -10
- package/package.json +6 -15
- package/src/api/api-alephium.ts +113 -25
- package/src/api/api-explorer.ts +1 -11
- package/{scripts/stop-devnet.js → src/api/utils.ts} +5 -12
- package/src/contract/contract.ts +43 -40
- package/src/utils/utils.ts +0 -12
- package/contracts/greeter/greeter.ral +0 -7
- package/contracts/greeter/greeter_interface.ral +0 -4
- package/contracts/greeter_main.ral +0 -7
- package/dev/user.conf +0 -29
- package/dist/scripts/create-project.d.ts +0 -2
- package/dist/scripts/create-project.js +0 -125
- package/dist/scripts/start-devnet.d.ts +0 -1
- package/dist/scripts/start-devnet.js +0 -131
- package/dist/scripts/stop-devnet.d.ts +0 -1
- package/scripts/create-project.ts +0 -137
- package/scripts/start-devnet.js +0 -141
- package/templates/base/README.md +0 -34
- package/templates/base/package.json +0 -35
- package/templates/base/src/greeter.ts +0 -42
- package/templates/base/tsconfig.json +0 -19
- package/templates/react/README.md +0 -34
- package/templates/react/config-overrides.js +0 -18
- package/templates/react/package.json +0 -66
- package/templates/react/src/App.tsx +0 -42
- package/templates/react/src/artifacts/greeter.ral.json +0 -26
- package/templates/react/src/artifacts/greeter_main.ral.json +0 -22
- package/templates/shared/.eslintrc.json +0 -12
- package/templates/shared/scripts/header.js +0 -0
|
@@ -12,14 +12,7 @@
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.Api = exports.HttpClient = exports.ContentType = void 0;
|
|
14
14
|
require("cross-fetch/polyfill");
|
|
15
|
-
|
|
16
|
-
if (response.error) {
|
|
17
|
-
throw new Error(response.error.detail);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
return response.data;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
15
|
+
const utils_1 = require("./utils");
|
|
23
16
|
var ContentType;
|
|
24
17
|
(function (ContentType) {
|
|
25
18
|
ContentType["Json"] = "application/json";
|
|
@@ -113,8 +106,6 @@ class HttpClient {
|
|
|
113
106
|
if (cancelToken) {
|
|
114
107
|
this.abortControllers.delete(cancelToken);
|
|
115
108
|
}
|
|
116
|
-
if (!response.ok)
|
|
117
|
-
throw data;
|
|
118
109
|
return data;
|
|
119
110
|
});
|
|
120
111
|
};
|
|
@@ -178,7 +169,7 @@ class Api extends HttpClient {
|
|
|
178
169
|
method: 'GET',
|
|
179
170
|
format: 'json',
|
|
180
171
|
...params
|
|
181
|
-
}).then(convertHttpResponse),
|
|
172
|
+
}).then(utils_1.convertHttpResponse),
|
|
182
173
|
/**
|
|
183
174
|
* No description
|
|
184
175
|
*
|
|
@@ -194,7 +185,7 @@ class Api extends HttpClient {
|
|
|
194
185
|
type: ContentType.Json,
|
|
195
186
|
format: 'json',
|
|
196
187
|
...params
|
|
197
|
-
}).then(convertHttpResponse),
|
|
188
|
+
}).then(utils_1.convertHttpResponse),
|
|
198
189
|
/**
|
|
199
190
|
* @description A new wallet will be created and respond with a mnemonic. Make sure to keep that mnemonic safely as it will allows you to recover your wallet. Default mnemonic size is 24, (options: 12, 15, 18, 21, 24).
|
|
200
191
|
*
|
|
@@ -210,7 +201,7 @@ class Api extends HttpClient {
|
|
|
210
201
|
type: ContentType.Json,
|
|
211
202
|
format: 'json',
|
|
212
203
|
...params
|
|
213
|
-
}).then(convertHttpResponse),
|
|
204
|
+
}).then(utils_1.convertHttpResponse),
|
|
214
205
|
/**
|
|
215
206
|
* No description
|
|
216
207
|
*
|
|
@@ -224,7 +215,7 @@ class Api extends HttpClient {
|
|
|
224
215
|
method: 'GET',
|
|
225
216
|
format: 'json',
|
|
226
217
|
...params
|
|
227
|
-
}).then(convertHttpResponse),
|
|
218
|
+
}).then(utils_1.convertHttpResponse),
|
|
228
219
|
/**
|
|
229
220
|
* No description
|
|
230
221
|
*
|
|
@@ -239,7 +230,7 @@ class Api extends HttpClient {
|
|
|
239
230
|
body: data,
|
|
240
231
|
type: ContentType.Json,
|
|
241
232
|
...params
|
|
242
|
-
}).then(convertHttpResponse),
|
|
233
|
+
}).then(utils_1.convertHttpResponse),
|
|
243
234
|
/**
|
|
244
235
|
* No description
|
|
245
236
|
*
|
|
@@ -252,7 +243,7 @@ class Api extends HttpClient {
|
|
|
252
243
|
path: `/wallets/${walletName}/lock`,
|
|
253
244
|
method: 'POST',
|
|
254
245
|
...params
|
|
255
|
-
}).then(convertHttpResponse),
|
|
246
|
+
}).then(utils_1.convertHttpResponse),
|
|
256
247
|
/**
|
|
257
248
|
* No description
|
|
258
249
|
*
|
|
@@ -267,7 +258,7 @@ class Api extends HttpClient {
|
|
|
267
258
|
body: data,
|
|
268
259
|
type: ContentType.Json,
|
|
269
260
|
...params
|
|
270
|
-
}).then(convertHttpResponse),
|
|
261
|
+
}).then(utils_1.convertHttpResponse),
|
|
271
262
|
/**
|
|
272
263
|
* No description
|
|
273
264
|
*
|
|
@@ -281,7 +272,7 @@ class Api extends HttpClient {
|
|
|
281
272
|
method: 'GET',
|
|
282
273
|
format: 'json',
|
|
283
274
|
...params
|
|
284
|
-
}).then(convertHttpResponse),
|
|
275
|
+
}).then(utils_1.convertHttpResponse),
|
|
285
276
|
/**
|
|
286
277
|
* No description
|
|
287
278
|
*
|
|
@@ -297,7 +288,7 @@ class Api extends HttpClient {
|
|
|
297
288
|
type: ContentType.Json,
|
|
298
289
|
format: 'json',
|
|
299
290
|
...params
|
|
300
|
-
}).then(convertHttpResponse),
|
|
291
|
+
}).then(utils_1.convertHttpResponse),
|
|
301
292
|
/**
|
|
302
293
|
* No description
|
|
303
294
|
*
|
|
@@ -313,7 +304,7 @@ class Api extends HttpClient {
|
|
|
313
304
|
type: ContentType.Json,
|
|
314
305
|
format: 'json',
|
|
315
306
|
...params
|
|
316
|
-
}).then(convertHttpResponse),
|
|
307
|
+
}).then(utils_1.convertHttpResponse),
|
|
317
308
|
/**
|
|
318
309
|
* No description
|
|
319
310
|
*
|
|
@@ -329,7 +320,7 @@ class Api extends HttpClient {
|
|
|
329
320
|
type: ContentType.Json,
|
|
330
321
|
format: 'json',
|
|
331
322
|
...params
|
|
332
|
-
}).then(convertHttpResponse),
|
|
323
|
+
}).then(utils_1.convertHttpResponse),
|
|
333
324
|
/**
|
|
334
325
|
* No description
|
|
335
326
|
*
|
|
@@ -345,7 +336,7 @@ class Api extends HttpClient {
|
|
|
345
336
|
type: ContentType.Json,
|
|
346
337
|
format: 'json',
|
|
347
338
|
...params
|
|
348
|
-
}).then(convertHttpResponse),
|
|
339
|
+
}).then(utils_1.convertHttpResponse),
|
|
349
340
|
/**
|
|
350
341
|
* No description
|
|
351
342
|
*
|
|
@@ -361,7 +352,7 @@ class Api extends HttpClient {
|
|
|
361
352
|
type: ContentType.Json,
|
|
362
353
|
format: 'json',
|
|
363
354
|
...params
|
|
364
|
-
}).then(convertHttpResponse),
|
|
355
|
+
}).then(utils_1.convertHttpResponse),
|
|
365
356
|
/**
|
|
366
357
|
* No description
|
|
367
358
|
*
|
|
@@ -375,7 +366,7 @@ class Api extends HttpClient {
|
|
|
375
366
|
method: 'GET',
|
|
376
367
|
format: 'json',
|
|
377
368
|
...params
|
|
378
|
-
}).then(convertHttpResponse),
|
|
369
|
+
}).then(utils_1.convertHttpResponse),
|
|
379
370
|
/**
|
|
380
371
|
* No description
|
|
381
372
|
*
|
|
@@ -389,7 +380,7 @@ class Api extends HttpClient {
|
|
|
389
380
|
method: 'GET',
|
|
390
381
|
format: 'json',
|
|
391
382
|
...params
|
|
392
|
-
}).then(convertHttpResponse),
|
|
383
|
+
}).then(utils_1.convertHttpResponse),
|
|
393
384
|
/**
|
|
394
385
|
* @description This endpoint can only be called if the wallet was created with the `isMiner = true` flag
|
|
395
386
|
*
|
|
@@ -403,7 +394,7 @@ class Api extends HttpClient {
|
|
|
403
394
|
method: 'GET',
|
|
404
395
|
format: 'json',
|
|
405
396
|
...params
|
|
406
|
-
}).then(convertHttpResponse),
|
|
397
|
+
}).then(utils_1.convertHttpResponse),
|
|
407
398
|
/**
|
|
408
399
|
* @description Cannot be called from a miner wallet
|
|
409
400
|
*
|
|
@@ -418,7 +409,7 @@ class Api extends HttpClient {
|
|
|
418
409
|
query: query,
|
|
419
410
|
format: 'json',
|
|
420
411
|
...params
|
|
421
|
-
}).then(convertHttpResponse),
|
|
412
|
+
}).then(utils_1.convertHttpResponse),
|
|
422
413
|
/**
|
|
423
414
|
* @description Your wallet need to have been created with the miner flag set to true
|
|
424
415
|
*
|
|
@@ -432,7 +423,7 @@ class Api extends HttpClient {
|
|
|
432
423
|
method: 'POST',
|
|
433
424
|
format: 'json',
|
|
434
425
|
...params
|
|
435
|
-
}).then(convertHttpResponse),
|
|
426
|
+
}).then(utils_1.convertHttpResponse),
|
|
436
427
|
/**
|
|
437
428
|
* No description
|
|
438
429
|
*
|
|
@@ -447,7 +438,7 @@ class Api extends HttpClient {
|
|
|
447
438
|
body: data,
|
|
448
439
|
type: ContentType.Json,
|
|
449
440
|
...params
|
|
450
|
-
}).then(convertHttpResponse)
|
|
441
|
+
}).then(utils_1.convertHttpResponse)
|
|
451
442
|
};
|
|
452
443
|
this.infos = {
|
|
453
444
|
/**
|
|
@@ -463,7 +454,7 @@ class Api extends HttpClient {
|
|
|
463
454
|
method: 'GET',
|
|
464
455
|
format: 'json',
|
|
465
456
|
...params
|
|
466
|
-
}).then(convertHttpResponse),
|
|
457
|
+
}).then(utils_1.convertHttpResponse),
|
|
467
458
|
/**
|
|
468
459
|
* No description
|
|
469
460
|
*
|
|
@@ -477,7 +468,7 @@ class Api extends HttpClient {
|
|
|
477
468
|
method: 'GET',
|
|
478
469
|
format: 'json',
|
|
479
470
|
...params
|
|
480
|
-
}).then(convertHttpResponse),
|
|
471
|
+
}).then(utils_1.convertHttpResponse),
|
|
481
472
|
/**
|
|
482
473
|
* No description
|
|
483
474
|
*
|
|
@@ -491,7 +482,7 @@ class Api extends HttpClient {
|
|
|
491
482
|
method: 'GET',
|
|
492
483
|
format: 'json',
|
|
493
484
|
...params
|
|
494
|
-
}).then(convertHttpResponse),
|
|
485
|
+
}).then(utils_1.convertHttpResponse),
|
|
495
486
|
/**
|
|
496
487
|
* No description
|
|
497
488
|
*
|
|
@@ -505,7 +496,7 @@ class Api extends HttpClient {
|
|
|
505
496
|
method: 'GET',
|
|
506
497
|
format: 'json',
|
|
507
498
|
...params
|
|
508
|
-
}).then(convertHttpResponse),
|
|
499
|
+
}).then(utils_1.convertHttpResponse),
|
|
509
500
|
/**
|
|
510
501
|
* No description
|
|
511
502
|
*
|
|
@@ -519,7 +510,7 @@ class Api extends HttpClient {
|
|
|
519
510
|
method: 'GET',
|
|
520
511
|
format: 'json',
|
|
521
512
|
...params
|
|
522
|
-
}).then(convertHttpResponse),
|
|
513
|
+
}).then(utils_1.convertHttpResponse),
|
|
523
514
|
/**
|
|
524
515
|
* No description
|
|
525
516
|
*
|
|
@@ -533,7 +524,7 @@ class Api extends HttpClient {
|
|
|
533
524
|
method: 'GET',
|
|
534
525
|
format: 'json',
|
|
535
526
|
...params
|
|
536
|
-
}).then(convertHttpResponse),
|
|
527
|
+
}).then(utils_1.convertHttpResponse),
|
|
537
528
|
/**
|
|
538
529
|
* No description
|
|
539
530
|
*
|
|
@@ -547,7 +538,7 @@ class Api extends HttpClient {
|
|
|
547
538
|
method: 'GET',
|
|
548
539
|
format: 'json',
|
|
549
540
|
...params
|
|
550
|
-
}).then(convertHttpResponse),
|
|
541
|
+
}).then(utils_1.convertHttpResponse),
|
|
551
542
|
/**
|
|
552
543
|
* No description
|
|
553
544
|
*
|
|
@@ -562,7 +553,7 @@ class Api extends HttpClient {
|
|
|
562
553
|
body: data,
|
|
563
554
|
type: ContentType.Json,
|
|
564
555
|
...params
|
|
565
|
-
}).then(convertHttpResponse),
|
|
556
|
+
}).then(utils_1.convertHttpResponse),
|
|
566
557
|
/**
|
|
567
558
|
* No description
|
|
568
559
|
*
|
|
@@ -576,7 +567,7 @@ class Api extends HttpClient {
|
|
|
576
567
|
method: 'GET',
|
|
577
568
|
format: 'json',
|
|
578
569
|
...params
|
|
579
|
-
}).then(convertHttpResponse),
|
|
570
|
+
}).then(utils_1.convertHttpResponse),
|
|
580
571
|
/**
|
|
581
572
|
* No description
|
|
582
573
|
*
|
|
@@ -591,7 +582,7 @@ class Api extends HttpClient {
|
|
|
591
582
|
body: data,
|
|
592
583
|
type: ContentType.Json,
|
|
593
584
|
...params
|
|
594
|
-
}).then(convertHttpResponse),
|
|
585
|
+
}).then(utils_1.convertHttpResponse),
|
|
595
586
|
/**
|
|
596
587
|
* No description
|
|
597
588
|
*
|
|
@@ -606,7 +597,7 @@ class Api extends HttpClient {
|
|
|
606
597
|
query: query,
|
|
607
598
|
format: 'json',
|
|
608
599
|
...params
|
|
609
|
-
}).then(convertHttpResponse),
|
|
600
|
+
}).then(utils_1.convertHttpResponse),
|
|
610
601
|
/**
|
|
611
602
|
* No description
|
|
612
603
|
*
|
|
@@ -621,24 +612,39 @@ class Api extends HttpClient {
|
|
|
621
612
|
query: query,
|
|
622
613
|
format: 'json',
|
|
623
614
|
...params
|
|
624
|
-
}).then(convertHttpResponse)
|
|
615
|
+
}).then(utils_1.convertHttpResponse)
|
|
625
616
|
};
|
|
626
617
|
this.blockflow = {
|
|
627
618
|
/**
|
|
628
619
|
* No description
|
|
629
620
|
*
|
|
630
621
|
* @tags Blockflow
|
|
631
|
-
* @name
|
|
622
|
+
* @name GetBlockflowBlocks
|
|
632
623
|
* @summary List blocks on the given time interval
|
|
633
|
-
* @request GET:/blockflow
|
|
624
|
+
* @request GET:/blockflow/blocks
|
|
634
625
|
*/
|
|
635
|
-
|
|
636
|
-
path: `/blockflow`,
|
|
626
|
+
getBlockflowBlocks: (query, params = {}) => this.request({
|
|
627
|
+
path: `/blockflow/blocks`,
|
|
637
628
|
method: 'GET',
|
|
638
629
|
query: query,
|
|
639
630
|
format: 'json',
|
|
640
631
|
...params
|
|
641
|
-
}).then(convertHttpResponse),
|
|
632
|
+
}).then(utils_1.convertHttpResponse),
|
|
633
|
+
/**
|
|
634
|
+
* No description
|
|
635
|
+
*
|
|
636
|
+
* @tags Blockflow
|
|
637
|
+
* @name GetBlockflowBlocksWithEvents
|
|
638
|
+
* @summary List blocks with events on the given time interval
|
|
639
|
+
* @request GET:/blockflow/blocks-with-events
|
|
640
|
+
*/
|
|
641
|
+
getBlockflowBlocksWithEvents: (query, params = {}) => this.request({
|
|
642
|
+
path: `/blockflow/blocks-with-events`,
|
|
643
|
+
method: 'GET',
|
|
644
|
+
query: query,
|
|
645
|
+
format: 'json',
|
|
646
|
+
...params
|
|
647
|
+
}).then(utils_1.convertHttpResponse),
|
|
642
648
|
/**
|
|
643
649
|
* No description
|
|
644
650
|
*
|
|
@@ -652,7 +658,21 @@ class Api extends HttpClient {
|
|
|
652
658
|
method: 'GET',
|
|
653
659
|
format: 'json',
|
|
654
660
|
...params
|
|
655
|
-
}).then(convertHttpResponse),
|
|
661
|
+
}).then(utils_1.convertHttpResponse),
|
|
662
|
+
/**
|
|
663
|
+
* No description
|
|
664
|
+
*
|
|
665
|
+
* @tags Blockflow
|
|
666
|
+
* @name GetBlockflowBlocksWithEventsBlockHash
|
|
667
|
+
* @summary Get a block and events with hash
|
|
668
|
+
* @request GET:/blockflow/blocks-with-events/{block_hash}
|
|
669
|
+
*/
|
|
670
|
+
getBlockflowBlocksWithEventsBlockHash: (blockHash, params = {}) => this.request({
|
|
671
|
+
path: `/blockflow/blocks-with-events/${blockHash}`,
|
|
672
|
+
method: 'GET',
|
|
673
|
+
format: 'json',
|
|
674
|
+
...params
|
|
675
|
+
}).then(utils_1.convertHttpResponse),
|
|
656
676
|
/**
|
|
657
677
|
* No description
|
|
658
678
|
*
|
|
@@ -667,7 +687,7 @@ class Api extends HttpClient {
|
|
|
667
687
|
query: query,
|
|
668
688
|
format: 'json',
|
|
669
689
|
...params
|
|
670
|
-
}).then(convertHttpResponse),
|
|
690
|
+
}).then(utils_1.convertHttpResponse),
|
|
671
691
|
/**
|
|
672
692
|
* No description
|
|
673
693
|
*
|
|
@@ -682,7 +702,7 @@ class Api extends HttpClient {
|
|
|
682
702
|
query: query,
|
|
683
703
|
format: 'json',
|
|
684
704
|
...params
|
|
685
|
-
}).then(convertHttpResponse),
|
|
705
|
+
}).then(utils_1.convertHttpResponse),
|
|
686
706
|
/**
|
|
687
707
|
* No description
|
|
688
708
|
*
|
|
@@ -697,7 +717,7 @@ class Api extends HttpClient {
|
|
|
697
717
|
query: query,
|
|
698
718
|
format: 'json',
|
|
699
719
|
...params
|
|
700
|
-
}).then(convertHttpResponse),
|
|
720
|
+
}).then(utils_1.convertHttpResponse),
|
|
701
721
|
/**
|
|
702
722
|
* No description
|
|
703
723
|
*
|
|
@@ -711,7 +731,7 @@ class Api extends HttpClient {
|
|
|
711
731
|
method: 'GET',
|
|
712
732
|
format: 'json',
|
|
713
733
|
...params
|
|
714
|
-
}).then(convertHttpResponse)
|
|
734
|
+
}).then(utils_1.convertHttpResponse)
|
|
715
735
|
};
|
|
716
736
|
this.addresses = {
|
|
717
737
|
/**
|
|
@@ -727,7 +747,7 @@ class Api extends HttpClient {
|
|
|
727
747
|
method: 'GET',
|
|
728
748
|
format: 'json',
|
|
729
749
|
...params
|
|
730
|
-
}).then(convertHttpResponse),
|
|
750
|
+
}).then(utils_1.convertHttpResponse),
|
|
731
751
|
/**
|
|
732
752
|
* No description
|
|
733
753
|
*
|
|
@@ -741,7 +761,7 @@ class Api extends HttpClient {
|
|
|
741
761
|
method: 'GET',
|
|
742
762
|
format: 'json',
|
|
743
763
|
...params
|
|
744
|
-
}).then(convertHttpResponse),
|
|
764
|
+
}).then(utils_1.convertHttpResponse),
|
|
745
765
|
/**
|
|
746
766
|
* No description
|
|
747
767
|
*
|
|
@@ -755,7 +775,7 @@ class Api extends HttpClient {
|
|
|
755
775
|
method: 'GET',
|
|
756
776
|
format: 'json',
|
|
757
777
|
...params
|
|
758
|
-
}).then(convertHttpResponse)
|
|
778
|
+
}).then(utils_1.convertHttpResponse)
|
|
759
779
|
};
|
|
760
780
|
this.transactions = {
|
|
761
781
|
/**
|
|
@@ -771,7 +791,7 @@ class Api extends HttpClient {
|
|
|
771
791
|
method: 'GET',
|
|
772
792
|
format: 'json',
|
|
773
793
|
...params
|
|
774
|
-
}).then(convertHttpResponse),
|
|
794
|
+
}).then(utils_1.convertHttpResponse),
|
|
775
795
|
/**
|
|
776
796
|
* No description
|
|
777
797
|
*
|
|
@@ -787,7 +807,7 @@ class Api extends HttpClient {
|
|
|
787
807
|
type: ContentType.Json,
|
|
788
808
|
format: 'json',
|
|
789
809
|
...params
|
|
790
|
-
}).then(convertHttpResponse),
|
|
810
|
+
}).then(utils_1.convertHttpResponse),
|
|
791
811
|
/**
|
|
792
812
|
* No description
|
|
793
813
|
*
|
|
@@ -803,7 +823,7 @@ class Api extends HttpClient {
|
|
|
803
823
|
type: ContentType.Json,
|
|
804
824
|
format: 'json',
|
|
805
825
|
...params
|
|
806
|
-
}).then(convertHttpResponse),
|
|
826
|
+
}).then(utils_1.convertHttpResponse),
|
|
807
827
|
/**
|
|
808
828
|
* No description
|
|
809
829
|
*
|
|
@@ -819,7 +839,7 @@ class Api extends HttpClient {
|
|
|
819
839
|
type: ContentType.Json,
|
|
820
840
|
format: 'json',
|
|
821
841
|
...params
|
|
822
|
-
}).then(convertHttpResponse),
|
|
842
|
+
}).then(utils_1.convertHttpResponse),
|
|
823
843
|
/**
|
|
824
844
|
* No description
|
|
825
845
|
*
|
|
@@ -835,7 +855,7 @@ class Api extends HttpClient {
|
|
|
835
855
|
type: ContentType.Json,
|
|
836
856
|
format: 'json',
|
|
837
857
|
...params
|
|
838
|
-
}).then(convertHttpResponse),
|
|
858
|
+
}).then(utils_1.convertHttpResponse),
|
|
839
859
|
/**
|
|
840
860
|
* No description
|
|
841
861
|
*
|
|
@@ -850,7 +870,7 @@ class Api extends HttpClient {
|
|
|
850
870
|
query: query,
|
|
851
871
|
format: 'json',
|
|
852
872
|
...params
|
|
853
|
-
}).then(convertHttpResponse)
|
|
873
|
+
}).then(utils_1.convertHttpResponse)
|
|
854
874
|
};
|
|
855
875
|
this.contracts = {
|
|
856
876
|
/**
|
|
@@ -868,7 +888,7 @@ class Api extends HttpClient {
|
|
|
868
888
|
type: ContentType.Json,
|
|
869
889
|
format: 'json',
|
|
870
890
|
...params
|
|
871
|
-
}).then(convertHttpResponse),
|
|
891
|
+
}).then(utils_1.convertHttpResponse),
|
|
872
892
|
/**
|
|
873
893
|
* No description
|
|
874
894
|
*
|
|
@@ -884,7 +904,7 @@ class Api extends HttpClient {
|
|
|
884
904
|
type: ContentType.Json,
|
|
885
905
|
format: 'json',
|
|
886
906
|
...params
|
|
887
|
-
}).then(convertHttpResponse),
|
|
907
|
+
}).then(utils_1.convertHttpResponse),
|
|
888
908
|
/**
|
|
889
909
|
* No description
|
|
890
910
|
*
|
|
@@ -900,7 +920,7 @@ class Api extends HttpClient {
|
|
|
900
920
|
type: ContentType.Json,
|
|
901
921
|
format: 'json',
|
|
902
922
|
...params
|
|
903
|
-
}).then(convertHttpResponse),
|
|
923
|
+
}).then(utils_1.convertHttpResponse),
|
|
904
924
|
/**
|
|
905
925
|
* No description
|
|
906
926
|
*
|
|
@@ -916,7 +936,7 @@ class Api extends HttpClient {
|
|
|
916
936
|
type: ContentType.Json,
|
|
917
937
|
format: 'json',
|
|
918
938
|
...params
|
|
919
|
-
}).then(convertHttpResponse),
|
|
939
|
+
}).then(utils_1.convertHttpResponse),
|
|
920
940
|
/**
|
|
921
941
|
* No description
|
|
922
942
|
*
|
|
@@ -932,7 +952,7 @@ class Api extends HttpClient {
|
|
|
932
952
|
type: ContentType.Json,
|
|
933
953
|
format: 'json',
|
|
934
954
|
...params
|
|
935
|
-
}).then(convertHttpResponse),
|
|
955
|
+
}).then(utils_1.convertHttpResponse),
|
|
936
956
|
/**
|
|
937
957
|
* No description
|
|
938
958
|
*
|
|
@@ -947,7 +967,7 @@ class Api extends HttpClient {
|
|
|
947
967
|
query: query,
|
|
948
968
|
format: 'json',
|
|
949
969
|
...params
|
|
950
|
-
}).then(convertHttpResponse),
|
|
970
|
+
}).then(utils_1.convertHttpResponse),
|
|
951
971
|
/**
|
|
952
972
|
* No description
|
|
953
973
|
*
|
|
@@ -963,7 +983,7 @@ class Api extends HttpClient {
|
|
|
963
983
|
type: ContentType.Json,
|
|
964
984
|
format: 'json',
|
|
965
985
|
...params
|
|
966
|
-
}).then(convertHttpResponse),
|
|
986
|
+
}).then(utils_1.convertHttpResponse),
|
|
967
987
|
/**
|
|
968
988
|
* No description
|
|
969
989
|
*
|
|
@@ -979,7 +999,7 @@ class Api extends HttpClient {
|
|
|
979
999
|
type: ContentType.Json,
|
|
980
1000
|
format: 'json',
|
|
981
1001
|
...params
|
|
982
|
-
}).then(convertHttpResponse)
|
|
1002
|
+
}).then(utils_1.convertHttpResponse)
|
|
983
1003
|
};
|
|
984
1004
|
this.multisig = {
|
|
985
1005
|
/**
|
|
@@ -997,7 +1017,7 @@ class Api extends HttpClient {
|
|
|
997
1017
|
type: ContentType.Json,
|
|
998
1018
|
format: 'json',
|
|
999
1019
|
...params
|
|
1000
|
-
}).then(convertHttpResponse),
|
|
1020
|
+
}).then(utils_1.convertHttpResponse),
|
|
1001
1021
|
/**
|
|
1002
1022
|
* No description
|
|
1003
1023
|
*
|
|
@@ -1013,7 +1033,7 @@ class Api extends HttpClient {
|
|
|
1013
1033
|
type: ContentType.Json,
|
|
1014
1034
|
format: 'json',
|
|
1015
1035
|
...params
|
|
1016
|
-
}).then(convertHttpResponse),
|
|
1036
|
+
}).then(utils_1.convertHttpResponse),
|
|
1017
1037
|
/**
|
|
1018
1038
|
* No description
|
|
1019
1039
|
*
|
|
@@ -1029,7 +1049,7 @@ class Api extends HttpClient {
|
|
|
1029
1049
|
type: ContentType.Json,
|
|
1030
1050
|
format: 'json',
|
|
1031
1051
|
...params
|
|
1032
|
-
}).then(convertHttpResponse)
|
|
1052
|
+
}).then(utils_1.convertHttpResponse)
|
|
1033
1053
|
};
|
|
1034
1054
|
this.utils = {
|
|
1035
1055
|
/**
|
|
@@ -1047,7 +1067,7 @@ class Api extends HttpClient {
|
|
|
1047
1067
|
type: ContentType.Json,
|
|
1048
1068
|
format: 'json',
|
|
1049
1069
|
...params
|
|
1050
|
-
}).then(convertHttpResponse),
|
|
1070
|
+
}).then(utils_1.convertHttpResponse),
|
|
1051
1071
|
/**
|
|
1052
1072
|
* No description
|
|
1053
1073
|
*
|
|
@@ -1060,7 +1080,7 @@ class Api extends HttpClient {
|
|
|
1060
1080
|
path: `/utils/check-hash-indexing`,
|
|
1061
1081
|
method: 'PUT',
|
|
1062
1082
|
...params
|
|
1063
|
-
}).then(convertHttpResponse)
|
|
1083
|
+
}).then(utils_1.convertHttpResponse)
|
|
1064
1084
|
};
|
|
1065
1085
|
this.miners = {
|
|
1066
1086
|
/**
|
|
@@ -1077,7 +1097,22 @@ class Api extends HttpClient {
|
|
|
1077
1097
|
query: query,
|
|
1078
1098
|
format: 'json',
|
|
1079
1099
|
...params
|
|
1080
|
-
}).then(convertHttpResponse),
|
|
1100
|
+
}).then(utils_1.convertHttpResponse),
|
|
1101
|
+
/**
|
|
1102
|
+
* No description
|
|
1103
|
+
*
|
|
1104
|
+
* @tags Miners
|
|
1105
|
+
* @name PostMinersCpuMiningMineOneBlock
|
|
1106
|
+
* @summary Mine a block on CPU miner. !!! for test only !!!
|
|
1107
|
+
* @request POST:/miners/cpu-mining/mine-one-block
|
|
1108
|
+
*/
|
|
1109
|
+
postMinersCpuMiningMineOneBlock: (query, params = {}) => this.request({
|
|
1110
|
+
path: `/miners/cpu-mining/mine-one-block`,
|
|
1111
|
+
method: 'POST',
|
|
1112
|
+
query: query,
|
|
1113
|
+
format: 'json',
|
|
1114
|
+
...params
|
|
1115
|
+
}).then(utils_1.convertHttpResponse),
|
|
1081
1116
|
/**
|
|
1082
1117
|
* No description
|
|
1083
1118
|
*
|
|
@@ -1091,7 +1126,7 @@ class Api extends HttpClient {
|
|
|
1091
1126
|
method: 'GET',
|
|
1092
1127
|
format: 'json',
|
|
1093
1128
|
...params
|
|
1094
|
-
}).then(convertHttpResponse),
|
|
1129
|
+
}).then(utils_1.convertHttpResponse),
|
|
1095
1130
|
/**
|
|
1096
1131
|
* No description
|
|
1097
1132
|
*
|
|
@@ -1106,7 +1141,7 @@ class Api extends HttpClient {
|
|
|
1106
1141
|
body: data,
|
|
1107
1142
|
type: ContentType.Json,
|
|
1108
1143
|
...params
|
|
1109
|
-
}).then(convertHttpResponse)
|
|
1144
|
+
}).then(utils_1.convertHttpResponse)
|
|
1110
1145
|
};
|
|
1111
1146
|
this.events = {
|
|
1112
1147
|
/**
|
|
@@ -1123,7 +1158,7 @@ class Api extends HttpClient {
|
|
|
1123
1158
|
query: query,
|
|
1124
1159
|
format: 'json',
|
|
1125
1160
|
...params
|
|
1126
|
-
}).then(convertHttpResponse),
|
|
1161
|
+
}).then(utils_1.convertHttpResponse),
|
|
1127
1162
|
/**
|
|
1128
1163
|
* No description
|
|
1129
1164
|
*
|
|
@@ -1137,13 +1172,13 @@ class Api extends HttpClient {
|
|
|
1137
1172
|
method: 'GET',
|
|
1138
1173
|
format: 'json',
|
|
1139
1174
|
...params
|
|
1140
|
-
}).then(convertHttpResponse),
|
|
1175
|
+
}).then(utils_1.convertHttpResponse),
|
|
1141
1176
|
/**
|
|
1142
1177
|
* No description
|
|
1143
1178
|
*
|
|
1144
1179
|
* @tags Events
|
|
1145
1180
|
* @name GetEventsTxIdTxid
|
|
1146
|
-
* @summary Get events for a
|
|
1181
|
+
* @summary Get contract events for a transaction
|
|
1147
1182
|
* @request GET:/events/tx-id/{txId}
|
|
1148
1183
|
*/
|
|
1149
1184
|
getEventsTxIdTxid: (txId, query, params = {}) => this.request({
|
|
@@ -1152,7 +1187,22 @@ class Api extends HttpClient {
|
|
|
1152
1187
|
query: query,
|
|
1153
1188
|
format: 'json',
|
|
1154
1189
|
...params
|
|
1155
|
-
}).then(convertHttpResponse)
|
|
1190
|
+
}).then(utils_1.convertHttpResponse),
|
|
1191
|
+
/**
|
|
1192
|
+
* No description
|
|
1193
|
+
*
|
|
1194
|
+
* @tags Events
|
|
1195
|
+
* @name GetEventsBlockHashBlockhash
|
|
1196
|
+
* @summary Get contract events for a block
|
|
1197
|
+
* @request GET:/events/block-hash/{blockHash}
|
|
1198
|
+
*/
|
|
1199
|
+
getEventsBlockHashBlockhash: (blockHash, query, params = {}) => this.request({
|
|
1200
|
+
path: `/events/block-hash/${blockHash}`,
|
|
1201
|
+
method: 'GET',
|
|
1202
|
+
query: query,
|
|
1203
|
+
format: 'json',
|
|
1204
|
+
...params
|
|
1205
|
+
}).then(utils_1.convertHttpResponse)
|
|
1156
1206
|
};
|
|
1157
1207
|
}
|
|
1158
1208
|
}
|