true
@@ -304,6 +304,7 @@
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
org.qortal.controller.Controller
+ true
. ..
diff --git a/src/main/java/org/qortal/api/resource/AdminResource.java b/src/main/java/org/qortal/api/resource/AdminResource.java
index 9cff1bbb..46e204db 100644
--- a/src/main/java/org/qortal/api/resource/AdminResource.java
+++ b/src/main/java/org/qortal/api/resource/AdminResource.java
@@ -222,6 +222,42 @@ public class AdminResource {
}
}
+ @GET
+ @Path("/summary/alltime")
+ @Operation(
+ summary = "Summary of activity since genesis",
+ responses = {
+ @ApiResponse(
+ content = @Content(schema = @Schema(implementation = ActivitySummary.class))
+ )
+ }
+ )
+ @ApiErrors({ApiError.REPOSITORY_ISSUE})
+ @SecurityRequirement(name = "apiKey")
+ public ActivitySummary allTimeSummary(@HeaderParam(Security.API_KEY_HEADER) String apiKey) {
+ Security.checkApiCallAllowed(request);
+
+ ActivitySummary summary = new ActivitySummary();
+
+ try (final Repository repository = RepositoryManager.getRepository()) {
+ int startHeight = 1;
+ long start = repository.getBlockRepository().fromHeight(startHeight).getTimestamp();
+ int endHeight = repository.getBlockRepository().getBlockchainHeight();
+
+ summary.setBlockCount(endHeight - startHeight);
+
+ summary.setTransactionCountByType(repository.getTransactionRepository().getTransactionSummary(startHeight + 1, endHeight));
+
+ summary.setAssetsIssued(repository.getAssetRepository().getRecentAssetIds(start).size());
+
+ summary.setNamesRegistered (repository.getNameRepository().getRecentNames(start).size());
+
+ return summary;
+ } catch (DataException e) {
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.REPOSITORY_ISSUE, e);
+ }
+ }
+
@GET
@Path("/enginestats")
@Operation(
diff --git a/src/main/java/org/qortal/api/resource/CrossChainBitcoinResource.java b/src/main/java/org/qortal/api/resource/CrossChainBitcoinResource.java
index dd967451..1e276e59 100644
--- a/src/main/java/org/qortal/api/resource/CrossChainBitcoinResource.java
+++ b/src/main/java/org/qortal/api/resource/CrossChainBitcoinResource.java
@@ -14,6 +14,7 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
+import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
@@ -35,6 +36,37 @@ public class CrossChainBitcoinResource {
@Context
HttpServletRequest request;
+ @GET
+ @Path("/height")
+ @Operation(
+ summary = "Returns current Bitcoin block height",
+ description = "Returns the height of the most recent block in the Bitcoin chain.",
+ responses = {
+ @ApiResponse(
+ content = @Content(
+ schema = @Schema(
+ type = "number"
+ )
+ )
+ )
+ }
+ )
+ @ApiErrors({ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE})
+ public String getBitcoinHeight() {
+ Bitcoin bitcoin = Bitcoin.getInstance();
+
+ try {
+ Integer height = bitcoin.getBlockchainHeight();
+ if (height == null)
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+
+ return height.toString();
+
+ } catch (ForeignBlockchainException e) {
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+ }
+ }
+
@POST
@Path("/walletbalance")
@Operation(
@@ -118,6 +150,45 @@ public class CrossChainBitcoinResource {
}
}
+ @POST
+ @Path("/unusedaddress")
+ @Operation(
+ summary = "Returns first unused address for hierarchical, deterministic BIP32 wallet",
+ description = "Supply BIP32 'm' private/public key in base58, starting with 'xprv'/'xpub' for mainnet, 'tprv'/'tpub' for testnet",
+ requestBody = @RequestBody(
+ required = true,
+ content = @Content(
+ mediaType = MediaType.TEXT_PLAIN,
+ schema = @Schema(
+ type = "string",
+ description = "BIP32 'm' private/public key in base58",
+ example = "tpubD6NzVbkrYhZ4XTPc4btCZ6SMgn8CxmWkj6VBVZ1tfcJfMq4UwAjZbG8U74gGSypL9XBYk2R2BLbDBe8pcEyBKM1edsGQEPKXNbEskZozeZc"
+ )
+ )
+ ),
+ responses = {
+ @ApiResponse(
+ content = @Content(array = @ArraySchema( schema = @Schema( implementation = SimpleTransaction.class ) ) )
+ )
+ }
+ )
+ @ApiErrors({ApiError.INVALID_PRIVATE_KEY, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE})
+ @SecurityRequirement(name = "apiKey")
+ public String getUnusedBitcoinReceiveAddress(@HeaderParam(Security.API_KEY_HEADER) String apiKey, String key58) {
+ Security.checkApiCallAllowed(request);
+
+ Bitcoin bitcoin = Bitcoin.getInstance();
+
+ if (!bitcoin.isValidDeterministicKey(key58))
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_PRIVATE_KEY);
+
+ try {
+ return bitcoin.getUnusedReceiveAddress(key58);
+ } catch (ForeignBlockchainException e) {
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+ }
+ }
+
@POST
@Path("/send")
@Operation(
diff --git a/src/main/java/org/qortal/api/resource/CrossChainDigibyteResource.java b/src/main/java/org/qortal/api/resource/CrossChainDigibyteResource.java
index 31d51c73..781d78f6 100644
--- a/src/main/java/org/qortal/api/resource/CrossChainDigibyteResource.java
+++ b/src/main/java/org/qortal/api/resource/CrossChainDigibyteResource.java
@@ -14,6 +14,7 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
+import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
@@ -35,6 +36,37 @@ public class CrossChainDigibyteResource {
@Context
HttpServletRequest request;
+ @GET
+ @Path("/height")
+ @Operation(
+ summary = "Returns current Digibyte block height",
+ description = "Returns the height of the most recent block in the Digibyte chain.",
+ responses = {
+ @ApiResponse(
+ content = @Content(
+ schema = @Schema(
+ type = "number"
+ )
+ )
+ )
+ }
+ )
+ @ApiErrors({ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE})
+ public String getDigibyteHeight() {
+ Digibyte digibyte = Digibyte.getInstance();
+
+ try {
+ Integer height = digibyte.getBlockchainHeight();
+ if (height == null)
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+
+ return height.toString();
+
+ } catch (ForeignBlockchainException e) {
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+ }
+ }
+
@POST
@Path("/walletbalance")
@Operation(
@@ -118,6 +150,45 @@ public class CrossChainDigibyteResource {
}
}
+ @POST
+ @Path("/unusedaddress")
+ @Operation(
+ summary = "Returns first unused address for hierarchical, deterministic BIP32 wallet",
+ description = "Supply BIP32 'm' private/public key in base58, starting with 'xprv'/'xpub' for mainnet, 'tprv'/'tpub' for testnet",
+ requestBody = @RequestBody(
+ required = true,
+ content = @Content(
+ mediaType = MediaType.TEXT_PLAIN,
+ schema = @Schema(
+ type = "string",
+ description = "BIP32 'm' private/public key in base58",
+ example = "tpubD6NzVbkrYhZ4XTPc4btCZ6SMgn8CxmWkj6VBVZ1tfcJfMq4UwAjZbG8U74gGSypL9XBYk2R2BLbDBe8pcEyBKM1edsGQEPKXNbEskZozeZc"
+ )
+ )
+ ),
+ responses = {
+ @ApiResponse(
+ content = @Content(array = @ArraySchema( schema = @Schema( implementation = SimpleTransaction.class ) ) )
+ )
+ }
+ )
+ @ApiErrors({ApiError.INVALID_PRIVATE_KEY, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE})
+ @SecurityRequirement(name = "apiKey")
+ public String getUnusedDigibyteReceiveAddress(@HeaderParam(Security.API_KEY_HEADER) String apiKey, String key58) {
+ Security.checkApiCallAllowed(request);
+
+ Digibyte digibyte = Digibyte.getInstance();
+
+ if (!digibyte.isValidDeterministicKey(key58))
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_PRIVATE_KEY);
+
+ try {
+ return digibyte.getUnusedReceiveAddress(key58);
+ } catch (ForeignBlockchainException e) {
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+ }
+ }
+
@POST
@Path("/send")
@Operation(
diff --git a/src/main/java/org/qortal/api/resource/CrossChainDogecoinResource.java b/src/main/java/org/qortal/api/resource/CrossChainDogecoinResource.java
index 28bebfb8..ff1d6d14 100644
--- a/src/main/java/org/qortal/api/resource/CrossChainDogecoinResource.java
+++ b/src/main/java/org/qortal/api/resource/CrossChainDogecoinResource.java
@@ -21,6 +21,7 @@ import org.qortal.crosschain.SimpleTransaction;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
+import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
@@ -33,6 +34,37 @@ public class CrossChainDogecoinResource {
@Context
HttpServletRequest request;
+ @GET
+ @Path("/height")
+ @Operation(
+ summary = "Returns current Dogecoin block height",
+ description = "Returns the height of the most recent block in the Dogecoin chain.",
+ responses = {
+ @ApiResponse(
+ content = @Content(
+ schema = @Schema(
+ type = "number"
+ )
+ )
+ )
+ }
+ )
+ @ApiErrors({ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE})
+ public String getDogecoinHeight() {
+ Dogecoin dogecoin = Dogecoin.getInstance();
+
+ try {
+ Integer height = dogecoin.getBlockchainHeight();
+ if (height == null)
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+
+ return height.toString();
+
+ } catch (ForeignBlockchainException e) {
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+ }
+ }
+
@POST
@Path("/walletbalance")
@Operation(
@@ -116,6 +148,45 @@ public class CrossChainDogecoinResource {
}
}
+ @POST
+ @Path("/unusedaddress")
+ @Operation(
+ summary = "Returns first unused address for hierarchical, deterministic BIP32 wallet",
+ description = "Supply BIP32 'm' private/public key in base58, starting with 'xprv'/'xpub' for mainnet, 'tprv'/'tpub' for testnet",
+ requestBody = @RequestBody(
+ required = true,
+ content = @Content(
+ mediaType = MediaType.TEXT_PLAIN,
+ schema = @Schema(
+ type = "string",
+ description = "BIP32 'm' private/public key in base58",
+ example = "tpubD6NzVbkrYhZ4XTPc4btCZ6SMgn8CxmWkj6VBVZ1tfcJfMq4UwAjZbG8U74gGSypL9XBYk2R2BLbDBe8pcEyBKM1edsGQEPKXNbEskZozeZc"
+ )
+ )
+ ),
+ responses = {
+ @ApiResponse(
+ content = @Content(array = @ArraySchema( schema = @Schema( implementation = SimpleTransaction.class ) ) )
+ )
+ }
+ )
+ @ApiErrors({ApiError.INVALID_PRIVATE_KEY, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE})
+ @SecurityRequirement(name = "apiKey")
+ public String getUnusedDogecoinReceiveAddress(@HeaderParam(Security.API_KEY_HEADER) String apiKey, String key58) {
+ Security.checkApiCallAllowed(request);
+
+ Dogecoin dogecoin = Dogecoin.getInstance();
+
+ if (!dogecoin.isValidDeterministicKey(key58))
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_PRIVATE_KEY);
+
+ try {
+ return dogecoin.getUnusedReceiveAddress(key58);
+ } catch (ForeignBlockchainException e) {
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+ }
+ }
+
@POST
@Path("/send")
@Operation(
diff --git a/src/main/java/org/qortal/api/resource/CrossChainLitecoinResource.java b/src/main/java/org/qortal/api/resource/CrossChainLitecoinResource.java
index d12dd94c..3e2ff799 100644
--- a/src/main/java/org/qortal/api/resource/CrossChainLitecoinResource.java
+++ b/src/main/java/org/qortal/api/resource/CrossChainLitecoinResource.java
@@ -14,6 +14,7 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
+import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
@@ -35,6 +36,37 @@ public class CrossChainLitecoinResource {
@Context
HttpServletRequest request;
+ @GET
+ @Path("/height")
+ @Operation(
+ summary = "Returns current Litecoin block height",
+ description = "Returns the height of the most recent block in the Litecoin chain.",
+ responses = {
+ @ApiResponse(
+ content = @Content(
+ schema = @Schema(
+ type = "number"
+ )
+ )
+ )
+ }
+ )
+ @ApiErrors({ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE})
+ public String getLitecoinHeight() {
+ Litecoin litecoin = Litecoin.getInstance();
+
+ try {
+ Integer height = litecoin.getBlockchainHeight();
+ if (height == null)
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+
+ return height.toString();
+
+ } catch (ForeignBlockchainException e) {
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+ }
+ }
+
@POST
@Path("/walletbalance")
@Operation(
@@ -118,6 +150,45 @@ public class CrossChainLitecoinResource {
}
}
+ @POST
+ @Path("/unusedaddress")
+ @Operation(
+ summary = "Returns first unused address for hierarchical, deterministic BIP32 wallet",
+ description = "Supply BIP32 'm' private/public key in base58, starting with 'xprv'/'xpub' for mainnet, 'tprv'/'tpub' for testnet",
+ requestBody = @RequestBody(
+ required = true,
+ content = @Content(
+ mediaType = MediaType.TEXT_PLAIN,
+ schema = @Schema(
+ type = "string",
+ description = "BIP32 'm' private/public key in base58",
+ example = "tpubD6NzVbkrYhZ4XTPc4btCZ6SMgn8CxmWkj6VBVZ1tfcJfMq4UwAjZbG8U74gGSypL9XBYk2R2BLbDBe8pcEyBKM1edsGQEPKXNbEskZozeZc"
+ )
+ )
+ ),
+ responses = {
+ @ApiResponse(
+ content = @Content(array = @ArraySchema( schema = @Schema( implementation = SimpleTransaction.class ) ) )
+ )
+ }
+ )
+ @ApiErrors({ApiError.INVALID_PRIVATE_KEY, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE})
+ @SecurityRequirement(name = "apiKey")
+ public String getUnusedLitecoinReceiveAddress(@HeaderParam(Security.API_KEY_HEADER) String apiKey, String key58) {
+ Security.checkApiCallAllowed(request);
+
+ Litecoin litecoin = Litecoin.getInstance();
+
+ if (!litecoin.isValidDeterministicKey(key58))
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_PRIVATE_KEY);
+
+ try {
+ return litecoin.getUnusedReceiveAddress(key58);
+ } catch (ForeignBlockchainException e) {
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+ }
+ }
+
@POST
@Path("/send")
@Operation(
diff --git a/src/main/java/org/qortal/api/resource/CrossChainPirateChainResource.java b/src/main/java/org/qortal/api/resource/CrossChainPirateChainResource.java
index bd7bf57d..6989e7c7 100644
--- a/src/main/java/org/qortal/api/resource/CrossChainPirateChainResource.java
+++ b/src/main/java/org/qortal/api/resource/CrossChainPirateChainResource.java
@@ -20,6 +20,7 @@ import org.qortal.crosschain.SimpleTransaction;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
+import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
@@ -32,6 +33,37 @@ public class CrossChainPirateChainResource {
@Context
HttpServletRequest request;
+ @GET
+ @Path("/height")
+ @Operation(
+ summary = "Returns current PirateChain block height",
+ description = "Returns the height of the most recent block in the PirateChain chain.",
+ responses = {
+ @ApiResponse(
+ content = @Content(
+ schema = @Schema(
+ type = "number"
+ )
+ )
+ )
+ }
+ )
+ @ApiErrors({ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE})
+ public String getPirateChainHeight() {
+ PirateChain pirateChain = PirateChain.getInstance();
+
+ try {
+ Integer height = pirateChain.getBlockchainHeight();
+ if (height == null)
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+
+ return height.toString();
+
+ } catch (ForeignBlockchainException e) {
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+ }
+ }
+
@POST
@Path("/walletbalance")
@Operation(
diff --git a/src/main/java/org/qortal/api/resource/CrossChainRavencoinResource.java b/src/main/java/org/qortal/api/resource/CrossChainRavencoinResource.java
index 97550392..b1d6aed4 100644
--- a/src/main/java/org/qortal/api/resource/CrossChainRavencoinResource.java
+++ b/src/main/java/org/qortal/api/resource/CrossChainRavencoinResource.java
@@ -14,6 +14,7 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
+import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
@@ -35,6 +36,37 @@ public class CrossChainRavencoinResource {
@Context
HttpServletRequest request;
+ @GET
+ @Path("/height")
+ @Operation(
+ summary = "Returns current Ravencoin block height",
+ description = "Returns the height of the most recent block in the Ravencoin chain.",
+ responses = {
+ @ApiResponse(
+ content = @Content(
+ schema = @Schema(
+ type = "number"
+ )
+ )
+ )
+ }
+ )
+ @ApiErrors({ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE})
+ public String getRavencoinHeight() {
+ Ravencoin ravencoin = Ravencoin.getInstance();
+
+ try {
+ Integer height = ravencoin.getBlockchainHeight();
+ if (height == null)
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+
+ return height.toString();
+
+ } catch (ForeignBlockchainException e) {
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+ }
+ }
+
@POST
@Path("/walletbalance")
@Operation(
@@ -118,6 +150,45 @@ public class CrossChainRavencoinResource {
}
}
+ @POST
+ @Path("/unusedaddress")
+ @Operation(
+ summary = "Returns first unused address for hierarchical, deterministic BIP32 wallet",
+ description = "Supply BIP32 'm' private/public key in base58, starting with 'xprv'/'xpub' for mainnet, 'tprv'/'tpub' for testnet",
+ requestBody = @RequestBody(
+ required = true,
+ content = @Content(
+ mediaType = MediaType.TEXT_PLAIN,
+ schema = @Schema(
+ type = "string",
+ description = "BIP32 'm' private/public key in base58",
+ example = "tpubD6NzVbkrYhZ4XTPc4btCZ6SMgn8CxmWkj6VBVZ1tfcJfMq4UwAjZbG8U74gGSypL9XBYk2R2BLbDBe8pcEyBKM1edsGQEPKXNbEskZozeZc"
+ )
+ )
+ ),
+ responses = {
+ @ApiResponse(
+ content = @Content(array = @ArraySchema( schema = @Schema( implementation = SimpleTransaction.class ) ) )
+ )
+ }
+ )
+ @ApiErrors({ApiError.INVALID_PRIVATE_KEY, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE})
+ @SecurityRequirement(name = "apiKey")
+ public String getUnusedRavencoinReceiveAddress(@HeaderParam(Security.API_KEY_HEADER) String apiKey, String key58) {
+ Security.checkApiCallAllowed(request);
+
+ Ravencoin ravencoin = Ravencoin.getInstance();
+
+ if (!ravencoin.isValidDeterministicKey(key58))
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_PRIVATE_KEY);
+
+ try {
+ return ravencoin.getUnusedReceiveAddress(key58);
+ } catch (ForeignBlockchainException e) {
+ throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.FOREIGN_BLOCKCHAIN_NETWORK_ISSUE);
+ }
+ }
+
@POST
@Path("/send")
@Operation(
diff --git a/src/main/java/org/qortal/crosschain/Bitcoin.java b/src/main/java/org/qortal/crosschain/Bitcoin.java
index 7fec5a17..b65bac8e 100644
--- a/src/main/java/org/qortal/crosschain/Bitcoin.java
+++ b/src/main/java/org/qortal/crosschain/Bitcoin.java
@@ -49,6 +49,7 @@ public class Bitcoin extends Bitcoiny {
//CLOSED new Server("bitcoin.grey.pw", Server.ConnectionType.SSL, 50002),
//CLOSED new Server("btc.litepay.ch", Server.ConnectionType.SSL, 50002),
//CLOSED new Server("electrum.pabu.io", Server.ConnectionType.SSL, 50002),
+ //CLOSED new Server("electrumx.dev", Server.ConnectionType.SSL, 50002),
//CLOSED new Server("electrumx.hodlwallet.com", Server.ConnectionType.SSL, 50002),
//CLOSED new Server("gd42.org", Server.ConnectionType.SSL, 50002),
//CLOSED new Server("korea.electrum-server.com", Server.ConnectionType.SSL, 50002),
@@ -56,28 +57,75 @@ public class Bitcoin extends Bitcoiny {
//1.15.0 new Server("alviss.coinjoined.com", Server.ConnectionType.SSL, 50002),
//1.15.0 new Server("electrum.acinq.co", Server.ConnectionType.SSL, 50002),
//1.14.0 new Server("electrum.coinext.com.br", Server.ConnectionType.SSL, 50002),
+ //F1.7.0 new Server("btc.lastingcoin.net", Server.ConnectionType.SSL, 50002),
new Server("104.248.139.211", Server.ConnectionType.SSL, 50002),
+ new Server("128.0.190.26", Server.ConnectionType.SSL, 50002),
new Server("142.93.6.38", Server.ConnectionType.SSL, 50002),
new Server("157.245.172.236", Server.ConnectionType.SSL, 50002),
new Server("167.172.226.175", Server.ConnectionType.SSL, 50002),
new Server("167.172.42.31", Server.ConnectionType.SSL, 50002),
new Server("178.62.80.20", Server.ConnectionType.SSL, 50002),
new Server("185.64.116.15", Server.ConnectionType.SSL, 50002),
+ new Server("188.165.206.215", Server.ConnectionType.SSL, 50002),
+ new Server("188.165.211.112", Server.ConnectionType.SSL, 50002),
+ new Server("2azzarita.hopto.org", Server.ConnectionType.SSL, 50002),
+ new Server("2electrumx.hopto.me", Server.ConnectionType.SSL, 56022),
+ new Server("2ex.digitaleveryware.com", Server.ConnectionType.SSL, 50002),
+ new Server("65.39.140.37", Server.ConnectionType.SSL, 50002),
new Server("68.183.188.105", Server.ConnectionType.SSL, 50002),
+ new Server("71.73.14.254", Server.ConnectionType.SSL, 50002),
+ new Server("94.23.247.135", Server.ConnectionType.SSL, 50002),
+ new Server("assuredly.not.fyi", Server.ConnectionType.SSL, 50002),
+ new Server("ax101.blockeng.ch", Server.ConnectionType.SSL, 50002),
+ new Server("ax102.blockeng.ch", Server.ConnectionType.SSL, 50002),
+ new Server("b.1209k.com", Server.ConnectionType.SSL, 50002),
+ new Server("b6.1209k.com", Server.ConnectionType.SSL, 50002),
+ new Server("bitcoin.dermichi.com", Server.ConnectionType.SSL, 50002),
+ new Server("bitcoin.lu.ke", Server.ConnectionType.SSL, 50002),
new Server("bitcoin.lukechilds.co", Server.ConnectionType.SSL, 50002),
new Server("blkhub.net", Server.ConnectionType.SSL, 50002),
- new Server("btc.lastingcoin.net", Server.ConnectionType.SSL, 50002),
+ new Server("btc.electroncash.dk", Server.ConnectionType.SSL, 60002),
+ new Server("btc.ocf.sh", Server.ConnectionType.SSL, 50002),
new Server("btce.iiiiiii.biz", Server.ConnectionType.SSL, 50002),
new Server("caleb.vegas", Server.ConnectionType.SSL, 50002),
new Server("eai.coincited.net", Server.ConnectionType.SSL, 50002),
+ new Server("electrum.bhoovd.com", Server.ConnectionType.SSL, 50002),
new Server("electrum.bitaroo.net", Server.ConnectionType.SSL, 50002),
- new Server("electrumx.dev", Server.ConnectionType.SSL, 50002),
+ new Server("electrum.bitcoinlizard.net", Server.ConnectionType.SSL, 50002),
+ new Server("electrum.blockstream.info", Server.ConnectionType.SSL, 50002),
+ new Server("electrum.emzy.de", Server.ConnectionType.SSL, 50002),
+ new Server("electrum.exan.tech", Server.ConnectionType.SSL, 50002),
+ new Server("electrum.kendigisland.xyz", Server.ConnectionType.SSL, 50002),
+ new Server("electrum.mmitech.info", Server.ConnectionType.SSL, 50002),
+ new Server("electrum.petrkr.net", Server.ConnectionType.SSL, 50002),
+ new Server("electrum.stippy.com", Server.ConnectionType.SSL, 50002),
+ new Server("electrum.thomasfischbach.de", Server.ConnectionType.SSL, 50002),
+ new Server("electrum0.snel.it", Server.ConnectionType.SSL, 50002),
+ new Server("electrum1.cipig.net", Server.ConnectionType.SSL, 50002),
+ new Server("electrum2.cipig.net", Server.ConnectionType.SSL, 50002),
+ new Server("electrum3.cipig.net", Server.ConnectionType.SSL, 50002),
+ new Server("electrumx.alexridevski.net", Server.ConnectionType.SSL, 50002),
+ new Server("electrumx-core.1209k.com", Server.ConnectionType.SSL, 50002),
new Server("elx.bitske.com", Server.ConnectionType.SSL, 50002),
+ new Server("ex03.axalgo.com", Server.ConnectionType.SSL, 50002),
+ new Server("ex05.axalgo.com", Server.ConnectionType.SSL, 50002),
+ new Server("ex07.axalgo.com", Server.ConnectionType.SSL, 50002),
new Server("fortress.qtornado.com", Server.ConnectionType.SSL, 50002),
+ new Server("fulcrum.grey.pw", Server.ConnectionType.SSL, 50002),
+ new Server("fulcrum.sethforprivacy.com", Server.ConnectionType.SSL, 51002),
new Server("guichet.centure.cc", Server.ConnectionType.SSL, 50002),
- new Server("kareoke.qoppa.org", Server.ConnectionType.SSL, 50002),
new Server("hodlers.beer", Server.ConnectionType.SSL, 50002),
+ new Server("kareoke.qoppa.org", Server.ConnectionType.SSL, 50002),
+ new Server("kirsche.emzy.de", Server.ConnectionType.SSL, 50002),
new Server("node1.btccuracao.com", Server.ConnectionType.SSL, 50002),
+ new Server("osr1ex1.compumundohipermegared.one", Server.ConnectionType.SSL, 50002),
+ new Server("smmalis37.ddns.net", Server.ConnectionType.SSL, 50002),
+ new Server("ulrichard.ch", Server.ConnectionType.SSL, 50002),
+ new Server("vmd104012.contaboserver.net", Server.ConnectionType.SSL, 50002),
+ new Server("vmd104014.contaboserver.net", Server.ConnectionType.SSL, 50002),
+ new Server("vmd63185.contaboserver.net", Server.ConnectionType.SSL, 50002),
+ new Server("vmd71287.contaboserver.net", Server.ConnectionType.SSL, 50002),
+ new Server("vmd84592.contaboserver.net", Server.ConnectionType.SSL, 50002),
new Server("xtrum.com", Server.ConnectionType.SSL, 50002));
}
diff --git a/src/main/java/org/qortal/crosschain/Bitcoiny.java b/src/main/java/org/qortal/crosschain/Bitcoiny.java
index c08bd91e..d1523b50 100644
--- a/src/main/java/org/qortal/crosschain/Bitcoiny.java
+++ b/src/main/java/org/qortal/crosschain/Bitcoiny.java
@@ -167,6 +167,16 @@ public abstract class Bitcoiny implements ForeignBlockchain {
return blockTimestamps.get(5);
}
+ /**
+ * Returns height from latest block.
+ *
+ * @throws ForeignBlockchainException if error occurs
+ */
+ public int getBlockchainHeight() throws ForeignBlockchainException {
+ int height = this.blockchainProvider.getCurrentHeight();
+ return height;
+ }
+
/** Returns fee per transaction KB. To be overridden for testnet/regtest. */
public Coin getFeePerKb() {
return this.bitcoinjContext.getFeePerKb();
diff --git a/src/main/java/org/qortal/crosschain/Digibyte.java b/src/main/java/org/qortal/crosschain/Digibyte.java
index 4358b3b3..2b31468d 100644
--- a/src/main/java/org/qortal/crosschain/Digibyte.java
+++ b/src/main/java/org/qortal/crosschain/Digibyte.java
@@ -45,6 +45,8 @@ public class Digibyte extends Bitcoiny {
return Arrays.asList(
// Servers chosen on NO BASIS WHATSOEVER from various sources!
// Status verified at https://1209k.com/bitcoin-eye/ele.php?chain=dgb
+ new Server("electrum-dgb.qortal.online", ConnectionType.SSL, 50002),
+ new Server("electrum1-dgb.qortal.online", ConnectionType.SSL, 50002),
new Server("electrum1.cipig.net", ConnectionType.SSL, 20059),
new Server("electrum2.cipig.net", ConnectionType.SSL, 20059),
new Server("electrum3.cipig.net", ConnectionType.SSL, 20059));
diff --git a/src/main/java/org/qortal/crosschain/Dogecoin.java b/src/main/java/org/qortal/crosschain/Dogecoin.java
index 9af8d990..6e763377 100644
--- a/src/main/java/org/qortal/crosschain/Dogecoin.java
+++ b/src/main/java/org/qortal/crosschain/Dogecoin.java
@@ -45,11 +45,12 @@ public class Dogecoin extends Bitcoiny {
public Collection getServers() {
return Arrays.asList(
// Servers chosen on NO BASIS WHATSOEVER from various sources!
+ // Status verified at https://1209k.com/bitcoin-eye/ele.php?chain=doge
+ new Server("electrum-doge.qortal.online", ConnectionType.SSL, 50002),
+ new Server("electrum1-doge.qortal.online", ConnectionType.SSL, 50002),
new Server("electrum1.cipig.net", ConnectionType.SSL, 20060),
new Server("electrum2.cipig.net", ConnectionType.SSL, 20060),
- new Server("electrum3.cipig.net", ConnectionType.SSL, 20060),
- new Server("161.97.137.235", ConnectionType.SSL, 50002));
- // TODO: add more mainnet servers. It's too centralized.
+ new Server("electrum3.cipig.net", ConnectionType.SSL, 20060));
}
@Override
diff --git a/src/main/java/org/qortal/crosschain/Litecoin.java b/src/main/java/org/qortal/crosschain/Litecoin.java
index 6fc6ba50..4e672d3f 100644
--- a/src/main/java/org/qortal/crosschain/Litecoin.java
+++ b/src/main/java/org/qortal/crosschain/Litecoin.java
@@ -45,17 +45,19 @@ public class Litecoin extends Bitcoiny {
return Arrays.asList(
// Servers chosen on NO BASIS WHATSOEVER from various sources!
// Status verified at https://1209k.com/bitcoin-eye/ele.php?chain=ltc
- //CLOSED new Server("electrum-ltc.petrkr.net", Server.ConnectionType.SSL, 60002),
//CLOSED new Server("electrum-ltc.someguy123.net", Server.ConnectionType.SSL, 50002),
+ //CLOSED new Server("ltc.litepay.ch", Server.ConnectionType.SSL, 50022),
+ //BEHIND new Server("62.171.169.176", Server.ConnectionType.SSL, 50002),
//PHISHY new Server("electrum-ltc.bysh.me", Server.ConnectionType.SSL, 50002),
new Server("backup.electrum-ltc.org", Server.ConnectionType.SSL, 443),
new Server("electrum.ltc.xurious.com", Server.ConnectionType.SSL, 50002),
+ new Server("electrum-ltc.petrkr.net", Server.ConnectionType.SSL, 60002),
+ new Server("electrum-ltc.qortal.online", Server.ConnectionType.SSL, 50002),
+ new Server("electrum1-ltc.qortal.online", Server.ConnectionType.SSL, 50002),
new Server("electrum1.cipig.net", Server.ConnectionType.SSL, 20063),
new Server("electrum2.cipig.net", Server.ConnectionType.SSL, 20063),
new Server("electrum3.cipig.net", Server.ConnectionType.SSL, 20063),
- new Server("ltc.litepay.ch", Server.ConnectionType.SSL, 50022),
- new Server("ltc.rentonrisk.com", Server.ConnectionType.SSL, 50002),
- new Server("62.171.169.176", Server.ConnectionType.SSL, 50002));
+ new Server("ltc.rentonrisk.com", Server.ConnectionType.SSL, 50002));
}
@Override
diff --git a/src/main/java/org/qortal/crosschain/PirateChain.java b/src/main/java/org/qortal/crosschain/PirateChain.java
index 09b37481..a1d31a4e 100644
--- a/src/main/java/org/qortal/crosschain/PirateChain.java
+++ b/src/main/java/org/qortal/crosschain/PirateChain.java
@@ -57,9 +57,9 @@ public class PirateChain extends Bitcoiny {
public Collection getServers() {
return Arrays.asList(
// Servers chosen on NO BASIS WHATSOEVER from various sources!
- new Server("arrrlightd.qortal.online", ConnectionType.SSL, 443),
- new Server("arrrlightd1.qortal.online", ConnectionType.SSL, 443),
- new Server("arrrlightd2.qortal.online", ConnectionType.SSL, 443),
+ new Server("wallet-arrr1.qortal.online", ConnectionType.SSL, 443),
+ new Server("wallet-arrr2.qortal.online", ConnectionType.SSL, 443),
+ new Server("wallet-arrr3.qortal.online", ConnectionType.SSL, 443),
new Server("lightd.pirate.black", ConnectionType.SSL, 443));
}
diff --git a/src/main/java/org/qortal/crosschain/Ravencoin.java b/src/main/java/org/qortal/crosschain/Ravencoin.java
index 7bf5b20f..f571a141 100644
--- a/src/main/java/org/qortal/crosschain/Ravencoin.java
+++ b/src/main/java/org/qortal/crosschain/Ravencoin.java
@@ -45,13 +45,16 @@ public class Ravencoin extends Bitcoiny {
return Arrays.asList(
// Servers chosen on NO BASIS WHATSOEVER from various sources!
// Status verified at https://1209k.com/bitcoin-eye/ele.php?chain=rvn
- new Server("aethyn.com", ConnectionType.SSL, 50002),
- new Server("electrum2.rvn.rocks", ConnectionType.SSL, 50002),
- new Server("rvn-dashboard.com", ConnectionType.SSL, 50002),
- new Server("rvn4lyfe.com", ConnectionType.SSL, 50002),
+ //CLOSED new Server("aethyn.com", ConnectionType.SSL, 50002),
+ //CLOSED new Server("electrum2.rvn.rocks", ConnectionType.SSL, 50002),
+ //BEHIND new Server("electrum3.rvn.rocks", ConnectionType.SSL, 50002),
+ new Server("electrum-rvn.qortal.online", ConnectionType.SSL, 50002),
+ new Server("electrum1-rvn.qortal.online", ConnectionType.SSL, 50002),
new Server("electrum1.cipig.net", ConnectionType.SSL, 20051),
new Server("electrum2.cipig.net", ConnectionType.SSL, 20051),
- new Server("electrum3.cipig.net", ConnectionType.SSL, 20051));
+ new Server("electrum3.cipig.net", ConnectionType.SSL, 20051),
+ new Server("rvn-dashboard.com", ConnectionType.SSL, 50002),
+ new Server("rvn4lyfe.com", ConnectionType.SSL, 50002));
}
@Override