disable cryptocurrencies currently not listed

This commit is contained in:
erciccione 2022-08-17 15:31:14 +02:00 committed by woodser
parent 3e305b1ca6
commit b6ba76580f
225 changed files with 0 additions and 9393 deletions

View File

@ -1,38 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Actinium extends Coin {
public Actinium() {
super("Actinium", "ACM", new Base58AddressValidator(new ActiniumParams()));
}
public static class ActiniumParams extends NetworkParametersAdapter {
public ActiniumParams() {
addressHeader = 53;
p2shHeader = 55;
}
}
}

View File

@ -1,55 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Adeptio extends Coin {
public Adeptio() {
super("Adeptio", "ADE", new AdeptioAddressValidator());
}
public static class AdeptioAddressValidator extends Base58AddressValidator {
public AdeptioAddressValidator() {
super(new AdeptioParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[A][a-km-zA-HJ-NP-Z1-9]{24,33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class AdeptioParams extends NetworkParametersAdapter {
public AdeptioParams() {
addressHeader = 23;
p2shHeader = 16;
}
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.CryptoNoteAddressValidator;
public class Aeon extends Coin {
public Aeon() {
super("Aeon", "AEON", new CryptoNoteAddressValidator(0xB2, 0x06B8));
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class Amitycoin extends Coin {
public Amitycoin() {
super("Amitycoin", "AMIT", new RegexAddressValidator("^amit[1-9A-Za-z^OIl]{94}"));
}
}

View File

@ -1,35 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Animecoin extends Coin {
public Animecoin() {
super("Animecoin", "ANI", new Base58AddressValidator(new AnimecoinMainNetParams()));
}
public static class AnimecoinMainNetParams extends NetworkParametersAdapter {
public AnimecoinMainNetParams() {
this.addressHeader = 23;
this.p2shHeader = 9;
}
}
}

View File

@ -1,30 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AltCoinAccountDisclaimer;
import bisq.asset.Coin;
import bisq.asset.CryptoNoteAddressValidator;
@AltCoinAccountDisclaimer("account.altcoin.popup.arq.msg")
public class Arqma extends Coin {
public Arqma() {
super("Arqma", "ARQ", new CryptoNoteAddressValidator(0x2cca, 0x6847));
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class Askcoin extends Coin {
public Askcoin() {
super("Askcoin", "ASK", new RegexAddressValidator("^[1-9][0-9]{0,11}"));
}
}

View File

@ -1,35 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Australiacash extends Coin {
public Australiacash() {
super("Australiacash", "AUS", new Base58AddressValidator(new AustraliacashParams()));
}
public static class AustraliacashParams extends NetworkParametersAdapter {
public AustraliacashParams() {
addressHeader = 23;
p2shHeader = 5;
}
}
}

View File

@ -1,39 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AltCoinAccountDisclaimer;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
/**
* Here is info from a Beam developer regarding validation.
*
* Well, unfortunately the range length is quite large. The BbsChannel is 64 bit = 8 bytes, the pubkey is 32 bytes.
* So, the length may be up to 80 chars. The minimum length "theoretically" can also drop to a small length, if the
* channel==0, and the pubkey starts with many zeroes (very unlikely, but possible). So, besides being up to 80 chars
* lower-case hex there's not much can be tested. A more robust test would also check if the pubkey is indeed valid,
* but it's a more complex test, requiring cryptographic code.
*
*/
@AltCoinAccountDisclaimer("account.altcoin.popup.beam.msg")
public class Beam extends Coin {
public Beam() {
super("Beam", "BEAM", new RegexAddressValidator("^([0-9a-f]{1,80})$"));
}
}

View File

@ -1,29 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class BitDaric extends Coin {
public BitDaric() {
super("BitDaric", "DARX", new RegexAddressValidator("^[R][a-km-zA-HJ-NP-Z1-9]{25,34}$"));
}
}

View File

@ -1,38 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class BitcoinRhodium extends Coin {
public BitcoinRhodium() {
super("Bitcoin Rhodium", "XRC", new Base58AddressValidator(new BitcoinRhodiumParams()));
}
public static class BitcoinRhodiumParams extends NetworkParametersAdapter {
public BitcoinRhodiumParams() {
addressHeader = 61;
p2shHeader = 123;
}
}
}

View File

@ -1,36 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Bitmark extends Coin {
public static class BitmarkParams extends NetworkParametersAdapter {
public BitmarkParams() {
addressHeader = 85;
p2shHeader = 5;
}
}
public Bitmark() {
super("Bitmark", "BTM", new Base58AddressValidator(new BitmarkParams()));
}
}

View File

@ -1,29 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class Bitzec extends Coin {
public Bitzec() {
super("Bitzec", "BZC", new RegexAddressValidator("^t.*", "validation.altcoin.zAddressesNotSupported"));
}
}

View File

@ -1,30 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AltCoinAccountDisclaimer;
import bisq.asset.Coin;
import bisq.asset.CryptoNoteAddressValidator;
@AltCoinAccountDisclaimer("account.altcoin.popup.blur.msg")
public class Blur extends Coin {
public Blur() {
super("Blur", "BLUR", new CryptoNoteAddressValidator(0x1e4d, 0x2195));
}
}

View File

@ -1,33 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AltCoinAccountDisclaimer;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
@AltCoinAccountDisclaimer("account.altcoin.popup.blk-burnt.msg")
public class BurntBlackCoin extends Coin {
public static final short PAYLOAD_LIMIT = 15000;
public BurntBlackCoin() {
super("Burnt BlackCoin",
"BLK-BURNT",
new RegexAddressValidator(String.format("(?:[0-9a-z]{2}?){1,%d}+", 2 * PAYLOAD_LIMIT)));
}
}

View File

@ -1,29 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class CRowdCLassic extends Coin {
public CRowdCLassic() {
super("CRowdCLassic", "CRCL", new RegexAddressValidator("^[C][a-zA-Z0-9]{33}$"));
}
}

View File

@ -1,35 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class CTSCoin extends Coin {
public CTSCoin() {
super("CTSCoin", "CTSC", new Base58AddressValidator(new CtscMainNetParams()));
}
public static class CtscMainNetParams extends NetworkParametersAdapter {
public CtscMainNetParams() {
this.addressHeader = 66;
this.p2shHeader = 16;
}
}
}

View File

@ -1,30 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AltCoinAccountDisclaimer;
import bisq.asset.Coin;
import bisq.asset.CryptoNoteAddressValidator;
@AltCoinAccountDisclaimer("account.altcoin.popup.cash2.msg")
public class Cash2 extends Coin {
public Cash2() {
super("Cash2", "CASH2", new CryptoNoteAddressValidator(false, 0x6));
}
}

View File

@ -1,38 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Chaucha extends Coin {
public Chaucha() {
super("Chaucha", "CHA", new Base58AddressValidator(new ChauchaParams()));
}
public static class ChauchaParams extends NetworkParametersAdapter {
public ChauchaParams() {
addressHeader = 88;
p2shHeader = 50;
}
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class CloakCoin extends Coin {
public CloakCoin() {
super("CloakCoin", "CLOAK", new RegexAddressValidator("^[B|C][a-km-zA-HJ-NP-Z1-9]{33}|^smY[a-km-zA-HJ-NP-Z1-9]{99}$"));
}
}

View File

@ -1,36 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.I18n;
import bisq.asset.RegexAddressValidator;
public class Counterparty extends Coin {
public Counterparty() {
super("Counterparty", "XCP", new XcpAddressValidator());
}
public static class XcpAddressValidator extends RegexAddressValidator {
public XcpAddressValidator() {
super("^[1][a-zA-Z0-9]{33}", I18n.DISPLAY_STRINGS.getString("account.altcoin.popup.validation.XCP"));
}
}
}

View File

@ -1,55 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Credits extends Coin {
public Credits() {
super("Credits", "CRDS", new CreditsAddressValidator());
}
public static class CreditsAddressValidator extends Base58AddressValidator {
public CreditsAddressValidator() {
super(new CreditsParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[C][a-km-zA-HJ-NP-Z1-9]{25,34}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class CreditsParams extends NetworkParametersAdapter {
public CreditsParams() {
addressHeader = 28;
p2shHeader = 5;
}
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class Croat extends Coin {
public Croat() {
super("Croat", "CROAT", new RegexAddressValidator("^C[1-9A-HJ-NP-Za-km-z]{94}"));
}
}

View File

@ -1,55 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class DSTRA extends Coin {
public DSTRA() {
super("DSTRA", "DST", new DSTRAAddressValidator());
}
public static class DSTRAAddressValidator extends Base58AddressValidator {
public DSTRAAddressValidator() {
super(new DSTRAParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[D][a-km-zA-HJ-NP-Z1-9]{33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class DSTRAParams extends NetworkParametersAdapter {
public DSTRAParams() {
addressHeader = 30;
p2shHeader = 33;
}
}
}

View File

@ -1,35 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class DarkPay extends Coin {
public DarkPay() {
super("DarkPay", "D4RK", new Base58AddressValidator(new DarkPayMainNetParams()));
}
public static class DarkPayMainNetParams extends NetworkParametersAdapter {
public DarkPayMainNetParams() {
this.addressHeader = 31;
this.p2shHeader = 60;
}
}
}

View File

@ -1,35 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Dash extends Coin {
public Dash() {
super("Dash", "DASH", new Base58AddressValidator(new DashMainNetParams()), Network.MAINNET);
}
public static class DashMainNetParams extends NetworkParametersAdapter {
public DashMainNetParams() {
this.addressHeader = 76;
this.p2shHeader = 16;
}
}
}

View File

@ -1,36 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.I18n;
import bisq.asset.RegexAddressValidator;
public class Decred extends Coin {
public Decred() {
super("Decred", "DCR", new DcrAddressValidator());
}
public static class DcrAddressValidator extends RegexAddressValidator {
public DcrAddressValidator() {
super("^[Dk|Ds|De|DS|Dc|Pm][a-zA-Z0-9]{24,34}", I18n.DISPLAY_STRINGS.getString("account.altcoin.popup.validation.DCR"));
}
}
}

View File

@ -1,53 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class DeepOnion extends Coin {
public DeepOnion() {
super("DeepOnion", "ONION", new DeepOnionAddressValidator());
}
public static class DeepOnionAddressValidator extends Base58AddressValidator {
public DeepOnionAddressValidator() {
super(new DeepOnionParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[D][a-km-zA-HJ-NP-Z1-9]{24,33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class DeepOnionParams extends NetworkParametersAdapter {
public DeepOnionParams() {
super();
addressHeader = 31;
p2shHeader = 78;
}
}
}

View File

@ -1,56 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Dextro extends Coin {
public Dextro() {
super("Dextro", "DXO", new Base58AddressValidator(new DextroParams()));
}
public static class DextroAddressValidator extends Base58AddressValidator {
public DextroAddressValidator() {
super(new DextroParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[D][a-km-zA-HJ-NP-Z1-9]{33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class DextroParams extends NetworkParametersAdapter {
public DextroParams() {
super();
addressHeader = 30;
p2shHeader = 90;
}
}
}

View File

@ -1,36 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Dogecoin extends Coin {
public Dogecoin() {
super("Dogecoin", "DOGE", new Base58AddressValidator(new DogecoinMainNetParams()), Network.MAINNET);
}
public static class DogecoinMainNetParams extends NetworkParametersAdapter {
public DogecoinMainNetParams() {
this.addressHeader = 30;
this.p2shHeader = 22;
}
}
}

View File

@ -1,36 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Doichain extends Coin {
public Doichain() {
super("Doichain", "DOI", new Base58AddressValidator(new DoichainParams()));
}
public static class DoichainParams extends NetworkParametersAdapter {
public DoichainParams() {
addressHeader = 52;
p2shHeader = 13;
}
}
}

View File

@ -1,55 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Donu extends Coin {
public Donu() {
super("Donu", "DONU", new DonuAddressValidator());
}
public static class DonuAddressValidator extends Base58AddressValidator {
public DonuAddressValidator() {
super(new DonuParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[N][a-km-zA-HJ-NP-Z1-9]{24,33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class DonuParams extends NetworkParametersAdapter {
public DonuParams() {
addressHeader = 53;
p2shHeader = 5;
}
}
}

View File

@ -1,30 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AltCoinAccountDisclaimer;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
@AltCoinAccountDisclaimer("account.altcoin.popup.drgl.msg")
public class Dragonglass extends Coin {
public Dragonglass() {
super("Dragonglass", "DRGL", new RegexAddressValidator("^(dRGL)[1-9A-HJ-NP-Za-km-z]{94}$"));
}
}

View File

@ -1,36 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Emercoin extends Coin {
public Emercoin() {
super("Emercoin", "EMC", new Base58AddressValidator(new EmercoinMainNetParams()), Network.MAINNET);
}
public static class EmercoinMainNetParams extends NetworkParametersAdapter {
public EmercoinMainNetParams() {
this.addressHeader = 33;
this.p2shHeader = 92;
}
}
}

View File

@ -1,53 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.AddressValidator;
import bisq.asset.Coin;
import java.util.Arrays;
import org.bitcoinj.core.Base58;
import org.bitcoinj.core.AddressFormatException;
public class Ergo extends Coin {
public Ergo() {
super("Ergo", "ERG", new ErgoAddressValidator());
}
public static class ErgoAddressValidator implements AddressValidator {
@Override
public AddressValidationResult validate(String address) {
try {
byte[] decoded = Base58.decode(address);
if (decoded.length < 4) {
return AddressValidationResult.invalidAddress("Input too short: " + decoded.length);
}
if (decoded[0] != 1 && decoded[0] != 2 && decoded[0] != 3) {
return AddressValidationResult.invalidAddress("Invalid prefix");
}
} catch (AddressFormatException e) {
return AddressValidationResult.invalidAddress(e);
}
return AddressValidationResult.validAddress();
}
}
}

View File

@ -1,29 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.EtherAddressValidator;
import bisq.asset.I18n;
public class EtherClassic extends Coin {
public EtherClassic() {
super("Ether Classic", "ETC", new EtherAddressValidator(I18n.DISPLAY_STRINGS.getString("account.altcoin.popup.validation.ETC")));
}
}

View File

@ -1,38 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Faircoin extends Coin {
public Faircoin() {
super("Faircoin", "FAIR", new Base58AddressValidator(new Faircoin.FaircoinParams()));
}
public static class FaircoinParams extends NetworkParametersAdapter {
public FaircoinParams() {
addressHeader = 95;
p2shHeader = 36;
}
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.CryptoNoteAddressValidator;
public class FourtyTwo extends Coin {
public FourtyTwo() {
super("FourtyTwo", "FRTY", new CryptoNoteAddressValidator(0x1cbd67, 0x13271817));
}
}

View File

@ -1,35 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Fujicoin extends Coin {
public Fujicoin() {
super("Fujicoin", "FJC", new Base58AddressValidator(new FujicoinParams()));
}
public static class FujicoinParams extends NetworkParametersAdapter {
public FujicoinParams() {
addressHeader = 36;
p2shHeader = 16;
}
}
}

View File

@ -1,35 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Galilel extends Coin {
public Galilel() {
super("Galilel", "GALI", new Base58AddressValidator(new GalilelMainNetParams()));
}
public static class GalilelMainNetParams extends NetworkParametersAdapter {
public GalilelMainNetParams() {
this.addressHeader = 68;
this.p2shHeader = 16;
}
}
}

View File

@ -1,56 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class GambleCoin extends Coin {
public GambleCoin() {
super("GambleCoin", "GMCN", new GambleCoinAddressValidator());
}
public static class GambleCoinAddressValidator extends Base58AddressValidator {
public GambleCoinAddressValidator() {
super(new GambleCoinParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[C][a-km-zA-HJ-NP-Z1-9]{33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class GambleCoinParams extends NetworkParametersAdapter {
public GambleCoinParams() {
super();
addressHeader = 28;
p2shHeader = 18;
}
}
}

View File

@ -1,55 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.*;
public class Genesis extends Coin {
public Genesis() {
super("Genesis", "GENX", new GenesisAddressValidator());
}
public static class GenesisAddressValidator extends Base58AddressValidator {
public GenesisAddressValidator() {
super(new GenesisParams());
}
@Override
public AddressValidationResult validate(String address) {
if (address.startsWith("S")) {
return super.validate(address);
}else if (address.startsWith("genx")){
return AddressValidationResult.invalidAddress("Bech32 GENX addresses are not supported on bisq");
}else if (address.startsWith("C")){
return AddressValidationResult.invalidAddress("Legacy GENX addresses are not supported on bisq");
}
return AddressValidationResult.invalidStructure();
}
}
public static class GenesisParams extends NetworkParametersAdapter {
public GenesisParams() {
addressHeader = 28;
p2shHeader = 63;
}
}
}

View File

@ -1,30 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AltCoinAccountDisclaimer;
import bisq.asset.Coin;
import bisq.asset.GrinAddressValidator;
@AltCoinAccountDisclaimer("account.altcoin.popup.grin.msg")
public class Grin extends Coin {
public Grin() {
super("Grin", "GRIN", new GrinAddressValidator());
}
}

View File

@ -1,35 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Hatch extends Coin {
public Hatch() {
super("Hatch", "HATCH", new Base58AddressValidator(new HatchMainNetParams()), Network.MAINNET);
}
public static class HatchMainNetParams extends NetworkParametersAdapter {
public HatchMainNetParams() {
this.addressHeader = 76;
this.p2shHeader = 16;
}
}
}

View File

@ -1,37 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Helium extends Coin {
public Helium() {
super("Helium", "HLM", new Base58AddressValidator(new HeliumParams()));
}
public static class HeliumParams extends NetworkParametersAdapter {
public HeliumParams() {
addressHeader = 63;
p2shHeader = 5;
}
}
}

View File

@ -1,69 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.AddressValidator;
import bisq.asset.Coin;
import org.bitcoinj.core.AddressFormatException;
import org.bitcoinj.core.Base58;
public class Horizen extends Coin {
public Horizen() {
super("Horizen", "ZEN", new HorizenAddressValidator());
}
public static class HorizenAddressValidator implements AddressValidator {
@Override
public AddressValidationResult validate(String address) {
byte[] byteAddress;
try {
// Get the non Base58 form of the address and the bytecode of the first two bytes
byteAddress = Base58.decodeChecked(address);
} catch (AddressFormatException e) {
// Unhandled Exception (probably a checksum error)
return AddressValidationResult.invalidAddress(e);
}
int version0 = byteAddress[0] & 0xFF;
int version1 = byteAddress[1] & 0xFF;
// We only support public ("zn" (0x20,0x89), "t1" (0x1C,0xB8))
// and multisig ("zs" (0x20,0x96), "t3" (0x1C,0xBD)) addresses
// Fail for private addresses
if (version0 == 0x16 && version1 == 0x9A)
// Address starts with "zc"
return AddressValidationResult.invalidAddress("", "validation.altcoin.zAddressesNotSupported");
if (version0 == 0x1C && (version1 == 0xB8 || version1 == 0xBD))
// "t1" or "t3" address
return AddressValidationResult.validAddress();
if (version0 == 0x20 && (version1 == 0x89 || version1 == 0x96))
// "zn" or "zs" address
return AddressValidationResult.validAddress();
// Unknown Type
return AddressValidationResult.invalidStructure();
}
}
}

View File

@ -1,56 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class IdaPay extends Coin {
public IdaPay() {
super("IdaPay", "IDA", new IdaPayAddressValidator());
}
public static class IdaPayAddressValidator extends Base58AddressValidator {
public IdaPayAddressValidator() {
super(new IdaPayParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[CD][a-km-zA-HJ-NP-Z1-9]{33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class IdaPayParams extends NetworkParametersAdapter {
public IdaPayParams() {
super();
addressHeader = 29;
p2shHeader = 36;
}
}
}

View File

@ -1,25 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class Iridium extends Coin {
public Iridium() {
super("Iridium", "IRD", new RegexAddressValidator("^ir[1-9A-Za-z^OIl]{95}"));
}
}

View File

@ -1,39 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Kekcoin extends Coin {
public Kekcoin() {
super("Kekcoin", "KEK", new Base58AddressValidator(new KekcoinParams()));
}
public static class KekcoinParams extends NetworkParametersAdapter {
public KekcoinParams() {
super();
addressHeader = 45;
p2shHeader = 88;
}
}
}

View File

@ -1,35 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class KnowYourDeveloper extends Coin {
public KnowYourDeveloper() {
super("Know Your Developer", "KYDC", new Base58AddressValidator(new KydMainNetParams()));
}
public static class KydMainNetParams extends NetworkParametersAdapter {
public KydMainNetParams() {
this.addressHeader = 78;
this.p2shHeader = 85;
}
}
}

View File

@ -1,35 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Kore extends Coin {
public Kore() {
super("Kore", "KORE", new Base58AddressValidator(new KoreMainNetParams()));
}
public static class KoreMainNetParams extends NetworkParametersAdapter {
public KoreMainNetParams() {
this.addressHeader = 45;
this.p2shHeader = 85;
}
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class Krypton extends Coin {
public Krypton() {
super("Krypton", "ZOD", new RegexAddressValidator("^QQQ[1-9A-Za-z^OIl]{95}"));
}
}

View File

@ -1,36 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class LBRYCredits extends Coin {
public LBRYCredits() {
super("LBRY Credits", "LBC", new Base58AddressValidator(new LBRYCreditsMainNetParams()), Network.MAINNET);
}
public static class LBRYCreditsMainNetParams extends NetworkParametersAdapter {
public LBRYCreditsMainNetParams() {
this.addressHeader = 0x55;
this.p2shHeader = 0x7a;
}
}
}

View File

@ -1,30 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AltCoinAccountDisclaimer;
import bisq.asset.Coin;
import bisq.asset.LiquidBitcoinAddressValidator;
@AltCoinAccountDisclaimer("account.altcoin.popup.liquidbitcoin.msg")
public class LiquidBitcoin extends Coin {
public LiquidBitcoin() {
super("Liquid Bitcoin", "L-BTC", new LiquidBitcoinAddressValidator());
}
}

View File

@ -1,37 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class LitecoinPlus extends Coin {
public LitecoinPlus() {
super("LitecoinPlus", "LCP", new Base58AddressValidator(new LitecoinPlusMainNetParams()));
}
public static class LitecoinPlusMainNetParams extends NetworkParametersAdapter {
public LitecoinPlusMainNetParams() {
this.addressHeader = 75;
this.p2shHeader = 8;
}
}
}

View File

@ -1,29 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class LitecoinZ extends Coin {
public LitecoinZ() {
super("LitecoinZ", "LTZ", new RegexAddressValidator("^L.*", "validation.altcoin.ltz.zAddressesNotSupported"));
}
}

View File

@ -1,37 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Lytix extends Coin {
public Lytix() {
super("Lytix", "LYTX", new Base58AddressValidator(new LytixParams()));
}
public static class LytixParams extends NetworkParametersAdapter {
public LytixParams() {
addressHeader = 19;
p2shHeader = 11;
}
}
}

View File

@ -1,30 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AltCoinAccountDisclaimer;
import bisq.asset.Coin;
import bisq.asset.CryptoNoteAddressValidator;
@AltCoinAccountDisclaimer("account.altcoin.popup.msr.msg")
public class Masari extends Coin {
public Masari() {
super("Masari", "MSR", new CryptoNoteAddressValidator(28, 52));
}
}

View File

@ -1,27 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.CryptoNoteAddressValidator;
public class Mask extends Coin {
public Mask() {
super("Mask", "MASK", new CryptoNoteAddressValidator(123, 206));
}
}

View File

@ -1,75 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.AddressValidator;
import bisq.asset.Coin;
import org.bitcoinj.core.AddressFormatException;
import org.bitcoinj.core.Base58;
import java.util.Arrays;
import java.util.zip.CRC32;
import java.util.zip.Checksum;
public class Mile extends Coin {
public Mile() {
super("Mile", "MILE", new MileAddressValidator());
}
/**
* Mile address - base58(32 bytes of public key + 4 bytes of crc32)
*/
public static class MileAddressValidator implements AddressValidator {
public MileAddressValidator() {
}
@Override
public AddressValidationResult validate(String address) {
byte[] decoded;
try {
decoded = Base58.decode(address);
} catch (AddressFormatException e) {
return AddressValidationResult.invalidAddress(e.getMessage());
}
if (decoded.length != 32 + 4)
return AddressValidationResult.invalidAddress("Invalid address");
byte[] data = Arrays.copyOfRange(decoded, 0, decoded.length - 4);
byte[] addrChecksum = Arrays.copyOfRange(decoded, decoded.length - 4, decoded.length);
Checksum checksum = new CRC32();
checksum.update(data, 0, data.length);
long checksumValue = checksum.getValue();
if ((byte)(checksumValue & 0xff) != addrChecksum[0] ||
(byte)((checksumValue >> 8) & 0xff) != addrChecksum[1] ||
(byte)((checksumValue >> 16) & 0xff) != addrChecksum[2] ||
(byte)((checksumValue >> 24) & 0xff) != addrChecksum[3])
{
return AddressValidationResult.invalidAddress("Invalid address checksum");
}
return AddressValidationResult.validAddress();
}
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class MirQuiX extends Coin {
public MirQuiX() {
super("MirQuiX", "MQX", new RegexAddressValidator("^[M][a-km-zA-HJ-NP-Z1-9]{33}$"));
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class MoX extends Coin {
public MoX() {
super("MoX", "MOX", new RegexAddressValidator("^X[1-9A-Za-z^OIl]{96}"));
}
}

View File

@ -1,55 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class MobitGlobal extends Coin {
public MobitGlobal() {
super("MobitGlobal", "MBGL", new MobitGlobalAddressValidator());
}
public static class MobitGlobalAddressValidator extends Base58AddressValidator {
public MobitGlobalAddressValidator() {
super(new MobitGlobalParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[M][a-zA-Z1-9]{33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class MobitGlobalParams extends NetworkParametersAdapter {
public MobitGlobalParams() {
addressHeader = 50;
p2shHeader = 110;
}
}
}

View File

@ -1,55 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class MonetaryUnit extends Coin {
public MonetaryUnit() {
super("MonetaryUnit", "MUE", new MonetaryUnitAddressValidator());
}
public static class MonetaryUnitAddressValidator extends Base58AddressValidator {
public MonetaryUnitAddressValidator() {
super(new MonetaryUnitParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[7][a-km-zA-HJ-NP-Z1-9]{24,33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class MonetaryUnitParams extends NetworkParametersAdapter {
public MonetaryUnitParams() {
addressHeader = 16;
p2shHeader = 76;
}
}
}

View File

@ -1,36 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Myce extends Coin {
public Myce() {
super("Myce", "YCE", new Base58AddressValidator(new MyceParams()));
}
public static class MyceParams extends NetworkParametersAdapter {
public MyceParams() {
addressHeader = 50;
p2shHeader = 85;
}
}
}

View File

@ -1,36 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.I18n;
import bisq.asset.RegexAddressValidator;
public class Namecoin extends Coin {
public Namecoin() {
super("Namecoin", "NMC", new NmcAddressValidator());
}
public static class NmcAddressValidator extends RegexAddressValidator {
public NmcAddressValidator() {
super("^[NM][a-zA-Z0-9]{33}$", I18n.DISPLAY_STRINGS.getString("account.altcoin.popup.validation.NMC"));
}
}
}

View File

@ -1,35 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Navcoin extends Coin {
public Navcoin() {
super("Navcoin", "NAV", new Base58AddressValidator(new NavcoinParams()));
}
public static class NavcoinParams extends NetworkParametersAdapter {
public NavcoinParams() {
this.addressHeader = 53;
this.p2shHeader = 85;
}
}
}

View File

@ -1,37 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Copyright © 2019 Oneiro NA, Inc.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class Ndau extends Coin {
public Ndau() {
// note: ndau addresses contain an internal checksum which was deemed too complicated to include here.
// this regex performs superficial validation, but there is a large space of addresses marked valid
// by this regex which are not in fact valid ndau addresses. For actual ndau address validation,
// use the Address class in github.com/oneiro-ndev/ndauj (java) or github.com/oneiro-ndev/ndaumath/pkg/address (go).
super("ndau", "XND", new RegexAddressValidator("nd[anexbm][abcdefghijkmnpqrstuvwxyz23456789]{45}"));
}
}

View File

@ -1,27 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class Noir extends Coin {
public Noir() {
super("Noir", "NOR", new RegexAddressValidator("^[Z][_A-z0-9]*([_A-z0-9])*$"));
}
}

View File

@ -1,27 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class NoteBlockchain extends Coin {
public NoteBlockchain() {
super("NoteBlockchain", "NTBC", new RegexAddressValidator("^[N][a-km-zA-HJ-NP-Z1-9]{26,33}$"));
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
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}$"));
}
}

View File

@ -1,55 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class PIVX extends Coin {
public PIVX() {
super("PIVX", "PIVX", new PIVXAddressValidator());
}
public static class PIVXAddressValidator extends Base58AddressValidator {
public PIVXAddressValidator() {
super(new PIVXParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[D][a-km-zA-HJ-NP-Z1-9]{24,33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class PIVXParams extends NetworkParametersAdapter {
public PIVXParams() {
addressHeader = 30;
p2shHeader = 13;
}
}
}

View File

@ -1,55 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class PZDC extends Coin {
public PZDC() {
super("PZDC", "PZDC", new PZDCAddressValidator());
}
public static class PZDCAddressValidator extends Base58AddressValidator {
public PZDCAddressValidator() {
super(new PZDCParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[P][a-km-zA-HJ-NP-Z1-9]{24,33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class PZDCParams extends NetworkParametersAdapter {
public PZDCParams() {
addressHeader = 55;
p2shHeader = 13;
}
}
}

View File

@ -1,30 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AltCoinAccountDisclaimer;
import bisq.asset.Coin;
import bisq.asset.CryptoNoteAddressValidator;
@AltCoinAccountDisclaimer("account.altcoin.popup.pars.msg")
public class ParsiCoin extends Coin {
public ParsiCoin() {
super("ParsiCoin", "PARS", new CryptoNoteAddressValidator(false, 0x90004));
}
}

View File

@ -1,52 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
import bisq.asset.AddressValidationResult;
public class Particl extends Coin {
public Particl() {
super("Particl", "PART", new ParticlMainNetAddressValidator());
}
public static class ParticlMainNetParams extends NetworkParametersAdapter {
public ParticlMainNetParams() {
this.addressHeader = 56;
this.p2shHeader = 60;
}
}
public static class ParticlMainNetAddressValidator extends Base58AddressValidator {
public ParticlMainNetAddressValidator() {
super(new ParticlMainNetParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[RP][a-km-zA-HJ-NP-Z1-9]{25,34}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class Persona extends Coin {
public Persona() {
super("Persona", "PRSN", new RegexAddressValidator("^[P][a-km-zA-HJ-NP-Z1-9]{33}$"));
}
}

View File

@ -1,38 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Pinkcoin extends Coin {
public Pinkcoin() {
super("Pinkcoin", "PINK", new Base58AddressValidator(new PinkcoinParams()));
}
public static class PinkcoinParams extends NetworkParametersAdapter {
public PinkcoinParams() {
addressHeader = 3;
p2shHeader = 28;
}
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class Plenteum extends Coin {
public Plenteum() {
super("Plenteum", "PLE", new RegexAddressValidator("^PLe[1-9A-Za-z^OIl]{95}"));
}
}

View File

@ -1,55 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class QMCoin extends Coin {
public QMCoin() {
super("QMCoin", "QMCoin", new QMCoinAddressValidator());
}
public static class QMCoinAddressValidator extends Base58AddressValidator {
public QMCoinAddressValidator() {
super(new QMCoinParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[Q][a-km-zA-HJ-NP-Z1-9]{24,33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class QMCoinParams extends NetworkParametersAdapter {
public QMCoinParams() {
addressHeader = 58;
p2shHeader = 120;
}
}
}

View File

@ -1,37 +0,0 @@
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Qbase extends Coin {
public Qbase() {
super("Qbase", "QBS", new Qbase.QbaseAddressValidator());
}
public static class QbaseAddressValidator extends Base58AddressValidator {
public QbaseAddressValidator() {
super(new Qbase.QbaseParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[B][a-km-zA-HJ-NP-Z1-9]{25,34}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class QbaseParams extends NetworkParametersAdapter {
public QbaseParams() {
addressHeader = 25;
p2shHeader = 5;
}
}
}

View File

@ -1,30 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AltCoinAccountDisclaimer;
import bisq.asset.Coin;
import bisq.asset.CryptoNoteAddressValidator;
@AltCoinAccountDisclaimer("account.altcoin.popup.qwertycoin.msg")
public class Qwertycoin extends Coin {
public Qwertycoin() {
super("Qwertycoin", "QWC", new CryptoNoteAddressValidator(false, 0x14820c));
}
}

View File

@ -1,39 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Radium extends Coin {
public Radium() {
super("Radium", "RADS", new Base58AddressValidator(new RadiumParams()));
}
public static class RadiumParams extends NetworkParametersAdapter {
public RadiumParams() {
super();
addressHeader = 76;
p2shHeader = 58;
}
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class Remix extends Coin {
public Remix() {
super("Remix", "RMX", new RegexAddressValidator("^((REMXi|SubRM)[1-9A-HJ-NP-Za-km-z]{94})$"));
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class Ryo extends Coin {
public Ryo() {
super("Ryo", "RYO", new RegexAddressValidator("^((RYoL|RYoS)[1-9A-HJ-NP-Za-km-z]{95}|(RYoK)[1-9A-HJ-NP-Za-km-z]{51})$"));
}
}

View File

@ -1,55 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class SUB1X extends Coin {
public SUB1X() {
super("SUB1X", "SUB1X", new SUB1XAddressValidator());
}
public static class SUB1XAddressValidator extends Base58AddressValidator {
public SUB1XAddressValidator() {
super(new SUB1XParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[Z][a-km-zA-HJ-NP-Z1-9]{24,33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class SUB1XParams extends NetworkParametersAdapter {
public SUB1XParams() {
addressHeader = 80;
p2shHeader = 13;
}
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class SiaPrimeCoin extends Coin {
public SiaPrimeCoin() {
super("SiaPrimeCoin", "SCP", new RegexAddressValidator("^([0-9a-z]{76})$"));
}
}

View File

@ -1,37 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.I18n;
import bisq.asset.RegexAddressValidator;
public class Siafund extends Coin {
public Siafund() {
super("Siafund", "SF", new SfAddressValidator());
}
public static class SfAddressValidator extends RegexAddressValidator {
public SfAddressValidator() {
super("^[0-9a-fA-F]{76}$", I18n.DISPLAY_STRINGS.getString("account.altcoin.popup.validation.XCP"));
}
}
}

View File

@ -1,51 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class SixEleven extends Coin {
public SixEleven() {
super("SixEleven", "SIL", new SixElevenAddressValidator());
}
public static class SixElevenAddressValidator extends Base58AddressValidator {
public SixElevenAddressValidator() {
super(new SixEleven.SixElevenChainParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[MN][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class SixElevenChainParams extends NetworkParametersAdapter {
public SixElevenChainParams() {
addressHeader = 52;
}
}
}

View File

@ -1,30 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AltCoinAccountDisclaimer;
import bisq.asset.Coin;
import bisq.asset.CryptoNoteAddressValidator;
@AltCoinAccountDisclaimer("account.altcoin.popup.solo.msg")
public class Solo extends Coin {
public Solo() {
super("Solo", "XSL", new CryptoNoteAddressValidator(13975, 23578));
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class SpaceCash extends Coin {
public SpaceCash() {
super("SpaceCash", "SPACE", new RegexAddressValidator("^([0-9a-z]{76})$"));
}
}

View File

@ -1,38 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Spectrecoin extends Coin {
public Spectrecoin() {
super("Spectrecoin", "XSPEC", new Base58AddressValidator(new SpectrecoinParams()));
}
public static class SpectrecoinParams extends NetworkParametersAdapter {
public SpectrecoinParams() {
addressHeader = 63;
p2shHeader = 136;
}
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
public class Starwels extends Coin {
public Starwels() {
super("Starwels", "USDH", new Base58AddressValidator());
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class TEO extends Coin {
public TEO() {
super("Trust Ether reOrigin", "TEO", new RegexAddressValidator("^0x[0-9a-fA-F]{40}$"));
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class TurtleCoin extends Coin {
public TurtleCoin() {
super("TurtleCoin", "TRTL", new RegexAddressValidator("^TRTL[1-9A-Za-z^OIl]{95}"));
}
}

View File

@ -1,56 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.AddressValidationResult;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class UnitedCommunityCoin extends Coin {
public UnitedCommunityCoin() {
super("UnitedCommunityCoin", "UCC", new UnitedCommunityCoinAddressValidator());
}
public static class UnitedCommunityCoinAddressValidator extends Base58AddressValidator {
public UnitedCommunityCoinAddressValidator() {
super(new UnitedCommunityCoinParams());
}
@Override
public AddressValidationResult validate(String address) {
if (!address.matches("^[U][a-km-zA-HJ-NP-Z1-9]{33}$"))
return AddressValidationResult.invalidStructure();
return super.validate(address);
}
}
public static class UnitedCommunityCoinParams extends NetworkParametersAdapter {
public UnitedCommunityCoinParams() {
super();
addressHeader = 68;
p2shHeader = 18;
}
}
}

View File

@ -1,36 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.I18n;
import bisq.asset.RegexAddressValidator;
public class Unobtanium extends Coin {
public Unobtanium() {
super("Unobtanium", "UNO", new UnoAddressValidator());
}
public static class UnoAddressValidator extends RegexAddressValidator {
public UnoAddressValidator() {
super("^[u]?[a-zA-Z0-9]{33}", I18n.DISPLAY_STRINGS.getString("account.altcoin.popup.validation.UNO"));
}
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class VARIUS extends Coin {
public VARIUS() {
super("VARIUS Coin", "VARIUS", new RegexAddressValidator("^[V][a-km-zA-HJ-NP-Z1-9]{33}$"));
}
}

View File

@ -1,54 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.*;
public class Veil extends Coin {
public Veil() {
super("Veil", "VEIL", new VeilAddressValidator());
}
public static class VeilAddressValidator extends Base58AddressValidator {
public VeilAddressValidator() {
super(new VeilParams());
}
@Override
public AddressValidationResult validate(String address) {
if (address.startsWith("V")) {
return super.validate(address);
}else if (address.startsWith("bv")){
// TODO: Add bech32 support
return AddressValidationResult.invalidAddress("Bech32 addresses not supported on bisq");
}
return AddressValidationResult.invalidStructure();
}
}
public static class VeilParams extends NetworkParametersAdapter {
public VeilParams() {
addressHeader = 70;
p2shHeader = 5;
}
}
}

View File

@ -1,35 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Base58AddressValidator;
import bisq.asset.Coin;
import bisq.asset.NetworkParametersAdapter;
public class Vertcoin extends Coin {
public Vertcoin() {
super("Vertcoin", "VTC", new Base58AddressValidator(new VertcoinMainNetParams()));
}
public static class VertcoinMainNetParams extends NetworkParametersAdapter {
public VertcoinMainNetParams() {
this.addressHeader = 71;
this.p2shHeader = 5;
}
}
}

View File

@ -1,28 +0,0 @@
/*
* This file is part of Haveno.
*
* Haveno 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.
*
* Haveno 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 Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.asset.coins;
import bisq.asset.Coin;
import bisq.asset.RegexAddressValidator;
public class WORX extends Coin {
public WORX() {
super("WORX Coin", "WORX", new RegexAddressValidator("^[W][a-km-zA-HJ-NP-Z1-9]{33}$"));
}
}

Some files were not shown because too many files have changed in this diff Show More