diff --git a/assets/src/main/java/bisq/asset/coins/Australiacash.java b/assets/src/main/java/bisq/asset/coins/Australiacash.java new file mode 100644 index 00000000000..d0dea1b7d87 --- /dev/null +++ b/assets/src/main/java/bisq/asset/coins/Australiacash.java @@ -0,0 +1,36 @@ +/* + * 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 Australiacash extends Coin { + public Australiacash() { + super("Australiacash", "AUS", new Base58BitcoinAddressValidator(new AustraliacashParams())); + } + public static class AustraliacashParams extends NetworkParametersAdapter { + + public AustraliacashParams() { + addressHeader = 23; + p2shHeader = 5; + acceptableAddressCodes = new int[]{addressHeader, p2shHeader}; + } + } +} 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 b52a2110033..caf53442aea 100644 --- a/assets/src/main/resources/META-INF/services/bisq.asset.Asset +++ b/assets/src/main/resources/META-INF/services/bisq.asset.Asset @@ -4,6 +4,7 @@ # See https://bisq.network/list-asset for complete instructions. bisq.asset.coins.Actinium bisq.asset.coins.Aeon +bisq.asset.coins.Australiacash bisq.asset.coins.Beam bisq.asset.coins.BitcoinRhodium bisq.asset.coins.Bitcoin$Mainnet diff --git a/assets/src/test/java/bisq/asset/coins/AustraliacashTest.java b/assets/src/test/java/bisq/asset/coins/AustraliacashTest.java new file mode 100644 index 00000000000..3e2ef3c19a1 --- /dev/null +++ b/assets/src/test/java/bisq/asset/coins/AustraliacashTest.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 AustraliacashTest extends AbstractAssetTest { + + public AustraliacashTest() { + super(new Australiacash()); + } + + @Test + public void testValidAddresses() { + assertValidAddress("AYf2TGCoQ15HatyE99R3q9jVcXHLx1zRWW"); + assertValidAddress("Aahw1A79we2jUbTaamP5YALh21GSxiWTZa"); + assertValidAddress("ALp3R9W3QsCdqaNNcULySXN31dYvfvDkRU"); + } + + @Test + public void testInvalidAddresses() { + assertInvalidAddress("1ALp3R9W3QsCdqaNNcULySXN31dYvfvDkRU"); + assertInvalidAddress("ALp3R9W3QsCdrqaNNcULySXN31dYvfvDkRU"); + assertInvalidAddress("ALp3R9W3QsCdqaNNcULySXN31dYvfvDkRU#"); + } +}