diff options
author | iancoleman <coleman.ian@gmail.com> | 2016-08-30 15:49:49 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-30 15:49:49 +1000 |
commit | 694767c01e27c3705e802cf46363fb509e056670 (patch) | |
tree | 9bf0dd8ed57e243fdc3c47449646b5b23e2f80c8 | |
parent | 6848d03ba16685c51d8af454fe3086ebb3e19386 (diff) | |
parent | 40150a875fb86178a71d99689a6846bc6436d5a5 (diff) | |
download | BIP39-694767c01e27c3705e802cf46363fb509e056670.tar.gz BIP39-694767c01e27c3705e802cf46363fb509e056670.tar.zst BIP39-694767c01e27c3705e802cf46363fb509e056670.zip |
Merge pull request #29 from dangershony/master
Adding peercoin and namecoin
-rw-r--r-- | bip39-standalone.html | 34 | ||||
-rw-r--r-- | src/js/bitcoinjs-extensions.js | 20 | ||||
-rw-r--r-- | src/js/index.js | 14 |
3 files changed, 68 insertions, 0 deletions
diff --git a/bip39-standalone.html b/bip39-standalone.html index 9b3c4f1..dcd6ffc 100644 --- a/bip39-standalone.html +++ b/bip39-standalone.html | |||
@@ -13364,6 +13364,26 @@ bitcoin.networks.dash = { | |||
13364 | wif: 0xcc, | 13364 | wif: 0xcc, |
13365 | }; | 13365 | }; |
13366 | 13366 | ||
13367 | bitcoin.networks.namecoin = { | ||
13368 | bip32: { | ||
13369 | public: 0x0488b21e, | ||
13370 | private: 0x0488ade4 | ||
13371 | }, | ||
13372 | pubKeyHash: 0x34, | ||
13373 | //scriptHash: 0x10, | ||
13374 | wif: 0x80, | ||
13375 | }; | ||
13376 | |||
13377 | bitcoin.networks.peercoin = { | ||
13378 | bip32: { | ||
13379 | public: 0x0488b21e, | ||
13380 | private: 0x0488ade4 | ||
13381 | }, | ||
13382 | pubKeyHash: 0x37, | ||
13383 | //scriptHash: 0x10, | ||
13384 | wif: 0xb7, | ||
13385 | }; | ||
13386 | |||
13367 | </script> | 13387 | </script> |
13368 | <script>// Select components from sjcl to suit the crypto operations bip39 requires. | 13388 | <script>// Select components from sjcl to suit the crypto operations bip39 requires. |
13369 | 13389 | ||
@@ -15432,6 +15452,20 @@ var Mnemonic = function(language) { | |||
15432 | DOM.bip44coin.val(5); | 15452 | DOM.bip44coin.val(5); |
15433 | }, | 15453 | }, |
15434 | }, | 15454 | }, |
15455 | { | ||
15456 | name: "Namecoin", | ||
15457 | onSelect: function() { | ||
15458 | network = bitcoin.networks.namecoin; | ||
15459 | DOM.bip44coin.val(7); | ||
15460 | }, | ||
15461 | }, | ||
15462 | { | ||
15463 | name: "Peercoin", | ||
15464 | onSelect: function() { | ||
15465 | network = bitcoin.networks.peercoin; | ||
15466 | DOM.bip44coin.val(6); | ||
15467 | }, | ||
15468 | }, | ||
15435 | ] | 15469 | ] |
15436 | 15470 | ||
15437 | init(); | 15471 | init(); |
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index 9f11de8..b02d79f 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js | |||
@@ -45,3 +45,23 @@ bitcoin.networks.dash = { | |||
45 | wif: 0xcc, | 45 | wif: 0xcc, |
46 | }; | 46 | }; |
47 | 47 | ||
48 | bitcoin.networks.namecoin = { | ||
49 | bip32: { | ||
50 | public: 0x0488b21e, | ||
51 | private: 0x0488ade4 | ||
52 | }, | ||
53 | pubKeyHash: 0x34, | ||
54 | //scriptHash: 0x10, | ||
55 | wif: 0x80, | ||
56 | }; | ||
57 | |||
58 | bitcoin.networks.peercoin = { | ||
59 | bip32: { | ||
60 | public: 0x0488b21e, | ||
61 | private: 0x0488ade4 | ||
62 | }, | ||
63 | pubKeyHash: 0x37, | ||
64 | //scriptHash: 0x10, | ||
65 | wif: 0xb7, | ||
66 | }; | ||
67 | |||
diff --git a/src/js/index.js b/src/js/index.js index 5cd09b6..69f5eab 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -587,6 +587,20 @@ | |||
587 | DOM.bip44coin.val(5); | 587 | DOM.bip44coin.val(5); |
588 | }, | 588 | }, |
589 | }, | 589 | }, |
590 | { | ||
591 | name: "Namecoin", | ||
592 | onSelect: function() { | ||
593 | network = bitcoin.networks.namecoin; | ||
594 | DOM.bip44coin.val(7); | ||
595 | }, | ||
596 | }, | ||
597 | { | ||
598 | name: "Peercoin", | ||
599 | onSelect: function() { | ||
600 | network = bitcoin.networks.peercoin; | ||
601 | DOM.bip44coin.val(6); | ||
602 | }, | ||
603 | }, | ||
590 | ] | 604 | ] |
591 | 605 | ||
592 | init(); | 606 | init(); |