-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geth Admin management API's implemented (web3-eth-admin) #2657
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you extend the documentation for this module? :)
packages/web3-core-method/src/methods/admin/AdminAddPeerMethod.js
Outdated
Show resolved
Hide resolved
Yes sure @nivida. I will start documenting it. |
I would add the docs directly here to this PR. Thanks! :) |
packages/web3-core-method/src/methods/admin/AdminAddPeerMethod.js
Outdated
Show resolved
Hide resolved
packages/web3-core-method/src/methods/admin/AdminStartRpcMethod.js
Outdated
Show resolved
Hide resolved
packages/web3-core-method/src/methods/admin/GetAdminDataDirectoryMethod.js
Outdated
Show resolved
Hide resolved
packages/web3-core-method/src/methods/admin/GetAdminNodeInfoMethod.js
Outdated
Show resolved
Hide resolved
packages/web3-core-method/src/methods/admin/SetAdminSolcMethod.js
Outdated
Show resolved
Hide resolved
@princesinha19 Sorry if I annoy you but could you also update the other method object names in the same pattern as the already changed methods?:) |
@nivide no problem. I will change it. Can you point me to the methods? should I change GetAdminPeerMethod to GetPeerMethod? |
The eth management modules should not get added to the web3.eth module this would blow up the bundle size for "normal" DApp's. :) |
Right. @nivida I can see. all the methods of web3-eth-personal, web3-eth-accounts are added in Eth typings class of web3-eth. |
I overloaded the types and also did all the requested changes. After overloading the method some error got occurred in build pipeline. Could please take a look at build pipeline @joshstevens19. |
@nivida @princesinha19 If this is a standalone module then great but in regards to what you said about I think all your PRs are standalone modules the user should only be able to get to it if they import the module and not through the public interface. If thats the case then great. We can't and should not remove the https://web3js.readthedocs.io/en/1.0/web3-eth.html#personal 👍 |
I am okay with adding it to web3.eth too. But, I agree with @nivida that it will unnecessarily increase the bundle size. So, I think we can separate the management API's and will keep it standalone modules. |
Yeah i agree with that, keeping it separate! @princesinha19 👍 Also i forgot to say brilliant work on the PRs done 👍 |
Description
I implemented all admin management API's provided by geth.
https://github.com/ethereum/go-ethereum/wiki/Management-APIs#list-of-management-apis
In this PR some of the the code for type is missing. So, I will update it further.
Fixes #2637 Partially
Type of change
Checklist:
npm run test
in the root folder with success and extended the tests if necessary.npm run build
in the root folder and tested it in the browser and with node.npm run dtslint
in the root folder and tested that all my types are correct