diff --git a/src/main/java/bisq/asset/coins/Actinium.java b/src/main/java/bisq/asset/coins/Actinium.java new file mode 100644 index 0000000..2593460 --- /dev/null +++ b/src/main/java/bisq/asset/coins/Actinium.java @@ -0,0 +1,39 @@ +/* + * 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.Base58BitcoinAddressValidator; +import bisq.asset.Coin; +import bisq.asset.NetworkParametersAdapter; + +public class Actinium extends Coin { + + public Actinium() { + super("Actinium", "ACM", new Base58BitcoinAddressValidator(new ActiniumParams())); + } + + + public static class ActiniumParams extends NetworkParametersAdapter { + + public ActiniumParams() { + addressHeader = 53; + p2shHeader = 5; + acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; + } + } +} diff --git a/src/main/resources/META-INF/services/bisq.asset.Asset b/src/main/resources/META-INF/services/bisq.asset.Asset index 6474d48..a39af83 100644 --- a/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/src/main/resources/META-INF/services/bisq.asset.Asset @@ -3,6 +3,7 @@ # See bisq.asset.Asset and bisq.asset.AssetRegistry for further details. # See https://bisq.network/list-asset for complete instructions. bisq.asset.coins.Achievecoin +bisq.asset.coins.Actinium bisq.asset.coins.Angelcoin bisq.asset.coins.Aquachain bisq.asset.coins.Arto diff --git a/src/test/java/bisq/asset/coins/ActiniumTest.java b/src/test/java/bisq/asset/coins/ActiniumTest.java new file mode 100644 index 0000000..094c5bd --- /dev/null +++ b/src/test/java/bisq/asset/coins/ActiniumTest.java @@ -0,0 +1,43 @@ +/* + * 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 ActiniumTest extends AbstractAssetTest { + + public ActiniumTest() { + super(new Actinium()); + } + + @Test + public void testValidAddresses() { + assertValidAddress("NLzB9iUGJ8GaKSn9GfVKfd55QVRdNdz9FK"); + assertValidAddress("NSz7PKmo1sLQYtFuZjTQ1zZXhPQtHLScKT"); + assertValidAddress("NTFtsh4Ff2ijPNsnQAUf5fKTp7DJaGxSZK"); + } + + @Test + public void testInvalidAddresses() { + assertInvalidAddress("MgTFtsh4Ff2ijPNsnQAUf5fKTp7DJaGxSZK"); + assertInvalidAddress("F9z7PKmo1sLQYtFuZjTQ1zZXhPQtHLScKT"); + assertInvalidAddress("16Ftsh4Ff2ijPNsnQAUf5fKTp7DJaGxSZK"); + } +}