Comments (2)
Just looking at the JSON RPC page the only mention of unlock is for the eth_sign method, which says the account should be unlocked, so it looks as though there's no JSON API for this, however I could have missed something here, how does the web3.js package do this? If it can be done over JSON RPC I'll update the package to include it.
I'm just updating the package for Dart 2 usage, when this is complete I'll have a deeper look at this.
from ethereum.
Thanks for checking into this. Yeah, good question. Searching through 0.x.x and 1.x.x web3.js code for 'unlockAccount', I don't see where it's actually turned into a JSON API call. I just see a few lines that I think are a template for Typescript's static type checking in https://github.com/ethereum/web3.js/tree/1.0ES6/packages/web3-eth-personal/src with a Readme a level up. Searching finds answers at https://ethereum.stackexchange.com/questions/8478/account-is-locked-how-to-unlock-it-using-json-rpc and https://ethereum.stackexchange.com/questions/4157/how-to-unlock-the-account-with-geth (with the first link showing the direct JSON call/syntax). Seeing it missing on the JSON RPC page, I guess this means it's not required? So if web3.js implemented it, they were just being helpful? Or is that some optional defined extension? I think I read that 'geth' has a web3 package inside it. So how did they know if they should, and how to, implement handling unlockAccount? Are the geth/web3 people all buddies, or the same people? Thanks again.
Updated 8/16/2018:
Also, I had planned on using web3.js' 'ecrecover' function to retrieve the account from the signed data and a signature. Documentation at https://web3js.readthedocs.io/en/1.0/web3-eth-personal.html. Looks like this is in the same package as 'unlockAccount' and also not in the JSON RPC spec, so I guess these are a collection of helper utilities/functions for working with the blockchain. Not sure what the raw json should look like though. I'll look into the web3.js implementation to see if I can piece it together.
Updated 8/20/2018:
OK, it's a little clearer now. There is another set of management APIs available in 'geth': https://github.com/ethereum/go-ethereum/wiki/Management-APIs. In there are the 'personal' ones I was mentioning (unlockAccount, ecrecover). Looks like the web3.js package I originally used implemented/wrapped calls to these geth APIs, and I guess I thought all APIs were part of any 'web3' implementation, but maybe anything beyond the core transaction related ones are considered optional.
from ethereum.
Related Issues (19)
- Fix minor coverage omissions in 1.0.0 HOT 1
- Dart 2 updates HOT 1
- Interface update tracker HOT 19
- use safeParse to convert address to BigInt HOT 6
- [Feature Request] Ethereum Wallet functionality HOT 4
- Can you help a beginner ? HOT 1
- getBlockByNumber returns null on Quorum HOT 1
- Null Safety Update HOT 2
- I want to use port 443. HOT 7
- Ethereum Mnemonics HOT 1
- why not support https?
- Update to latest package standards HOT 1
- WebSocket support for Server/DartVM
- How can i make a multicall?
- How can I use a proxy to change the ip?
- Add repository tag to pubspec HOT 1
- Update to Dart 3 HOT 1
- Fix static analysis errors introduced by lint 3.0.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ethereum.