@dashevo/dapi-client 0.24.0-dev.17 → 0.24.0-dev.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,7 +30,7 @@ class ListDAPIAddressProvider {
30
30
  }
31
31
 
32
32
  // This is a temporary fix for a localhost masternode.
33
- // On mac os, internal docker IP is used to register masternode, and it's
33
+ // On macOS, internal docker IP is used to register masternode, and it's
34
34
  // not really possible to bind to that address, so that workaround is introduced.
35
35
  const network = networks.get(this.options.network);
36
36
  if (network && network.regtestEnabled) {
@@ -19,10 +19,15 @@ class SimplifiedMasternodeListDAPIAddressProvider {
19
19
  */
20
20
  async getLiveAddress() {
21
21
  const sml = await this.smlProvider.getSimplifiedMNList();
22
- const validMasternodeList = sml.getValidMasternodesList();
22
+ const validMasternodeList = sml.getValidMasternodesList()
23
+ // Keep only HP masternodes
24
+ .filter((smlEntry) => smlEntry.nType === 1);
23
25
 
24
26
  const addressesByRegProTxHashes = {};
27
+ let allowSelfSignedCertificate;
25
28
  this.listDAPIAddressProvider.getAllAddresses().forEach((address) => {
29
+ allowSelfSignedCertificate = address.isSelfSignedCertificateAllowed();
30
+
26
31
  if (!address.getProRegTxHash()) {
27
32
  return;
28
33
  }
@@ -36,6 +41,8 @@ class SimplifiedMasternodeListDAPIAddressProvider {
36
41
  if (!address) {
37
42
  address = new DAPIAddress({
38
43
  host: smlEntry.getIp(),
44
+ port: smlEntry.platformHTTPPort,
45
+ allowSelfSignedCertificate,
39
46
  proRegTxHash: smlEntry.proRegTxHash,
40
47
  });
41
48
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashevo/dapi-client",
3
- "version": "0.24.0-dev.17",
3
+ "version": "0.24.0-dev.19",
4
4
  "description": "Client library used to access Dash DAPI endpoints",
5
5
  "main": "lib/index.js",
6
6
  "contributors": [
@@ -26,11 +26,11 @@
26
26
  }
27
27
  ],
28
28
  "dependencies": {
29
- "@dashevo/dapi-grpc": "0.24.0-dev.17",
30
- "@dashevo/dash-spv": "0.24.0-dev.17",
29
+ "@dashevo/dapi-grpc": "0.24.0-dev.19",
30
+ "@dashevo/dash-spv": "0.24.0-dev.19",
31
31
  "@dashevo/dashcore-lib": "~0.20.0",
32
- "@dashevo/dpp": "0.24.0-dev.17",
33
- "@dashevo/grpc-common": "0.24.0-dev.17",
32
+ "@dashevo/dpp": "0.24.0-dev.19",
33
+ "@dashevo/grpc-common": "0.24.0-dev.19",
34
34
  "bs58": "^4.0.1",
35
35
  "cbor": "^8.0.0",
36
36
  "lodash": "^4.17.21",