diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/js/bitcoinjs-extensions.js | 37 | ||||
-rw-r--r-- | src/js/index.js | 27 |
2 files changed, 60 insertions, 4 deletions
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index 16e9385..f7e708b 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js | |||
@@ -47,14 +47,14 @@ bitcoinjs.bitcoin.networks.crown = { | |||
47 | 47 | ||
48 | var addrBytes = b58.decode(oldAddress); | 48 | var addrBytes = b58.decode(oldAddress); |
49 | 49 | ||
50 | var hash160 = new Uint16Array(23); | 50 | var hash160 = new Uint16Array(23); |
51 | hash160[0]= 0x01; //C | 51 | hash160[0]= 0x01; //C |
52 | hash160[1]= 0x75; //R | 52 | hash160[1]= 0x75; //R |
53 | hash160[2]= 0x07; //W | 53 | hash160[2]= 0x07; //W |
54 | addrBytes.copy(hash160, 3, 1, 21); | 54 | addrBytes.copy(hash160, 3, 1, 21); |
55 | 55 | ||
56 | var checksum = bitcoinjs.bitcoin.crypto.hash256(hash160).subarray(0, 4); | 56 | var checksum = bitcoinjs.bitcoin.crypto.hash256(hash160).subarray(0, 4); |
57 | var binaryAddr = new Uint16Array(27); | 57 | var binaryAddr = new Uint16Array(27); |
58 | binaryAddr.set(hash160,0); | 58 | binaryAddr.set(hash160,0); |
59 | checksum.copy(binaryAddr, 23, 0, 4); | 59 | checksum.copy(binaryAddr, 23, 0, 4); |
60 | var newAddress = b58.encode(binaryAddr); | 60 | var newAddress = b58.encode(binaryAddr); |
@@ -172,6 +172,17 @@ bitcoinjs.bitcoin.networks.dogecoin = { | |||
172 | wif: 0x9e | 172 | wif: 0x9e |
173 | }; | 173 | }; |
174 | 174 | ||
175 | bitcoinjs.bitcoin.networks.dogecointestnet = { | ||
176 | messagePrefix: '\x19Dogecoin Signed Message:\n', | ||
177 | bip32: { | ||
178 | public: 0x043587cf, | ||
179 | private: 0x04358394 | ||
180 | }, | ||
181 | pubKeyHash: 0x71, | ||
182 | scriptHash: 0xc4, | ||
183 | wif: 0xf1 | ||
184 | }; | ||
185 | |||
175 | bitcoinjs.bitcoin.networks.denarius = { | 186 | bitcoinjs.bitcoin.networks.denarius = { |
176 | messagePrefix: '\x19Denarius Signed Message:\n', | 187 | messagePrefix: '\x19Denarius Signed Message:\n', |
177 | bip32: { | 188 | bip32: { |
@@ -878,6 +889,17 @@ bitcoinjs.bitcoin.networks.linx = { | |||
878 | wif: 0xcb, | 889 | wif: 0xcb, |
879 | }; | 890 | }; |
880 | 891 | ||
892 | |||
893 | bitcoinjs.bitcoin.networks.litecointestnet = { | ||
894 | messagePrefix: '\x18Litecoin Signed Message:\n', | ||
895 | bip32: { | ||
896 | public: 0x043587cf, | ||
897 | private: 0x04358394, | ||
898 | }, | ||
899 | pubKeyHash: 0x6f, | ||
900 | scriptHash: 0xc4, | ||
901 | wif: 0xef, | ||
902 | }; | ||
881 | bitcoinjs.bitcoin.networks.litecoincash = { | 903 | bitcoinjs.bitcoin.networks.litecoincash = { |
882 | messagePrefix: '\x18Litecoin Signed Message:\n', | 904 | messagePrefix: '\x18Litecoin Signed Message:\n', |
883 | bip32: { | 905 | bip32: { |
@@ -1549,3 +1571,14 @@ bitcoinjs.bitcoin.networks.deeponion = { | |||
1549 | scriptHash: 0x4E, | 1571 | scriptHash: 0x4E, |
1550 | wif: 0x9F, | 1572 | wif: 0x9F, |
1551 | }; | 1573 | }; |
1574 | |||
1575 | bitcoinjs.bitcoin.networks.monkey = { | ||
1576 | messagePrefix: 'x18DarkNet Signed Message:\n', | ||
1577 | bip32: { | ||
1578 | public: 0x0488B21E, | ||
1579 | private: 0x0488ADE4, | ||
1580 | }, | ||
1581 | pubKeyHash: 0x7F, | ||
1582 | scriptHash: 0xC4, | ||
1583 | wif: 0x3F, | ||
1584 | }; | ||
diff --git a/src/js/index.js b/src/js/index.js index 3b3ebed..f54ff71 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -980,11 +980,12 @@ | |||
980 | address = bitcoinjs.bitcoin.address.fromOutputScript(scriptpubkey, network) | 980 | address = bitcoinjs.bitcoin.address.fromOutputScript(scriptpubkey, network) |
981 | } | 981 | } |
982 | } | 982 | } |
983 | 983 | ||
984 | if ((networks[DOM.network.val()].name == "CRW - Crown")) { | 984 | if ((networks[DOM.network.val()].name == "CRW - Crown")) { |
985 | address = bitcoinjs.bitcoin.networks.crown.toNewAddress(address); | 985 | address = bitcoinjs.bitcoin.networks.crown.toNewAddress(address); |
986 | } | 986 | } |
987 | if (networks[DOM.network.val()].name == "EOS - EOSIO") { | 987 | |
988 | if (networks[DOM.network.val()].name == "EOS - EOSIO") { | ||
988 | address = "" | 989 | address = "" |
989 | pubkey = eosUtil.bufferToPublic(keyPair.getPublicKeyBuffer()); | 990 | pubkey = eosUtil.bufferToPublic(keyPair.getPublicKeyBuffer()); |
990 | privkey = eosUtil.bufferToPrivate(keyPair.d.toBuffer(32)); | 991 | privkey = eosUtil.bufferToPrivate(keyPair.d.toBuffer(32)); |
@@ -1965,6 +1966,13 @@ | |||
1965 | }, | 1966 | }, |
1966 | }, | 1967 | }, |
1967 | { | 1968 | { |
1969 | name: "DOGEt - Dogecoin Testnet", | ||
1970 | onSelect: function() { | ||
1971 | network = bitcoinjs.bitcoin.networks.dogecointestnet; | ||
1972 | setHdCoin(1); | ||
1973 | }, | ||
1974 | }, | ||
1975 | { | ||
1968 | name: "DXN - DEXON", | 1976 | name: "DXN - DEXON", |
1969 | onSelect: function() { | 1977 | onSelect: function() { |
1970 | network = bitcoinjs.bitcoin.networks.bitcoin; | 1978 | network = bitcoinjs.bitcoin.networks.bitcoin; |
@@ -2225,6 +2233,14 @@ | |||
2225 | }, | 2233 | }, |
2226 | }, | 2234 | }, |
2227 | { | 2235 | { |
2236 | name: "LTCt - Litecoin Testnet", | ||
2237 | onSelect: function() { | ||
2238 | network = bitcoinjs.bitcoin.networks.litecointestnet; | ||
2239 | setHdCoin(1); | ||
2240 | DOM.litecoinLtubContainer.removeClass("hidden"); | ||
2241 | }, | ||
2242 | }, | ||
2243 | { | ||
2228 | name: "LTZ - LitecoinZ", | 2244 | name: "LTZ - LitecoinZ", |
2229 | onSelect: function() { | 2245 | onSelect: function() { |
2230 | network = bitcoinjs.bitcoin.networks.litecoinz; | 2246 | network = bitcoinjs.bitcoin.networks.litecoinz; |
@@ -2768,6 +2784,13 @@ | |||
2768 | setHdCoin(121); | 2784 | setHdCoin(121); |
2769 | }, | 2785 | }, |
2770 | }, | 2786 | }, |
2787 | { | ||
2788 | name: "MONK - Monkey Project", | ||
2789 | ` onSelect: function() { | ||
2790 | network = bitcoinjs.bitcoin.networks.monkey; | ||
2791 | setHdCoin(214); | ||
2792 | }, | ||
2793 | } | ||
2771 | ] | 2794 | ] |
2772 | 2795 | ||
2773 | var clients = [ | 2796 | var clients = [ |