Closed louisabraham closed 7 years ago
The keystore files are in JSON format, so they can be parsed in JavaScript simply by using the built-in JSON.parse
method. Here's an example using HTML5 FileReader: https://github.com/AugurProject/augur/blob/stable/app/components/Register.jsx#L250-L267
Oh sorry, I had only seen importFromFile, so I suppose the keyObject in keythereum.recover(password, keyObject) is simply the parsed JSON ?
Yes, that's correct.
Thank you very much!
Is it possible to import a keystore file from a string ? For example, I would like to be able to drop my keystore file in the browser to use it, but I haven't seen a function to read the account from a string.