adding xlm stellar

This commit is contained in:
Suat Özgür
2018-12-17 00:43:16 +01:00
parent 2ef27fb80b
commit 8ffa333bc9
6 changed files with 42939 additions and 0 deletions

View File

@@ -888,6 +888,7 @@
<script src="js/biginteger.js"></script>
<script src="js/zxcvbn.js"></script>
<script src="js/entropy.js"></script>
<script src="js/stellar-util.js"></script>
<script src="js/index.js"></script>
</body>
</html>

View File

@@ -808,6 +808,14 @@
privkey = ethUtil.addHexPrefix(privkey);
pubkey = ethUtil.addHexPrefix(pubkey);
}
// Stellar is different
if (networks[DOM.network.val()].name == "XLM - Stellar") {
const path = "m/44'/148'/" + index + "'";
const keypair = stellarUtil.derivePath(path, seed);
indexText = path;
privkey = keypair.secret();
pubkey = address = keypair.publicKey();
}
// Ripple values are different
if (networks[DOM.network.val()].name == "XRP - Ripple") {
privkey = convertRipplePriv(privkey);
@@ -1694,6 +1702,14 @@
setHdCoin(1);
},
},
{
name: "XLM - Stellar",
onSelect: function() {
segwitAvailable: false,
network = null;
setHdCoin(148);
},
},
{
name: "XMY - Myriadcoin",
segwitAvailable: false,

41520
src/js/stellar-util.js Normal file

File diff suppressed because one or more lines are too long