-
-
Save Stoner19/0c679686b74d7bc4d064b9583910b200 to your computer and use it in GitHub Desktop.
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