Add Aeon support
This commit is contained in:
parent
b3c0703201
commit
812b852d75
|
@ -8537,14 +8537,21 @@ return{_strlen:lb,_ge_mul8:Va,_keccak:db,_ge_scalarmult:Ta,_ge_fromfe_frombytes_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var config = {
|
var moneroConfig = {
|
||||||
coinUnitPlaces: 12,
|
coinUnitPlaces: 12,
|
||||||
coinSymbol: 'XMR',
|
coinSymbol: 'XMR',
|
||||||
coinName: 'Monero',
|
coinName: 'Monero',
|
||||||
coinUriPrefix: 'monero:',
|
coinUriPrefix: 'monero:',
|
||||||
addressPrefix: 18
|
addressPrefix: 18
|
||||||
};
|
};
|
||||||
var cnUtil = (function(initConfig) {
|
var aeonConfig = {
|
||||||
|
coinUnitPlaces: 12,
|
||||||
|
coinSymbol: 'AEON',
|
||||||
|
coinName: 'Aeon',
|
||||||
|
coinUriPrefix: 'aeon:',
|
||||||
|
addressPrefix: 0xB2
|
||||||
|
};
|
||||||
|
var cnUtilGen = function(initConfig) {
|
||||||
//var config = $.extend({}, initConfig);
|
//var config = $.extend({}, initConfig);
|
||||||
var config = initConfig;
|
var config = initConfig;
|
||||||
config.coinUnits = new JSBigInt(10).pow(config.coinUnitPlaces);
|
config.coinUnits = new JSBigInt(10).pow(config.coinUnitPlaces);
|
||||||
|
@ -8965,7 +8972,8 @@ var cnUtil = (function(initConfig) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
})(config);
|
};
|
||||||
|
var cnUtil = cnUtilGen(moneroConfig);
|
||||||
/*
|
/*
|
||||||
mnemonic.js : Converts between 4-byte aligned strings and a human-readable
|
mnemonic.js : Converts between 4-byte aligned strings and a human-readable
|
||||||
sequence of words. Uses 1626 common words taken from wikipedia article:
|
sequence of words. Uses 1626 common words taken from wikipedia article:
|
||||||
|
@ -10716,10 +10724,15 @@ bC0zLjUsMjAuNGgtNkwyNDQuOCwzMTAuNkwyNDQuOCwzMTAuNnoiLz4KPC9nPgo8L3N2Zz4K">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<p>
|
<p>
|
||||||
This page generates a new <a href="http://getmonero.org/">Monero</a> wallet. It is self contained and
|
This page generates a new
|
||||||
|
<select onchange="js:setCoin(this.selectedIndex);" class="waves-effect waves-light btn" style="max-width: 20%">
|
||||||
|
<option>Monero</option>
|
||||||
|
<option>Aeon</option>
|
||||||
|
</select>
|
||||||
|
wallet. It is self contained and
|
||||||
does all the necessary calculations locally, so is suitable for generating a new wallet on a machine
|
does all the necessary calculations locally, so is suitable for generating a new wallet on a machine
|
||||||
that is not connected to the network, and may even never be. This way, you can create
|
that is not connected to the network, and may even never be. This way, you can create
|
||||||
a Monero wallet without risking the keys. This file is GPG signed, see <a href="#gpg-instructions">GPG instructions</a>.
|
a Monero/Aeon wallet without risking the keys. This file is GPG signed, see <a href="#gpg-instructions">GPG instructions</a>.
|
||||||
You can check for up to date versions of this page
|
You can check for up to date versions of this page
|
||||||
<a href="https://github.com/moneromooo-monero/monero-wallet-generator/blob/master/monero-wallet-generator.html">here</a>.
|
<a href="https://github.com/moneromooo-monero/monero-wallet-generator/blob/master/monero-wallet-generator.html">here</a>.
|
||||||
</p>
|
</p>
|
||||||
|
@ -10744,12 +10757,12 @@ bC0zLjUsMjAuNGgtNkwyNDQuOCwzMTAuNkwyNDQuOCwzMTAuNnoiLz4KPC9nPgo8L3N2Zz4K">
|
||||||
<div class="row center-align">
|
<div class="row center-align">
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<form>
|
<form>
|
||||||
<input class="waves-effect waves-light btn" type="button" onclick="js:genwallet('english');" value="English" action=""/>
|
<input class="waves-effect waves-light btn" type="button" onclick="js:genwallet('english');" value="English" action=""/ id=lang_en>
|
||||||
<input class="waves-effect waves-light btn" type="button" onclick="js:genwallet('spanish');" value="Spanish" action=""/>
|
<input class="waves-effect waves-light btn" type="button" onclick="js:genwallet('spanish');" value="Spanish" action=""/ id=lang_es>
|
||||||
<!-- portuguese word list has a few prefix collisions
|
<!-- portuguese word list has a few prefix collisions
|
||||||
<input type="button" onclick="js:genwallet('portuguese');" value="Portuguese" action=""/>
|
<input type="button" onclick="js:genwallet('portuguese');" value="Portuguese" action=""/ id=lang_pt>
|
||||||
-->
|
-->
|
||||||
<input class="waves-effect waves-light btn" type="button" onclick="js:genwallet('japanese');" value="Japanese" action=""/>
|
<input class="waves-effect waves-light btn" type="button" onclick="js:genwallet('japanese');" value="Japanese" action=""/ id=lang_jp>
|
||||||
<br>
|
<br>
|
||||||
<font size="-1">(restoring non English language seeds needs a recent simplewallet)</font>
|
<font size="-1">(restoring non English language seeds needs a recent simplewallet)</font>
|
||||||
</form>
|
</form>
|
||||||
|
@ -10762,10 +10775,10 @@ bC0zLjUsMjAuNGgtNkwyNDQuOCwzMTAuNkwyNDQuOCwzMTAuNnoiLz4KPC9nPgo8L3N2Zz4K">
|
||||||
<span class="card-title light-green-text text-darken-4">
|
<span class="card-title light-green-text text-darken-4">
|
||||||
Public address
|
Public address
|
||||||
<input type="button" class="waves-effect waves-light btn" onclick="js:toggle_qr();" value="Show QR code" action=""
|
<input type="button" class="waves-effect waves-light btn" onclick="js:toggle_qr();" value="Show QR code" action=""
|
||||||
style="line-height: 25px; height: 25px; font-size: 60%; padding: 0px 1.5rem;"/>
|
style="line-height: 25px; height: 25px; font-size: 60%; padding: 0px 1.5rem;"/ id="show_qr_code">
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<p>This is the address you give to third parties to send monero to you.
|
<p>This is the address you give to third parties to send aeon/monero to you.
|
||||||
<br><b>It is the only information here that's meant to be public.</b>
|
<br><b>It is the only information here that's meant to be public.</b>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10782,7 +10795,7 @@ bC0zLjUsMjAuNGgtNkwyNDQuOCwzMTAuNkwyNDQuOCwzMTAuNnoiLz4KPC9nPgo8L3N2Zz4K">
|
||||||
<div class="card-content pink-text text-darken-5">
|
<div class="card-content pink-text text-darken-5">
|
||||||
<span class="card-title pink-text text-darken-5">Mnemonic seed</span>
|
<span class="card-title pink-text text-darken-5">Mnemonic seed</span>
|
||||||
<p>
|
<p>
|
||||||
The mnemonic seed is a string that comprises 25 words and allows you to recreate your
|
The mnemonic seed is a string that comprises 24 (Aeon) or 25 (Monero) words and allows you to recreate your
|
||||||
private keys. <b>Keep it secure!</b>
|
private keys. <b>Keep it secure!</b>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10838,7 +10851,9 @@ bC0zLjUsMjAuNGgtNkwyNDQuOCwzMTAuNkwyNDQuOCwzMTAuNnoiLz4KPC9nPgo8L3N2Zz4K">
|
||||||
<br>
|
<br>
|
||||||
If you found this useful, a donation would be appreciated:
|
If you found this useful, a donation would be appreciated:
|
||||||
<br>
|
<br>
|
||||||
<pre>4AfUP827TeRZ1cck3tZThgZbRCEwBrpcJTkA1LCiyFVuMH4b5y59bKMZHGb9y58K3gSjWDCBsB4RkGsGDhsmMG5R2qmbLeW</pre>
|
<pre>Monero: 4AfUP827TeRZ1cck3tZThgZbRCEwBrpcJTkA1LCiyFVuMH4b5y59bKMZHGb9y58K3gSjWDCBsB4RkGsGDhsmMG5R2qmbLeW</pre>
|
||||||
|
<br>
|
||||||
|
<pre>Aeon: WmtXcFZj5iGY21JxAtFsJVQmQQyo7jgoJP8V4zLWVzDeeTfvbP8Mzb5gbNpQEc6BkeUYUqjGntHDSDyA6LKjdGBQ1w9iEpfVw</pre>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
Thanks, and welcome to Monero!
|
Thanks, and welcome to Monero!
|
||||||
|
@ -10958,12 +10973,18 @@ function genwallet(lang)
|
||||||
|
|
||||||
spend_key_widget.innerHTML = keys.spend.sec;
|
spend_key_widget.innerHTML = keys.spend.sec;
|
||||||
view_key_widget.innerHTML = keys.view.sec;
|
view_key_widget.innerHTML = keys.view.sec;
|
||||||
address_widget.innerHTML = keys.public_addr;
|
address_widget.innerHTML = cnUtil.pubkeys_to_string(keys.spend.pub, keys.view.pub);
|
||||||
address_qr_widget.innerHTML = "";
|
address_qr_widget.innerHTML = "";
|
||||||
mnemonic_widget.innerHTML = mnemonic;
|
mnemonic_widget.innerHTML = mnemonic;
|
||||||
|
|
||||||
qr=new QRCode(address_qr_widget, {correctLevel:QRCode.CorrectLevel.L});
|
// only monero has the URI scheme
|
||||||
qr.makeCode("monero:"+keys.public_addr);
|
if (prefix_widget.value == "4") {
|
||||||
|
qr=new QRCode(address_qr_widget, {correctLevel:QRCode.CorrectLevel.L});
|
||||||
|
qr.makeCode("monero:"+keys.public_addr);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
qr = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
previous_button_text = "";
|
previous_button_text = "";
|
||||||
|
@ -11008,13 +11029,13 @@ function genwallet_prefix_worker()
|
||||||
|
|
||||||
var zerohex="0000000000000000000000000000000000000000000000000000000000000000";
|
var zerohex="0000000000000000000000000000000000000000000000000000000000000000";
|
||||||
var ffhex="ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";
|
var ffhex="ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";
|
||||||
var lowest_address=cnUtil.pubkeys_to_string(zerohex,zerohex);
|
|
||||||
var highest_address=cnUtil.pubkeys_to_string(ffhex,ffhex);
|
|
||||||
|
|
||||||
function is_valid_prefix(prefix)
|
function is_valid_prefix(prefix)
|
||||||
{
|
{
|
||||||
if (prefix.length <= 0 || prefix.length >= 95)
|
if (prefix.length <= 0 || prefix.length >= 95)
|
||||||
return false;
|
return false;
|
||||||
|
var lowest_address=cnUtil.pubkeys_to_string(zerohex,zerohex);
|
||||||
|
var highest_address=cnUtil.pubkeys_to_string(ffhex,ffhex);
|
||||||
var lowest=lowest_address.substr(0,prefix.length);
|
var lowest=lowest_address.substr(0,prefix.length);
|
||||||
var highest=highest_address.substr(0,prefix.length);
|
var highest=highest_address.substr(0,prefix.length);
|
||||||
if (prefix<lowest)
|
if (prefix<lowest)
|
||||||
|
@ -11055,8 +11076,8 @@ function genwallet_prefix()
|
||||||
prefix_widget = document.getElementById("prefix_widget");
|
prefix_widget = document.getElementById("prefix_widget");
|
||||||
prefix = prefix_widget.value;
|
prefix = prefix_widget.value;
|
||||||
prefix.trim();
|
prefix.trim();
|
||||||
if (prefix.length < 2 || prefix[0] != "4") {
|
if (prefix.length < 2) {
|
||||||
alert("Bad prefix "+prefix+" should start with 4 and be at least one extra character");
|
alert("Bad prefix should be at least two characters");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!is_valid_prefix(prefix)) {
|
if (!is_valid_prefix(prefix)) {
|
||||||
|
@ -11092,6 +11113,47 @@ function toggle_qr()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function enableElement(id, enable)
|
||||||
|
{
|
||||||
|
var el = document.getElementById(id)
|
||||||
|
if (el) {
|
||||||
|
if (enable)
|
||||||
|
el.disabled = false;
|
||||||
|
else
|
||||||
|
el.disabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function enableLanguage(code, enable)
|
||||||
|
{
|
||||||
|
enableElement("lang_" + code, enable)
|
||||||
|
}
|
||||||
|
|
||||||
|
function setCoin(index)
|
||||||
|
{
|
||||||
|
var enable
|
||||||
|
var language
|
||||||
|
prefix_widget = document.getElementById("prefix_widget");
|
||||||
|
if (index == 0) {
|
||||||
|
cnUtil = cnUtilGen(moneroConfig);
|
||||||
|
prefix_widget.value = "4";
|
||||||
|
enable = true
|
||||||
|
language = "english"
|
||||||
|
}
|
||||||
|
else if (index == 1) {
|
||||||
|
cnUtil = cnUtilGen(aeonConfig);
|
||||||
|
prefix_widget.value = "W";
|
||||||
|
enable = false
|
||||||
|
language = "electrum"
|
||||||
|
}
|
||||||
|
enableLanguage("en", enable)
|
||||||
|
enableLanguage("es", enable)
|
||||||
|
enableLanguage("pt", enable)
|
||||||
|
enableLanguage("jp", enable)
|
||||||
|
enableElement("show_qr_code", enable)
|
||||||
|
genwallet(language);
|
||||||
|
}
|
||||||
|
|
||||||
genwallet();
|
genwallet();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
-----BEGIN PGP SIGNATURE-----
|
-----BEGIN PGP SIGNATURE-----
|
||||||
Version: GnuPG v1
|
Version: GnuPG v1
|
||||||
|
|
||||||
iQIcBAABAgAGBQJWja4CAAoJEGhvB0VNbO/DKMoQALkgL36Z7Nz69fSFH0Z0/xJP
|
iQIcBAABAgAGBQJYlaa5AAoJEGhvB0VNbO/DP90QAJSHlHFtU4Gau4bgF4ZHTID7
|
||||||
dew+12n+GNAQwrA7nD/28p5SZB5CQKDF1sMIKmXBSlf4hTQhU29Q5BUDn1bK4agy
|
Vc0kvu0p3B3v9n/+zO02YKjYGHp1F0f2lyA+ZAnUW8BXR5QTy0QqqmfQDK4ilCQT
|
||||||
l8F0pxKcUhaGv3B/Jqida0JVoBu/O6dhugL8CU46CSaAGpB39OH4dOpUkM0XqbsU
|
2x7Xjcs30Ol90p1A2hIzqr+iY5qTnvqMriYpD39GUIFyqGOUsJj6+zP3mpTzgMLW
|
||||||
BsQj6xRRZ1Eh+WlhsyqP+DUIw0v3gCigXLDbNFWnCeMGCoHVYs9uA7Hih+wXMvpN
|
U742K/whTFcqUdLWxzIsv41kflvdnpbphHsycANLwY/7owfVoZm0gZNwzTNB4IQ5
|
||||||
Hs/QmcMjbf5uIt8agca91Q/UkekVsPUE7kIilDLu6xfMP4zjvns3t+2pkrlMD6RH
|
dS+i2cp4GATZGqH5dxYBkKq7xlqN1/+GRx9bhvIa6fanI99ldm9ajmh7Ehd24Khl
|
||||||
+dZzuKOAG4wZDyrp+UfuFVJBnSYaJf6E0ViVUKt3cJ5dLs4xMta7fOrOmPhwBRRh
|
0lR/ngXk8HKWyRlNtVuUZ47i9lkUibygRVtL2HZ2ML+MUZrNRH3Hk5WJp/FyjQ8Y
|
||||||
HnwVCdrlsRspx9yafstM1/T2noO5AJQP7q0znL1vgE07Q41T2hqNCfk+I1FYAMfN
|
LFt/DVCBAf7o+Ohjrl/w5/SI4baY2B5YZhOKD5pWMlRfgZZp+aIWDDAwgYEUrZN6
|
||||||
0Fb2gbhCUuaE6cT5tZNJHViW8vFw5dUrX/jyCDaK3NAK9341oYyjPDe2v+ANSAXw
|
/gnfTrOLIWgsm+eZjMvVUopJrVDrinTkS5d03F8Yy9DH2P1qcF102dzHnK0bAwxR
|
||||||
1oil/CiC7QZkhdE5mcUdPplMPiN33XausNkbqo7wLeI9+6r/2RRgzgJWkvaPhYgs
|
6BAwnCqYYsIZpKVeq/JUTC6OtQt3LImQzhbATCTAGEoSNs7zwQ600r1QkyzAJwFv
|
||||||
24muChtBSDPpss/bM/v2YaJ4tCKHnTmFmgY1SuiPhDlU0iF2yvMUeulw19ByarrY
|
FmJM4gTX09lISbQZKDPu0DAO967TTK8JQqNtGZ2ibFVVBoQ8posxJjnf2drjB5nD
|
||||||
VLY9nl+hwQ8e0uOANUEaM+E4hguPeG7yLIq1wPvdD/stanvGw+62Myx3kpVbMDkm
|
hMHc0vD9nE2NoTp+t/scOZw/avSGfvuSPmcBlpkWJqqZZG7o8RGFKt89qZlcIRQ8
|
||||||
way0Vxvwz0fCkLbuQTbl
|
jt7ihU/WJxDiA5Qtwu2R
|
||||||
=z7EP
|
=xteP
|
||||||
-----END PGP SIGNATURE-----
|
-----END PGP SIGNATURE-----
|
||||||
|
|
Loading…
Reference in New Issue