Last active
October 5, 2019 13:23
-
-
Save anonymoussprocket/270c3a7e66ed7066547ee39ff61d670d to your computer and use it in GitHub Desktop.
Tezori/Galleon wallet file reader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<script src="https://cdn.jsdelivr.net/gh/cryptonomic/conseiljs/dist-web/conseiljs.min.js" crossorigin="anonymous" type="text/javascript"></script> | |
<script> | |
const processFile = () => { | |
var reader = new FileReader(); | |
reader.onload = async () => { | |
var content = reader.result; | |
const w = await conseiljs.TezosFileWallet.loadWalletString(content, document.forms[0]['inputpassword'].value); | |
document.getElementById('outputkeyhash').innerText = w.identities[0].publicKeyHash; | |
document.getElementById('outputsecretkey').innerText = w.identities[0].privateKey; | |
}; | |
reader.readAsText(document.forms[0]['inputfile'].files[0]); | |
}; | |
</script> | |
</head> | |
<body> | |
<h1>Tezori/Galleon wallet file reader</h1> | |
<h2>Use at your own risk</h2> | |
<form> | |
<label for="inputfile">Wallet File</label> | |
<input name="inputfile" id="inputfile" type='file'><br> | |
<label for="inputpassword">Password</label> | |
<input name="inputpassword" id="inputpassword" type="password" /><br /> | |
<button onclick="processFile(); return false;">Process</button> | |
<form> | |
<div> | |
<label for="outputkeyhash">Account Address</label> | |
<div id="outputkeyhash"> </div> | |
<label for="outputkeyhash">Secret Key</label> | |
<div id="outputsecretkey"> </div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment