Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into http-api
Browse files Browse the repository at this point in the history
  • Loading branch information
mrosseel committed Oct 12, 2018
2 parents 272910b + 56965c1 commit 3b13412
Show file tree
Hide file tree
Showing 118 changed files with 2,455 additions and 703 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 28 additions & 0 deletions assets/src/main/java/bisq/asset/coins/Bitcoin2.java
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());
}
}
39 changes: 39 additions & 0 deletions assets/src/main/java/bisq/asset/coins/Chaucha.java
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};
}
}
}

28 changes: 28 additions & 0 deletions assets/src/main/java/bisq/asset/coins/Croat.java
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}"));
}
}
40 changes: 40 additions & 0 deletions assets/src/main/java/bisq/asset/coins/Kekcoin.java
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};
}
}
}
28 changes: 28 additions & 0 deletions assets/src/main/java/bisq/asset/coins/Loki.java
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})$"));
}
}
56 changes: 56 additions & 0 deletions assets/src/main/java/bisq/asset/coins/MobitGlobal.java
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};
}
}
}
56 changes: 56 additions & 0 deletions assets/src/main/java/bisq/asset/coins/Neos.java
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};
}
}
}
56 changes: 56 additions & 0 deletions assets/src/main/java/bisq/asset/coins/PZDC.java
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};
}
}
}
Loading

0 comments on commit 3b13412

Please sign in to comment.