mirror of
https://github.com/bisq-network/bisq.git
synced 2025-01-19 05:44:05 +01:00
Merge branch 'master' of github.com:bisq-network/bisq-desktop into redesign
# Conflicts: # desktop/src/main/java/bisq/desktop/main/settings/preferences/PreferencesView.java # desktop/src/main/java/bisq/desktop/util/FormBuilder.java
This commit is contained in:
commit
0edbb1733c
1
.idea/codeStyles/codeStyleConfig.xml
generated
1
.idea/codeStyles/codeStyleConfig.xml
generated
@ -1,5 +1,6 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||
</state>
|
||||
</component>
|
@ -7,7 +7,7 @@
|
||||
|
||||
Bisq is a safe, private and decentralized way to exchange bitcoin for national currencies and other cryptocurrencies. Bisq uses peer-to-peer technology and multi-signature escrow to facilitate trading without the need for a centralized third party exchange. Bisq is non-custodial (never holds your funds), and incorporates a human arbitration system to resolve disputes.
|
||||
|
||||
For more information, see https://bisq-network/intro and for step-by-step getting started instructions, see https://bisq.network/get-started.
|
||||
For more information, see https://bisq.network/intro and for step-by-step getting started instructions, see https://bisq.network/get-started.
|
||||
|
||||
|
||||
## Building Bisq
|
||||
|
@ -40,16 +40,39 @@ public class CryptonoteAddressValidator implements AddressValidator {
|
||||
// Invalid characters
|
||||
return AddressValidationResult.invalidStructure();
|
||||
}
|
||||
|
||||
if (address.startsWith(prefix) && address.length() == 94 + prefix.length()) {
|
||||
// Standard address
|
||||
return AddressValidationResult.validAddress();
|
||||
} else if (address.startsWith(subAddressPrefix) && address.length() == 94 + subAddressPrefix.length()) {
|
||||
// Subaddress
|
||||
return AddressValidationResult.validAddress();
|
||||
} else {
|
||||
// Integrated? Invalid? Doesn't matter
|
||||
if (address.startsWith(prefix)) {
|
||||
if (prefix.length() == 1 && address.length() == 94 + prefix.length()) {
|
||||
// XMR-type Standard address
|
||||
return AddressValidationResult.validAddress();
|
||||
}
|
||||
else if (prefix.length() == 2 && address.length() == 95 + prefix.length()) {
|
||||
//Aeon & Blur-type addresses
|
||||
return AddressValidationResult.validAddress();
|
||||
}
|
||||
else {
|
||||
//Non-supported prefix
|
||||
return AddressValidationResult.invalidStructure();
|
||||
}
|
||||
}
|
||||
if (address.startsWith(subAddressPrefix)) {
|
||||
if (subAddressPrefix.length() == 1 && address.length() == 94 + subAddressPrefix.length()) {
|
||||
// XMR-type subaddress
|
||||
return AddressValidationResult.validAddress();
|
||||
}
|
||||
else if (subAddressPrefix.length() == 2 && address.length() == 95 + subAddressPrefix.length()) {
|
||||
// Aeon & Blur-type subaddress
|
||||
return AddressValidationResult.validAddress();
|
||||
}
|
||||
else {
|
||||
// Non-supported subAddress
|
||||
return AddressValidationResult.invalidStructure();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
//Integrated? Invalid? Doesn't matter
|
||||
return AddressValidationResult.invalidStructure();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
39
assets/src/main/java/bisq/asset/coins/Actinium.java
Normal file
39
assets/src/main/java/bisq/asset/coins/Actinium.java
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
import bisq.asset.Coin;
|
||||
import bisq.asset.NetworkParametersAdapter;
|
||||
|
||||
public class Actinium extends Coin {
|
||||
|
||||
public Actinium() {
|
||||
super("Actinium", "ACM", new Base58BitcoinAddressValidator(new ActiniumParams()));
|
||||
}
|
||||
|
||||
|
||||
public static class ActiniumParams extends NetworkParametersAdapter {
|
||||
|
||||
public ActiniumParams() {
|
||||
addressHeader = 53;
|
||||
p2shHeader = 5;
|
||||
acceptableAddressCodes = new int[]{addressHeader, p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
28
assets/src/main/java/bisq/asset/coins/Bitcoin2.java
Normal file
28
assets/src/main/java/bisq/asset/coins/Bitcoin2.java
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
import bisq.asset.Coin;
|
||||
|
||||
public class Bitcoin2 extends Coin {
|
||||
|
||||
public Bitcoin2() {
|
||||
super("Bitcoin 2", "BTC2", new Base58BitcoinAddressValidator());
|
||||
}
|
||||
}
|
28
assets/src/main/java/bisq/asset/coins/Blur.java
Normal file
28
assets/src/main/java/bisq/asset/coins/Blur.java
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Coin;
|
||||
import bisq.asset.CryptonoteAddressValidator;
|
||||
|
||||
public class Blur extends Coin {
|
||||
|
||||
public Blur() {
|
||||
super("Blur", "BLUR", new CryptonoteAddressValidator("bL", "Ry"));
|
||||
}
|
||||
}
|
39
assets/src/main/java/bisq/asset/coins/Chaucha.java
Normal file
39
assets/src/main/java/bisq/asset/coins/Chaucha.java
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
import bisq.asset.Coin;
|
||||
import bisq.asset.NetworkParametersAdapter;
|
||||
|
||||
public class Chaucha extends Coin {
|
||||
|
||||
public Chaucha() {
|
||||
super("Chaucha", "CHA", new Base58BitcoinAddressValidator(new ChauchaParams()));
|
||||
}
|
||||
|
||||
public static class ChauchaParams extends NetworkParametersAdapter {
|
||||
|
||||
public ChauchaParams() {
|
||||
addressHeader = 88;
|
||||
p2shHeader = 50;
|
||||
acceptableAddressCodes = new int[]{addressHeader, p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
28
assets/src/main/java/bisq/asset/coins/Croat.java
Normal file
28
assets/src/main/java/bisq/asset/coins/Croat.java
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <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}"));
|
||||
}
|
||||
}
|
28
assets/src/main/java/bisq/asset/coins/Dragonglass.java
Normal file
28
assets/src/main/java/bisq/asset/coins/Dragonglass.java
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Coin;
|
||||
import bisq.asset.RegexAddressValidator;
|
||||
|
||||
public class Dragonglass extends Coin {
|
||||
|
||||
public Dragonglass() {
|
||||
super("Dragonglass", "DRGL", new RegexAddressValidator("^(dRGL)[1-9A-HJ-NP-Za-km-z]{94}$"));
|
||||
}
|
||||
}
|
40
assets/src/main/java/bisq/asset/coins/Kekcoin.java
Normal file
40
assets/src/main/java/bisq/asset/coins/Kekcoin.java
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
import bisq.asset.Coin;
|
||||
import bisq.asset.NetworkParametersAdapter;
|
||||
|
||||
public class Kekcoin extends Coin {
|
||||
|
||||
public Kekcoin() {
|
||||
super("Kekcoin", "KEK", new Base58BitcoinAddressValidator(new KekcoinParams()));
|
||||
}
|
||||
|
||||
|
||||
public static class KekcoinParams extends NetworkParametersAdapter {
|
||||
|
||||
public KekcoinParams() {
|
||||
super();
|
||||
addressHeader = 45;
|
||||
p2shHeader = 88;
|
||||
acceptableAddressCodes = new int[]{addressHeader, p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
28
assets/src/main/java/bisq/asset/coins/Loki.java
Normal file
28
assets/src/main/java/bisq/asset/coins/Loki.java
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Coin;
|
||||
import bisq.asset.RegexAddressValidator;
|
||||
|
||||
public class Loki extends Coin {
|
||||
|
||||
public Loki() {
|
||||
super("Loki", "LOKI", new RegexAddressValidator("^(L[0-9A-Za-z]{94})|(L[PK][0-9A-Za-z]{104})$"));
|
||||
}
|
||||
}
|
56
assets/src/main/java/bisq/asset/coins/MobitGlobal.java
Normal file
56
assets/src/main/java/bisq/asset/coins/MobitGlobal.java
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AddressValidationResult;
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
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 Base58BitcoinAddressValidator {
|
||||
|
||||
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;
|
||||
acceptableAddressCodes = new int[]{addressHeader, p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
56
assets/src/main/java/bisq/asset/coins/Neos.java
Normal file
56
assets/src/main/java/bisq/asset/coins/Neos.java
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AddressValidationResult;
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
import bisq.asset.Coin;
|
||||
import bisq.asset.NetworkParametersAdapter;
|
||||
|
||||
public class Neos extends Coin {
|
||||
|
||||
public Neos() {
|
||||
super("Neos", "NEOS", new NeosAddressValidator());
|
||||
}
|
||||
|
||||
|
||||
public static class NeosAddressValidator extends Base58BitcoinAddressValidator {
|
||||
|
||||
public NeosAddressValidator() {
|
||||
super(new NeosParams());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddressValidationResult validate(String address) {
|
||||
if (!address.matches("^[N][a-km-zA-HJ-NP-Z1-9]{25,34}$"))
|
||||
return AddressValidationResult.invalidStructure();
|
||||
|
||||
return super.validate(address);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class NeosParams extends NetworkParametersAdapter {
|
||||
|
||||
public NeosParams() {
|
||||
addressHeader = 53;
|
||||
p2shHeader = 5;
|
||||
acceptableAddressCodes = new int[]{addressHeader, p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
56
assets/src/main/java/bisq/asset/coins/PZDC.java
Normal file
56
assets/src/main/java/bisq/asset/coins/PZDC.java
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AddressValidationResult;
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
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 Base58BitcoinAddressValidator {
|
||||
|
||||
public PZDCAddressValidator() {
|
||||
super(new PZDCParams());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddressValidationResult validate(String address) {
|
||||
if (!address.matches("^[P][a-km-zA-HJ-NP-Z1-9]{25,34}$"))
|
||||
return AddressValidationResult.invalidStructure();
|
||||
|
||||
return super.validate(address);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class PZDCParams extends NetworkParametersAdapter {
|
||||
|
||||
public PZDCParams() {
|
||||
addressHeader = 55;
|
||||
p2shHeader = 13;
|
||||
acceptableAddressCodes = new int[]{addressHeader, p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
56
assets/src/main/java/bisq/asset/coins/QMCoin.java
Normal file
56
assets/src/main/java/bisq/asset/coins/QMCoin.java
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AddressValidationResult;
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
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 Base58BitcoinAddressValidator {
|
||||
|
||||
public QMCoinAddressValidator() {
|
||||
super(new QMCoinParams());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddressValidationResult validate(String address) {
|
||||
if (!address.matches("^[Q][a-km-zA-HJ-NP-Z1-9]{25,34}$"))
|
||||
return AddressValidationResult.invalidStructure();
|
||||
|
||||
return super.validate(address);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class QMCoinParams extends NetworkParametersAdapter {
|
||||
|
||||
public QMCoinParams() {
|
||||
addressHeader = 58;
|
||||
p2shHeader = 120;
|
||||
acceptableAddressCodes = new int[]{addressHeader, p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
28
assets/src/main/java/bisq/asset/coins/QRL.java
Normal file
28
assets/src/main/java/bisq/asset/coins/QRL.java
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Coin;
|
||||
import bisq.asset.RegexAddressValidator;
|
||||
|
||||
public class QRL extends Coin {
|
||||
|
||||
public QRL() {
|
||||
super("Quantum Resistant Ledger", "QRL", new RegexAddressValidator("([Q]\\d{6}[0-9a-fA-F]{72})"));
|
||||
}
|
||||
}
|
40
assets/src/main/java/bisq/asset/coins/Radium.java
Normal file
40
assets/src/main/java/bisq/asset/coins/Radium.java
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
import bisq.asset.Coin;
|
||||
import bisq.asset.NetworkParametersAdapter;
|
||||
|
||||
public class Radium extends Coin {
|
||||
|
||||
public Radium() {
|
||||
super("Radium", "RADS", new Base58BitcoinAddressValidator(new RadiumParams()));
|
||||
}
|
||||
|
||||
|
||||
public static class RadiumParams extends NetworkParametersAdapter {
|
||||
|
||||
public RadiumParams() {
|
||||
super();
|
||||
addressHeader = 76;
|
||||
p2shHeader = 58;
|
||||
acceptableAddressCodes = new int[]{addressHeader, p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
28
assets/src/main/java/bisq/asset/coins/Ryo.java
Normal file
28
assets/src/main/java/bisq/asset/coins/Ryo.java
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <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})$"));
|
||||
}
|
||||
}
|
56
assets/src/main/java/bisq/asset/coins/SUB1X.java
Normal file
56
assets/src/main/java/bisq/asset/coins/SUB1X.java
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AddressValidationResult;
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
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 Base58BitcoinAddressValidator {
|
||||
|
||||
public SUB1XAddressValidator() {
|
||||
super(new SUB1XParams());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddressValidationResult validate(String address) {
|
||||
if (!address.matches("^[Z][a-km-zA-HJ-NP-Z1-9]{25,34}$"))
|
||||
return AddressValidationResult.invalidStructure();
|
||||
|
||||
return super.validate(address);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class SUB1XParams extends NetworkParametersAdapter {
|
||||
|
||||
public SUB1XParams() {
|
||||
addressHeader = 80;
|
||||
p2shHeader = 13;
|
||||
acceptableAddressCodes = new int[]{addressHeader, p2shHeader};
|
||||
}
|
||||
}
|
||||
}
|
28
assets/src/main/java/bisq/asset/coins/Starwels.java
Normal file
28
assets/src/main/java/bisq/asset/coins/Starwels.java
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.Base58BitcoinAddressValidator;
|
||||
import bisq.asset.Coin;
|
||||
|
||||
public class Starwels extends Coin {
|
||||
|
||||
public Starwels() {
|
||||
super("Starwels", "MAI", new Base58BitcoinAddressValidator());
|
||||
}
|
||||
}
|
28
assets/src/main/java/bisq/asset/coins/TurtleCoin.java
Normal file
28
assets/src/main/java/bisq/asset/coins/TurtleCoin.java
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <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}"));
|
||||
}
|
||||
}
|
42
assets/src/main/java/bisq/asset/coins/Zero.java
Normal file
42
assets/src/main/java/bisq/asset/coins/Zero.java
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AddressValidationResult;
|
||||
import bisq.asset.AddressValidator;
|
||||
import bisq.asset.Coin;
|
||||
|
||||
public class Zero extends Coin {
|
||||
|
||||
public Zero() {
|
||||
super("Zero", "ZER", new ZeroAddressValidator());
|
||||
}
|
||||
|
||||
|
||||
public static class ZeroAddressValidator implements AddressValidator {
|
||||
|
||||
@Override
|
||||
public AddressValidationResult validate(String address) {
|
||||
// We only support t addresses (transparent transactions)
|
||||
if (!address.startsWith("t1"))
|
||||
return AddressValidationResult.invalidAddress("", "validation.altcoin.zAddressesNotSupported");
|
||||
|
||||
return AddressValidationResult.validAddress();
|
||||
}
|
||||
}
|
||||
}
|
27
assets/src/main/java/bisq/asset/tokens/EtherStone.java
Normal file
27
assets/src/main/java/bisq/asset/tokens/EtherStone.java
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.tokens;
|
||||
|
||||
import bisq.asset.Erc20Token;
|
||||
|
||||
public class EtherStone extends Erc20Token {
|
||||
|
||||
public EtherStone() {
|
||||
super("EtherStone", "ETHS");
|
||||
}
|
||||
}
|
27
assets/src/main/java/bisq/asset/tokens/GreenBlockCoin.java
Executable file
27
assets/src/main/java/bisq/asset/tokens/GreenBlockCoin.java
Executable file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.tokens;
|
||||
|
||||
import bisq.asset.Erc20Token;
|
||||
|
||||
public class GreenBlockCoin extends Erc20Token {
|
||||
|
||||
public GreenBlockCoin() {
|
||||
super("GreenBlockCoin", "GBK");
|
||||
}
|
||||
}
|
@ -3,10 +3,12 @@
|
||||
# See bisq.asset.Asset and bisq.asset.AssetRegistry for further details.
|
||||
# See https://bisq.network/list-asset for complete instructions.
|
||||
bisq.asset.coins.Achievecoin
|
||||
bisq.asset.coins.Actinium
|
||||
bisq.asset.coins.Angelcoin
|
||||
bisq.asset.coins.Aquachain
|
||||
bisq.asset.coins.Arto
|
||||
bisq.asset.coins.BitCloud
|
||||
bisq.asset.coins.Bitcoin2
|
||||
bisq.asset.coins.BitcoinCash
|
||||
bisq.asset.coins.BitcoinClashic
|
||||
bisq.asset.coins.BitcoinCore
|
||||
@ -18,6 +20,7 @@ bisq.asset.coins.Bitcoin$Testnet
|
||||
bisq.asset.coins.Bitcore
|
||||
bisq.asset.coins.BitDaric
|
||||
bisq.asset.coins.BitZeny
|
||||
bisq.asset.coins.Blur
|
||||
bisq.asset.coins.BSQ$Mainnet
|
||||
bisq.asset.coins.BSQ$Regtest
|
||||
bisq.asset.coins.BSQ$Testnet
|
||||
@ -25,10 +28,12 @@ bisq.asset.coins.Burstcoin
|
||||
bisq.asset.coins.Byteball
|
||||
bisq.asset.coins.Cagecoin
|
||||
bisq.asset.coins.CassubianDetk
|
||||
bisq.asset.coins.Chaucha
|
||||
bisq.asset.coins.Conceal
|
||||
bisq.asset.coins.Counterparty
|
||||
bisq.asset.coins.Creativecoin
|
||||
bisq.asset.coins.Credits
|
||||
bisq.asset.coins.Croat
|
||||
bisq.asset.coins.Cryptonite
|
||||
bisq.asset.coins.Cryptonodes
|
||||
bisq.asset.coins.DACash
|
||||
@ -44,6 +49,7 @@ bisq.asset.coins.Diamond
|
||||
bisq.asset.coins.DigiMoney
|
||||
bisq.asset.coins.Dinero
|
||||
bisq.asset.coins.Dogecoin
|
||||
bisq.asset.coins.Dragonglass
|
||||
bisq.asset.coins.DRIP
|
||||
bisq.asset.coins.DSTRA
|
||||
bisq.asset.coins.DynamicCoin
|
||||
@ -56,6 +62,7 @@ bisq.asset.coins.Gridcoin
|
||||
bisq.asset.coins.InfinityEconomics
|
||||
bisq.asset.coins.Instacash
|
||||
bisq.asset.coins.InternetOfPeople
|
||||
bisq.asset.coins.Kekcoin
|
||||
bisq.asset.coins.Koto
|
||||
bisq.asset.coins.Kumacoin
|
||||
bisq.asset.coins.LBRY
|
||||
@ -65,6 +72,7 @@ bisq.asset.coins.Litecoin$Mainnet
|
||||
bisq.asset.coins.Litecoin$Regtest
|
||||
bisq.asset.coins.Litecoin$Testnet
|
||||
bisq.asset.coins.Lobstex
|
||||
bisq.asset.coins.Loki
|
||||
bisq.asset.coins.Madbyte
|
||||
bisq.asset.coins.Madcoin
|
||||
bisq.asset.coins.MaidSafeCoin
|
||||
@ -73,6 +81,7 @@ bisq.asset.coins.Mazacoin
|
||||
bisq.asset.coins.MegaCoin
|
||||
bisq.asset.coins.MFCoin
|
||||
bisq.asset.coins.MicroCoin
|
||||
bisq.asset.coins.MobitGlobal
|
||||
bisq.asset.coins.Monero
|
||||
bisq.asset.coins.Motion
|
||||
bisq.asset.coins.Myriadcoin
|
||||
@ -80,6 +89,7 @@ bisq.asset.coins.Namecoin
|
||||
bisq.asset.coins.Nano
|
||||
bisq.asset.coins.NavCoin
|
||||
bisq.asset.coins.NEETCOIN
|
||||
bisq.asset.coins.Neos
|
||||
bisq.asset.coins.NewPowerCoin
|
||||
bisq.asset.coins.Nilu
|
||||
bisq.asset.coins.Nimiq
|
||||
@ -94,9 +104,14 @@ bisq.asset.coins.PIVX
|
||||
bisq.asset.coins.PostCoin
|
||||
bisq.asset.coins.Pranacoin
|
||||
bisq.asset.coins.PRiVCY
|
||||
bisq.asset.coins.PZDC
|
||||
bisq.asset.coins.QMCoin
|
||||
bisq.asset.coins.QRL
|
||||
bisq.asset.coins.Radium
|
||||
bisq.asset.coins.ReddCoin
|
||||
bisq.asset.coins.Ringo
|
||||
bisq.asset.coins.Roicoin
|
||||
bisq.asset.coins.Ryo
|
||||
bisq.asset.coins.SafeFileSystemCoin
|
||||
bisq.asset.coins.Semux
|
||||
bisq.asset.coins.Siacoin
|
||||
@ -104,12 +119,15 @@ bisq.asset.coins.Siafund
|
||||
bisq.asset.coins.Sibcoin
|
||||
bisq.asset.coins.Spectrecoin
|
||||
bisq.asset.coins.SpeedCash
|
||||
bisq.asset.coins.Starwels
|
||||
bisq.asset.coins.STEEM
|
||||
bisq.asset.coins.Stellite
|
||||
bisq.asset.coins.Strayacoin
|
||||
bisq.asset.coins.SUB1X
|
||||
bisq.asset.coins.Tamadcoin
|
||||
bisq.asset.coins.Terracoin
|
||||
bisq.asset.coins.Triton
|
||||
bisq.asset.coins.TurtleCoin
|
||||
bisq.asset.coins.Ubiq
|
||||
bisq.asset.coins.Unobtanium
|
||||
bisq.asset.coins.VDinar
|
||||
@ -122,13 +140,16 @@ bisq.asset.coins.Yenten
|
||||
bisq.asset.coins.Zcash
|
||||
bisq.asset.coins.Zcoin
|
||||
bisq.asset.coins.ZenCash
|
||||
bisq.asset.coins.Zero
|
||||
bisq.asset.coins.ZeroOneCoin
|
||||
bisq.asset.tokens.BetterBetting
|
||||
bisq.asset.tokens.DaiStablecoin
|
||||
bisq.asset.tokens.Ellaism
|
||||
bisq.asset.tokens.EtherStone
|
||||
bisq.asset.tokens.Exceed
|
||||
bisq.asset.tokens.GeoCoin
|
||||
bisq.asset.tokens.Grans
|
||||
bisq.asset.tokens.GreenBlockCoin
|
||||
bisq.asset.tokens.Internext
|
||||
bisq.asset.tokens.LikeCoin
|
||||
bisq.asset.tokens.Movement
|
||||
|
43
assets/src/test/java/bisq/asset/coins/ActiniumTest.java
Normal file
43
assets/src/test/java/bisq/asset/coins/ActiniumTest.java
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class ActiniumTest extends AbstractAssetTest {
|
||||
|
||||
public ActiniumTest() {
|
||||
super(new Actinium());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("NLzB9iUGJ8GaKSn9GfVKfd55QVRdNdz9FK");
|
||||
assertValidAddress("NSz7PKmo1sLQYtFuZjTQ1zZXhPQtHLScKT");
|
||||
assertValidAddress("NTFtsh4Ff2ijPNsnQAUf5fKTp7DJaGxSZK");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("MgTFtsh4Ff2ijPNsnQAUf5fKTp7DJaGxSZK");
|
||||
assertInvalidAddress("F9z7PKmo1sLQYtFuZjTQ1zZXhPQtHLScKT");
|
||||
assertInvalidAddress("16Ftsh4Ff2ijPNsnQAUf5fKTp7DJaGxSZK");
|
||||
}
|
||||
}
|
43
assets/src/test/java/bisq/asset/coins/Bitcoin2Test.java
Normal file
43
assets/src/test/java/bisq/asset/coins/Bitcoin2Test.java
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class Bitcoin2Test extends AbstractAssetTest {
|
||||
|
||||
public Bitcoin2Test() {
|
||||
super(new Bitcoin2());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("1Ns5bawVfpHYy6J7qdANasXy2nBTtq23cg");
|
||||
assertValidAddress("1P1WG1SV9AyKsHeGZtdmh8HN6QtCmemMCV");
|
||||
assertValidAddress("1mFiSH3mHL6gdqvRXYW5BgQh9E9vLCpNE");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("21HQQgsvLTgN9xD9hNmAgAreakzVzQUSLSHa");
|
||||
assertInvalidAddress("bc1q2rskr9eey7kvuv53esm8lm2tzmejpr3yzdz8xg");
|
||||
assertInvalidAddress("1HQQgsvLTgN9xD9hNmAgAreakzVzQUSLSH#");
|
||||
}
|
||||
}
|
44
assets/src/test/java/bisq/asset/coins/BlurTest.java
Normal file
44
assets/src/test/java/bisq/asset/coins/BlurTest.java
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
import org.junit.Test;
|
||||
|
||||
public class BlurTest extends AbstractAssetTest {
|
||||
|
||||
public BlurTest() {
|
||||
super(new Blur());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("bL3W1g1d12sbxQDTQ6q8bgU2bBp2rkfFFKfNvQuUQTHqgQHRaxKTHqK5Nqdm53BU3ibPnsqbdYAnnJMyqJ6FfN9m3CSZSNqDE");
|
||||
assertValidAddress("bL2zBGUBDkQdyYasdoAdvQCxWLa9Mk5Q1PW8Zk7S38vx9xu7T7NMPPWNfieXqUyswo544ZSB3C1n9jLMfsUvR6p91rnrSdx9h");
|
||||
assertValidAddress("Ry49oErHtqyHucxADDT2DfEJ9pRv2ciSpKV9XseCuWmx1PK1CZi4gbPKxhWBdtvLJNNc94c4yDutmZrD3WrsHPYV1nvE9X4Cc");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("");
|
||||
assertInvalidAddress("bl4E2BCFY31DPLjeqF6Gu7TEUM5v2JwpmudFX64AubQtFDYEPBvgvQPzidaawDhjAmHeZSw92wEBnUfdfY5144Sad2ZCknZzC");
|
||||
assertInvalidAddress("Ry49oErHtqyHucxADDT2DfEJ9pRv2ciSpKV9XseCuWmx1PK1CZi4gbPKxhWBdtvLJNNc94c4yDutmZrD3WrsHPYV1nvE9X40");
|
||||
assertInvalidAddress("bLNHRh8pFh5Y14bhBVAoD4cvqHyoPsQJqB3dr49zoF6bNDFrts96tuuj#RoUKWRwpTHmYt4Kf78FES7LCXAXKXFf6bMsx1sdgz");
|
||||
assertInvalidAddress("82zBGUBDkQdyYasdoAdvQCxWLa9Mk5Q1PW#8Zk7S38vx9xu7T7NMPPWNfieXqUyswo544ZSB3C1n9jLMfsUvR6p91rnrSdxwd");
|
||||
}
|
||||
}
|
43
assets/src/test/java/bisq/asset/coins/ChauchaTest.java
Normal file
43
assets/src/test/java/bisq/asset/coins/ChauchaTest.java
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class ChauchaTest extends AbstractAssetTest {
|
||||
|
||||
public ChauchaTest() {
|
||||
super(new Chaucha());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("cTC7AodMWM4fXsG1TDu4JLn2qKQoMg4F9N");
|
||||
assertValidAddress("caWnffHrx8wkQqcSVJ7wpRvN1E7Ztz7kPP");
|
||||
assertValidAddress("ciWwaG4trw1vQZSL4F4phQqznK4NgZURdQ");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("1cTC7AodMWM4fXsG1TDu4JLn2qKQoMg4F9N");
|
||||
assertInvalidAddress("cTC7AodMWM4fXsG1TDu4JLn2qKQoMg4F9XN");
|
||||
assertInvalidAddress("cTC7AodMWM4fXsG1TDu4JLn2qKQoMg4F9N#");
|
||||
}
|
||||
}
|
47
assets/src/test/java/bisq/asset/coins/CroatTest.java
Normal file
47
assets/src/test/java/bisq/asset/coins/CroatTest.java
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class CroatTest extends AbstractAssetTest {
|
||||
|
||||
public CroatTest() {
|
||||
super(new Croat());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("CsZ46x2mzB3GhjrC2Lt7oZ4Efmj8USUjVM7Bdz8B8EF6bQwN84NzSti7RwLZcFoZG5NR1iaiZY8GP2KwumVc1jGzHLvBzAv");
|
||||
assertValidAddress("CjxZDcoWCsx1wmYkmJcFpSTgqpjoFGRW9dQT8JqgwvkBaU6Q3X4MJ4QjVkNUM7GHp6NjYaTrKeH4bSRTK3mCYsHf2818vzv");
|
||||
assertValidAddress("CoCJje3bcEH2dkvb5suRy2ZiBtPBeBqWaY9sbMLEtqEvDn969eDx1zqV4FP8erJSJFK5Br6GheGnJJG7BDtG9XFbFcMkUJU");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("ZsZ46x2mzB3GhjrC2Lt7oZ4Efmj8USUjVM7Bdz8B8EF6bQwN84NzSti7RwLZcFoZG5NR1iaiZY8GP2KwumVc1jGzHLvBzAv");
|
||||
assertInvalidAddress("");
|
||||
assertInvalidAddress("CjxZDcoWCsx1wmYkmJcFpSTgqpjoFGRW9dQT8JqgwvkBaU6Q3X4MJ4QjV#NUM7GHp6NjYaTrKeH4bSRTK3mCYsHf2818vzv");
|
||||
assertInvalidAddress("CoCJje3bcEH2dkvb5suRy2ZiBtPBeBqWaY9sbMLEtqEvDn969eDx1zqV4FP8erJSJFK5Br6GheGnJJG7BDtG9XFbFcMkUJUuuuuuuuu");
|
||||
assertInvalidAddress("CsZ46x2mzB3GhjrC2Lt7oZ4Efmj8USUjVM7Bdz8B8EF6bQwN84NzSti7RwLZcFoZG5NR1iaiZY8GP2KwumVc1jGzHLvBzAv11111111");
|
||||
assertInvalidAddress("CjxZDcoWCsx1wmYkmJcFpSTgqpjoFGRW9dQT8JqgwvkBaU6Q3X4MJ4QjVkNUM7GHp6NjYaTrKeH4bSRTK3m");
|
||||
assertInvalidAddress("CjxZDcoWCsx1wmYkmJcFpSTgqpjoFGRW9dQT8JqgwvkBaU6Q3X4MJ4QjVkNUM7GHp6NjYaTrKeH4bSRTK3mCYsHf2818vzv$%");
|
||||
}
|
||||
}
|
45
assets/src/test/java/bisq/asset/coins/DragonglassTest.java
Normal file
45
assets/src/test/java/bisq/asset/coins/DragonglassTest.java
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class DragonglassTest extends AbstractAssetTest {
|
||||
|
||||
public DragonglassTest() {
|
||||
super(new Dragonglass());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("dRGLhxvCtLk1vfSD3WmFzyTN5ph2gZYvkZfxvLSrcdry95x4PPJrCKBTKDEFZYTw4bCGqoiaUWxNd8B41vqXaTY72Vi2XcvikX");
|
||||
assertValidAddress("dRGLjS5v91tDd4GDZeahUj95nkXSNQs5DMY1YStLN2hSNWD67iZh7ED7oDw841Kx6oUYouZaXmBNFcqSptNZ4dL94CbZbF53jt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("dRGLjS5v91tDd4GDZeahUj95nkXSNQs5DMY1YStLN2hSNWD67iZh7ED7oDw841Kx6oUYouZaXmBNFcqSptNZ4dL94CbZbF53j");
|
||||
assertInvalidAddress("dRGLjS5v91tDd4GDZeahUj95nkXSNQs5DMY1YStLN2hSNWD67iZh7ED7oDw841Ko6oUYouZaXmBNFcqSptNZ4dL94oUCifk4048");
|
||||
assertInvalidAddress("DRGLhxvCtLk1vfSD3WmFzyTN5ph2gZYvkZfxvLSrcdry95x4PPJrCKBTKDEFZYTw4bCGqoiaUWxNd8B41vqXaTY72Vi2XcvikX");
|
||||
assertInvalidAddress("drglhxvCtLk1vfSD3WmFzyTN5ph2gZYvkZfxvLSrcdry95x4PPJrCKBTKDEFZYTw4bCGqoiaUWxNd8B41vqXaTY72Vi2XcvikX");
|
||||
assertInvalidAddress("dRgLjS5v91tDd4GDZeahUj95nkXSNQs5DMY1YStLN2hSNWD67iZh7ED7oDw841Kx6oUYouZaXmBNFcqSptNZ4dL94CbZbF53jt");
|
||||
assertInvalidAddress("dRGlhxvCtLk1vfSD3WmFzyTN5ph2gZYvkZfxvLSrcdry95x4PPJrCKBTKDEFZYTw4bCGqoiaUWxNd8B41vqXaTY72Vi2XcvikX");
|
||||
}
|
||||
}
|
43
assets/src/test/java/bisq/asset/coins/KekcoinTest.java
Normal file
43
assets/src/test/java/bisq/asset/coins/KekcoinTest.java
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class KekcoinTest extends AbstractAssetTest {
|
||||
|
||||
public KekcoinTest() {
|
||||
super(new Kekcoin());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("KHWHFVU5ZMUfkiYEMMuXRDv1LjD2j1HJ2H");
|
||||
assertValidAddress("KSXQWsaKC9qL2e2RoeXNXY4FgQC6qUBpjD");
|
||||
assertValidAddress("KNVy3X1iuiF7Gz9a4fSYLF3RehN2yGkFvP");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("1LgfapHEPhZbRF9pMd5WPT35hFXcZS1USrW");
|
||||
assertInvalidAddress("1K5B7SDcuZvd2oUTaW9d62gwqsZkteXqA4");
|
||||
assertInvalidAddress("1GckU1XSCknLBcTGnayBVRjNsDjxqopNav");
|
||||
}
|
||||
}
|
52
assets/src/test/java/bisq/asset/coins/LokiTest.java
Normal file
52
assets/src/test/java/bisq/asset/coins/LokiTest.java
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class LokiTest extends AbstractAssetTest {
|
||||
|
||||
public LokiTest() {
|
||||
super(new Loki());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("LVjRU9UVQ9SXDm3shuHVj5hmavGfbQEVMJwgH8Kh9AyPRyXtzZ64Rpjb15L3sWK2TT6caWVYSBATECKb9pc2qf5tCbsfb6Q");
|
||||
assertValidAddress("LTmZwKAZcwhhdRMRWLgGvzY4n5fT3n9Mh33H2xnXiCNVcwmtNToP4iVSu59MNc2YNkGGPVwE5B9ra2nRQ5nYmf3kE1kzXKx");
|
||||
assertValidAddress("LQmsf1ktNYQGWD2xbY1MStfYWFi1Sm4Cd7cHVryxepwcPcaa5N6KbpHdFXYDvswNYaRS1W5JLGY52dkRDV6hCVrtBhUCAe5");
|
||||
assertValidAddress("LX3F8zHNvth1JvU5qdETsfQFF33PPKw1sHdusAaaGLhi1J1dv6rKZbN92PxpV1uW9o8T5WPwYvYwKDteTiZN2gEE3y5wMqZ");
|
||||
assertValidAddress("LWv1YaK5jJaGPCFd1wxJbZ4hHa7yGKNJeGCPC9fJCXqz8NqittAtS1xYkr5gYxnjtYKDWPB6hNQBE93bz7ZVJFtXQJrT1SZ");
|
||||
assertValidAddress("LK6DQ17G8R3zs3Xf33wCeViD2B95jgdpjAhcRsjuheJ784dumXn7g3RPAzedWpFq364jJKYL9dkQ8mY66sZG9BiCx3dmHUuhwuSMcRwr9u");
|
||||
assertValidAddress("LPDCQ17G8R3zs3Xf33wCeViD2B95jgdpjAhcRsjuheJ784dumXn7g3RPAzedWpFq364jJKYL9dkQ8mY66sZG9BiCx3dmHUuhwuSMcRwr9u");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("LWv1YaK5jJaGPCFd1wxJbZ4hHa7yGKNJeGCPC9fJCXqz8NqittAtS1xYkr5gYxnjtYKDWPB6hNQBE93bz7ZVJFtXQJrT1SZz");
|
||||
assertInvalidAddress("lWv1YaK5jJaGPCFd1wxJbZ4hHa7yGKNJeGCPC9fJCXqz8NqittAtS1xYkr5gYxnjtYKDWPB6hNQBE93bz7ZVJFtXQJrT1SZ");
|
||||
assertInvalidAddress("Wv1YaK5jJaGPCFd1wxJbZ4hHa7yGKNJeGCPC9fJCXqz8NqittAtS1xYkr5gYxnjtYKDWPB6hNQBE93bz7ZVJFtXQJrT1SZz");
|
||||
assertInvalidAddress("LWv1YaK5jJaGPCFd1wxJbZ4hHa7yGKNJeGCPC9fJCXqz8NqittAtS1xYkr5gYxnjtYKDWPB6hNQBE93bz7ZVJFtXQJrT1S");
|
||||
assertInvalidAddress("LZ6DQ17G8R3zs3Xf33wCeViD2B95jgdpjAhcRsjuheJ784dumXn7g3RPAzedWpFq364jJKYL9dkQ8mY66sZG9BiCx3dmHUuhwuSMcRwr9u");
|
||||
assertInvalidAddress("lK6DQ17G8R3zs3Xf33wCeViD2B95jgdpjAhcRsjuheJ784dumXn7g3RPAzedWpFq364jJKYL9dkQ8mY66sZG9BiCx3dmHUuhwuSMcRwr9u");
|
||||
assertInvalidAddress("LK6DQ17G8R3zs3Xf33wCeViD2B95jgdpjAhcRsjuheJ784dumXn7g3RPAzedWpFq364jJKYL9dkQ8mY66sZG9BiCx3dmHUuhwuSMcRwr9uu");
|
||||
assertInvalidAddress("LK6DQ17G8R3zs3Xf33wCeViD2B95jgdpjAhcRsjuheJ784dumXn7g3RPAzedWpFq364jJKYL9dkQ8mY66sZG9BiCx3dmHUuhwuSMcRwr9");
|
||||
}
|
||||
}
|
44
assets/src/test/java/bisq/asset/coins/MobitGlobalTest.java
Normal file
44
assets/src/test/java/bisq/asset/coins/MobitGlobalTest.java
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class MobitGlobalTest extends AbstractAssetTest {
|
||||
|
||||
public MobitGlobalTest() {
|
||||
super(new MobitGlobal());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("MKDLXTdJs1AtAJhoRddLBSimXCE6SXbyMq");
|
||||
assertValidAddress("MGr2WYY9kSLPozEcsCWSEumXNX2AJXggUR");
|
||||
assertValidAddress("MUe1HzGqzcunR1wUxHTqX9cuQNMnEjiN7D");
|
||||
assertValidAddress("MWRqbYKkQcSvtHq4GFrPvYGf8GFGsLNPcE");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("AWGfbG22DNhgP2rsKfqyFxCwi1u68BbHAA1");
|
||||
assertInvalidAddress("AWGfbG22DNhgP2rsKfqyFxCwi1u68BbHAB");
|
||||
assertInvalidAddress("AWGfbG22DNhgP2rsKfqyFxCwi1u68BbHA#");
|
||||
}
|
||||
}
|
45
assets/src/test/java/bisq/asset/coins/NeosTest.java
Normal file
45
assets/src/test/java/bisq/asset/coins/NeosTest.java
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class NeosTest extends AbstractAssetTest {
|
||||
|
||||
public NeosTest() {
|
||||
super(new Neos());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("NS5cGWdERahJ11pn12GoV5Jb7nsLzdr3kP");
|
||||
assertValidAddress("NU7nCzyQiAtTxzXLnDsJu4NhwQqrnPyJZj");
|
||||
assertValidAddress("NeeAy35aQirpmTARHEXpP8uTmpPCcSD9Qn");
|
||||
assertValidAddress("NScgetCW5bqDTVWFH3EYNMtTo5RcvDxD6B");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhemqq");
|
||||
assertInvalidAddress("NScgetCW5bqDTVWFH3EYNMtTo5Rc#DxD6B");
|
||||
assertInvalidAddress("NeeAy35a0irpmTARHEXpP8uTmpPCcSD9Qn");
|
||||
assertInvalidAddress("NScgetCWRcvDxD6B");
|
||||
}
|
||||
}
|
48
assets/src/test/java/bisq/asset/coins/PZDCTest.java
Normal file
48
assets/src/test/java/bisq/asset/coins/PZDCTest.java
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
public class PZDCTest extends AbstractAssetTest {
|
||||
|
||||
public PZDCTest() {
|
||||
super(new PZDC());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("PNxERPUbkvCYeuJk44pH8bsdQJenvEWt5J");
|
||||
assertValidAddress("PCwCT1PkW2RsxT8jTb21vRnNDQGDRcWNkM");
|
||||
assertValidAddress("PPD3mYyS3vsHBkCrbCfrZyrwCGdr6EJHgG");
|
||||
assertValidAddress("PTQDhqksrocR7Z516zbpjuXSGVD37iu8gy");
|
||||
assertValidAddress("PXtABooQW1ED9NkARTiFcZv6xUnMmrbhpt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("pGXsg0jSMzh1dSqggRvHjPvE3cnwvuXC7s");
|
||||
assertInvalidAddress("PKfRRcjwzKFq3dIqE9gq8Ztxn922W4GZhm");
|
||||
assertInvalidAddress("PXP75NnwDryYswQb9RaPFBchqLRSvBmDP");
|
||||
assertInvalidAddress("PKr3vQ7S");
|
||||
}
|
||||
}
|
46
assets/src/test/java/bisq/asset/coins/QMCoinTest.java
Normal file
46
assets/src/test/java/bisq/asset/coins/QMCoinTest.java
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class QMCoinTest extends AbstractAssetTest {
|
||||
|
||||
public QMCoinTest() {
|
||||
super(new QMCoin());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("QSXwS2opau1PYsvj4PrirPkP6LQHeKbQDx");
|
||||
assertValidAddress("QbvD8CPJwAmpQoE8CQhzcfWp1EAmT2E298");
|
||||
assertValidAddress("QUAzsb7nqp7XVsRy9vjaE4kTUpgP1pFeoL");
|
||||
assertValidAddress("QQDvVM2s3WYa8EZQS1s2esRkR4zmrjy94d");
|
||||
assertValidAddress("QgdkWtsy1inr9j8RUrqDeVnrJmhE28WnLX");
|
||||
assertValidAddress("Qii56aanBMiEPpjHoaE4zgEW4jPuhGjuj5");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhemqq");
|
||||
assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYheO");
|
||||
assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhek#");
|
||||
}
|
||||
}
|
49
assets/src/test/java/bisq/asset/coins/QRLTest.java
Normal file
49
assets/src/test/java/bisq/asset/coins/QRLTest.java
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
public class QRLTest extends AbstractAssetTest {
|
||||
|
||||
public QRLTest() {
|
||||
super(new QRL());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("Q0104008e2b38425dd2bae2b2b3a88d8df4911b0e0e5e880a71abe9e0f68296cc3560fb52dfb637");
|
||||
assertValidAddress("Q0204003808ebc69dfb4d9da48ec06bd7682091589aa4f6d7040d1f26ee1bf947e9f19fa50d253f");
|
||||
assertValidAddress("Q00050049194cc61c011dc0bccdfdccefc78cf540544520e283457ede9d3349d074883fc88497bb");
|
||||
assertValidAddress("Q010400e6f61e0a86b48e49ff34e5f7837d19e11a69aad2e8d49c1bb625bbc8f076823288a2b38b");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("Z0104008e2b38425dd2bae2b2b3a88d8df4911b0e0e5e880a71abe9e0f68296cc3560fb52dfb637");
|
||||
assertInvalidAddress("Q01A4008e2b38425dd2bae2b2b3a88d8df4911b0e0e5e880a71abe9e0f68296cc3560fb52dfb637");
|
||||
assertInvalidAddress("Q0104008e2b38425dd2bae2b2b3a88d8df4911b0e0e5e880a71abe9e0fR8296cc3560fb52dfb637");
|
||||
assertInvalidAddress("Q0104008e2b38425dd2bae2b2b3a88d8df491?b0e0e5e880a71abe9e0fR8296cc3560fb52dfb637");
|
||||
assertInvalidAddress("Q010400e6f61e0a86b48e49ff34e5f7837d19e11a69aad2e8d49c1bb625bbc8f076823288a2b");
|
||||
assertInvalidAddress("");
|
||||
}
|
||||
}
|
45
assets/src/test/java/bisq/asset/coins/RadiumTest.java
Normal file
45
assets/src/test/java/bisq/asset/coins/RadiumTest.java
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
public class RadiumTest extends AbstractAssetTest {
|
||||
|
||||
public RadiumTest() {
|
||||
super(new Radium());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("XfrvQw3Uv4oGgc535TYyBCT2uNU7ofHGDU");
|
||||
assertValidAddress("Xwgof4wf1t8TnQUJ2UokZRVwHxRt4t6Feb");
|
||||
assertValidAddress("Xep8KxEZUsCxQuvCfPdt2VHuHbp43nX7Pm");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("1LgfapHEPhZbRF9pMd5WPT35hFXcZS1USrW");
|
||||
assertInvalidAddress("1K5B7SDcuZvd2oUTaW9d62gwqsZkteXqA4");
|
||||
assertInvalidAddress("1GckU1XSCknLBcTGnayBVRjNsDjxqopNav");
|
||||
}
|
||||
}
|
50
assets/src/test/java/bisq/asset/coins/RyoTest.java
Normal file
50
assets/src/test/java/bisq/asset/coins/RyoTest.java
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
import org.junit.Test;
|
||||
|
||||
public class RyoTest extends AbstractAssetTest {
|
||||
|
||||
public RyoTest() {
|
||||
super(new Ryo());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("RYoLsinT9duNEtHGqAUicJKD2cmGiB9gB6sqHqWvV6suB4TtPSR8ynyh2vVVvNyDE6g7WEaBxCG8GD1KM2ffWP7FLXgeJbNYrp2");
|
||||
assertValidAddress("RYoSrJ7ES1wGsikGHFm69SU6dTTKt8Vi6V7BoC3wsLcc1Y2CXgQkW7vHSe5uArGU9TjUC5RtvzhCycVDnPPbThTmZA8VqDzTPeM");
|
||||
assertValidAddress("RYoKst8YBCucSywKDshsywbjc5uCi8ybSUtWgvM3LfzaYe93d4qqpsJ");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("");
|
||||
assertInvalidAddress("RYoLsinT9duNEtHGqAUicJKD2cmGiB9gB6sqHqWvV6suB4TtPSR8ynyh2vVVvNyDE6g7WEaBxCG8GD1KM2ffWP7FLXgeJbNYrp");
|
||||
assertInvalidAddress("RYoLsjCoYrxag2pPoDDTB4cRriKCNn8WjhY99kqjYuNTfE4MU2Yo1CPdpyK7PXpxDcAd5YDNerE6WCc4cVQvEbxLaHk4UcvbRp23");
|
||||
assertInvalidAddress("RYoLsinT9duNEtHGqAUicJKD2cmGiB9gB6sqHqWvV6suB4TtPSR8ynyh2vVVvNyDE6g7W!!!xCG8GD1KM2ffWP7FLXgeJbNYrp2");
|
||||
assertInvalidAddress("RYoSrJ7ES1IIIIIGHFm69SU6dTTKt8Vi6V7BoC3wsLcc1Y2CXgQkW7vHSe5uArGU9TjUC5RtvzhCycVDnPPbThTmZA8VqDzTPeM");
|
||||
assertInvalidAddress("RYoSrJ7ES1wGsikGHFm69SU6dTTKt8Vi6V7BoC3wsLcc1Y2CXgQkW7vHSe5uArGU9TjUC5RtvzhCycVDnPPbThTmZA8VqDzTPe");
|
||||
assertInvalidAddress("RYoSrJ7ES1wGsikGHFm69SU6dTTKt8Vi6V7BoC3wsLcc1Y2CXgQkW7vHSe5uArGU9TjUC5RtvzhCycVDnPPbThTmZA8VqDzTPeM1");
|
||||
assertInvalidAddress("RYoNsBB18NdcSywKDshsywbjc5uCi8ybSUtWgvM3LfzaYe93d6DEu3PcSywKDshsywbjc5uCi8ybSUtWgvM3LfzaYe93d96NjjvBCYU2SZD2of");
|
||||
assertInvalidAddress("RYoKst8YBCucSywKDshsywbjc5uCi8ybSUtWgvM3LfzaYe93d4qqpsJC");
|
||||
assertInvalidAddress("RYoKst8YBCucSywKDshsywbjc5uCi8ybSUtWgvM3LfzaYe93d4qqps");
|
||||
assertInvalidAddress("RYost8YBCucSywKDshsywbjc5uCi8ybSUtWgvM3LfzaYe93d4qqpsJ");
|
||||
}
|
||||
}
|
47
assets/src/test/java/bisq/asset/coins/SUB1XTest.java
Normal file
47
assets/src/test/java/bisq/asset/coins/SUB1XTest.java
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class SUB1XTest extends AbstractAssetTest {
|
||||
|
||||
public SUB1XTest() {
|
||||
super(new SUB1X());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("ZDxdoVuyosZ6vY3LZAP1Z4H4eXMq2ZpLH7");
|
||||
assertValidAddress("ZKi6EksPCZoMi6EGXS9vWVed4NeSov2ZS4");
|
||||
assertValidAddress("ZT29B3yDJq1jzkCTBs4LnraM3E854MAPRm");
|
||||
assertValidAddress("ZZeaSimQwza3CkFWTrRPQDamZcbntf2uMG");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("ZDxdoVuyosZ6vY3LZAP1Z4H4eXMq2ZpAC7");
|
||||
assertInvalidAddress("ZKi6EksPCZoMi6EGXS9vWVedqwfov2ZS4");
|
||||
assertInvalidAddress("ZT29B3yDJq1jzkqwrwBs4LnraM3E854MAPRm");
|
||||
assertInvalidAddress("ZZeaSimQwza3CkFWTqwrfQDamZcbntf2uMG");
|
||||
assertInvalidAddress("Z23t23f");
|
||||
assertInvalidAddress("ZZeaSimQwza3CkFWTrRPQDavZcbnta2uMGA");
|
||||
}
|
||||
}
|
43
assets/src/test/java/bisq/asset/coins/StarwelsTest.java
Normal file
43
assets/src/test/java/bisq/asset/coins/StarwelsTest.java
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class StarwelsTest extends AbstractAssetTest {
|
||||
|
||||
public StarwelsTest() {
|
||||
super(new Starwels());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("1F7EixuiBdvi9bVxEPzAgJ11GRJsdH3ihh");
|
||||
assertValidAddress("17DdVnWvz3XZPvMYHmSRSycUgt2EEv29So");
|
||||
assertValidAddress("1HuoFLoGJQCLodNDH5oCXWaR1kL8DwksJX");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("21HQQgsvLTgN9xD9hNmAgAreakzVzQUSLSHa");
|
||||
assertInvalidAddress("1HQQgsvLTgN9xD9hNmAgAreakzVzQUSLSHs");
|
||||
assertInvalidAddress("1HQQgsvLTgN9xD9hNmAgAreakzVzQUSLSH#");
|
||||
}
|
||||
}
|
48
assets/src/test/java/bisq/asset/coins/TurtleCoinTest.java
Normal file
48
assets/src/test/java/bisq/asset/coins/TurtleCoinTest.java
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class TurtleCoinTest extends AbstractAssetTest {
|
||||
|
||||
public TurtleCoinTest() {
|
||||
super(new TurtleCoin());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("TRTLv2X775FNQmN8x2UC3TVzs6trRHwUAcQSL6RUyRXR6JjwFYP8XG8VTCsi7QgPcWBJUWJk2SwaMYvrMk37T4nFVLPigMXcsf8");
|
||||
assertValidAddress("TRTLuyTzuoDL9wvoq9VcyGW9Vrp2R3161V3hSa8nZUxAL4iqbTJfFhSXpsrQunXuCGAnA72cZgYGmP7a8zJ6RrwAf5rKjwhUEU8");
|
||||
assertValidAddress("TRTLv2YGSbTgmAkZDYvRM8X6bLcJXYr4qMDTXYth9ppc2rHfnNGXPcbBTWxfRxwPTnJvFX1txGh6j9tQ9spJs3US3WwvDzkGsXC");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("TRTLv23ymatPTWgN1jncG33hMdJxZBLrBcCWQBGGGC14CFMUCq1nvxiV8d5cW92mmavzw542bpyjYXd8");
|
||||
assertInvalidAddress("TRLuxauCnCH7XZrSZSZw7XEEbkgrnZcaE1MK8wLtTYkF3g1J7nciYiaZDsTNYm2oDLTAM2JPq4rrlhVN5cXWpTPYh8P5wKbXNdoh");
|
||||
assertInvalidAddress("");
|
||||
assertInvalidAddress("TRTLv3xxpAFfXKwF5ond4sWDX3AVgZngT88KpPCCJKcuRjGktgp5HHTK2yV7NTo8659u5jwMigLmHaoFKho0OhVmF8WP9pVZhBL9kC#RoUKWRwpsx1F");
|
||||
assertInvalidAddress("TRTLuwafXHTPzj1d2wc7c9X69r3qG1277ecnLnUaZ61M1YV5d3GYAs1Jbc2q4C4fWN$C4fWNLoDLDvADvpjNYdt3sdRB434UidKXimQQn");
|
||||
assertInvalidAddress("1jRo3rcp9fjdfjdSGpx");
|
||||
assertInvalidAddress("GDARp92UtmTWDjZatG8sduRockSteadyWasHere3atrHSXr9vJzjHq2TfPrjateDz9Wc8ZJKuDayqJ$%");
|
||||
assertInvalidAddress("F3xQ8Gv6xnvDhUrM57z71bfFvu9HeofXtXpZRLnrCN2s2cKvkQowrWjJTGz4676ymKvU4NzPY8Cadgsdhsdfhg4gfJwL2yhhkJ7");
|
||||
}
|
||||
}
|
43
assets/src/test/java/bisq/asset/coins/ZeroTest.java
Normal file
43
assets/src/test/java/bisq/asset/coins/ZeroTest.java
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.coins;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class ZeroTest extends AbstractAssetTest {
|
||||
|
||||
public ZeroTest() {
|
||||
super(new Zero());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("t1cZTNaKS6juH6tGEhCUZmZhtbYGeYeuTrK");
|
||||
assertValidAddress("t1ZBPYJwK2UPbshwcYWRiCq7vw8VPDYumWu");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhem");
|
||||
assertInvalidAddress("38NwrYsD1HxQW5zfLT0QcUUXGMPvQgzTSn");
|
||||
assertInvalidAddress("8tP9rh3SH6n9cSLmV22vnSNNw56LKGpLrB");
|
||||
assertInvalidAddress("8Zbvjr");
|
||||
}
|
||||
}
|
42
assets/src/test/java/bisq/asset/tokens/EtherStoneTest.java
Normal file
42
assets/src/test/java/bisq/asset/tokens/EtherStoneTest.java
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.tokens;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class EtherStoneTest extends AbstractAssetTest {
|
||||
|
||||
public EtherStoneTest () {
|
||||
super(new EtherStone());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("0x0d81d9e21bd7c5bb095535624dcb0759e64b3899");
|
||||
assertValidAddress("0d81d9e21bd7c5bb095535624dcb0759e64b3899");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("0x65767ec6d4d3d18a200842352485cdc37cbf3a216");
|
||||
assertInvalidAddress("0x65767ec6d4d3d18a200842352485cdc37cbf3a2g");
|
||||
assertInvalidAddress("65767ec6d4d3d18a200842352485cdc37cbf3a2g");
|
||||
}
|
||||
}
|
42
assets/src/test/java/bisq/asset/tokens/GreenBlockCoinTest.java
Executable file
42
assets/src/test/java/bisq/asset/tokens/GreenBlockCoinTest.java
Executable file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.asset.tokens;
|
||||
|
||||
import bisq.asset.AbstractAssetTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class GreenBlockCoinTest extends AbstractAssetTest {
|
||||
|
||||
public GreenBlockCoinTest() {
|
||||
super(new GreenBlockCoin());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidAddresses() {
|
||||
assertValidAddress("0x2a65Aca4D5fC5B5C859090a6c34d164135398226");
|
||||
assertValidAddress("2a65Aca4D5fC5B5C859090a6c34d164135398226");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidAddresses() {
|
||||
assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d1641353982266");
|
||||
assertInvalidAddress("0x2a65Aca4D5fC5B5C859090a6c34d16413539822g");
|
||||
assertInvalidAddress("2a65Aca4D5fC5B5C859090a6c34d16413539822g");
|
||||
}
|
||||
}
|
@ -45,7 +45,7 @@ dependencies {
|
||||
compile('com.google.inject:guice:4.1.0') {
|
||||
exclude(module: 'guava')
|
||||
}
|
||||
compile('network.bisq.libdohj:libdohj-core:9573d077') {
|
||||
compile('network.bisq.libdohj:libdohj-core:d4ace7bc') {
|
||||
exclude(module: 'jsr305')
|
||||
exclude(module: 'slf4j-api')
|
||||
exclude(module: 'guava')
|
||||
|
@ -88,6 +88,10 @@ public class Log {
|
||||
logbackLogger.addAppender(errorAppender);*/
|
||||
}
|
||||
|
||||
public static void setCustomLogLevel(String pattern, Level logLevel) {
|
||||
((Logger) LoggerFactory.getLogger(pattern)).setLevel(logLevel);
|
||||
}
|
||||
|
||||
public static void traceCall() {
|
||||
if (LoggerFactory.getLogger(Log.class).isTraceEnabled()) {
|
||||
StackTraceElement stackTraceElement = new Throwable().getStackTrace()[1];
|
||||
|
@ -67,4 +67,10 @@ public abstract class NetworkEnvelope implements Envelope {
|
||||
return messageVersion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "NetworkEnvelope{" +
|
||||
"\n messageVersion=" + messageVersion +
|
||||
"\n}";
|
||||
}
|
||||
}
|
||||
|
@ -56,6 +56,7 @@ message NetworkEnvelope {
|
||||
|
||||
AddPersistableNetworkPayloadMessage add_persistable_network_payload_message = 31;
|
||||
AckMessage ack_message = 32;
|
||||
RepublishGovernanceDataRequest republish_governance_data_request = 33;
|
||||
}
|
||||
}
|
||||
|
||||
@ -319,6 +320,9 @@ message NewBlockBroadcastMessage {
|
||||
BaseBlock raw_block = 1;
|
||||
}
|
||||
|
||||
message RepublishGovernanceDataRequest {
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Payload
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -931,6 +935,9 @@ message PersistableEnvelope {
|
||||
MyBlindVoteList my_blind_vote_list = 22;
|
||||
MeritList merit_list = 23;
|
||||
BondedRoleList bonded_role_list = 24;
|
||||
RemovedAssetList removed_asset_list = 25;
|
||||
EvaluatedProposalList evaluated_proposal_list = 26;
|
||||
DecryptedBallotsWithMeritsList decrypted_ballots_with_merits_list = 27;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1336,7 +1343,6 @@ message Tx {
|
||||
repeated BaseTxOutput tx_outputs = 1;
|
||||
TxType txType = 2;
|
||||
int64 burnt_fee = 3;
|
||||
int32 unlock_block_height = 4;
|
||||
}
|
||||
|
||||
enum TxType {
|
||||
@ -1351,8 +1357,8 @@ enum TxType {
|
||||
COMPENSATION_REQUEST = 8;
|
||||
BLIND_VOTE = 9;
|
||||
VOTE_REVEAL = 10;
|
||||
LOCK_UP = 11;
|
||||
UN_LOCK = 12;
|
||||
LOCKUP = 11;
|
||||
UNLOCK = 12;
|
||||
}
|
||||
|
||||
message TxInput {
|
||||
@ -1381,25 +1387,26 @@ message RawTxOutput {
|
||||
message TxOutput {
|
||||
TxOutputType tx_output_type = 1;
|
||||
int32 lock_time = 2;
|
||||
int32 unlock_block_height = 3;
|
||||
}
|
||||
|
||||
enum TxOutputType {
|
||||
PB_ERROR_TX_OUTPUT_TYPE = 0;
|
||||
UNDEFINED = 1;
|
||||
UNDEFINED_OUTPUT = 1;
|
||||
GENESIS_OUTPUT = 2;
|
||||
BSQ_OUTPUT = 3;
|
||||
BTC_OUTPUT = 4;
|
||||
PROPOSAL_OP_RETURN_OUTPUT = 5;
|
||||
COMP_REQ_OP_RETURN_OUTPUT = 6;
|
||||
ISSUANCE_CANDIDATE_OUTPUT = 7;
|
||||
BLIND_VOTE_LOCK_STAKE_OUTPUT = 8;
|
||||
BLIND_VOTE_OP_RETURN_OUTPUT = 9;
|
||||
VOTE_REVEAL_UNLOCK_STAKE_OUTPUT = 10;
|
||||
VOTE_REVEAL_OP_RETURN_OUTPUT = 11;
|
||||
BOND_LOCK = 12;
|
||||
BOND_LOCK_OP_RETURN_OUTPUT = 13;
|
||||
BOND_UNLOCK = 14;
|
||||
BOND_UNLOCK_OP_RETURN_OUTPUT = 15;
|
||||
CONFISCATE_BOND_OP_RETURN_OUTPUT = 7;
|
||||
ISSUANCE_CANDIDATE_OUTPUT = 8;
|
||||
BLIND_VOTE_LOCK_STAKE_OUTPUT = 9;
|
||||
BLIND_VOTE_OP_RETURN_OUTPUT = 10;
|
||||
VOTE_REVEAL_UNLOCK_STAKE_OUTPUT = 11;
|
||||
VOTE_REVEAL_OP_RETURN_OUTPUT = 12;
|
||||
LOCKUP_OUTPUT = 13;
|
||||
LOCKUP_OP_RETURN_OUTPUT = 14;
|
||||
UNLOCK_OUTPUT = 15;
|
||||
INVALID_OUTPUT = 16;
|
||||
}
|
||||
|
||||
@ -1470,11 +1477,11 @@ message Proposal {
|
||||
string tx_id = 5;
|
||||
oneof message {
|
||||
CompensationProposal compensation_proposal = 6;
|
||||
GenericProposal generic_proposal = 7;
|
||||
ChangeParamProposal change_param_proposal = 8;
|
||||
RemoveAltcoinProposal remove_altcoin_proposal = 9;
|
||||
ConfiscateBondProposal confiscate_bond_proposal = 10;
|
||||
BondedRoleProposal bonded_role_proposal = 11;
|
||||
ChangeParamProposal change_param_proposal = 7;
|
||||
BondedRoleProposal bonded_role_proposal = 8;
|
||||
ConfiscateBondProposal confiscate_bond_proposal = 9;
|
||||
GenericProposal generic_proposal = 10;
|
||||
RemoveAssetProposal remove_asset_proposal = 11;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1483,24 +1490,32 @@ message CompensationProposal {
|
||||
string bsq_address = 2;
|
||||
}
|
||||
|
||||
message GenericProposal {
|
||||
}
|
||||
|
||||
message ChangeParamProposal {
|
||||
string param = 1; // name of enum
|
||||
int64 param_value = 2;
|
||||
}
|
||||
|
||||
message RemoveAltcoinProposal {
|
||||
string currency_code = 1;
|
||||
message BondedRoleProposal {
|
||||
BondedRole bonded_role = 1;
|
||||
}
|
||||
|
||||
message ConfiscateBondProposal {
|
||||
bytes hash = 1;
|
||||
}
|
||||
|
||||
message BondedRoleProposal {
|
||||
BondedRole bonded_role = 1;
|
||||
message GenericProposal {
|
||||
}
|
||||
|
||||
message RemoveAssetProposal {
|
||||
string ticker_symbol = 1;
|
||||
}
|
||||
|
||||
message RemovedAsset {
|
||||
string ticker_symbol = 1;
|
||||
string remove_reason = 2;
|
||||
}
|
||||
message RemovedAssetList {
|
||||
repeated RemovedAsset removed_asset = 1;
|
||||
}
|
||||
|
||||
message BondedRole {
|
||||
@ -1616,6 +1631,39 @@ message MeritList {
|
||||
repeated Merit merit = 1;
|
||||
}
|
||||
|
||||
message ProposalVoteResult {
|
||||
Proposal proposal = 1;
|
||||
int64 stake_of_Accepted_votes = 2;
|
||||
int64 stake_of_Rejected_votes = 3;
|
||||
int32 num_accepted_votes = 4;
|
||||
int32 num_rejected_votes = 5;
|
||||
int32 num_ignored_votes = 6;
|
||||
}
|
||||
|
||||
message EvaluatedProposal {
|
||||
bool is_accepted = 1;
|
||||
ProposalVoteResult proposal_vote_result = 2;
|
||||
int64 required_quorum = 3;
|
||||
int64 required_threshold = 4;
|
||||
}
|
||||
|
||||
message EvaluatedProposalList {
|
||||
repeated EvaluatedProposal evaluated_proposal = 1;
|
||||
}
|
||||
|
||||
message DecryptedBallotsWithMerits {
|
||||
bytes hash_of_blind_vote_list = 1;
|
||||
string vote_reveal_tx_id = 2;
|
||||
string blind_vote_tx_id = 3;
|
||||
int64 stake = 4;
|
||||
BallotList ballot_list = 5;
|
||||
MeritList merit_list = 6;
|
||||
}
|
||||
|
||||
message DecryptedBallotsWithMeritsList {
|
||||
repeated DecryptedBallotsWithMerits decrypted_ballots_with_merits = 1;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Misc
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -24,7 +24,7 @@ dependencies {
|
||||
compile project(':assets')
|
||||
compile project(':p2p')
|
||||
compile 'net.sf.jopt-simple:jopt-simple:5.0.3'
|
||||
compile('network.bisq.btcd-cli4j:btcd-cli4j-core:cb5c474b') {
|
||||
compile('network.bisq.btcd-cli4j:btcd-cli4j-core:3864e1c4') {
|
||||
exclude(module: 'slf4j-api')
|
||||
exclude(module: 'httpclient')
|
||||
exclude(module: 'commons-lang3')
|
||||
@ -32,7 +32,7 @@ dependencies {
|
||||
exclude(module: 'jackson-annotations')
|
||||
exclude(module: 'jackson-databind')
|
||||
}
|
||||
compile('network.bisq.btcd-cli4j:btcd-cli4j-daemon:cb5c474b') {
|
||||
compile('network.bisq.btcd-cli4j:btcd-cli4j-daemon:3864e1c4') {
|
||||
exclude(module: 'slf4j-api')
|
||||
exclude(module: 'httpclient')
|
||||
exclude(module: 'commons-lang3')
|
||||
|
@ -19,7 +19,7 @@ package bisq.core;
|
||||
|
||||
import bisq.core.alert.AlertModule;
|
||||
import bisq.core.app.AppOptionKeys;
|
||||
import bisq.core.app.AvoidStandbyMode;
|
||||
import bisq.core.app.AvoidStandbyModeService;
|
||||
import bisq.core.app.BisqEnvironment;
|
||||
import bisq.core.app.BisqFacade;
|
||||
import bisq.core.app.BisqSetup;
|
||||
@ -94,7 +94,7 @@ public class CoreModule extends AppModule {
|
||||
bind(Preferences.class).in(Singleton.class);
|
||||
bind(BridgeAddressProvider.class).to(Preferences.class).in(Singleton.class);
|
||||
bind(CorruptedDatabaseFilesHandler.class).in(Singleton.class);
|
||||
bind(AvoidStandbyMode.class).in(Singleton.class);
|
||||
bind(AvoidStandbyModeService.class).in(Singleton.class);
|
||||
|
||||
bind(SeedNodeAddressLookup.class).in(Singleton.class);
|
||||
bind(SeedNodeRepository.class).to(DefaultSeedNodeRepository.class).in(Singleton.class);
|
||||
|
@ -40,18 +40,18 @@ import javax.sound.sampled.DataLine;
|
||||
import javax.sound.sampled.SourceDataLine;
|
||||
|
||||
@Slf4j
|
||||
public class AvoidStandbyMode {
|
||||
public class AvoidStandbyModeService {
|
||||
private final Preferences preferences;
|
||||
private volatile boolean isStopped;
|
||||
|
||||
@Inject
|
||||
public AvoidStandbyMode(Preferences preferences) {
|
||||
public AvoidStandbyModeService(Preferences preferences) {
|
||||
this.preferences = preferences;
|
||||
|
||||
preferences.getUseStandbyModeProperty().addListener((observable, oldValue, newValue) -> {
|
||||
if (newValue) {
|
||||
isStopped = true;
|
||||
log.info("AvoidStandbyMode stopped");
|
||||
log.info("AvoidStandbyModeService stopped");
|
||||
} else {
|
||||
start();
|
||||
}
|
||||
@ -67,9 +67,9 @@ public class AvoidStandbyMode {
|
||||
|
||||
private void start() {
|
||||
isStopped = false;
|
||||
log.info("AvoidStandbyMode started");
|
||||
log.info("AvoidStandbyModeService started");
|
||||
Thread thread = new Thread(this::play);
|
||||
thread.setName("AvoidStandbyMode-thread");
|
||||
thread.setName("AvoidStandbyModeService-thread");
|
||||
thread.start();
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ public class BisqEnvironment extends StandardEnvironment {
|
||||
"";
|
||||
genesisBlockHeight = commandLineProperties.containsProperty(DaoOptionKeys.GENESIS_BLOCK_HEIGHT) ?
|
||||
(String) commandLineProperties.getProperty(DaoOptionKeys.GENESIS_BLOCK_HEIGHT) :
|
||||
"";
|
||||
"-1";
|
||||
daoActivated = commandLineProperties.containsProperty(DaoOptionKeys.DAO_ACTIVATED) ?
|
||||
(String) commandLineProperties.getProperty(DaoOptionKeys.DAO_ACTIVATED) :
|
||||
"";
|
||||
|
@ -18,11 +18,12 @@
|
||||
package bisq.core.app;
|
||||
|
||||
import bisq.core.arbitration.ArbitratorManager;
|
||||
import bisq.core.btc.BaseCurrencyNetwork;
|
||||
import bisq.core.btc.BtcOptionKeys;
|
||||
import bisq.core.btc.RegTestHost;
|
||||
import bisq.core.btc.setup.RegTestHost;
|
||||
import bisq.core.btc.setup.WalletsSetup;
|
||||
import bisq.core.btc.wallet.BsqWalletService;
|
||||
import bisq.core.btc.wallet.BtcWalletService;
|
||||
import bisq.core.btc.wallet.WalletsSetup;
|
||||
import bisq.core.dao.DaoOptionKeys;
|
||||
import bisq.core.dao.DaoSetup;
|
||||
import bisq.core.exceptions.BisqException;
|
||||
@ -208,7 +209,11 @@ public abstract class BisqExecutable implements GracefulShutDownHandler {
|
||||
|
||||
protected void setupDevEnv() {
|
||||
DevEnv.setDevMode(injector.getInstance(Key.get(Boolean.class, Names.named(CommonOptionKeys.USE_DEV_MODE))));
|
||||
DevEnv.setDaoActivated(injector.getInstance(Key.get(Boolean.class, Names.named(DaoOptionKeys.DAO_ACTIVATED))));
|
||||
|
||||
BaseCurrencyNetwork baseCurrencyNetwork = BisqEnvironment.getBaseCurrencyNetwork();
|
||||
boolean isRegTestOrTestNet = (baseCurrencyNetwork.isTestnet() || baseCurrencyNetwork.isRegtest());
|
||||
boolean isDaoActivatedOptionSet = injector.getInstance(Key.get(Boolean.class, Names.named(DaoOptionKeys.DAO_ACTIVATED)));
|
||||
DevEnv.setDaoActivated(isDaoActivatedOptionSet || isRegTestOrTestNet);
|
||||
}
|
||||
|
||||
private void setCorruptedDataBaseFilesHandler() {
|
||||
@ -432,7 +437,7 @@ public abstract class BisqExecutable implements GracefulShutDownHandler {
|
||||
description("Genesis transaction ID when not using the hard coded one", ""))
|
||||
.withRequiredArg();
|
||||
parser.accepts(DaoOptionKeys.GENESIS_BLOCK_HEIGHT,
|
||||
description("Genesis transaction block height when not using the hard coded one", ""))
|
||||
description("Genesis transaction block height when not using the hard coded one", -1))
|
||||
.withRequiredArg();
|
||||
parser.accepts(DaoOptionKeys.DAO_ACTIVATED,
|
||||
description("Developer flag. If true it enables dao phase 2 features.", false))
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
package bisq.core.app;
|
||||
|
||||
import bisq.core.btc.BalanceModel;
|
||||
import bisq.core.btc.model.BalanceModel;
|
||||
import bisq.core.presentation.BalancePresentation;
|
||||
|
||||
import bisq.common.app.Version;
|
||||
|
@ -92,6 +92,7 @@ public class BisqHeadlessApp implements HeadlessApp {
|
||||
bisqSetup.setDisplaySecurityRecommendationHandler(key -> log.info("onDisplaySecurityRecommendationHandler"));
|
||||
bisqSetup.setDisplayLocalhostHandler(key -> log.info("onDisplayLocalhostHandler"));
|
||||
bisqSetup.setWrongOSArchitectureHandler(msg -> log.info("onWrongOSArchitectureHandler. msg={}", msg));
|
||||
bisqSetup.setVoteResultExceptionHandler(voteResultException -> log.info("voteResultException={}", voteResultException));
|
||||
|
||||
//TODO move to bisqSetup
|
||||
corruptedDatabaseFilesHandler.getCorruptedDatabaseFiles().ifPresent(files -> log.info("getCorruptedDatabaseFiles. files={}", files));
|
||||
|
@ -23,13 +23,15 @@ import bisq.core.alert.PrivateNotificationManager;
|
||||
import bisq.core.alert.PrivateNotificationPayload;
|
||||
import bisq.core.arbitration.ArbitratorManager;
|
||||
import bisq.core.arbitration.DisputeManager;
|
||||
import bisq.core.btc.AddressEntry;
|
||||
import bisq.core.btc.BalanceModel;
|
||||
import bisq.core.btc.listeners.BalanceListener;
|
||||
import bisq.core.btc.model.AddressEntry;
|
||||
import bisq.core.btc.model.BalanceModel;
|
||||
import bisq.core.btc.setup.WalletsSetup;
|
||||
import bisq.core.btc.wallet.BtcWalletService;
|
||||
import bisq.core.btc.wallet.WalletsManager;
|
||||
import bisq.core.btc.wallet.WalletsSetup;
|
||||
import bisq.core.dao.DaoSetup;
|
||||
import bisq.core.dao.governance.voteresult.VoteResultException;
|
||||
import bisq.core.dao.governance.voteresult.VoteResultService;
|
||||
import bisq.core.filter.FilterManager;
|
||||
import bisq.core.locale.Res;
|
||||
import bisq.core.notifications.MobileNotificationService;
|
||||
@ -61,6 +63,7 @@ import bisq.common.Clock;
|
||||
import bisq.common.Timer;
|
||||
import bisq.common.UserThread;
|
||||
import bisq.common.app.DevEnv;
|
||||
import bisq.common.app.Log;
|
||||
import bisq.common.crypto.CryptoException;
|
||||
import bisq.common.crypto.KeyRing;
|
||||
import bisq.common.crypto.SealedAndSigned;
|
||||
@ -88,8 +91,6 @@ import javafx.collections.SetChangeListener;
|
||||
|
||||
import org.spongycastle.crypto.params.KeyParameter;
|
||||
|
||||
import java.security.Security;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Socket;
|
||||
|
||||
@ -101,6 +102,8 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import ch.qos.logback.classic.Level;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -146,6 +149,7 @@ public class BisqSetup {
|
||||
private final DisputeMsgEvents disputeMsgEvents;
|
||||
private final PriceAlert priceAlert;
|
||||
private final MarketAlerts marketAlerts;
|
||||
private final VoteResultService voteResultService;
|
||||
private final BSFormatter formatter;
|
||||
@Setter
|
||||
@Nullable
|
||||
@ -172,6 +176,9 @@ public class BisqSetup {
|
||||
private BiConsumer<Alert, String> displayUpdateHandler;
|
||||
@Setter
|
||||
@Nullable
|
||||
private Consumer<VoteResultException> voteResultExceptionHandler;
|
||||
@Setter
|
||||
@Nullable
|
||||
private Consumer<PrivateNotificationPayload> displayPrivateNotificationHandler;
|
||||
|
||||
@Getter
|
||||
@ -215,6 +222,7 @@ public class BisqSetup {
|
||||
DisputeMsgEvents disputeMsgEvents,
|
||||
PriceAlert priceAlert,
|
||||
MarketAlerts marketAlerts,
|
||||
VoteResultService voteResultService,
|
||||
BSFormatter formatter) {
|
||||
|
||||
|
||||
@ -250,6 +258,7 @@ public class BisqSetup {
|
||||
this.disputeMsgEvents = disputeMsgEvents;
|
||||
this.priceAlert = priceAlert;
|
||||
this.marketAlerts = marketAlerts;
|
||||
this.voteResultService = voteResultService;
|
||||
this.formatter = formatter;
|
||||
}
|
||||
|
||||
@ -404,7 +413,6 @@ public class BisqSetup {
|
||||
step3();
|
||||
});
|
||||
} catch (Throwable e) {
|
||||
log.info("Localhost Bitcoin node not detected.");
|
||||
UserThread.execute(BisqSetup.this::step3);
|
||||
} finally {
|
||||
if (socket != null) {
|
||||
@ -471,6 +479,11 @@ public class BisqSetup {
|
||||
walletInitialized.addListener(walletInitializedListener);
|
||||
else if (displayTorNetworkSettingsHandler != null)
|
||||
displayTorNetworkSettingsHandler.accept(true);
|
||||
|
||||
log.info("Set log level for org.berndpruenster.netlayer classes to DEBUG to show more details for " +
|
||||
"Tor network connection issues");
|
||||
Log.setCustomLogLevel("org.berndpruenster.netlayer", Level.DEBUG);
|
||||
|
||||
}, STARTUP_TIMEOUT_MINUTES, TimeUnit.MINUTES);
|
||||
|
||||
p2pNetworkReady = p2PNetworkSetup.init(this::initWallet, displayTorNetworkSettingsHandler);
|
||||
@ -627,6 +640,15 @@ public class BisqSetup {
|
||||
}
|
||||
});
|
||||
|
||||
voteResultService.getVoteResultExceptions().addListener((ListChangeListener<VoteResultException>) c -> {
|
||||
c.next();
|
||||
if (c.wasAdded() && voteResultExceptionHandler != null) {
|
||||
c.getAddedSubList().forEach(e -> {
|
||||
voteResultExceptionHandler.accept(e);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
mobileNotificationService.onAllServicesInitialized();
|
||||
myOfferTakenEvents.onAllServicesInitialized();
|
||||
tradeEvents.onAllServicesInitialized();
|
||||
|
@ -77,8 +77,6 @@ public class P2PNetworkSetup {
|
||||
}
|
||||
|
||||
BooleanProperty init(Runnable initWalletServiceHandler, @Nullable Consumer<Boolean> displayTorNetworkSettingsHandler) {
|
||||
log.info("init");
|
||||
|
||||
StringProperty bootstrapState = new SimpleStringProperty();
|
||||
StringProperty bootstrapWarning = new SimpleStringProperty();
|
||||
BooleanProperty hiddenServicePublished = new SimpleBooleanProperty();
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
package bisq.core.app;
|
||||
|
||||
import bisq.core.btc.setup.WalletsSetup;
|
||||
import bisq.core.btc.wallet.WalletsManager;
|
||||
import bisq.core.btc.wallet.WalletsSetup;
|
||||
import bisq.core.locale.Res;
|
||||
import bisq.core.user.Preferences;
|
||||
import bisq.core.util.BSFormatter;
|
||||
|
@ -18,10 +18,12 @@
|
||||
package bisq.core.app.misc;
|
||||
|
||||
import bisq.core.dao.DaoSetup;
|
||||
import bisq.core.dao.governance.asset.AssetService;
|
||||
import bisq.core.dao.governance.ballot.BallotListService;
|
||||
import bisq.core.dao.governance.blindvote.MyBlindVoteListService;
|
||||
import bisq.core.dao.governance.myvote.MyVoteListService;
|
||||
import bisq.core.dao.governance.role.BondedRolesService;
|
||||
import bisq.core.dao.governance.voteresult.VoteResultService;
|
||||
import bisq.core.filter.FilterManager;
|
||||
import bisq.core.payment.AccountAgeWitnessService;
|
||||
import bisq.core.trade.statistics.TradeStatisticsManager;
|
||||
@ -50,7 +52,9 @@ public class AppSetupWithP2PAndDAO extends AppSetupWithP2P {
|
||||
MyVoteListService myVoteListService,
|
||||
BallotListService ballotListService,
|
||||
MyBlindVoteListService myBlindVoteListService,
|
||||
BondedRolesService bondedRolesService) {
|
||||
BondedRolesService bondedRolesService,
|
||||
AssetService assetService,
|
||||
VoteResultService voteResultService) {
|
||||
super(encryptionService,
|
||||
keyRing,
|
||||
p2PService,
|
||||
@ -64,6 +68,8 @@ public class AppSetupWithP2PAndDAO extends AppSetupWithP2P {
|
||||
persistedDataHosts.add(ballotListService);
|
||||
persistedDataHosts.add(myBlindVoteListService);
|
||||
persistedDataHosts.add(bondedRolesService);
|
||||
persistedDataHosts.add(assetService);
|
||||
persistedDataHosts.add(voteResultService);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -21,9 +21,9 @@ import bisq.core.app.AppOptionKeys;
|
||||
import bisq.core.app.BisqEnvironment;
|
||||
import bisq.core.app.BisqExecutable;
|
||||
import bisq.core.arbitration.ArbitratorManager;
|
||||
import bisq.core.btc.setup.WalletsSetup;
|
||||
import bisq.core.btc.wallet.BsqWalletService;
|
||||
import bisq.core.btc.wallet.BtcWalletService;
|
||||
import bisq.core.btc.wallet.WalletsSetup;
|
||||
import bisq.core.offer.OpenOfferManager;
|
||||
|
||||
import bisq.network.p2p.P2PService;
|
||||
|
@ -24,12 +24,12 @@ import bisq.core.arbitration.messages.OpenNewDisputeMessage;
|
||||
import bisq.core.arbitration.messages.PeerOpenedDisputeMessage;
|
||||
import bisq.core.arbitration.messages.PeerPublishedDisputePayoutTxMessage;
|
||||
import bisq.core.btc.exceptions.TransactionVerificationException;
|
||||
import bisq.core.btc.exceptions.TxBroadcastException;
|
||||
import bisq.core.btc.exceptions.WalletException;
|
||||
import bisq.core.btc.setup.WalletsSetup;
|
||||
import bisq.core.btc.wallet.BtcWalletService;
|
||||
import bisq.core.btc.wallet.TradeWalletService;
|
||||
import bisq.core.btc.wallet.TxBroadcastException;
|
||||
import bisq.core.btc.wallet.TxBroadcaster;
|
||||
import bisq.core.btc.wallet.WalletsSetup;
|
||||
import bisq.core.locale.Res;
|
||||
import bisq.core.offer.OpenOffer;
|
||||
import bisq.core.offer.OpenOfferManager;
|
||||
|
@ -17,9 +17,6 @@
|
||||
|
||||
package bisq.core.btc;
|
||||
|
||||
import bisq.core.app.BisqEnvironment;
|
||||
import bisq.core.provider.fee.FeeService;
|
||||
|
||||
import org.libdohj.params.DashMainNetParams;
|
||||
import org.libdohj.params.DashRegTestParams;
|
||||
import org.libdohj.params.DashTestNet3Params;
|
||||
@ -67,6 +64,10 @@ public enum BaseCurrencyNetwork {
|
||||
return "MAINNET".equals(network);
|
||||
}
|
||||
|
||||
public boolean isTestnet() {
|
||||
return "TESTNET".equals(network);
|
||||
}
|
||||
|
||||
public boolean isRegtest() {
|
||||
return "REGTEST".equals(network);
|
||||
}
|
||||
@ -84,15 +85,6 @@ public enum BaseCurrencyNetwork {
|
||||
}
|
||||
|
||||
public long getDefaultMinFeePerByte() {
|
||||
switch (BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode()) {
|
||||
case "BTC":
|
||||
return 1;
|
||||
case "LTC":
|
||||
return FeeService.LTC_REFERENCE_DEFAULT_MIN_TX_FEE.value;
|
||||
case "DASH":
|
||||
return FeeService.DASH_REFERENCE_DEFAULT_MIN_TX_FEE.value;
|
||||
default:
|
||||
throw new RuntimeException("Unsupported code at getDefaultMinFee: " + BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode());
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -18,12 +18,16 @@
|
||||
package bisq.core.btc;
|
||||
|
||||
import bisq.core.app.AppOptionKeys;
|
||||
import bisq.core.btc.model.AddressEntryList;
|
||||
import bisq.core.btc.model.BalanceModel;
|
||||
import bisq.core.btc.nodes.BtcNodes;
|
||||
import bisq.core.btc.setup.RegTestHost;
|
||||
import bisq.core.btc.setup.WalletsSetup;
|
||||
import bisq.core.btc.wallet.BsqCoinSelector;
|
||||
import bisq.core.btc.wallet.BsqWalletService;
|
||||
import bisq.core.btc.wallet.BtcWalletService;
|
||||
import bisq.core.btc.wallet.NonBsqCoinSelector;
|
||||
import bisq.core.btc.wallet.TradeWalletService;
|
||||
import bisq.core.btc.wallet.WalletsSetup;
|
||||
import bisq.core.provider.PriceNodeHttpClient;
|
||||
import bisq.core.provider.ProvidersRepository;
|
||||
import bisq.core.provider.fee.FeeProvider;
|
||||
@ -73,7 +77,7 @@ public class BitcoinModule extends AppModule {
|
||||
bind(TradeWalletService.class).in(Singleton.class);
|
||||
bind(BsqCoinSelector.class).in(Singleton.class);
|
||||
bind(NonBsqCoinSelector.class).in(Singleton.class);
|
||||
bind(BitcoinNodes.class).in(Singleton.class);
|
||||
bind(BtcNodes.class).in(Singleton.class);
|
||||
bind(BalanceModel.class).in(Singleton.class);
|
||||
|
||||
bind(PriceNodeHttpClient.class).in(Singleton.class);
|
||||
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// This package is not used atm but might be used in future when we need to lookup non-wallet transactions
|
||||
|
||||
package bisq.core.btc.blockchain;
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc;
|
||||
package bisq.core.btc.exceptions;
|
||||
|
||||
public class AddressEntryException extends Exception {
|
||||
public AddressEntryException(String message) {
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.exceptions;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
import org.bitcoinj.core.InsufficientMoneyException;
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc;
|
||||
package bisq.core.btc.exceptions;
|
||||
|
||||
public class InsufficientFundsException extends Exception {
|
||||
public InsufficientFundsException(String message) {
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.exceptions;
|
||||
|
||||
import lombok.Getter;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.exceptions;
|
||||
|
||||
import org.bitcoinj.core.Transaction;
|
||||
import org.bitcoinj.wallet.Wallet;
|
||||
@ -35,10 +35,9 @@ public class TxBroadcastTimeoutException extends TxBroadcastException {
|
||||
private final Wallet wallet;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param localTx The tx we sent out
|
||||
* @param delay The timeout delay
|
||||
* @param wallet Wallet is needed if a client is calling wallet.commitTx(tx)
|
||||
* @param localTx The tx we sent out
|
||||
* @param delay The timeout delay
|
||||
* @param wallet Wallet is needed if a client is calling wallet.commitTx(tx)
|
||||
*/
|
||||
public TxBroadcastTimeoutException(Transaction localTx, int delay, Wallet wallet) {
|
||||
super("The transaction was not broadcasted in " + delay +
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.exceptions;
|
||||
|
||||
import org.bitcoinj.core.Transaction;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.listeners;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc;
|
||||
package bisq.core.btc.model;
|
||||
|
||||
import bisq.core.app.BisqEnvironment;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc;
|
||||
package bisq.core.btc.model;
|
||||
|
||||
import bisq.common.proto.persistable.PersistableEnvelope;
|
||||
import bisq.common.proto.persistable.PersistedDataHost;
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc;
|
||||
package bisq.core.btc.model;
|
||||
|
||||
import bisq.core.btc.wallet.BtcWalletService;
|
||||
import bisq.core.offer.OpenOfferManager;
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.data;
|
||||
package bisq.core.btc.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.data;
|
||||
package bisq.core.btc.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.data;
|
||||
package bisq.core.btc.model;
|
||||
|
||||
import bisq.common.proto.network.NetworkPayload;
|
||||
import bisq.common.proto.persistable.PersistablePayload;
|
@ -15,7 +15,9 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.nodes;
|
||||
|
||||
import bisq.core.btc.setup.WalletConfig;
|
||||
|
||||
import bisq.network.Socks5MultiDiscovery;
|
||||
|
||||
@ -32,8 +34,8 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
class WalletNetworkConfig {
|
||||
private static final Logger log = LoggerFactory.getLogger(WalletNetworkConfig.class);
|
||||
public class BtcNetworkConfig {
|
||||
private static final Logger log = LoggerFactory.getLogger(BtcNetworkConfig.class);
|
||||
|
||||
@Nullable
|
||||
private final Socks5Proxy proxy;
|
||||
@ -41,15 +43,15 @@ class WalletNetworkConfig {
|
||||
private final NetworkParameters parameters;
|
||||
private final int socks5DiscoverMode;
|
||||
|
||||
WalletNetworkConfig(WalletConfig delegate, NetworkParameters parameters, int socks5DiscoverMode,
|
||||
@Nullable Socks5Proxy proxy) {
|
||||
public BtcNetworkConfig(WalletConfig delegate, NetworkParameters parameters, int socks5DiscoverMode,
|
||||
@Nullable Socks5Proxy proxy) {
|
||||
this.delegate = delegate;
|
||||
this.parameters = parameters;
|
||||
this.socks5DiscoverMode = socks5DiscoverMode;
|
||||
this.proxy = proxy;
|
||||
}
|
||||
|
||||
void proposePeers(List<PeerAddress> peers) {
|
||||
public void proposePeers(List<PeerAddress> peers) {
|
||||
if (!peers.isEmpty()) {
|
||||
log.info("You connect with peerAddresses: {}", peers);
|
||||
PeerAddress[] peerAddresses = peers.toArray(new PeerAddress[peers.size()]);
|
@ -15,9 +15,9 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.nodes;
|
||||
|
||||
import bisq.core.btc.BitcoinNodes.BtcNode;
|
||||
import bisq.core.btc.nodes.BtcNodes.BtcNode;
|
||||
|
||||
import bisq.network.DnsLookupException;
|
||||
import bisq.network.DnsLookupTor;
|
@ -15,7 +15,7 @@
|
||||
* along with bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc;
|
||||
package bisq.core.btc.nodes;
|
||||
|
||||
import bisq.core.app.BisqEnvironment;
|
||||
|
||||
@ -35,7 +35,7 @@ import static com.google.common.base.Preconditions.checkArgument;
|
||||
|
||||
// Managed here: https://github.com/bisq-network/roles/issues/39
|
||||
@Slf4j
|
||||
public class BitcoinNodes {
|
||||
public class BtcNodes {
|
||||
|
||||
public enum BitcoinNodesOption {
|
||||
PROVIDED,
|
||||
@ -82,10 +82,10 @@ public class BitcoinNodes {
|
||||
return BisqEnvironment.getBaseCurrencyNetwork().isBitcoin() && BisqEnvironment.getBaseCurrencyNetwork().isMainnet();
|
||||
}
|
||||
|
||||
public static List<BitcoinNodes.BtcNode> toBtcNodesList(Collection<String> nodes) {
|
||||
public static List<BtcNodes.BtcNode> toBtcNodesList(Collection<String> nodes) {
|
||||
return nodes.stream()
|
||||
.filter(e -> !e.isEmpty())
|
||||
.map(BitcoinNodes.BtcNode::fromFullAddress)
|
||||
.map(BtcNodes.BtcNode::fromFullAddress)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
@ -15,9 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
|
||||
import bisq.core.btc.BitcoinNodes.BtcNode;
|
||||
package bisq.core.btc.nodes;
|
||||
|
||||
import org.bitcoinj.core.PeerAddress;
|
||||
|
||||
@ -31,20 +29,20 @@ import java.util.stream.Stream;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
class PeerAddressesRepository {
|
||||
public class BtcNodesRepository {
|
||||
private final BtcNodeConverter converter;
|
||||
private final List<BtcNode> nodes;
|
||||
private final List<BtcNodes.BtcNode> nodes;
|
||||
|
||||
PeerAddressesRepository(BtcNodeConverter converter, List<BtcNode> nodes) {
|
||||
public BtcNodesRepository(List<BtcNodes.BtcNode> nodes) {
|
||||
this(new BtcNodeConverter(), nodes);
|
||||
}
|
||||
|
||||
public BtcNodesRepository(BtcNodeConverter converter, List<BtcNodes.BtcNode> nodes) {
|
||||
this.converter = converter;
|
||||
this.nodes = nodes;
|
||||
}
|
||||
|
||||
PeerAddressesRepository(List<BtcNode> nodes) {
|
||||
this(new BtcNodeConverter(), nodes);
|
||||
}
|
||||
|
||||
List<PeerAddress> getPeerAddresses(@Nullable Socks5Proxy proxy, boolean isUseClearNodesWithProxies) {
|
||||
public List<PeerAddress> getPeerAddresses(@Nullable Socks5Proxy proxy, boolean isUseClearNodesWithProxies) {
|
||||
List<PeerAddress> result;
|
||||
// We connect to onion nodes only in case we use Tor for BitcoinJ (default) to avoid privacy leaks at
|
||||
// exit nodes with bloom filters.
|
||||
@ -65,28 +63,26 @@ class PeerAddressesRepository {
|
||||
|
||||
private List<PeerAddress> getClearNodes() {
|
||||
return nodes.stream()
|
||||
.filter(BtcNode::hasClearNetAddress)
|
||||
.filter(BtcNodes.BtcNode::hasClearNetAddress)
|
||||
.flatMap(node -> nullableAsStream(converter.convertClearNode(node)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private List<PeerAddress> getOnionHosts() {
|
||||
return nodes.stream()
|
||||
.filter(BtcNode::hasOnionAddress)
|
||||
.filter(BtcNodes.BtcNode::hasOnionAddress)
|
||||
.flatMap(node -> nullableAsStream(converter.convertOnionHost(node)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private List<PeerAddress> getClearNodesBehindProxy(Socks5Proxy proxy) {
|
||||
return nodes.stream()
|
||||
.filter(BtcNode::hasClearNetAddress)
|
||||
.filter(BtcNodes.BtcNode::hasClearNetAddress)
|
||||
.flatMap(node -> nullableAsStream(converter.convertWithTor(node, proxy)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private static <T> Stream<T> nullableAsStream(@Nullable T item) {
|
||||
return Optional.ofNullable(item)
|
||||
.map(Stream::of)
|
||||
.orElse(Stream.empty());
|
||||
return Optional.ofNullable(item).stream();
|
||||
}
|
||||
}
|
@ -15,11 +15,9 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.nodes;
|
||||
|
||||
import bisq.core.btc.BitcoinNodes;
|
||||
import bisq.core.btc.BitcoinNodes.BitcoinNodesOption;
|
||||
import bisq.core.btc.BitcoinNodes.BtcNode;
|
||||
import bisq.core.btc.setup.WalletsSetup;
|
||||
import bisq.core.user.Preferences;
|
||||
|
||||
import bisq.common.util.Utilities;
|
||||
@ -31,32 +29,29 @@ import java.util.Set;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static bisq.core.btc.BitcoinNodes.BitcoinNodesOption.CUSTOM;
|
||||
import static bisq.core.btc.wallet.WalletsSetup.DEFAULT_CONNECTIONS;
|
||||
|
||||
|
||||
class WalletSetupPreferences {
|
||||
private static final Logger log = LoggerFactory.getLogger(WalletSetupPreferences.class);
|
||||
public class BtcNodesSetupPreferences {
|
||||
private static final Logger log = LoggerFactory.getLogger(BtcNodesSetupPreferences.class);
|
||||
|
||||
private final Preferences preferences;
|
||||
|
||||
WalletSetupPreferences(Preferences preferences) {
|
||||
public BtcNodesSetupPreferences(Preferences preferences) {
|
||||
this.preferences = preferences;
|
||||
}
|
||||
|
||||
List<BtcNode> selectPreferredNodes(BitcoinNodes nodes) {
|
||||
List<BtcNode> result;
|
||||
public List<BtcNodes.BtcNode> selectPreferredNodes(BtcNodes nodes) {
|
||||
List<BtcNodes.BtcNode> result;
|
||||
|
||||
BitcoinNodesOption nodesOption = BitcoinNodesOption.values()[preferences.getBitcoinNodesOptionOrdinal()];
|
||||
BtcNodes.BitcoinNodesOption nodesOption = BtcNodes.BitcoinNodesOption.values()[preferences.getBitcoinNodesOptionOrdinal()];
|
||||
switch (nodesOption) {
|
||||
case CUSTOM:
|
||||
String bitcoinNodes = preferences.getBitcoinNodes();
|
||||
Set<String> distinctNodes = Utilities.commaSeparatedListToSet(bitcoinNodes, false);
|
||||
result = BitcoinNodes.toBtcNodesList(distinctNodes);
|
||||
result = BtcNodes.toBtcNodesList(distinctNodes);
|
||||
if (result.isEmpty()) {
|
||||
log.warn("Custom nodes is set but no valid nodes are provided. " +
|
||||
"We fall back to provided nodes option.");
|
||||
preferences.setBitcoinNodesOptionOrdinal(BitcoinNodesOption.PROVIDED.ordinal());
|
||||
preferences.setBitcoinNodesOptionOrdinal(BtcNodes.BitcoinNodesOption.PROVIDED.ordinal());
|
||||
result = nodes.getProvidedBtcNodes();
|
||||
}
|
||||
break;
|
||||
@ -72,12 +67,12 @@ class WalletSetupPreferences {
|
||||
return result;
|
||||
}
|
||||
|
||||
boolean isUseCustomNodes() {
|
||||
return CUSTOM.ordinal() == preferences.getBitcoinNodesOptionOrdinal();
|
||||
public boolean isUseCustomNodes() {
|
||||
return BtcNodes.BitcoinNodesOption.CUSTOM.ordinal() == preferences.getBitcoinNodesOptionOrdinal();
|
||||
}
|
||||
|
||||
int calculateMinBroadcastConnections(List<BtcNode> nodes) {
|
||||
BitcoinNodesOption nodesOption = BitcoinNodesOption.values()[preferences.getBitcoinNodesOptionOrdinal()];
|
||||
public int calculateMinBroadcastConnections(List<BtcNodes.BtcNode> nodes) {
|
||||
BtcNodes.BitcoinNodesOption nodesOption = BtcNodes.BitcoinNodesOption.values()[preferences.getBitcoinNodesOptionOrdinal()];
|
||||
int result;
|
||||
switch (nodesOption) {
|
||||
case CUSTOM:
|
||||
@ -88,7 +83,7 @@ class WalletSetupPreferences {
|
||||
break;
|
||||
case PUBLIC:
|
||||
// We keep the empty nodes
|
||||
result = (int) Math.floor(DEFAULT_CONNECTIONS * 0.8);
|
||||
result = (int) Math.floor(WalletsSetup.DEFAULT_CONNECTIONS * 0.8);
|
||||
break;
|
||||
case PROVIDED:
|
||||
default:
|
@ -33,7 +33,7 @@
|
||||
* PircBotX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc;
|
||||
package bisq.core.btc.nodes;
|
||||
|
||||
import javax.net.SocketFactory;
|
||||
|
@ -31,7 +31,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package bisq.core.btc;
|
||||
package bisq.core.btc.nodes;
|
||||
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
import org.bitcoinj.net.discovery.PeerDiscovery;
|
||||
@ -50,7 +50,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
||||
// TODO not used anymore. Not sure if it was replaced by something else or removed by accident.
|
||||
/**
|
||||
* SeedPeersSocks5Dns resolves peers via Proxy (Socks5) remote DNS.
|
||||
*/
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.setup;
|
||||
|
||||
import org.bitcoinj.crypto.ChildNumber;
|
||||
import org.bitcoinj.crypto.DeterministicKey;
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.setup;
|
||||
|
||||
import org.bitcoinj.crypto.ChildNumber;
|
||||
import org.bitcoinj.crypto.DeterministicKey;
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.setup;
|
||||
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
import org.bitcoinj.wallet.DeterministicKeyChain;
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.setup;
|
||||
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
import org.bitcoinj.wallet.KeyChainGroup;
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.setup;
|
||||
|
||||
import org.bitcoinj.crypto.ChildNumber;
|
||||
import org.bitcoinj.crypto.DeterministicKey;
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc;
|
||||
package bisq.core.btc.setup;
|
||||
|
||||
public enum RegTestHost {
|
||||
|
@ -15,10 +15,11 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.setup;
|
||||
|
||||
import bisq.core.app.BisqEnvironment;
|
||||
import bisq.core.btc.ProxySocketFactory;
|
||||
import bisq.core.btc.nodes.ProxySocketFactory;
|
||||
import bisq.core.btc.wallet.BisqRiskAnalysis;
|
||||
|
||||
import bisq.common.app.Version;
|
||||
|
@ -15,15 +15,17 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
package bisq.core.btc.setup;
|
||||
|
||||
import bisq.core.app.BisqEnvironment;
|
||||
import bisq.core.btc.AddressEntry;
|
||||
import bisq.core.btc.AddressEntryList;
|
||||
import bisq.core.btc.BitcoinNodes;
|
||||
import bisq.core.btc.BitcoinNodes.BtcNode;
|
||||
import bisq.core.btc.BtcOptionKeys;
|
||||
import bisq.core.btc.RegTestHost;
|
||||
import bisq.core.btc.model.AddressEntry;
|
||||
import bisq.core.btc.model.AddressEntryList;
|
||||
import bisq.core.btc.nodes.BtcNetworkConfig;
|
||||
import bisq.core.btc.nodes.BtcNodes;
|
||||
import bisq.core.btc.nodes.BtcNodes.BtcNode;
|
||||
import bisq.core.btc.nodes.BtcNodesRepository;
|
||||
import bisq.core.btc.nodes.BtcNodesSetupPreferences;
|
||||
import bisq.core.user.Preferences;
|
||||
|
||||
import bisq.network.Socks5MultiDiscovery;
|
||||
@ -102,7 +104,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
@Slf4j
|
||||
public class WalletsSetup {
|
||||
// We reduce defaultConnections from 12 (PeerGroup.DEFAULT_CONNECTIONS) to 9 nodes
|
||||
static final int DEFAULT_CONNECTIONS = 9;
|
||||
public static final int DEFAULT_CONNECTIONS = 9;
|
||||
|
||||
private static final long STARTUP_TIMEOUT = 180;
|
||||
private static final String BSQ_WALLET_FILE_NAME = "bisq_BSQ.wallet";
|
||||
@ -113,7 +115,7 @@ public class WalletsSetup {
|
||||
private final Preferences preferences;
|
||||
private final Socks5ProxyProvider socks5ProxyProvider;
|
||||
private final BisqEnvironment bisqEnvironment;
|
||||
private final BitcoinNodes bitcoinNodes;
|
||||
private final BtcNodes btcNodes;
|
||||
private final String btcWalletFileName;
|
||||
private final int numConnectionForBtc;
|
||||
private final String userAgent;
|
||||
@ -138,7 +140,7 @@ public class WalletsSetup {
|
||||
Preferences preferences,
|
||||
Socks5ProxyProvider socks5ProxyProvider,
|
||||
BisqEnvironment bisqEnvironment,
|
||||
BitcoinNodes bitcoinNodes,
|
||||
BtcNodes btcNodes,
|
||||
@Named(BtcOptionKeys.USER_AGENT) String userAgent,
|
||||
@Named(BtcOptionKeys.WALLET_DIR) File appDir,
|
||||
@Named(BtcOptionKeys.USE_ALL_PROVIDED_NODES) String useAllProvidedNodes,
|
||||
@ -149,7 +151,7 @@ public class WalletsSetup {
|
||||
this.preferences = preferences;
|
||||
this.socks5ProxyProvider = socks5ProxyProvider;
|
||||
this.bisqEnvironment = bisqEnvironment;
|
||||
this.bitcoinNodes = bitcoinNodes;
|
||||
this.btcNodes = btcNodes;
|
||||
this.numConnectionForBtc = numConnectionForBtc != null ? Integer.parseInt(numConnectionForBtc) : DEFAULT_CONNECTIONS;
|
||||
this.useAllProvidedNodes = "true".equals(useAllProvidedNodes);
|
||||
this.userAgent = userAgent;
|
||||
@ -322,17 +324,17 @@ public class WalletsSetup {
|
||||
}
|
||||
|
||||
private void configPeerNodes(@Nullable Socks5Proxy proxy) {
|
||||
WalletSetupPreferences walletSetupPreferences = new WalletSetupPreferences(preferences);
|
||||
BtcNodesSetupPreferences btcNodesSetupPreferences = new BtcNodesSetupPreferences(preferences);
|
||||
|
||||
List<BtcNode> nodes = walletSetupPreferences.selectPreferredNodes(bitcoinNodes);
|
||||
int minBroadcastConnections = walletSetupPreferences.calculateMinBroadcastConnections(nodes);
|
||||
List<BtcNode> nodes = btcNodesSetupPreferences.selectPreferredNodes(btcNodes);
|
||||
int minBroadcastConnections = btcNodesSetupPreferences.calculateMinBroadcastConnections(nodes);
|
||||
walletConfig.setMinBroadcastConnections(minBroadcastConnections);
|
||||
|
||||
PeerAddressesRepository repository = new PeerAddressesRepository(nodes);
|
||||
boolean isUseClearNodesWithProxies = (useAllProvidedNodes || walletSetupPreferences.isUseCustomNodes());
|
||||
BtcNodesRepository repository = new BtcNodesRepository(nodes);
|
||||
boolean isUseClearNodesWithProxies = (useAllProvidedNodes || btcNodesSetupPreferences.isUseCustomNodes());
|
||||
List<PeerAddress> peers = repository.getPeerAddresses(proxy, isUseClearNodesWithProxies);
|
||||
|
||||
WalletNetworkConfig networkConfig = new WalletNetworkConfig(walletConfig, params, socks5DiscoverMode, proxy);
|
||||
BtcNetworkConfig networkConfig = new BtcNetworkConfig(walletConfig, params, socks5DiscoverMode, proxy);
|
||||
networkConfig.proposePeers(peers);
|
||||
}
|
||||
|
||||
@ -341,12 +343,12 @@ public class WalletsSetup {
|
||||
// Backup
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void backupWallets() {
|
||||
public void backupWallets() {
|
||||
FileUtil.rollingBackup(walletDir, btcWalletFileName, 20);
|
||||
FileUtil.rollingBackup(walletDir, BSQ_WALLET_FILE_NAME, 20);
|
||||
}
|
||||
|
||||
void clearBackups() {
|
||||
public void clearBackups() {
|
||||
try {
|
||||
FileUtil.deleteDirectory(new File(Paths.get(walletDir.getAbsolutePath(), "backup").toString()));
|
||||
} catch (IOException e) {
|
@ -17,8 +17,6 @@
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
|
||||
import bisq.core.btc.Restrictions;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
import org.bitcoinj.core.InsufficientMoneyException;
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
|
@ -1,74 +0,0 @@
|
||||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
import org.bitcoinj.core.Sha256Hash;
|
||||
import org.bitcoinj.core.TransactionOutput;
|
||||
import org.bitcoinj.core.UTXO;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class BsqUtxoTransactionOutput extends TransactionOutput {
|
||||
private static final Logger log = LoggerFactory.getLogger(BsqUtxoTransactionOutput.class);
|
||||
private final UTXO output;
|
||||
private final int chainHeight;
|
||||
|
||||
/**
|
||||
* Construct a free standing Transaction Output.
|
||||
*
|
||||
* @param params The network parameters.
|
||||
* @param output The stored output (free standing).
|
||||
*/
|
||||
public BsqUtxoTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {
|
||||
super(params, null, output.getValue(), output.getScript().getProgram());
|
||||
this.output = output;
|
||||
this.chainHeight = chainHeight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the {@link UTXO}.
|
||||
*
|
||||
* @return The stored output.
|
||||
*/
|
||||
public UTXO getUTXO() {
|
||||
return output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the depth withing the chain of the parent tx, depth is 1 if it the output height is the height of
|
||||
* the latest block.
|
||||
*
|
||||
* @return The depth.
|
||||
*/
|
||||
@Override
|
||||
public int getParentTransactionDepthInBlocks() {
|
||||
return chainHeight - output.getHeight() + 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIndex() {
|
||||
return (int) output.getIndex();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Sha256Hash getParentTransactionHash() {
|
||||
return output.getHash();
|
||||
}
|
||||
}
|
@ -18,9 +18,11 @@
|
||||
package bisq.core.btc.wallet;
|
||||
|
||||
import bisq.core.app.BisqEnvironment;
|
||||
import bisq.core.btc.Restrictions;
|
||||
import bisq.core.btc.exceptions.InsufficientBsqException;
|
||||
import bisq.core.btc.exceptions.TransactionVerificationException;
|
||||
import bisq.core.btc.exceptions.WalletException;
|
||||
import bisq.core.btc.listeners.BsqBalanceListener;
|
||||
import bisq.core.btc.setup.WalletsSetup;
|
||||
import bisq.core.dao.state.BsqStateListener;
|
||||
import bisq.core.dao.state.BsqStateService;
|
||||
import bisq.core.dao.state.blockchain.Block;
|
||||
|
@ -17,13 +17,13 @@
|
||||
|
||||
package bisq.core.btc.wallet;
|
||||
|
||||
import bisq.core.btc.AddressEntry;
|
||||
import bisq.core.btc.AddressEntryException;
|
||||
import bisq.core.btc.AddressEntryList;
|
||||
import bisq.core.btc.InsufficientFundsException;
|
||||
import bisq.core.btc.Restrictions;
|
||||
import bisq.core.btc.exceptions.AddressEntryException;
|
||||
import bisq.core.btc.exceptions.InsufficientFundsException;
|
||||
import bisq.core.btc.exceptions.TransactionVerificationException;
|
||||
import bisq.core.btc.exceptions.WalletException;
|
||||
import bisq.core.btc.model.AddressEntry;
|
||||
import bisq.core.btc.model.AddressEntryList;
|
||||
import bisq.core.btc.setup.WalletsSetup;
|
||||
import bisq.core.provider.fee.FeeService;
|
||||
import bisq.core.user.Preferences;
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.btc;
|
||||
package bisq.core.btc.wallet;
|
||||
|
||||
import bisq.core.app.BisqEnvironment;
|
||||
|
@ -18,13 +18,15 @@
|
||||
package bisq.core.btc.wallet;
|
||||
|
||||
import bisq.core.app.BisqEnvironment;
|
||||
import bisq.core.btc.AddressEntry;
|
||||
import bisq.core.btc.data.InputsAndChangeOutput;
|
||||
import bisq.core.btc.data.PreparedDepositTxAndMakerInputs;
|
||||
import bisq.core.btc.data.RawTransactionInput;
|
||||
import bisq.core.btc.exceptions.SigningException;
|
||||
import bisq.core.btc.exceptions.TransactionVerificationException;
|
||||
import bisq.core.btc.exceptions.WalletException;
|
||||
import bisq.core.btc.model.AddressEntry;
|
||||
import bisq.core.btc.model.InputsAndChangeOutput;
|
||||
import bisq.core.btc.model.PreparedDepositTxAndMakerInputs;
|
||||
import bisq.core.btc.model.RawTransactionInput;
|
||||
import bisq.core.btc.setup.WalletConfig;
|
||||
import bisq.core.btc.setup.WalletsSetup;
|
||||
import bisq.core.locale.Res;
|
||||
|
||||
import bisq.common.app.Log;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user