FIO - Foundation for Interwallet Operability.
https://fioprotocol.io
module.exports.zxcvbn = require('zxcvbn')
+/* handshake */
module.exports.handshake = require('handshake-util')
+
+/* bs58 */
+try {
+ module.exports.bs58 = require('bs58')
+}
+catch (e) {
+ console.warn("Error loading bs58 library");
+ console.warn(e);
+};
+
+/* create-hash */
+try {
+ module.exports.createHash = require('create-hash')
+}
+catch (e) {
+ console.warn("Error loading create-hash library");
+ console.warn(e);
+};
+
"bip38": "2.0.2",
"bip38grs": "git://github.com/Groestlcoin/bip38grs.git#091975b01679b74dc0a4136bb743fe17791b0151",
"bitcoinjs-lib": "git://github.com/iancoleman/bitcoinjs-lib.git#v3.3.2_16bit",
+ "bs58": "^4.0.1",
"buffer": "5.4.3",
+ "create-hash": "^1.2.0",
"ed25519-hd-key": "^1.0.0",
"elastos-wallet-js": "git://github.com/johnnynanjiang/Elastos.SDK.Keypair.Javascript.git#491dc51b64efaf0a8aae62028b68e2c8e38fde06",
"ethereumjs-util": "6.0.0",
"fast-levenshtein": "2.0.6",
"groestlcoinjs-lib": "git://github.com/Groestlcoin/groestlcoinjs-lib.git#3.3.2",
"javascript-biginteger": "0.9.2",
+ "jsrsasign": "^8.0.15",
"kjua": "0.6.0",
"nebulas": "0.5.6",
"stellar-base": "^0.10.0",
<script src="js/jingtum-util.js"></script>
<script src="js/casinocoin-util.js"></script>
<script src="js/eos-util.js"></script>
+ <script src="js/fio-util.js"></script>
<script src="js/sjcl-bip39.js"></script>
<script src="js/wordlist_english.js"></script>
<script src="js/wordlist_japanese.js"></script>
--- /dev/null
+function FIObufferToPublic(pubBuf) {
+ const Buffer = libs.buffer.Buffer;
+ const FIO_PUBLIC_PREFIX = "FIO";
+
+ let checksum = libs.createHash("rmd160").update(pubBuf).digest("hex").slice(0, 8);
+ pubBuf = Buffer.concat([pubBuf, Buffer.from(checksum, "hex")]);
+ return FIO_PUBLIC_PREFIX.concat(libs.bs58.encode(pubBuf));
+}
+
+function FIObufferToPrivate(privBuf) {
+ const Buffer = libs.buffer.Buffer;
+ const FIO_PRIVATE_PREFIX = "80";
+
+ privBuf = Buffer.concat([Buffer.from(FIO_PRIVATE_PREFIX, "hex"), privBuf]);
+ let tmp = libs.createHash("sha256").update(privBuf).digest();
+ let checksum = libs.createHash("sha256").update(tmp).digest("hex").slice(0, 8);
+ privBuf = Buffer.concat([privBuf, Buffer.from(checksum, "hex")]);
+ return libs.bs58.encode(privBuf);
+}
\ No newline at end of file
privkey = eosUtil.bufferToPrivate(keyPair.d.toBuffer(32));
}
+ if (networks[DOM.network.val()].name == "FIO - Foundation for Interwallet Operability") {
+ address = ""
+ pubkey = FIObufferToPublic(keyPair.getPublicKeyBuffer());
+ privkey = FIObufferToPrivate(keyPair.d.toBuffer(32));
+ }
+
//Groestlcoin Addresses are different
if(isGRS()) {
setHdCoin(40);
},
},
+ {
+ name: "FIO - Foundation for Interwallet Operability",
+ onSelect: function() {
+ network = libs.bitcoin.networks.bitcoin;
+ setHdCoin(235);
+ },
+ },
{
name: "FIX - FIX",
onSelect: function() {
};
testNetwork(done, params);
});
+it('Allows selection of FIO', function(done) {
+ var params = {
+ selectText: "FIO - Foundation for Interwallet Operability",
+ phrase: "valley alien library bread worry brother bundle hammer loyal barely dune brave",
+ firstPubKey: "FIO5kJKNHwctcfUM5XZyiWSqSTM5HTzznJP9F3ZdbhaQAHEVq575o",
+ firstPrivKey: "5Kbb37EAqQgZ9vWUHoPiC2uXYhyGSFNbL6oiDp24Ea1ADxV1qnu",
+ };
+ testNetwork(done, params);
+});
it('Allows selection of Firstcoin', function(done) {
var params = {
selectText: "FRST - Firstcoin",