@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.
- package/README.md +3 -4
- package/lib/dapiAddressProvider/DAPIAddress.js +14 -40
- package/lib/dapiAddressProvider/ListDAPIAddressProvider.js +1 -2
- package/lib/test/fixtures/getMNListDiffsFixture.js +85 -1066
- package/lib/transport/GrpcTransport/GrpcTransport.js +4 -9
- package/lib/transport/JsonRpcTransport/JsonRpcTransport.js +1 -1
- package/package.json +9 -8
- package/polyfills/fetch-polyfill.js +10 -0
|
@@ -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
|
-
|
|
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()}:${
|
|
144
|
+
return `${protocol}://${address.getHost()}:${address.getPort()}`;
|
|
150
145
|
}
|
|
151
146
|
}
|
|
152
147
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/dapi-client",
|
|
3
|
-
"version": "0.24.0-dev.
|
|
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.
|
|
30
|
-
"@dashevo/dash-spv": "0.24.0-dev.
|
|
31
|
-
"@dashevo/dashcore-lib": "~0.
|
|
32
|
-
"@dashevo/dpp": "0.24.0-dev.
|
|
33
|
-
"@dashevo/grpc-common": "0.24.0-dev.
|
|
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.
|
|
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
|
+
}
|