github.com/neatio-net/neatio@v1.7.3-0.20231114194659-f4d7a2226baa/internal/web3ext/web3ext.go (about) 1 package web3ext 2 3 var Modules = map[string]string{ 4 "admin": Admin_JS, 5 "chequebook": Chequebook_JS, 6 "clique": Clique_JS, 7 "debug": Debug_JS, 8 "eth": Eth_JS, 9 "neat": NEAT_JS, 10 "miner": Miner_JS, 11 "net": Net_JS, 12 "personal": Personal_JS, 13 "rpc": RPC_JS, 14 "shh": Shh_JS, 15 "swarmfs": SWARMFS_JS, 16 "txpool": TxPool_JS, 17 "istanbul": Istanbul_JS, 18 } 19 20 const Chequebook_JS = ` 21 web3._extend({ 22 property: 'chequebook', 23 methods: [ 24 new web3._extend.Method({ 25 name: 'deposit', 26 call: 'chequebook_deposit', 27 params: 1, 28 inputFormatter: [null] 29 }), 30 new web3._extend.Property({ 31 name: 'balance', 32 getter: 'chequebook_balance', 33 outputFormatter: web3._extend.utils.toDecimal 34 }), 35 new web3._extend.Method({ 36 name: 'cash', 37 call: 'chequebook_cash', 38 params: 1, 39 inputFormatter: [null] 40 }), 41 new web3._extend.Method({ 42 name: 'issue', 43 call: 'chequebook_issue', 44 params: 2, 45 inputFormatter: [null, null] 46 }), 47 ] 48 }); 49 ` 50 51 const Clique_JS = ` 52 web3._extend({ 53 property: 'clique', 54 methods: [ 55 new web3._extend.Method({ 56 name: 'getSnapshot', 57 call: 'clique_getSnapshot', 58 params: 1, 59 inputFormatter: [null] 60 }), 61 new web3._extend.Method({ 62 name: 'getSnapshotAtHash', 63 call: 'clique_getSnapshotAtHash', 64 params: 1 65 }), 66 new web3._extend.Method({ 67 name: 'getSigners', 68 call: 'clique_getSigners', 69 params: 1, 70 inputFormatter: [null] 71 }), 72 new web3._extend.Method({ 73 name: 'getSignersAtHash', 74 call: 'clique_getSignersAtHash', 75 params: 1 76 }), 77 new web3._extend.Method({ 78 name: 'propose', 79 call: 'clique_propose', 80 params: 2 81 }), 82 new web3._extend.Method({ 83 name: 'discard', 84 call: 'clique_discard', 85 params: 1 86 }), 87 ], 88 properties: [ 89 new web3._extend.Property({ 90 name: 'proposals', 91 getter: 'clique_proposals' 92 }), 93 ] 94 }); 95 ` 96 97 const Admin_JS = ` 98 web3._extend({ 99 property: 'admin', 100 methods: [ 101 new web3._extend.Method({ 102 name: 'addPeer', 103 call: 'admin_addPeer', 104 params: 1 105 }), 106 new web3._extend.Method({ 107 name: 'removePeer', 108 call: 'admin_removePeer', 109 params: 1 110 }), 111 new web3._extend.Method({ 112 name: 'exportChain', 113 call: 'admin_exportChain', 114 params: 1, 115 inputFormatter: [null] 116 }), 117 new web3._extend.Method({ 118 name: 'importChain', 119 call: 'admin_importChain', 120 params: 1 121 }), 122 new web3._extend.Method({ 123 name: 'sleepBlocks', 124 call: 'admin_sleepBlocks', 125 params: 2 126 }), 127 new web3._extend.Method({ 128 name: 'startRPC', 129 call: 'admin_startRPC', 130 params: 4, 131 inputFormatter: [null, null, null, null] 132 }), 133 new web3._extend.Method({ 134 name: 'stopRPC', 135 call: 'admin_stopRPC' 136 }), 137 new web3._extend.Method({ 138 name: 'startWS', 139 call: 'admin_startWS', 140 params: 4, 141 inputFormatter: [null, null, null, null] 142 }), 143 new web3._extend.Method({ 144 name: 'stopWS', 145 call: 'admin_stopWS' 146 }), 147 new web3._extend.Method({ 148 name: 'startScanAndPrune', 149 call: 'admin_startScanAndPrune' 150 }), 151 ], 152 properties: [ 153 new web3._extend.Property({ 154 name: 'nodeInfo', 155 getter: 'admin_nodeInfo' 156 }), 157 new web3._extend.Property({ 158 name: 'peers', 159 getter: 'admin_peers' 160 }), 161 new web3._extend.Property({ 162 name: 'datadir', 163 getter: 'admin_datadir' 164 }), 165 ] 166 }); 167 ` 168 169 const Debug_JS = ` 170 web3._extend({ 171 property: 'debug', 172 methods: [ 173 new web3._extend.Method({ 174 name: 'printBlock', 175 call: 'debug_printBlock', 176 params: 1 177 }), 178 new web3._extend.Method({ 179 name: 'getBlockRlp', 180 call: 'debug_getBlockRlp', 181 params: 1 182 }), 183 new web3._extend.Method({ 184 name: 'setHead', 185 call: 'debug_setHead', 186 params: 1 187 }), 188 new web3._extend.Method({ 189 name: 'seedHash', 190 call: 'debug_seedHash', 191 params: 1 192 }), 193 new web3._extend.Method({ 194 name: 'dumpBlock', 195 call: 'debug_dumpBlock', 196 params: 1 197 }), 198 new web3._extend.Method({ 199 name: 'chaindbProperty', 200 call: 'debug_chaindbProperty', 201 params: 1, 202 outputFormatter: console.log 203 }), 204 new web3._extend.Method({ 205 name: 'chaindbCompact', 206 call: 'debug_chaindbCompact', 207 }), 208 new web3._extend.Method({ 209 name: 'metrics', 210 call: 'debug_metrics', 211 params: 1 212 }), 213 new web3._extend.Method({ 214 name: 'verbosity', 215 call: 'debug_verbosity', 216 params: 1 217 }), 218 new web3._extend.Method({ 219 name: 'vmodule', 220 call: 'debug_vmodule', 221 params: 1 222 }), 223 new web3._extend.Method({ 224 name: 'backtraceAt', 225 call: 'debug_backtraceAt', 226 params: 1, 227 }), 228 new web3._extend.Method({ 229 name: 'stacks', 230 call: 'debug_stacks', 231 params: 0, 232 outputFormatter: console.log 233 }), 234 new web3._extend.Method({ 235 name: 'freeOSMemory', 236 call: 'debug_freeOSMemory', 237 params: 0, 238 }), 239 new web3._extend.Method({ 240 name: 'setGCPercent', 241 call: 'debug_setGCPercent', 242 params: 1, 243 }), 244 new web3._extend.Method({ 245 name: 'memStats', 246 call: 'debug_memStats', 247 params: 0, 248 }), 249 new web3._extend.Method({ 250 name: 'gcStats', 251 call: 'debug_gcStats', 252 params: 0, 253 }), 254 new web3._extend.Method({ 255 name: 'cpuProfile', 256 call: 'debug_cpuProfile', 257 params: 2 258 }), 259 new web3._extend.Method({ 260 name: 'startCPUProfile', 261 call: 'debug_startCPUProfile', 262 params: 1 263 }), 264 new web3._extend.Method({ 265 name: 'stopCPUProfile', 266 call: 'debug_stopCPUProfile', 267 params: 0 268 }), 269 new web3._extend.Method({ 270 name: 'goTrace', 271 call: 'debug_goTrace', 272 params: 2 273 }), 274 new web3._extend.Method({ 275 name: 'startGoTrace', 276 call: 'debug_startGoTrace', 277 params: 1 278 }), 279 new web3._extend.Method({ 280 name: 'stopGoTrace', 281 call: 'debug_stopGoTrace', 282 params: 0 283 }), 284 new web3._extend.Method({ 285 name: 'blockProfile', 286 call: 'debug_blockProfile', 287 params: 2 288 }), 289 new web3._extend.Method({ 290 name: 'setBlockProfileRate', 291 call: 'debug_setBlockProfileRate', 292 params: 1 293 }), 294 new web3._extend.Method({ 295 name: 'writeBlockProfile', 296 call: 'debug_writeBlockProfile', 297 params: 1 298 }), 299 new web3._extend.Method({ 300 name: 'mutexProfile', 301 call: 'debug_mutexProfile', 302 params: 2 303 }), 304 new web3._extend.Method({ 305 name: 'setMutexProfileRate', 306 call: 'debug_setMutexProfileRate', 307 params: 1 308 }), 309 new web3._extend.Method({ 310 name: 'writeMutexProfile', 311 call: 'debug_writeMutexProfile', 312 params: 1 313 }), 314 new web3._extend.Method({ 315 name: 'writeMemProfile', 316 call: 'debug_writeMemProfile', 317 params: 1 318 }), 319 new web3._extend.Method({ 320 name: 'traceBlock', 321 call: 'debug_traceBlock', 322 params: 2, 323 inputFormatter: [null, null] 324 }), 325 new web3._extend.Method({ 326 name: 'traceBlockFromFile', 327 call: 'debug_traceBlockFromFile', 328 params: 2, 329 inputFormatter: [null, null] 330 }), 331 new web3._extend.Method({ 332 name: 'traceBlockByNumber', 333 call: 'debug_traceBlockByNumber', 334 params: 2, 335 inputFormatter: [null, null] 336 }), 337 new web3._extend.Method({ 338 name: 'traceBlockByHash', 339 call: 'debug_traceBlockByHash', 340 params: 2, 341 inputFormatter: [null, null] 342 }), 343 new web3._extend.Method({ 344 name: 'traceTransaction', 345 call: 'debug_traceTransaction', 346 params: 2, 347 inputFormatter: [null, null] 348 }), 349 new web3._extend.Method({ 350 name: 'preimage', 351 call: 'debug_preimage', 352 params: 1, 353 inputFormatter: [null] 354 }), 355 new web3._extend.Method({ 356 name: 'getBadBlocks', 357 call: 'debug_getBadBlocks', 358 params: 0, 359 }), 360 new web3._extend.Method({ 361 name: 'storageRangeAt', 362 call: 'debug_storageRangeAt', 363 params: 5, 364 }), 365 new web3._extend.Method({ 366 name: 'getModifiedAccountsByNumber', 367 call: 'debug_getModifiedAccountsByNumber', 368 params: 2, 369 inputFormatter: [null, null], 370 }), 371 new web3._extend.Method({ 372 name: 'getModifiedAccountsByHash', 373 call: 'debug_getModifiedAccountsByHash', 374 params: 2, 375 inputFormatter:[null, null], 376 }), 377 ], 378 properties: [] 379 }); 380 ` 381 382 const Eth_JS = ` 383 web3._extend({ 384 property: 'eth', 385 methods: [ 386 new web3._extend.Method({ 387 name: 'sign', 388 call: 'eth_sign', 389 params: 2, 390 inputFormatter: [web3._extend.formatters.inputAddressFormatter, null] 391 }), 392 new web3._extend.Method({ 393 name: 'resend', 394 call: 'eth_resend', 395 params: 3, 396 inputFormatter: [web3._extend.formatters.inputTransactionFormatter, web3._extend.utils.fromDecimal, web3._extend.utils.fromDecimal] 397 }), 398 new web3._extend.Method({ 399 name: 'signTransaction', 400 call: 'eth_signTransaction', 401 params: 1, 402 inputFormatter: [web3._extend.formatters.inputTransactionFormatter] 403 }), 404 new web3._extend.Method({ 405 name: 'submitTransaction', 406 call: 'eth_submitTransaction', 407 params: 1, 408 inputFormatter: [web3._extend.formatters.inputTransactionFormatter] 409 }), 410 new web3._extend.Method({ 411 name: 'getRawTransaction', 412 call: 'eth_getRawTransactionByHash', 413 params: 1 414 }), 415 new web3._extend.Method({ 416 name: 'getRawTransactionFromBlock', 417 call: function(args) { 418 return (web3._extend.utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getRawTransactionByBlockHashAndIndex' : 'eth_getRawTransactionByBlockNumberAndIndex'; 419 }, 420 params: 2, 421 inputFormatter: [web3._extend.formatters.inputBlockNumberFormatter, web3._extend.utils.toHex] 422 }), 423 new web3._extend.Method({ 424 name: 'getBalanceDetail', 425 call: 'eth_getBalanceDetail', 426 params: 3, 427 inputFormatter: [web3._extend.formatters.inputAddressFormatter, web3._extend.formatters.inputDefaultBlockNumberFormatter, null] 428 }), 429 ], 430 properties: [ 431 new web3._extend.Property({ 432 name: 'pendingTransactions', 433 getter: 'eth_pendingTransactions', 434 outputFormatter: function(txs) { 435 var formatted = []; 436 for (var i = 0; i < txs.length; i++) { 437 formatted.push(web3._extend.formatters.outputTransactionFormatter(txs[i])); 438 formatted[i].blockHash = null; 439 } 440 return formatted; 441 } 442 }), 443 ] 444 }); 445 ` 446 447 const NEAT_JS = ` 448 web3._extend({ 449 property: 'neat', 450 methods: [ 451 new web3._extend.Method({ 452 name: 'sign', 453 call: 'neat_sign', 454 params: 2, 455 inputFormatter: [web3._extend.formatters.inputAddressFormatter, null] 456 }), 457 new web3._extend.Method({ 458 name: 'resend', 459 call: 'neat_resend', 460 params: 3, 461 inputFormatter: [web3._extend.formatters.inputTransactionFormatter, web3._extend.utils.fromDecimal, web3._extend.utils.fromDecimal] 462 }), 463 new web3._extend.Method({ 464 name: 'signTransaction', 465 call: 'neat_signTransaction', 466 params: 1, 467 inputFormatter: [web3._extend.formatters.inputTransactionFormatter] 468 }), 469 new web3._extend.Method({ 470 name: 'submitTransaction', 471 call: 'neat_submitTransaction', 472 params: 1, 473 inputFormatter: [web3._extend.formatters.inputTransactionFormatter] 474 }), 475 new web3._extend.Method({ 476 name: 'getRawTransaction', 477 call: 'neat_getRawTransactionByHash', 478 params: 1 479 }), 480 new web3._extend.Method({ 481 name: 'getRawTransactionFromBlock', 482 call: function(args) { 483 return (web3._extend.utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'neat_getRawTransactionByBlockHashAndIndex' : 'neat_getRawTransactionByBlockNumberAndIndex'; 484 }, 485 params: 2, 486 inputFormatter: [web3._extend.formatters.inputBlockNumberFormatter, web3._extend.utils.toHex] 487 }), 488 new web3._extend.Method({ 489 name: 'getBalanceDetail', 490 call: 'neat_getBalanceDetail', 491 params: 3, 492 inputFormatter: [web3._extend.formatters.inputAddressFormatter, web3._extend.formatters.inputDefaultBlockNumberFormatter, null] 493 }), 494 new web3._extend.Method({ 495 name: 'signAddress', 496 call: 'neat_signAddress', 497 params: 2 498 }), 499 new web3._extend.Method({ 500 name: 'getBlockReward', 501 call: 'neat_getBlockReward', 502 params: 1 503 }), 504 new web3._extend.Method({ 505 name: 'withdrawReward', 506 call: 'neat_withdrawReward', 507 params: 4, 508 inputFormatter: [web3._extend.formatters.inputAddressFormatter, web3._extend.formatters.inputAddressFormatter, null, null] 509 }), 510 new web3._extend.Method({ 511 name: 'voteNextEpoch', 512 call: 'neat_voteNextEpoch', 513 params: 3 514 }), 515 new web3._extend.Method({ 516 name: 'revealVote', 517 call: 'neat_revealVote', 518 params: 6 519 }), 520 new web3._extend.Method({ 521 name: 'getCurrentEpochNumber', 522 call: 'neat_getCurrentEpochNumber' 523 }), 524 new web3._extend.Method({ 525 name: 'getEpoch', 526 call: 'neat_getEpoch', 527 params: 1 528 }), 529 new web3._extend.Method({ 530 name: 'getNextEpochVote', 531 call: 'neat_getNextEpochVote' 532 }), 533 new web3._extend.Method({ 534 name: 'getNextEpochValidators', 535 call: 'neat_getNextEpochValidators' 536 }), 537 new web3._extend.Method({ 538 name: 'getNextEpochCandidates', 539 call: 'neat_getNextEpochCandidates' 540 }), 541 new web3._extend.Method({ 542 name: 'getEpochCandidates', 543 call: 'neat_getEpochCandidates', 544 params: 1 545 }), 546 new web3._extend.Method({ 547 name: 'getValidatorStatus', 548 call: 'neat_getValidatorStatus', 549 params: 1, 550 inputFormatter: [web3._extend.formatters.inputAddressFormatter] 551 }), 552 new web3._extend.Method({ 553 name: 'editValidator', 554 call: 'neat_editValidator', 555 params: 6, 556 inputFormatter: [web3._extend.formatters.inputAddressFormatter, null, null, null, null, null] 557 }), 558 new web3._extend.Method({ 559 name: 'getVoteHash', 560 call: 'neat_getVoteHash', 561 params: 4, 562 inputFormatter: [web3._extend.formatters.inputAddressFormatter, null, null, null] 563 }), 564 new web3._extend.Method({ 565 name: 'getConsensusPublicKey', 566 call: 'neat_getConsensusPublicKey', 567 params: 1 568 }), 569 new web3._extend.Method({ 570 name: 'decodeExtraData', 571 call: 'neat_decodeExtraData', 572 params: 1 573 }), 574 new web3._extend.Method({ 575 name: 'delegate', 576 call: 'neat_delegate', 577 params: 4 578 }), 579 new web3._extend.Method({ 580 name: 'unDelegate', 581 call: 'neat_unDelegate', 582 params: 4 583 }), 584 new web3._extend.Method({ 585 name: 'register', 586 call: 'neat_register', 587 params: 6, 588 inputFormatter: [web3._extend.formatters.inputAddressFormatter, null, null, null, null] 589 }), 590 new web3._extend.Method({ 591 name: 'unRegister', 592 call: 'neat_unRegister', 593 params: 2, 594 inputFormatter: [web3._extend.formatters.inputAddressFormatter, null] 595 }), 596 new web3._extend.Method({ 597 name: 'checkCandidate', 598 call: 'neat_checkCandidate', 599 params: 2, 600 inputFormatter: [web3._extend.formatters.inputAddressFormatter, web3._extend.formatters.inputDefaultBlockNumberFormatter] 601 }), 602 new web3._extend.Method({ 603 name: 'getBannedStatus', 604 call: 'neat_getBannedStatus', 605 params: 2, 606 inputFormatter: [web3._extend.formatters.inputAddressFormatter, web3._extend.formatters.inputDefaultBlockNumberFormatter] 607 }), 608 new web3._extend.Method({ 609 name: 'setCommission', 610 call: 'neat_setCommission', 611 params: 3, 612 inputFormatter: [web3._extend.formatters.inputAddressFormatter, null, null] 613 }), 614 new web3._extend.Method({ 615 name: 'setAddress', 616 call: 'neat_setAddress', 617 params: 3, 618 inputFormatter: [web3._extend.formatters.inputAddressFormatter, web3._extend.formatters.inputAddressFormatter, null] 619 }) 620 ], 621 properties: [ 622 new web3._extend.Property({ 623 name: 'pendingTransactions', 624 getter: 'eth_pendingTransactions', 625 outputFormatter: function(txs) { 626 var formatted = []; 627 for (var i = 0; i < txs.length; i++) { 628 formatted.push(web3._extend.formatters.outputTransactionFormatter(txs[i])); 629 formatted[i].blockHash = null; 630 } 631 return formatted; 632 } 633 }), 634 ] 635 }); 636 ` 637 638 const Miner_JS = ` 639 web3._extend({ 640 property: 'miner', 641 methods: [ 642 new web3._extend.Method({ 643 name: 'start', 644 call: 'miner_start', 645 params: 1, 646 inputFormatter: [null] 647 }), 648 new web3._extend.Method({ 649 name: 'stop', 650 call: 'miner_stop' 651 }), 652 new web3._extend.Method({ 653 name: 'setEtherbase', 654 call: 'miner_setEtherbase', 655 params: 1, 656 inputFormatter: [web3._extend.formatters.inputAddressFormatter] 657 }), 658 new web3._extend.Method({ 659 name: 'setExtra', 660 call: 'miner_setExtra', 661 params: 1 662 }), 663 new web3._extend.Method({ 664 name: 'setGasPrice', 665 call: 'miner_setGasPrice', 666 params: 1, 667 inputFormatter: [web3._extend.utils.fromDecimal] 668 }), 669 new web3._extend.Method({ 670 name: 'getHashrate', 671 call: 'miner_getHashrate' 672 }), 673 ], 674 properties: [] 675 }); 676 ` 677 678 const Net_JS = ` 679 web3._extend({ 680 property: 'net', 681 methods: [], 682 properties: [ 683 new web3._extend.Property({ 684 name: 'version', 685 getter: 'net_version' 686 }), 687 ] 688 }); 689 ` 690 691 const Personal_JS = ` 692 web3._extend({ 693 property: 'personal', 694 methods: [ 695 new web3._extend.Method({ 696 name: 'importRawKey', 697 call: 'personal_importRawKey', 698 params: 2 699 }), 700 new web3._extend.Method({ 701 name: 'sign', 702 call: 'personal_sign', 703 params: 3, 704 inputFormatter: [null, web3._extend.formatters.inputAddressFormatter, null] 705 }), 706 new web3._extend.Method({ 707 name: 'ecRecover', 708 call: 'personal_ecRecover', 709 params: 2 710 }), 711 new web3._extend.Method({ 712 name: 'openWallet', 713 call: 'personal_openWallet', 714 params: 2 715 }), 716 new web3._extend.Method({ 717 name: 'deriveAccount', 718 call: 'personal_deriveAccount', 719 params: 3 720 }), 721 new web3._extend.Method({ 722 name: 'signTransaction', 723 call: 'personal_signTransaction', 724 params: 2, 725 inputFormatter: [web3._extend.formatters.inputTransactionFormatter, null] 726 }), 727 ], 728 properties: [ 729 new web3._extend.Property({ 730 name: 'listWallets', 731 getter: 'personal_listWallets' 732 }), 733 ] 734 }) 735 ` 736 737 const RPC_JS = ` 738 web3._extend({ 739 property: 'rpc', 740 methods: [], 741 properties: [ 742 new web3._extend.Property({ 743 name: 'modules', 744 getter: 'rpc_modules' 745 }), 746 ] 747 }); 748 ` 749 750 const Shh_JS = ` 751 web3._extend({ 752 property: 'shh', 753 methods: [ 754 ], 755 properties: 756 [ 757 new web3._extend.Property({ 758 name: 'version', 759 getter: 'shh_version', 760 outputFormatter: web3._extend.utils.toDecimal 761 }), 762 new web3._extend.Property({ 763 name: 'info', 764 getter: 'shh_info' 765 }), 766 ] 767 }); 768 ` 769 770 const SWARMFS_JS = ` 771 web3._extend({ 772 property: 'swarmfs', 773 methods: 774 [ 775 new web3._extend.Method({ 776 name: 'mount', 777 call: 'swarmfs_mount', 778 params: 2 779 }), 780 new web3._extend.Method({ 781 name: 'unmount', 782 call: 'swarmfs_unmount', 783 params: 1 784 }), 785 new web3._extend.Method({ 786 name: 'listmounts', 787 call: 'swarmfs_listmounts', 788 params: 0 789 }), 790 ] 791 }); 792 ` 793 794 const TxPool_JS = ` 795 web3._extend({ 796 property: 'txpool', 797 methods: [], 798 properties: 799 [ 800 new web3._extend.Property({ 801 name: 'content', 802 getter: 'txpool_content' 803 }), 804 new web3._extend.Property({ 805 name: 'inspect', 806 getter: 'txpool_inspect' 807 }), 808 new web3._extend.Property({ 809 name: 'status', 810 getter: 'txpool_status', 811 outputFormatter: function(status) { 812 status.pending = web3._extend.utils.toDecimal(status.pending); 813 status.queued = web3._extend.utils.toDecimal(status.queued); 814 return status; 815 } 816 }), 817 ] 818 }); 819 ` 820 821 const Istanbul_JS = ` 822 web3._extend({ 823 property: 'istanbul', 824 methods: 825 [ 826 new web3._extend.Method({ 827 name: 'getSnapshot', 828 call: 'istanbul_getSnapshot', 829 params: 1, 830 inputFormatter: [null] 831 }), 832 new web3._extend.Method({ 833 name: 'getSnapshotAtHash', 834 call: 'istanbul_getSnapshotAtHash', 835 params: 1 836 }), 837 new web3._extend.Method({ 838 name: 'getValidators', 839 call: 'istanbul_getValidators', 840 params: 1, 841 inputFormatter: [null] 842 }), 843 new web3._extend.Method({ 844 name: 'getValidatorsAtHash', 845 call: 'istanbul_getValidatorsAtHash', 846 params: 1 847 }), 848 new web3._extend.Method({ 849 name: 'propose', 850 call: 'istanbul_propose', 851 params: 2 852 }), 853 new web3._extend.Method({ 854 name: 'discard', 855 call: 'istanbul_discard', 856 params: 1 857 }) 858 ], 859 properties: 860 [ 861 new web3._extend.Property({ 862 name: 'candidates', 863 getter: 'istanbul_candidates' 864 }), 865 ] 866 }); 867 `