0

How we can export web3.js's amdin and miner block in node.js code by to interact with the ethereum private blockchain in console

put on hold as unclear what you're asking by Rosco Kalis, Achala Dissanayake, shane, Briomkez, ivicaa Jan 13 at 18:19

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Extremely unclear. – goodvibration Jan 9 at 11:10
  • i m trying to use web3.js's admin api but its gives undefinded – sandeep singh Jan 9 at 11:21
  • I don't see anywhere in your question how exactly you are trying that. – goodvibration Jan 9 at 11:24
  • var Web3 = require('web3'); if (typeof web3 !== 'undefined') { web3 = new Web3(web3.currentProvider); } else { // set the provider you want from Web3.providers web3 = new Web3(new Web3.providers.HttpProvider("localhost:8101")); } console.log('web3 miner',web3.miner); – sandeep singh Jan 9 at 11:29
  • Make sure you npm install web3 in the same path as your script, or npm install -g web3 (not recommended). – goodvibration Jan 9 at 11:31