admin_js.go 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. package api
  2. const Admin_JS = `
  3. web3._extend({
  4. property: 'admin',
  5. methods:
  6. [
  7. new web3._extend.Method({
  8. name: 'addPeer',
  9. call: 'admin_addPeer',
  10. params: 1,
  11. inputFormatter: [web3._extend.utils.formatInputString],
  12. outputFormatter: web3._extend.formatters.formatOutputBool
  13. }),
  14. new web3._extend.Method({
  15. name: 'exportChain',
  16. call: 'admin_exportChain',
  17. params: 1,
  18. inputFormatter: [web3._extend.utils.formatInputString],
  19. outputFormatter: function(obj) { return obj; }
  20. }),
  21. new web3._extend.Method({
  22. name: 'importChain',
  23. call: 'admin_importChain',
  24. params: 1,
  25. inputFormatter: [web3._extend.utils.formatInputString],
  26. outputFormatter: function(obj) { return obj; }
  27. }),
  28. new web3._extend.Method({
  29. name: 'verbosity',
  30. call: 'admin_verbosity',
  31. params: 1,
  32. inputFormatter: [web3._extend.utils.formatInputInt],
  33. outputFormatter: web3._extend.formatters.formatOutputBool
  34. }),
  35. new web3._extend.Method({
  36. name: 'setSolc',
  37. call: 'admin_setSolc',
  38. params: 1,
  39. inputFormatter: [web3._extend.utils.formatInputString],
  40. outputFormatter: web3._extend.formatters.formatOutputString
  41. }),
  42. new web3._extend.Method({
  43. name: 'startRPC',
  44. call: 'admin_startRPC',
  45. params: 4,
  46. inputFormatter: [web3._extend.utils.formatInputString,web3._extend.utils.formatInputInteger,web3._extend.utils.formatInputString,web3._extend.utils.formatInputString],
  47. outputFormatter: web3._extend.formatters.formatOutputBool
  48. }),
  49. new web3._extend.Method({
  50. name: 'stopRPC',
  51. call: 'admin_stopRPC',
  52. params: 0,
  53. inputFormatter: [],
  54. outputFormatter: web3._extend.formatters.formatOutputBool
  55. })
  56. ],
  57. properties:
  58. [
  59. new web3._extend.Property({
  60. name: 'nodeInfo',
  61. getter: 'admin_nodeInfo',
  62. outputFormatter: web3._extend.formatters.formatOutputString
  63. }),
  64. new web3._extend.Property({
  65. name: 'peers',
  66. getter: 'admin_peers',
  67. outputFormatter: function(obj) { return obj; }
  68. }),
  69. new web3._extend.Property({
  70. name: 'datadir',
  71. getter: 'admin_datadir',
  72. outputFormatter: web3._extend.formatters.formatOutputString
  73. }),
  74. new web3._extend.Property({
  75. name: 'chainSyncStatus',
  76. getter: 'admin_chainSyncStatus',
  77. outputFormatter: function(obj) { return obj; }
  78. })
  79. ]
  80. });
  81. `