diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/index.html | 2 | ||||
-rw-r--r-- | src/js/bitcoinjs-extensions.js | 11 | ||||
-rw-r--r-- | src/js/index.js | 7 | ||||
-rw-r--r-- | src/js/segwit-parameters.js | 26 |
4 files changed, 45 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 1ef2aa4..e331c24 100644 --- a/src/js/bitcoinjs-extensions.js +++ b/src/js/bitcoinjs-extensions.js | |||
@@ -1739,6 +1739,17 @@ 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 | |||
1742 | // https://github.com/libs.bitcoinjs-lib/blob/3f6f5ef97a1ee1b8337865209282c0095e22b2e7/src/networks.js | 1753 | // https://github.com/libs.bitcoinjs-lib/blob/3f6f5ef97a1ee1b8337865209282c0095e22b2e7/src/networks.js |
1743 | libs.bitcoin.networks.regtest = { | 1754 | libs.bitcoin.networks.regtest = { |
1744 | messagePrefix: '\x18Bitcoin Signed Message:\n', | 1755 | messagePrefix: '\x18Bitcoin Signed Message:\n', |
diff --git a/src/js/index.js b/src/js/index.js index f711818..0471e86 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -3099,6 +3099,13 @@ | |||
3099 | }, | 3099 | }, |
3100 | }, | 3100 | }, |
3101 | { | 3101 | { |
3102 | name: "SUGAR - Sugarchain", | ||
3103 | onSelect: function() { | ||
3104 | network = libs.bitcoin.networks.sugarchain; | ||
3105 | setHdCoin(408); | ||
3106 | }, | ||
3107 | }, | ||
3108 | { | ||
3102 | name: "SWTC - Jingtum", | 3109 | name: "SWTC - Jingtum", |
3103 | onSelect: function() { | 3110 | onSelect: function() { |
3104 | network = libs.bitcoin.networks.bitcoin; | 3111 | network = libs.bitcoin.networks.bitcoin; |
diff --git a/src/js/segwit-parameters.js b/src/js/segwit-parameters.js index d5ea419..0c41bf7 100644 --- a/src/js/segwit-parameters.js +++ b/src/js/segwit-parameters.js | |||
@@ -683,4 +683,30 @@ 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 | |||
686 | })(); | 712 | })(); |