admin_js.go 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. ],
  43. properties:
  44. [
  45. new web3._extend.Property({
  46. name: 'nodeInfo',
  47. getter: 'admin_nodeInfo',
  48. outputFormatter: web3._extend.formatters.formatOutputString
  49. }),
  50. new web3._extend.Property({
  51. name: 'peers',
  52. getter: 'admin_peers',
  53. outputFormatter: function(obj) { return obj; }
  54. }),
  55. new web3._extend.Property({
  56. name: 'datadir',
  57. getter: 'admin_datadir',
  58. outputFormatter: web3._extend.formatters.formatOutputString
  59. }),
  60. new web3._extend.Property({
  61. name: 'chainSyncStatus',
  62. getter: 'admin_chainSyncStatus',
  63. outputFormatter: function(obj) { return obj; }
  64. })
  65. ]
  66. });
  67. `