aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriancoleman <1281387+iancoleman@users.noreply.github.com>2018-03-12 11:21:17 +1100
committerGitHub <noreply@github.com>2018-03-12 11:21:17 +1100
commitaaa82c097f2a3bee5800a232865cef56bbcd8a5f (patch)
tree5ef2087f2a7192ba9135f00cc8b0e3afbb5a9bb9
parent05311e7f5432d324cdcdd1d72d1287b8abe04d40 (diff)
parent40209fd898d628372cd35459aba1d8fc4b9d8758 (diff)
downloadBIP39-aaa82c097f2a3bee5800a232865cef56bbcd8a5f.tar.gz
BIP39-aaa82c097f2a3bee5800a232865cef56bbcd8a5f.tar.zst
BIP39-aaa82c097f2a3bee5800a232865cef56bbcd8a5f.zip
Merge pull request #172 from carsenk/master
Add Denarius (DNR) Support
-rw-r--r--bip39-standalone.html19
-rw-r--r--src/js/bitcoinjs-extensions.js11
-rw-r--r--src/js/index.js8
-rw-r--r--tests/spec/tests.js7
4 files changed, 45 insertions, 0 deletions
diff --git a/bip39-standalone.html b/bip39-standalone.html
index 123556f..bcb1a5d 100644
--- a/bip39-standalone.html
+++ b/bip39-standalone.html
@@ -50907,6 +50907,17 @@ bitcoinjs.bitcoin.networks.slimcointn = {
50907 wif: 0x57 50907 wif: 0x57
50908}; 50908};
50909 50909
50910bitcoinjs.bitcoin.networks.denarius = {
50911 messagePrefix: '\x19Denarius Signed Message:\n',
50912 bip32: {
50913 public: 0x0488b21e,
50914 private: 0x0488ade4
50915 },
50916 pubKeyHash: 0x1e,
50917 scriptHash: 0x5a,
50918 wif: 0x9e
50919};
50920
50910bitcoinjs.bitcoin.networks.dogecoin = { 50921bitcoinjs.bitcoin.networks.dogecoin = {
50911 messagePrefix: '\x19Dogecoin Signed Message:\n', 50922 messagePrefix: '\x19Dogecoin Signed Message:\n',
50912 bip32: { 50923 bip32: {
@@ -104134,6 +104145,14 @@ window.Entropy = new (function() {
104134 }, 104145 },
104135 }, 104146 },
104136 { 104147 {
104148 name: "DNR - Denarius",
104149 segwitAvailable: false,
104150 onSelect: function() {
104151 network = bitcoinjs.bitcoin.networks.denarius;
104152 setHdCoin(0);
104153 },
104154 },
104155 {
104137 name: "DOGE - Dogecoin", 104156 name: "DOGE - Dogecoin",
104138 segwitAvailable: false, 104157 segwitAvailable: false,
104139 onSelect: function() { 104158 onSelect: function() {
diff --git a/src/js/bitcoinjs-extensions.js b/src/js/bitcoinjs-extensions.js
index 3ab395d..be36e2d 100644
--- a/src/js/bitcoinjs-extensions.js
+++ b/src/js/bitcoinjs-extensions.js
@@ -152,6 +152,17 @@ bitcoinjs.bitcoin.networks.dogecoin = {
152 wif: 0x9e 152 wif: 0x9e
153}; 153};
154 154
155bitcoinjs.bitcoin.networks.denarius = {
156 messagePrefix: '\x19Denarius Signed Message:\n',
157 bip32: {
158 public: 0x0488b21e,
159 private: 0x0488ade4
160 },
161 pubKeyHash: 0x1e,
162 scriptHash: 0x5a,
163 wif: 0x9e
164};
165
155bitcoinjs.bitcoin.networks.viacoin = { 166bitcoinjs.bitcoin.networks.viacoin = {
156 messagePrefix: '\x18Viacoin Signed Message:\n', 167 messagePrefix: '\x18Viacoin Signed Message:\n',
157 bip32: { 168 bip32: {
diff --git a/src/js/index.js b/src/js/index.js
index 580573d..2f157e0 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -1551,6 +1551,14 @@
1551 }, 1551 },
1552 }, 1552 },
1553 { 1553 {
1554 name: "DNR - Denarius",
1555 segwitAvailable: false,
1556 onSelect: function() {
1557 network = bitcoinjs.bitcoin.networks.denarius;
1558 setHdCoin(0);
1559 },
1560 },
1561 {
1554 name: "DOGE - Dogecoin", 1562 name: "DOGE - Dogecoin",
1555 segwitAvailable: false, 1563 segwitAvailable: false,
1556 onSelect: function() { 1564 onSelect: function() {
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index 167a496..7e01070 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -423,6 +423,13 @@ it('Allows selection of dogecoin', function(done) {
423 }; 423 };
424 testNetwork(done, params); 424 testNetwork(done, params);
425}); 425});
426it('Allows selection of denarius', function(done) {
427 var params = {
428 selectText: "DNR - Denarius",
429 firstAddress: "D9feDKo88SHir79b2Kqhk7JAtaddmxDjNV",
430 };
431 testNetwork(done, params);
432});
426it('Allows selection of shadowcash', function(done) { 433it('Allows selection of shadowcash', function(done) {
427 var params = { 434 var params = {
428 selectText: "SDC - ShadowCash", 435 selectText: "SDC - ShadowCash",