@dashevo/dapi-grpc 0.23.0 → 0.24.0-dev.10
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/browser.js +13 -5
- package/clients/core/v0/nodejs/CorePromiseClient.js +11 -3
- package/clients/core/v0/web/CorePromiseClient.js +159 -0
- package/clients/core/v0/web/core_pb.d.ts +783 -0
- package/clients/core/v0/web/core_pb_service.d.ts +161 -0
- package/clients/core/v0/web/core_pb_service.js +317 -0
- package/clients/platform/v0/nodejs/PlatformPromiseClient.js +11 -3
- package/clients/platform/v0/nodejs/platform_pbjs.js +348 -20
- package/clients/platform/v0/nodejs/platform_protoc.js +108 -16
- package/clients/platform/v0/web/PlatformPromiseClient.js +130 -0
- package/clients/platform/v0/web/platform_pb.d.ts +608 -0
- package/clients/platform/v0/web/platform_pb.js +108 -16
- package/clients/platform/v0/web/platform_pb_service.d.ts +177 -0
- package/clients/platform/v0/web/platform_pb_service.js +301 -0
- package/lib/utils/parseMetadata.js +27 -0
- package/node.js +4 -0
- package/package.json +3 -3
- package/protos/platform/v0/platform.proto +6 -1
- package/scripts/build.sh +2 -2
- package/clients/core/v0/web/core_grpc_web_pb.js +0 -499
- package/clients/platform/v0/web/platform_grpc_web_pb.js +0 -509
- package/lib/utils/stripHostname.js +0 -15
- package/test/unit/utils/stripHostname.spec.js +0 -23
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const { Metadata: MetadataGrpcJS } = require('@grpc/grpc-js/build/src/metadata');
|
|
2
|
+
const { grpc: { Metadata: MetadataGrpcWeb } } = require('@improbable-eng/grpc-web');
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param {MetadataGrpcJS|MetadataGrpcWeb} metadata
|
|
7
|
+
* @return {{}|{[p: string]: string}}
|
|
8
|
+
*/
|
|
9
|
+
const parseMetadata = (metadata) => {
|
|
10
|
+
if (metadata instanceof MetadataGrpcJS) {
|
|
11
|
+
return metadata.getMap();
|
|
12
|
+
} if (metadata instanceof MetadataGrpcWeb) {
|
|
13
|
+
const parsedMetadata = {};
|
|
14
|
+
metadata.forEach((key, values) => {
|
|
15
|
+
// Mapping each key to the first value associated with it.
|
|
16
|
+
// This corresponds to the getMap() behaviour of the grpc-js Metadata class.
|
|
17
|
+
const [value] = values;
|
|
18
|
+
parsedMetadata[key] = value;
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
return parsedMetadata;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return metadata;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
module.exports = parseMetadata;
|
package/node.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const { Metadata } = require('@grpc/grpc-js/build/src/metadata');
|
|
1
2
|
const CorePromiseClient = require('./clients/core/v0/nodejs/CorePromiseClient');
|
|
2
3
|
const PlatformPromiseClient = require('./clients/platform/v0/nodejs/PlatformPromiseClient');
|
|
3
4
|
|
|
@@ -6,6 +7,7 @@ const protocPlatformMessages = require('./clients/platform/v0/nodejs/platform_pr
|
|
|
6
7
|
|
|
7
8
|
const getCoreDefinition = require('./lib/getCoreDefinition');
|
|
8
9
|
const getPlatformDefinition = require('./lib/getPlatformDefinition');
|
|
10
|
+
const parseMetadata = require('./lib/utils/parseMetadata');
|
|
9
11
|
|
|
10
12
|
const {
|
|
11
13
|
org: {
|
|
@@ -45,4 +47,6 @@ module.exports = {
|
|
|
45
47
|
...protocCoreMessages,
|
|
46
48
|
...protocPlatformMessages,
|
|
47
49
|
},
|
|
50
|
+
parseMetadata,
|
|
51
|
+
Metadata,
|
|
48
52
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/dapi-grpc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0-dev.10",
|
|
4
4
|
"description": "DAPI GRPC definition file and generated clients",
|
|
5
5
|
"browser": "browser.js",
|
|
6
6
|
"main": "node.js",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/dashevo/dapi-grpc#readme",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@dashevo/grpc-common": "0.
|
|
36
|
+
"@dashevo/grpc-common": "0.24.0-dev.10",
|
|
37
37
|
"@dashevo/protobufjs": "6.10.5",
|
|
38
38
|
"@grpc/grpc-js": "^1.3.7",
|
|
39
|
+
"@improbable-eng/grpc-web": "^0.15.0",
|
|
39
40
|
"google-protobuf": "^3.12.2",
|
|
40
|
-
"grpc-web": "1.2.1",
|
|
41
41
|
"long": "^5.2.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
@@ -2,6 +2,8 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package org.dash.platform.dapi.v0;
|
|
4
4
|
|
|
5
|
+
import "google/protobuf/timestamp.proto";
|
|
6
|
+
|
|
5
7
|
service Platform {
|
|
6
8
|
rpc broadcastStateTransition (BroadcastStateTransitionRequest) returns (BroadcastStateTransitionResponse);
|
|
7
9
|
rpc getIdentity (GetIdentityRequest) returns (GetIdentityResponse);
|
|
@@ -14,13 +16,16 @@ service Platform {
|
|
|
14
16
|
|
|
15
17
|
message Proof {
|
|
16
18
|
bytes merkle_proof = 1;
|
|
17
|
-
bytes
|
|
19
|
+
bytes quorum_hash = 2;
|
|
18
20
|
bytes signature = 3;
|
|
21
|
+
uint32 round = 4;
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
message ResponseMetadata {
|
|
22
25
|
int64 height = 1;
|
|
23
26
|
uint32 core_chain_locked_height = 2;
|
|
27
|
+
uint64 time_ms = 3;
|
|
28
|
+
uint32 protocol_version = 4;
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
message StateTransitionBroadcastError {
|
package/scripts/build.sh
CHANGED
|
@@ -31,7 +31,7 @@ docker run -v "$CORE_PROTO_PATH:$CORE_PROTO_PATH" \
|
|
|
31
31
|
--rm \
|
|
32
32
|
"$PROTOC_IMAGE" \
|
|
33
33
|
--js_out="import_style=commonjs:$CORE_WEB_OUT_PATH" \
|
|
34
|
-
--
|
|
34
|
+
--ts_out="service=grpc-web:$CORE_WEB_OUT_PATH" \
|
|
35
35
|
-I="$CORE_PROTO_PATH" \
|
|
36
36
|
"core.proto"
|
|
37
37
|
|
|
@@ -63,7 +63,7 @@ docker run -v "$PLATFORM_PROTO_PATH:$PLATFORM_PROTO_PATH" \
|
|
|
63
63
|
--rm \
|
|
64
64
|
"$PROTOC_IMAGE" \
|
|
65
65
|
--js_out="import_style=commonjs:$PLATFORM_WEB_OUT_PATH" \
|
|
66
|
-
--
|
|
66
|
+
--ts_out="service=grpc-web:$PLATFORM_WEB_OUT_PATH" \
|
|
67
67
|
-I="$PLATFORM_PROTO_PATH" \
|
|
68
68
|
"platform.proto"
|
|
69
69
|
|
|
@@ -1,499 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview gRPC-Web generated client stub for org.dash.platform.dapi.v0
|
|
3
|
-
* @enhanceable
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// Code generated by protoc-gen-grpc-web. DO NOT EDIT.
|
|
8
|
-
// versions:
|
|
9
|
-
// protoc-gen-grpc-web v1.4.2
|
|
10
|
-
// protoc v3.18.1
|
|
11
|
-
// source: core.proto
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/* eslint-disable */
|
|
15
|
-
// @ts-nocheck
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const grpc = {};
|
|
20
|
-
grpc.web = require('grpc-web');
|
|
21
|
-
|
|
22
|
-
const proto = {};
|
|
23
|
-
proto.org = {};
|
|
24
|
-
proto.org.dash = {};
|
|
25
|
-
proto.org.dash.platform = {};
|
|
26
|
-
proto.org.dash.platform.dapi = {};
|
|
27
|
-
proto.org.dash.platform.dapi.v0 = require('./core_pb.js');
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @param {string} hostname
|
|
31
|
-
* @param {?Object} credentials
|
|
32
|
-
* @param {?grpc.web.ClientOptions} options
|
|
33
|
-
* @constructor
|
|
34
|
-
* @struct
|
|
35
|
-
* @final
|
|
36
|
-
*/
|
|
37
|
-
proto.org.dash.platform.dapi.v0.CoreClient =
|
|
38
|
-
function(hostname, credentials, options) {
|
|
39
|
-
if (!options) options = {};
|
|
40
|
-
options.format = 'text';
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @private @const {!grpc.web.GrpcWebClientBase} The client
|
|
44
|
-
*/
|
|
45
|
-
this.client_ = new grpc.web.GrpcWebClientBase(options);
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @private @const {string} The hostname
|
|
49
|
-
*/
|
|
50
|
-
this.hostname_ = hostname.replace(/\/+$/, '');
|
|
51
|
-
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @param {string} hostname
|
|
57
|
-
* @param {?Object} credentials
|
|
58
|
-
* @param {?grpc.web.ClientOptions} options
|
|
59
|
-
* @constructor
|
|
60
|
-
* @struct
|
|
61
|
-
* @final
|
|
62
|
-
*/
|
|
63
|
-
proto.org.dash.platform.dapi.v0.CorePromiseClient =
|
|
64
|
-
function(hostname, credentials, options) {
|
|
65
|
-
if (!options) options = {};
|
|
66
|
-
options.format = 'text';
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @private @const {!grpc.web.GrpcWebClientBase} The client
|
|
70
|
-
*/
|
|
71
|
-
this.client_ = new grpc.web.GrpcWebClientBase(options);
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* @private @const {string} The hostname
|
|
75
|
-
*/
|
|
76
|
-
this.hostname_ = hostname.replace(/\/+$/, '');
|
|
77
|
-
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* @const
|
|
83
|
-
* @type {!grpc.web.MethodDescriptor<
|
|
84
|
-
* !proto.org.dash.platform.dapi.v0.GetStatusRequest,
|
|
85
|
-
* !proto.org.dash.platform.dapi.v0.GetStatusResponse>}
|
|
86
|
-
*/
|
|
87
|
-
const methodDescriptor_Core_getStatus = new grpc.web.MethodDescriptor(
|
|
88
|
-
'/org.dash.platform.dapi.v0.Core/getStatus',
|
|
89
|
-
grpc.web.MethodType.UNARY,
|
|
90
|
-
proto.org.dash.platform.dapi.v0.GetStatusRequest,
|
|
91
|
-
proto.org.dash.platform.dapi.v0.GetStatusResponse,
|
|
92
|
-
/**
|
|
93
|
-
* @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest} request
|
|
94
|
-
* @return {!Uint8Array}
|
|
95
|
-
*/
|
|
96
|
-
function(request) {
|
|
97
|
-
return request.serializeBinary();
|
|
98
|
-
},
|
|
99
|
-
proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinary
|
|
100
|
-
);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest} request The
|
|
105
|
-
* request proto
|
|
106
|
-
* @param {?Object<string, string>} metadata User defined
|
|
107
|
-
* call metadata
|
|
108
|
-
* @param {function(?grpc.web.RpcError, ?proto.org.dash.platform.dapi.v0.GetStatusResponse)}
|
|
109
|
-
* callback The callback function(error, response)
|
|
110
|
-
* @return {!grpc.web.ClientReadableStream<!proto.org.dash.platform.dapi.v0.GetStatusResponse>|undefined}
|
|
111
|
-
* The XHR Node Readable Stream
|
|
112
|
-
*/
|
|
113
|
-
proto.org.dash.platform.dapi.v0.CoreClient.prototype.getStatus =
|
|
114
|
-
function(request, metadata, callback) {
|
|
115
|
-
return this.client_.rpcCall(this.hostname_ +
|
|
116
|
-
'/org.dash.platform.dapi.v0.Core/getStatus',
|
|
117
|
-
request,
|
|
118
|
-
metadata || {},
|
|
119
|
-
methodDescriptor_Core_getStatus,
|
|
120
|
-
callback);
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest} request The
|
|
126
|
-
* request proto
|
|
127
|
-
* @param {?Object<string, string>=} metadata User defined
|
|
128
|
-
* call metadata
|
|
129
|
-
* @return {!Promise<!proto.org.dash.platform.dapi.v0.GetStatusResponse>}
|
|
130
|
-
* Promise that resolves to the response
|
|
131
|
-
*/
|
|
132
|
-
proto.org.dash.platform.dapi.v0.CorePromiseClient.prototype.getStatus =
|
|
133
|
-
function(request, metadata) {
|
|
134
|
-
return this.client_.unaryCall(this.hostname_ +
|
|
135
|
-
'/org.dash.platform.dapi.v0.Core/getStatus',
|
|
136
|
-
request,
|
|
137
|
-
metadata || {},
|
|
138
|
-
methodDescriptor_Core_getStatus);
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* @const
|
|
144
|
-
* @type {!grpc.web.MethodDescriptor<
|
|
145
|
-
* !proto.org.dash.platform.dapi.v0.GetBlockRequest,
|
|
146
|
-
* !proto.org.dash.platform.dapi.v0.GetBlockResponse>}
|
|
147
|
-
*/
|
|
148
|
-
const methodDescriptor_Core_getBlock = new grpc.web.MethodDescriptor(
|
|
149
|
-
'/org.dash.platform.dapi.v0.Core/getBlock',
|
|
150
|
-
grpc.web.MethodType.UNARY,
|
|
151
|
-
proto.org.dash.platform.dapi.v0.GetBlockRequest,
|
|
152
|
-
proto.org.dash.platform.dapi.v0.GetBlockResponse,
|
|
153
|
-
/**
|
|
154
|
-
* @param {!proto.org.dash.platform.dapi.v0.GetBlockRequest} request
|
|
155
|
-
* @return {!Uint8Array}
|
|
156
|
-
*/
|
|
157
|
-
function(request) {
|
|
158
|
-
return request.serializeBinary();
|
|
159
|
-
},
|
|
160
|
-
proto.org.dash.platform.dapi.v0.GetBlockResponse.deserializeBinary
|
|
161
|
-
);
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* @param {!proto.org.dash.platform.dapi.v0.GetBlockRequest} request The
|
|
166
|
-
* request proto
|
|
167
|
-
* @param {?Object<string, string>} metadata User defined
|
|
168
|
-
* call metadata
|
|
169
|
-
* @param {function(?grpc.web.RpcError, ?proto.org.dash.platform.dapi.v0.GetBlockResponse)}
|
|
170
|
-
* callback The callback function(error, response)
|
|
171
|
-
* @return {!grpc.web.ClientReadableStream<!proto.org.dash.platform.dapi.v0.GetBlockResponse>|undefined}
|
|
172
|
-
* The XHR Node Readable Stream
|
|
173
|
-
*/
|
|
174
|
-
proto.org.dash.platform.dapi.v0.CoreClient.prototype.getBlock =
|
|
175
|
-
function(request, metadata, callback) {
|
|
176
|
-
return this.client_.rpcCall(this.hostname_ +
|
|
177
|
-
'/org.dash.platform.dapi.v0.Core/getBlock',
|
|
178
|
-
request,
|
|
179
|
-
metadata || {},
|
|
180
|
-
methodDescriptor_Core_getBlock,
|
|
181
|
-
callback);
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* @param {!proto.org.dash.platform.dapi.v0.GetBlockRequest} request The
|
|
187
|
-
* request proto
|
|
188
|
-
* @param {?Object<string, string>=} metadata User defined
|
|
189
|
-
* call metadata
|
|
190
|
-
* @return {!Promise<!proto.org.dash.platform.dapi.v0.GetBlockResponse>}
|
|
191
|
-
* Promise that resolves to the response
|
|
192
|
-
*/
|
|
193
|
-
proto.org.dash.platform.dapi.v0.CorePromiseClient.prototype.getBlock =
|
|
194
|
-
function(request, metadata) {
|
|
195
|
-
return this.client_.unaryCall(this.hostname_ +
|
|
196
|
-
'/org.dash.platform.dapi.v0.Core/getBlock',
|
|
197
|
-
request,
|
|
198
|
-
metadata || {},
|
|
199
|
-
methodDescriptor_Core_getBlock);
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* @const
|
|
205
|
-
* @type {!grpc.web.MethodDescriptor<
|
|
206
|
-
* !proto.org.dash.platform.dapi.v0.BroadcastTransactionRequest,
|
|
207
|
-
* !proto.org.dash.platform.dapi.v0.BroadcastTransactionResponse>}
|
|
208
|
-
*/
|
|
209
|
-
const methodDescriptor_Core_broadcastTransaction = new grpc.web.MethodDescriptor(
|
|
210
|
-
'/org.dash.platform.dapi.v0.Core/broadcastTransaction',
|
|
211
|
-
grpc.web.MethodType.UNARY,
|
|
212
|
-
proto.org.dash.platform.dapi.v0.BroadcastTransactionRequest,
|
|
213
|
-
proto.org.dash.platform.dapi.v0.BroadcastTransactionResponse,
|
|
214
|
-
/**
|
|
215
|
-
* @param {!proto.org.dash.platform.dapi.v0.BroadcastTransactionRequest} request
|
|
216
|
-
* @return {!Uint8Array}
|
|
217
|
-
*/
|
|
218
|
-
function(request) {
|
|
219
|
-
return request.serializeBinary();
|
|
220
|
-
},
|
|
221
|
-
proto.org.dash.platform.dapi.v0.BroadcastTransactionResponse.deserializeBinary
|
|
222
|
-
);
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* @param {!proto.org.dash.platform.dapi.v0.BroadcastTransactionRequest} request The
|
|
227
|
-
* request proto
|
|
228
|
-
* @param {?Object<string, string>} metadata User defined
|
|
229
|
-
* call metadata
|
|
230
|
-
* @param {function(?grpc.web.RpcError, ?proto.org.dash.platform.dapi.v0.BroadcastTransactionResponse)}
|
|
231
|
-
* callback The callback function(error, response)
|
|
232
|
-
* @return {!grpc.web.ClientReadableStream<!proto.org.dash.platform.dapi.v0.BroadcastTransactionResponse>|undefined}
|
|
233
|
-
* The XHR Node Readable Stream
|
|
234
|
-
*/
|
|
235
|
-
proto.org.dash.platform.dapi.v0.CoreClient.prototype.broadcastTransaction =
|
|
236
|
-
function(request, metadata, callback) {
|
|
237
|
-
return this.client_.rpcCall(this.hostname_ +
|
|
238
|
-
'/org.dash.platform.dapi.v0.Core/broadcastTransaction',
|
|
239
|
-
request,
|
|
240
|
-
metadata || {},
|
|
241
|
-
methodDescriptor_Core_broadcastTransaction,
|
|
242
|
-
callback);
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* @param {!proto.org.dash.platform.dapi.v0.BroadcastTransactionRequest} request The
|
|
248
|
-
* request proto
|
|
249
|
-
* @param {?Object<string, string>=} metadata User defined
|
|
250
|
-
* call metadata
|
|
251
|
-
* @return {!Promise<!proto.org.dash.platform.dapi.v0.BroadcastTransactionResponse>}
|
|
252
|
-
* Promise that resolves to the response
|
|
253
|
-
*/
|
|
254
|
-
proto.org.dash.platform.dapi.v0.CorePromiseClient.prototype.broadcastTransaction =
|
|
255
|
-
function(request, metadata) {
|
|
256
|
-
return this.client_.unaryCall(this.hostname_ +
|
|
257
|
-
'/org.dash.platform.dapi.v0.Core/broadcastTransaction',
|
|
258
|
-
request,
|
|
259
|
-
metadata || {},
|
|
260
|
-
methodDescriptor_Core_broadcastTransaction);
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* @const
|
|
266
|
-
* @type {!grpc.web.MethodDescriptor<
|
|
267
|
-
* !proto.org.dash.platform.dapi.v0.GetTransactionRequest,
|
|
268
|
-
* !proto.org.dash.platform.dapi.v0.GetTransactionResponse>}
|
|
269
|
-
*/
|
|
270
|
-
const methodDescriptor_Core_getTransaction = new grpc.web.MethodDescriptor(
|
|
271
|
-
'/org.dash.platform.dapi.v0.Core/getTransaction',
|
|
272
|
-
grpc.web.MethodType.UNARY,
|
|
273
|
-
proto.org.dash.platform.dapi.v0.GetTransactionRequest,
|
|
274
|
-
proto.org.dash.platform.dapi.v0.GetTransactionResponse,
|
|
275
|
-
/**
|
|
276
|
-
* @param {!proto.org.dash.platform.dapi.v0.GetTransactionRequest} request
|
|
277
|
-
* @return {!Uint8Array}
|
|
278
|
-
*/
|
|
279
|
-
function(request) {
|
|
280
|
-
return request.serializeBinary();
|
|
281
|
-
},
|
|
282
|
-
proto.org.dash.platform.dapi.v0.GetTransactionResponse.deserializeBinary
|
|
283
|
-
);
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* @param {!proto.org.dash.platform.dapi.v0.GetTransactionRequest} request The
|
|
288
|
-
* request proto
|
|
289
|
-
* @param {?Object<string, string>} metadata User defined
|
|
290
|
-
* call metadata
|
|
291
|
-
* @param {function(?grpc.web.RpcError, ?proto.org.dash.platform.dapi.v0.GetTransactionResponse)}
|
|
292
|
-
* callback The callback function(error, response)
|
|
293
|
-
* @return {!grpc.web.ClientReadableStream<!proto.org.dash.platform.dapi.v0.GetTransactionResponse>|undefined}
|
|
294
|
-
* The XHR Node Readable Stream
|
|
295
|
-
*/
|
|
296
|
-
proto.org.dash.platform.dapi.v0.CoreClient.prototype.getTransaction =
|
|
297
|
-
function(request, metadata, callback) {
|
|
298
|
-
return this.client_.rpcCall(this.hostname_ +
|
|
299
|
-
'/org.dash.platform.dapi.v0.Core/getTransaction',
|
|
300
|
-
request,
|
|
301
|
-
metadata || {},
|
|
302
|
-
methodDescriptor_Core_getTransaction,
|
|
303
|
-
callback);
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* @param {!proto.org.dash.platform.dapi.v0.GetTransactionRequest} request The
|
|
309
|
-
* request proto
|
|
310
|
-
* @param {?Object<string, string>=} metadata User defined
|
|
311
|
-
* call metadata
|
|
312
|
-
* @return {!Promise<!proto.org.dash.platform.dapi.v0.GetTransactionResponse>}
|
|
313
|
-
* Promise that resolves to the response
|
|
314
|
-
*/
|
|
315
|
-
proto.org.dash.platform.dapi.v0.CorePromiseClient.prototype.getTransaction =
|
|
316
|
-
function(request, metadata) {
|
|
317
|
-
return this.client_.unaryCall(this.hostname_ +
|
|
318
|
-
'/org.dash.platform.dapi.v0.Core/getTransaction',
|
|
319
|
-
request,
|
|
320
|
-
metadata || {},
|
|
321
|
-
methodDescriptor_Core_getTransaction);
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* @const
|
|
327
|
-
* @type {!grpc.web.MethodDescriptor<
|
|
328
|
-
* !proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest,
|
|
329
|
-
* !proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse>}
|
|
330
|
-
*/
|
|
331
|
-
const methodDescriptor_Core_getEstimatedTransactionFee = new grpc.web.MethodDescriptor(
|
|
332
|
-
'/org.dash.platform.dapi.v0.Core/getEstimatedTransactionFee',
|
|
333
|
-
grpc.web.MethodType.UNARY,
|
|
334
|
-
proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest,
|
|
335
|
-
proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse,
|
|
336
|
-
/**
|
|
337
|
-
* @param {!proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest} request
|
|
338
|
-
* @return {!Uint8Array}
|
|
339
|
-
*/
|
|
340
|
-
function(request) {
|
|
341
|
-
return request.serializeBinary();
|
|
342
|
-
},
|
|
343
|
-
proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse.deserializeBinary
|
|
344
|
-
);
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* @param {!proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest} request The
|
|
349
|
-
* request proto
|
|
350
|
-
* @param {?Object<string, string>} metadata User defined
|
|
351
|
-
* call metadata
|
|
352
|
-
* @param {function(?grpc.web.RpcError, ?proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse)}
|
|
353
|
-
* callback The callback function(error, response)
|
|
354
|
-
* @return {!grpc.web.ClientReadableStream<!proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse>|undefined}
|
|
355
|
-
* The XHR Node Readable Stream
|
|
356
|
-
*/
|
|
357
|
-
proto.org.dash.platform.dapi.v0.CoreClient.prototype.getEstimatedTransactionFee =
|
|
358
|
-
function(request, metadata, callback) {
|
|
359
|
-
return this.client_.rpcCall(this.hostname_ +
|
|
360
|
-
'/org.dash.platform.dapi.v0.Core/getEstimatedTransactionFee',
|
|
361
|
-
request,
|
|
362
|
-
metadata || {},
|
|
363
|
-
methodDescriptor_Core_getEstimatedTransactionFee,
|
|
364
|
-
callback);
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* @param {!proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest} request The
|
|
370
|
-
* request proto
|
|
371
|
-
* @param {?Object<string, string>=} metadata User defined
|
|
372
|
-
* call metadata
|
|
373
|
-
* @return {!Promise<!proto.org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse>}
|
|
374
|
-
* Promise that resolves to the response
|
|
375
|
-
*/
|
|
376
|
-
proto.org.dash.platform.dapi.v0.CorePromiseClient.prototype.getEstimatedTransactionFee =
|
|
377
|
-
function(request, metadata) {
|
|
378
|
-
return this.client_.unaryCall(this.hostname_ +
|
|
379
|
-
'/org.dash.platform.dapi.v0.Core/getEstimatedTransactionFee',
|
|
380
|
-
request,
|
|
381
|
-
metadata || {},
|
|
382
|
-
methodDescriptor_Core_getEstimatedTransactionFee);
|
|
383
|
-
};
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* @const
|
|
388
|
-
* @type {!grpc.web.MethodDescriptor<
|
|
389
|
-
* !proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest,
|
|
390
|
-
* !proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse>}
|
|
391
|
-
*/
|
|
392
|
-
const methodDescriptor_Core_subscribeToBlockHeadersWithChainLocks = new grpc.web.MethodDescriptor(
|
|
393
|
-
'/org.dash.platform.dapi.v0.Core/subscribeToBlockHeadersWithChainLocks',
|
|
394
|
-
grpc.web.MethodType.SERVER_STREAMING,
|
|
395
|
-
proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest,
|
|
396
|
-
proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse,
|
|
397
|
-
/**
|
|
398
|
-
* @param {!proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest} request
|
|
399
|
-
* @return {!Uint8Array}
|
|
400
|
-
*/
|
|
401
|
-
function(request) {
|
|
402
|
-
return request.serializeBinary();
|
|
403
|
-
},
|
|
404
|
-
proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse.deserializeBinary
|
|
405
|
-
);
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
/**
|
|
409
|
-
* @param {!proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest} request The request proto
|
|
410
|
-
* @param {?Object<string, string>=} metadata User defined
|
|
411
|
-
* call metadata
|
|
412
|
-
* @return {!grpc.web.ClientReadableStream<!proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse>}
|
|
413
|
-
* The XHR Node Readable Stream
|
|
414
|
-
*/
|
|
415
|
-
proto.org.dash.platform.dapi.v0.CoreClient.prototype.subscribeToBlockHeadersWithChainLocks =
|
|
416
|
-
function(request, metadata) {
|
|
417
|
-
return this.client_.serverStreaming(this.hostname_ +
|
|
418
|
-
'/org.dash.platform.dapi.v0.Core/subscribeToBlockHeadersWithChainLocks',
|
|
419
|
-
request,
|
|
420
|
-
metadata || {},
|
|
421
|
-
methodDescriptor_Core_subscribeToBlockHeadersWithChainLocks);
|
|
422
|
-
};
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* @param {!proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest} request The request proto
|
|
427
|
-
* @param {?Object<string, string>=} metadata User defined
|
|
428
|
-
* call metadata
|
|
429
|
-
* @return {!grpc.web.ClientReadableStream<!proto.org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse>}
|
|
430
|
-
* The XHR Node Readable Stream
|
|
431
|
-
*/
|
|
432
|
-
proto.org.dash.platform.dapi.v0.CorePromiseClient.prototype.subscribeToBlockHeadersWithChainLocks =
|
|
433
|
-
function(request, metadata) {
|
|
434
|
-
return this.client_.serverStreaming(this.hostname_ +
|
|
435
|
-
'/org.dash.platform.dapi.v0.Core/subscribeToBlockHeadersWithChainLocks',
|
|
436
|
-
request,
|
|
437
|
-
metadata || {},
|
|
438
|
-
methodDescriptor_Core_subscribeToBlockHeadersWithChainLocks);
|
|
439
|
-
};
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* @const
|
|
444
|
-
* @type {!grpc.web.MethodDescriptor<
|
|
445
|
-
* !proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest,
|
|
446
|
-
* !proto.org.dash.platform.dapi.v0.TransactionsWithProofsResponse>}
|
|
447
|
-
*/
|
|
448
|
-
const methodDescriptor_Core_subscribeToTransactionsWithProofs = new grpc.web.MethodDescriptor(
|
|
449
|
-
'/org.dash.platform.dapi.v0.Core/subscribeToTransactionsWithProofs',
|
|
450
|
-
grpc.web.MethodType.SERVER_STREAMING,
|
|
451
|
-
proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest,
|
|
452
|
-
proto.org.dash.platform.dapi.v0.TransactionsWithProofsResponse,
|
|
453
|
-
/**
|
|
454
|
-
* @param {!proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest} request
|
|
455
|
-
* @return {!Uint8Array}
|
|
456
|
-
*/
|
|
457
|
-
function(request) {
|
|
458
|
-
return request.serializeBinary();
|
|
459
|
-
},
|
|
460
|
-
proto.org.dash.platform.dapi.v0.TransactionsWithProofsResponse.deserializeBinary
|
|
461
|
-
);
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
/**
|
|
465
|
-
* @param {!proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest} request The request proto
|
|
466
|
-
* @param {?Object<string, string>=} metadata User defined
|
|
467
|
-
* call metadata
|
|
468
|
-
* @return {!grpc.web.ClientReadableStream<!proto.org.dash.platform.dapi.v0.TransactionsWithProofsResponse>}
|
|
469
|
-
* The XHR Node Readable Stream
|
|
470
|
-
*/
|
|
471
|
-
proto.org.dash.platform.dapi.v0.CoreClient.prototype.subscribeToTransactionsWithProofs =
|
|
472
|
-
function(request, metadata) {
|
|
473
|
-
return this.client_.serverStreaming(this.hostname_ +
|
|
474
|
-
'/org.dash.platform.dapi.v0.Core/subscribeToTransactionsWithProofs',
|
|
475
|
-
request,
|
|
476
|
-
metadata || {},
|
|
477
|
-
methodDescriptor_Core_subscribeToTransactionsWithProofs);
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* @param {!proto.org.dash.platform.dapi.v0.TransactionsWithProofsRequest} request The request proto
|
|
483
|
-
* @param {?Object<string, string>=} metadata User defined
|
|
484
|
-
* call metadata
|
|
485
|
-
* @return {!grpc.web.ClientReadableStream<!proto.org.dash.platform.dapi.v0.TransactionsWithProofsResponse>}
|
|
486
|
-
* The XHR Node Readable Stream
|
|
487
|
-
*/
|
|
488
|
-
proto.org.dash.platform.dapi.v0.CorePromiseClient.prototype.subscribeToTransactionsWithProofs =
|
|
489
|
-
function(request, metadata) {
|
|
490
|
-
return this.client_.serverStreaming(this.hostname_ +
|
|
491
|
-
'/org.dash.platform.dapi.v0.Core/subscribeToTransactionsWithProofs',
|
|
492
|
-
request,
|
|
493
|
-
metadata || {},
|
|
494
|
-
methodDescriptor_Core_subscribeToTransactionsWithProofs);
|
|
495
|
-
};
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
module.exports = proto.org.dash.platform.dapi.v0;
|
|
499
|
-
|