@dashevo/dapi-client 0.24.0-dev.12 → 0.24.0-dev.14

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.
@@ -133,20 +133,15 @@ class GrpcTransport {
133
133
  */
134
134
  makeGrpcUrlFromAddress(address) {
135
135
  let protocol = address.getProtocol();
136
- let port = address.getHttpPort();
137
-
138
136
  // For NodeJS Client
139
137
  if (typeof process !== 'undefined'
140
138
  && process.versions != null
141
- && process.versions.node != null) {
142
- port = address.getGrpcPort();
143
-
144
- if (address.isSelfSignedCertificateAllowed()) {
145
- protocol = 'http';
146
- }
139
+ && process.versions.node != null
140
+ && address.isSelfSignedCertificateAllowed()) {
141
+ protocol = 'http';
147
142
  }
148
143
 
149
- return `${protocol}://${address.getHost()}:${port}`;
144
+ return `${protocol}://${address.getHost()}:${address.getPort()}`;
150
145
  }
151
146
  }
152
147
 
@@ -67,7 +67,7 @@ class JsonRpcTransport {
67
67
  const result = await this.requestJsonRpc(
68
68
  address.getProtocol(),
69
69
  address.getHost(),
70
- address.getHttpPort(),
70
+ address.getPort(),
71
71
  address.isSelfSignedCertificateAllowed(),
72
72
  method,
73
73
  params,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashevo/dapi-client",
3
- "version": "0.24.0-dev.12",
3
+ "version": "0.24.0-dev.14",
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.12",
30
- "@dashevo/dash-spv": "0.24.0-dev.12",
31
- "@dashevo/dashcore-lib": "~0.19.44",
32
- "@dashevo/dpp": "0.24.0-dev.12",
33
- "@dashevo/grpc-common": "0.24.0-dev.12",
29
+ "@dashevo/dapi-grpc": "0.24.0-dev.14",
30
+ "@dashevo/dash-spv": "0.24.0-dev.14",
31
+ "@dashevo/dashcore-lib": "~0.20.0",
32
+ "@dashevo/dpp": "0.24.0-dev.14",
33
+ "@dashevo/grpc-common": "0.24.0-dev.14",
34
34
  "bs58": "^4.0.1",
35
35
  "cbor": "^8.0.0",
36
36
  "lodash": "^4.17.21",
@@ -72,12 +72,13 @@
72
72
  "string_decoder": "^1.3.0",
73
73
  "url": "^0.11.0",
74
74
  "util": "^0.12.4",
75
- "webpack": "^5.59.1",
75
+ "webpack": "^5.76.1",
76
76
  "webpack-cli": "^4.9.1"
77
77
  },
78
78
  "files": [
79
79
  "docs",
80
- "lib"
80
+ "lib",
81
+ "polyfills"
81
82
  ],
82
83
  "scripts": {
83
84
  "build:web": "webpack",
@@ -0,0 +1,10 @@
1
+ /* eslint-disable */
2
+
3
+ const { default: fetch, Headers, Request, Response } = require('node-fetch');
4
+
5
+ if (!globalThis.fetch) {
6
+ globalThis.fetch = fetch;
7
+ globalThis.Headers = Headers;
8
+ globalThis.Request = Request;
9
+ globalThis.Response = Response;
10
+ }