From ddc19bd6e760f141126c73d81bde066eed0210a0 Mon Sep 17 00:00:00 2001
From: WG91 <43027401+WG91@users.noreply.github.com>
Date: Sun, 9 Jun 2019 10:01:23 +0200
Subject: [PATCH] Add PENG
- Official project URL: https://pengcoin.io && https://github.com/coinpeng/pengcore
- Official block explorers: https://coinexplorer.net/PENG && http://149.28.12.158:88
Link to random transaction (1): https://www.coinexplorer.net/PENG/transaction/3ae121103db60e686ad701e3a5498664c699c688d70eb36438dbf2b3dabb1b4c
Link to random transaction (2): http://149.28.12.158:88/tx/c252dcc8fbb944f98746d61d6d06a7f96743433b5d0e1e2bb5ec61934041d217
Add ViBook (VBK)
- Official project URL: http://vibook.info/
- Official block explorers: http://45.76.196.158:3001/
Link to random transaction (1): http://45.76.196.158:3001/tx/e3bea4f874cd88912f0effd906dd865b676671f6a32c8db73b336c717ffbddcc
Link to random transaction (2): http://45.76.196.158:3001/tx/abd399a72ecd0573166d3b4b4db0d781449200df5d573a6477b8be85c85896fe
---
.../src/main/java/bisq/asset/coins/PENG.java | 28 ++++++++++++
.../main/java/bisq/asset/coins/ViBook.java | 28 ++++++++++++
.../META-INF/services/bisq.asset.Asset | 2 +
.../test/java/bisq/asset/coins/PENGTest.java | 45 +++++++++++++++++++
.../java/bisq/asset/coins/ViBookTest.java | 45 +++++++++++++++++++
5 files changed, 148 insertions(+)
create mode 100644 assets/src/main/java/bisq/asset/coins/PENG.java
create mode 100644 assets/src/main/java/bisq/asset/coins/ViBook.java
create mode 100644 assets/src/test/java/bisq/asset/coins/PENGTest.java
create mode 100644 assets/src/test/java/bisq/asset/coins/ViBookTest.java
diff --git a/assets/src/main/java/bisq/asset/coins/PENG.java b/assets/src/main/java/bisq/asset/coins/PENG.java
new file mode 100644
index 00000000000..df6025e40ec
--- /dev/null
+++ b/assets/src/main/java/bisq/asset/coins/PENG.java
@@ -0,0 +1,28 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+package bisq.asset.coins;
+
+import bisq.asset.Coin;
+import bisq.asset.RegexAddressValidator;
+
+public class PENG extends Coin {
+
+ public PENG() {
+ super("PENG Coin", "PENG", new RegexAddressValidator("^[P][a-km-zA-HJ-NP-Z1-9]{33}$"));
+ }
+}
diff --git a/assets/src/main/java/bisq/asset/coins/ViBook.java b/assets/src/main/java/bisq/asset/coins/ViBook.java
new file mode 100644
index 00000000000..3eeed7a0ebe
--- /dev/null
+++ b/assets/src/main/java/bisq/asset/coins/ViBook.java
@@ -0,0 +1,28 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+package bisq.asset.coins;
+
+import bisq.asset.Coin;
+import bisq.asset.RegexAddressValidator;
+
+public class ViBook extends Coin {
+
+ public ViBook() {
+ super("ViBook", "VBK", new RegexAddressValidator("^[V][a-km-zA-HJ-NP-Z1-9]{33}$"));
+ }
+}
diff --git a/assets/src/main/resources/META-INF/services/bisq.asset.Asset b/assets/src/main/resources/META-INF/services/bisq.asset.Asset
index 2a6cf1a7d54..3b39cfb3961 100644
--- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset
+++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset
@@ -67,6 +67,7 @@ bisq.asset.coins.Navcoin
bisq.asset.coins.Neos
bisq.asset.coins.Noir
bisq.asset.coins.ParsiCoin
+bisq.asset.coins.PENG
bisq.asset.coins.Persona
bisq.asset.coins.Pinkcoin
bisq.asset.coins.PIVX
@@ -89,6 +90,7 @@ bisq.asset.coins.TurtleCoin
bisq.asset.coins.UnitedCommunityCoin
bisq.asset.coins.Unobtanium
bisq.asset.coins.Veil
+bisq.asset.coins.ViBook
bisq.asset.coins.Webchain
bisq.asset.coins.WrkzCoin
bisq.asset.coins.XDR
diff --git a/assets/src/test/java/bisq/asset/coins/PENGTest.java b/assets/src/test/java/bisq/asset/coins/PENGTest.java
new file mode 100644
index 00000000000..4482ae666dc
--- /dev/null
+++ b/assets/src/test/java/bisq/asset/coins/PENGTest.java
@@ -0,0 +1,45 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+package bisq.asset.coins;
+
+import bisq.asset.AbstractAssetTest;
+
+import org.junit.Test;
+
+public class PENGTest extends AbstractAssetTest {
+
+ public PENGTest() {
+ super(new PENG());
+ }
+
+ @Test
+ public void testValidAddresses() {
+ assertValidAddress("P9KqnVS9UpcJmLtCF1j4SV3fcccMuGEbhs");
+ assertValidAddress("PUTXyY73s3HDvEzNJQekXMnjNjTrzFBzE2");
+ assertValidAddress("PEfabj5DzRj6WBpc3jtVDorsVM5nddDxie");
+ assertValidAddress("PAvXbSUAdCyd9MEtDPYYSmezmeLGL1HcjG");
+ }
+
+ @Test
+ public void testInvalidAddresses() {
+ assertInvalidAddress("Pp9KqnVS9UpcJmLtCF1j4SV3fcccMuGEbhs");
+ assertInvalidAddress("PqUTXyY73s3HDvEzNJQekXMnjNjTrzFBzE2");
+ assertInvalidAddress("P8Efabj5DzRj6WBpc3jtVDorsVM5nddDxie");
+ assertInvalidAddress("P9AvXbSUAdCyd9MEtDPYYSmezmeLGL1HcjG");
+ }
+}
\ No newline at end of file
diff --git a/assets/src/test/java/bisq/asset/coins/ViBookTest.java b/assets/src/test/java/bisq/asset/coins/ViBookTest.java
new file mode 100644
index 00000000000..7be59e93a59
--- /dev/null
+++ b/assets/src/test/java/bisq/asset/coins/ViBookTest.java
@@ -0,0 +1,45 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+package bisq.asset.coins;
+
+import bisq.asset.AbstractAssetTest;
+
+import org.junit.Test;
+
+public class ViBookTest extends AbstractAssetTest {
+
+ public ViBookTest() {
+ super(new ViBook());
+ }
+
+ @Test
+ public void testValidAddresses() {
+ assertValidAddress("VESZy7B2kptnXjjc3hYRW9shATCynmatJd");
+ assertValidAddress("VXcRxR2nCMNVHisAjviSEwPtDxCyjE8fc2");
+ assertValidAddress("VWDWn4PiARKuMty1fXmGi96UZazqsXL4wR");
+ assertValidAddress("VPVJddq66YKY4Sogh7YmxMkaz6NJJnsSAp");
+ }
+
+ @Test
+ public void testInvalidAddresses() {
+ assertInvalidAddress("VEASZy7B2kptnXjjc3hYRW9shATCynmatJd");
+ assertInvalidAddress("VXcRxFR2nCMNVHisAjviSEwPtDxCyjE8fc2");
+ assertInvalidAddress("VWDWn4PiARKuMty1fXmGi96UZazqsXL4wRs");
+ assertInvalidAddress("VPVJddq66YKY4Sogh7YmxMkaz6sNJJnsSAp");
+ }
+}
\ No newline at end of file