forked from bisq-network/bisq
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into http-api
- Loading branch information
Showing
118 changed files
with
2,455 additions
and
703 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}; | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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})$")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}; | ||
} | ||
} | ||
} |
Oops, something went wrong.