@@ -48,13 +48,21 @@ import BTPSourceInformation from "./data/Formatter/BTPSourceInformation";
48
48
*/
49
49
export default class IconService {
50
50
public static IconAmount = Amount ;
51
+
51
52
public static IconBuilder = Builder ;
53
+
52
54
public static IconConverter = Converter ;
55
+
53
56
public static IconWallet = Wallet ;
57
+
54
58
public static IconUtil = Util ;
59
+
55
60
public static SignedTransaction = SignedTransaction ;
61
+
56
62
public static HttpProvider = HttpProvider ;
63
+
57
64
public static IconHexadecimal = Hexadecimal ;
65
+
58
66
public static IconValidator = Validator ;
59
67
60
68
private provider : HttpProvider ;
@@ -290,6 +298,7 @@ export default class IconService {
290
298
return this . provider . request ( request ) ;
291
299
}
292
300
}
301
+
293
302
/**
294
303
* Calls a SCORE API just for reading.
295
304
* @param {Call } call - The call instance exported by CallBuilder
@@ -366,7 +375,7 @@ export default class IconService {
366
375
throw error . toString ( ) ;
367
376
}
368
377
const requestId = Util . getCurrentTime ( ) ;
369
- const params = { hash : hash } ;
378
+ const params = { hash } ;
370
379
const request = new Request ( requestId , "icx_getDataByHash" , params ) ;
371
380
return this . provider . request ( request ) ;
372
381
}
@@ -412,6 +421,7 @@ export default class IconService {
412
421
const request = new Request ( requestId , "icx_getVotesByHeight" , params ) ;
413
422
return this . provider . request ( request ) ;
414
423
}
424
+
415
425
/**
416
426
* Get proof for the receipt
417
427
* @param {string } hash - The hash value of the block including the result
@@ -431,7 +441,7 @@ export default class IconService {
431
441
throw error . toString ( ) ;
432
442
}
433
443
const requestId = Util . getCurrentTime ( ) ;
434
- const params = { hash : hash , index : Converter . toHex ( index ) } ;
444
+ const params = { hash, index : Converter . toHex ( index ) } ;
435
445
const request = new Request ( requestId , "icx_getProofForResult" , params ) ;
436
446
return this . provider . request ( request ) ;
437
447
}
@@ -464,15 +474,15 @@ export default class IconService {
464
474
}
465
475
const requestId = Util . getCurrentTime ( ) ;
466
476
const params = {
467
- hash : hash ,
477
+ hash,
468
478
index : Converter . toHex ( index ) ,
469
479
events : events . map ( Converter . toHex ) ,
470
480
} ;
471
481
const request = new Request ( requestId , "icx_getProofForEvents" , params ) ;
472
482
return this . provider . request ( request ) ;
473
483
}
474
484
475
- /***
485
+ /** *
476
486
* Get BTP network information.
477
487
* @param id - network id
478
488
* @param height - Main block height
@@ -492,7 +502,7 @@ export default class IconService {
492
502
return this . provider . request < BTPNetworkInfo > ( request ) ;
493
503
}
494
504
495
- /***
505
+ /** *
496
506
* Get BTP network type information.
497
507
* @param id - Network type id
498
508
* @param height - Main block height
@@ -512,7 +522,7 @@ export default class IconService {
512
522
return this . provider . request < BTPNetworkTypeInfo > ( request ) ;
513
523
}
514
524
515
- /***
525
+ /** *
516
526
* Get BTP messages
517
527
* @param networkID - BTP network ID
518
528
* @param height - Main block height
@@ -528,7 +538,7 @@ export default class IconService {
528
538
return this . provider . request < Array < string > > ( request ) ;
529
539
}
530
540
531
- /***
541
+ /** *
532
542
* Get BTP block header
533
543
* @param networkID - Network id
534
544
* @param height - Main block height
@@ -544,7 +554,7 @@ export default class IconService {
544
554
return this . provider . request < string > ( request ) ;
545
555
}
546
556
547
- /***
557
+ /** *
548
558
* Get BTP block proof
549
559
* @param networkID - Network id
550
560
* @param height - Main block height
@@ -560,7 +570,7 @@ export default class IconService {
560
570
return this . provider . request < string > ( request ) ;
561
571
}
562
572
563
- /***
573
+ /** *
564
574
* Get source network information
565
575
* @return {HttpCall } The HttpCall instance for btp_getSourceInformation JSON-RPC API request.
566
576
*/
0 commit comments