diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/index.html | 2 | ||||
-rw-r--r-- | src/js/bitcoinjs-extensions.js | 33 | ||||
-rw-r--r-- | src/js/index.js | 21 | ||||
-rw-r--r-- | src/js/segwit-parameters.js | 52 |
4 files changed, 107 insertions, 1 deletions
diff --git a/src/index.html b/src/index.html index 1184a0c..ae39c11 100644 --- a/src/index.html +++ b/src/index.html | |||
@@ -24,7 +24,7 @@ | |||
24 | <div class="form-group"> | 24 | <div class="form-group"> |
25 | <div class="col-sm-2"></div> | 25 | <div class="col-sm-2"></div> |
26 | <div class="col-sm-10"> | 26 | <div class="col-sm-10"> |
27 | <p>You can enter an existing BIP39 mnemonic, or generate a new random one. Typing your own twelve words will probably not work how you expect, since the words require a particular structure (the last word is a checksum).</p> | 27 | <p>You can enter an existing BIP39 mnemonic, or generate a new random one. Typing your own twelve words will probably not work how you expect, since the words require a particular structure (the last word contains a checksum).</p> |
28 | <p> | 28 | <p> |
29 | For more info see the | 29 | For more info see the |
30 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki" target="_blank">BIP39 spec</a>. | 30 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki" target="_blank">BIP39 spec</a>. |
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js index 17475b1..2792e13 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js | |||
@@ -1739,6 +1739,28 @@ libs.bitcoin.networks.elastos = { | |||
1739 | wif: 0xef // TODO set this correctly, same as BTC for now | 1739 | wif: 0xef // TODO set this correctly, same as BTC for now |
1740 | }; | 1740 | }; |
1741 | 1741 | ||
1742 | libs.bitcoin.networks.sugarchain = { | ||
1743 | messagePrefix: '\x18Sugarchain Signed Message:\n', | ||
1744 | bip32: { | ||
1745 | public: 0x0488B21E, | ||
1746 | private: 0x0488ADE4, | ||
1747 | }, | ||
1748 | pubKeyHash: 0x3f, | ||
1749 | scriptHash: 0x7d, | ||
1750 | wif: 0x80 | ||
1751 | }; | ||
1752 | |||
1753 | libs.bitcoin.networks.sugarchaintestnet = { | ||
1754 | messagePrefix: '\x18Sugarchain Signed Message:\n', | ||
1755 | bip32: { | ||
1756 | public: 0x045f1cf6, | ||
1757 | private: 0x045f18bc, | ||
1758 | }, | ||
1759 | pubKeyHash: 0x42, | ||
1760 | scriptHash: 0x80, | ||
1761 | wif: 0xef | ||
1762 | }; | ||
1763 | |||
1742 | // https://github.com/libs.bitcoinjs-lib/blob/3f6f5ef97a1ee1b8337865209282c0095e22b2e7/src/networks.js | 1764 | // https://github.com/libs.bitcoinjs-lib/blob/3f6f5ef97a1ee1b8337865209282c0095e22b2e7/src/networks.js |
1743 | libs.bitcoin.networks.regtest = { | 1765 | libs.bitcoin.networks.regtest = { |
1744 | messagePrefix: '\x18Bitcoin Signed Message:\n', | 1766 | messagePrefix: '\x18Bitcoin Signed Message:\n', |
@@ -1751,3 +1773,14 @@ libs.bitcoin.networks.regtest = { | |||
1751 | scriptHash: 0xc4, | 1773 | scriptHash: 0xc4, |
1752 | wif: 0xef, | 1774 | wif: 0xef, |
1753 | }; | 1775 | }; |
1776 | |||
1777 | libs.bitcoin.networks.argoneum = { | ||
1778 | messagePrefix: 'unused', | ||
1779 | bip32: { | ||
1780 | public: 0x0488b21e, | ||
1781 | private: 0x0488ade4 | ||
1782 | }, | ||
1783 | pubKeyHash: 0x32, | ||
1784 | scriptHash: 0x61, | ||
1785 | wif: 0xbf | ||
1786 | }; | ||
diff --git a/src/js/index.js b/src/js/index.js index eb914a8..32825b2 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -2036,6 +2036,13 @@ | |||
2036 | }, | 2036 | }, |
2037 | }, | 2037 | }, |
2038 | { | 2038 | { |
2039 | name: "AGM - Argoneum", | ||
2040 | onSelect: function() { | ||
2041 | network = libs.bitcoin.networks.argoneum; | ||
2042 | setHdCoin(421); | ||
2043 | }, | ||
2044 | }, | ||
2045 | { | ||
2039 | name: "ARYA - Aryacoin", | 2046 | name: "ARYA - Aryacoin", |
2040 | onSelect: function() { | 2047 | onSelect: function() { |
2041 | network = libs.bitcoin.networks.aryacoin; | 2048 | network = libs.bitcoin.networks.aryacoin; |
@@ -3103,6 +3110,20 @@ | |||
3103 | }, | 3110 | }, |
3104 | }, | 3111 | }, |
3105 | { | 3112 | { |
3113 | name: "SUGAR - Sugarchain", | ||
3114 | onSelect: function() { | ||
3115 | network = libs.bitcoin.networks.sugarchain; | ||
3116 | setHdCoin(408); | ||
3117 | }, | ||
3118 | }, | ||
3119 | { | ||
3120 | name: "TUGAR - Sugarchain Testnet", | ||
3121 | onSelect: function() { | ||
3122 | network = libs.bitcoin.networks.sugarchaintestnet; | ||
3123 | setHdCoin(408); | ||
3124 | }, | ||
3125 | }, | ||
3126 | { | ||
3106 | name: "SWTC - Jingtum", | 3127 | name: "SWTC - Jingtum", |
3107 | onSelect: function() { | 3128 | onSelect: function() { |
3108 | network = libs.bitcoin.networks.bitcoin; | 3129 | network = libs.bitcoin.networks.bitcoin; |
diff --git a/src/js/segwit-parameters.js b/src/js/segwit-parameters.js index d5ea419..ea6f86e 100644 --- a/src/js/segwit-parameters.js +++ b/src/js/segwit-parameters.js | |||
@@ -683,4 +683,56 @@ libs.bitcoin.networks.deeponion.p2wpkhInP2sh = { | |||
683 | wif: 0x9f | 683 | wif: 0x9f |
684 | }; | 684 | }; |
685 | 685 | ||
686 | libs.bitcoin.networks.sugarchain.p2wpkh = { | ||
687 | baseNetwork: "sugarchain", | ||
688 | messagePrefix: '\x1DSugarchain Signed Message:\n', | ||
689 | bech32: 'sugar', | ||
690 | bip32: { | ||
691 | public: 0x04b24746, | ||
692 | private: 0x04b2430c | ||
693 | }, | ||
694 | pubKeyHash: 0x3f, | ||
695 | scriptHash: 0x7d, | ||
696 | wif: 0x80 | ||
697 | }; | ||
698 | |||
699 | libs.bitcoin.networks.sugarchain.p2wpkhInP2sh = { | ||
700 | baseNetwork: "sugarchain", | ||
701 | messagePrefix: '\x1DSugarchain Signed Message:\n', | ||
702 | bech32: 'sugar', | ||
703 | bip32: { | ||
704 | public: 0x049d7cb2, | ||
705 | private: 0x049d7878 | ||
706 | }, | ||
707 | pubKeyHash: 0x3f, | ||
708 | scriptHash: 0x7d, | ||
709 | wif: 0x80 | ||
710 | }; | ||
711 | |||
712 | libs.bitcoin.networks.sugarchaintestnet.p2wpkh = { | ||
713 | baseNetwork: "sugarchaintestnet", | ||
714 | messagePrefix: '\x18Sugarchain Signed Message:\n', | ||
715 | bech32: 'tugar', | ||
716 | bip32: { | ||
717 | public: 0x045f1cf6, | ||
718 | private: 0x045f18bc | ||
719 | }, | ||
720 | pubKeyHash: 0x42, | ||
721 | scriptHash: 0x80, | ||
722 | wif: 0xef | ||
723 | }; | ||
724 | |||
725 | libs.bitcoin.networks.sugarchaintestnet.p2wpkhInP2sh = { | ||
726 | baseNetwork: "sugarchaintestnet", | ||
727 | messagePrefix: '\x18Sugarchain Signed Message:\n', | ||
728 | bech32: 'tugar', | ||
729 | bip32: { | ||
730 | public: 0x044a5262, | ||
731 | private: 0x044a4e28 | ||
732 | }, | ||
733 | pubKeyHash: 0x42, | ||
734 | scriptHash: 0x80, | ||
735 | wif: 0xef | ||
736 | }; | ||
737 | |||
686 | })(); | 738 | })(); |