forked from scalar-labs/scalardl-node-client-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscalar_grpc_pb.js
409 lines (362 loc) · 15.5 KB
/
scalar_grpc_pb.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
// GENERATED CODE -- DO NOT EDIT!
'use strict';
var grpc = require('grpc');
var scalar_pb = require('./scalar_pb.js');
var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
function serialize_google_protobuf_Empty(arg) {
if (!(arg instanceof google_protobuf_empty_pb.Empty)) {
throw new Error('Expected argument of type google.protobuf.Empty');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_google_protobuf_Empty(buffer_arg) {
return google_protobuf_empty_pb.Empty.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_CertificateRegistrationRequest(arg) {
if (!(arg instanceof scalar_pb.CertificateRegistrationRequest)) {
throw new Error('Expected argument of type rpc.CertificateRegistrationRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_CertificateRegistrationRequest(buffer_arg) {
return scalar_pb.CertificateRegistrationRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_ContractExecutionRequest(arg) {
if (!(arg instanceof scalar_pb.ContractExecutionRequest)) {
throw new Error('Expected argument of type rpc.ContractExecutionRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_ContractExecutionRequest(buffer_arg) {
return scalar_pb.ContractExecutionRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_ContractExecutionResponse(arg) {
if (!(arg instanceof scalar_pb.ContractExecutionResponse)) {
throw new Error('Expected argument of type rpc.ContractExecutionResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_ContractExecutionResponse(buffer_arg) {
return scalar_pb.ContractExecutionResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_ContractRegistrationRequest(arg) {
if (!(arg instanceof scalar_pb.ContractRegistrationRequest)) {
throw new Error('Expected argument of type rpc.ContractRegistrationRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_ContractRegistrationRequest(buffer_arg) {
return scalar_pb.ContractRegistrationRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_ContractsListingRequest(arg) {
if (!(arg instanceof scalar_pb.ContractsListingRequest)) {
throw new Error('Expected argument of type rpc.ContractsListingRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_ContractsListingRequest(buffer_arg) {
return scalar_pb.ContractsListingRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_ContractsListingResponse(arg) {
if (!(arg instanceof scalar_pb.ContractsListingResponse)) {
throw new Error('Expected argument of type rpc.ContractsListingResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_ContractsListingResponse(buffer_arg) {
return scalar_pb.ContractsListingResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_FunctionRegistrationRequest(arg) {
if (!(arg instanceof scalar_pb.FunctionRegistrationRequest)) {
throw new Error('Expected argument of type rpc.FunctionRegistrationRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_FunctionRegistrationRequest(buffer_arg) {
return scalar_pb.FunctionRegistrationRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_IdentifiableContractExecutionResponse(arg) {
if (!(arg instanceof scalar_pb.IdentifiableContractExecutionResponse)) {
throw new Error('Expected argument of type rpc.IdentifiableContractExecutionResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_IdentifiableContractExecutionResponse(buffer_arg) {
return scalar_pb.IdentifiableContractExecutionResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_LedgerValidationRequest(arg) {
if (!(arg instanceof scalar_pb.LedgerValidationRequest)) {
throw new Error('Expected argument of type rpc.LedgerValidationRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_LedgerValidationRequest(buffer_arg) {
return scalar_pb.LedgerValidationRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_LedgerValidationResponse(arg) {
if (!(arg instanceof scalar_pb.LedgerValidationResponse)) {
throw new Error('Expected argument of type rpc.LedgerValidationResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_LedgerValidationResponse(buffer_arg) {
return scalar_pb.LedgerValidationResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_PauseRequest(arg) {
if (!(arg instanceof scalar_pb.PauseRequest)) {
throw new Error('Expected argument of type rpc.PauseRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_PauseRequest(buffer_arg) {
return scalar_pb.PauseRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_ProofRetrievalRequest(arg) {
if (!(arg instanceof scalar_pb.ProofRetrievalRequest)) {
throw new Error('Expected argument of type rpc.ProofRetrievalRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_ProofRetrievalRequest(buffer_arg) {
return scalar_pb.ProofRetrievalRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_ProofRetrievalResponse(arg) {
if (!(arg instanceof scalar_pb.ProofRetrievalResponse)) {
throw new Error('Expected argument of type rpc.ProofRetrievalResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_ProofRetrievalResponse(buffer_arg) {
return scalar_pb.ProofRetrievalResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_ProofsRegistrationRequest(arg) {
if (!(arg instanceof scalar_pb.ProofsRegistrationRequest)) {
throw new Error('Expected argument of type rpc.ProofsRegistrationRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_ProofsRegistrationRequest(buffer_arg) {
return scalar_pb.ProofsRegistrationRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_ResultRetrievalRequest(arg) {
if (!(arg instanceof scalar_pb.ResultRetrievalRequest)) {
throw new Error('Expected argument of type rpc.ResultRetrievalRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_ResultRetrievalRequest(buffer_arg) {
return scalar_pb.ResultRetrievalRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_StateRetrievalRequest(arg) {
if (!(arg instanceof scalar_pb.StateRetrievalRequest)) {
throw new Error('Expected argument of type rpc.StateRetrievalRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_StateRetrievalRequest(buffer_arg) {
return scalar_pb.StateRetrievalRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_StateRetrievalResponse(arg) {
if (!(arg instanceof scalar_pb.StateRetrievalResponse)) {
throw new Error('Expected argument of type rpc.StateRetrievalResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_StateRetrievalResponse(buffer_arg) {
return scalar_pb.StateRetrievalResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_rpc_StatsResponse(arg) {
if (!(arg instanceof scalar_pb.StatsResponse)) {
throw new Error('Expected argument of type rpc.StatsResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_rpc_StatsResponse(buffer_arg) {
return scalar_pb.StatsResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
// Ledger service definition.
var LedgerService = exports.LedgerService = {
registerContract: {
path: '/rpc.Ledger/RegisterContract',
requestStream: false,
responseStream: false,
requestType: scalar_pb.ContractRegistrationRequest,
responseType: google_protobuf_empty_pb.Empty,
requestSerialize: serialize_rpc_ContractRegistrationRequest,
requestDeserialize: deserialize_rpc_ContractRegistrationRequest,
responseSerialize: serialize_google_protobuf_Empty,
responseDeserialize: deserialize_google_protobuf_Empty,
},
listContracts: {
path: '/rpc.Ledger/ListContracts',
requestStream: false,
responseStream: false,
requestType: scalar_pb.ContractsListingRequest,
responseType: scalar_pb.ContractsListingResponse,
requestSerialize: serialize_rpc_ContractsListingRequest,
requestDeserialize: deserialize_rpc_ContractsListingRequest,
responseSerialize: serialize_rpc_ContractsListingResponse,
responseDeserialize: deserialize_rpc_ContractsListingResponse,
},
executeContract: {
path: '/rpc.Ledger/ExecuteContract',
requestStream: false,
responseStream: false,
requestType: scalar_pb.ContractExecutionRequest,
responseType: scalar_pb.ContractExecutionResponse,
requestSerialize: serialize_rpc_ContractExecutionRequest,
requestDeserialize: deserialize_rpc_ContractExecutionRequest,
responseSerialize: serialize_rpc_ContractExecutionResponse,
responseDeserialize: deserialize_rpc_ContractExecutionResponse,
},
validateLedger: {
path: '/rpc.Ledger/ValidateLedger',
requestStream: false,
responseStream: false,
requestType: scalar_pb.LedgerValidationRequest,
responseType: scalar_pb.LedgerValidationResponse,
requestSerialize: serialize_rpc_LedgerValidationRequest,
requestDeserialize: deserialize_rpc_LedgerValidationRequest,
responseSerialize: serialize_rpc_LedgerValidationResponse,
responseDeserialize: deserialize_rpc_LedgerValidationResponse,
},
};
exports.LedgerClient = grpc.makeGenericClientConstructor(LedgerService);
var LedgerPrivilegedService = exports.LedgerPrivilegedService = {
registerCert: {
path: '/rpc.LedgerPrivileged/RegisterCert',
requestStream: false,
responseStream: false,
requestType: scalar_pb.CertificateRegistrationRequest,
responseType: google_protobuf_empty_pb.Empty,
requestSerialize: serialize_rpc_CertificateRegistrationRequest,
requestDeserialize: deserialize_rpc_CertificateRegistrationRequest,
responseSerialize: serialize_google_protobuf_Empty,
responseDeserialize: deserialize_google_protobuf_Empty,
},
registerFunction: {
path: '/rpc.LedgerPrivileged/RegisterFunction',
requestStream: false,
responseStream: false,
requestType: scalar_pb.FunctionRegistrationRequest,
responseType: google_protobuf_empty_pb.Empty,
requestSerialize: serialize_rpc_FunctionRegistrationRequest,
requestDeserialize: deserialize_rpc_FunctionRegistrationRequest,
responseSerialize: serialize_google_protobuf_Empty,
responseDeserialize: deserialize_google_protobuf_Empty,
},
retrieveState: {
path: '/rpc.LedgerPrivileged/RetrieveState',
requestStream: false,
responseStream: false,
requestType: scalar_pb.StateRetrievalRequest,
responseType: scalar_pb.StateRetrievalResponse,
requestSerialize: serialize_rpc_StateRetrievalRequest,
requestDeserialize: deserialize_rpc_StateRetrievalRequest,
responseSerialize: serialize_rpc_StateRetrievalResponse,
responseDeserialize: deserialize_rpc_StateRetrievalResponse,
},
};
exports.LedgerPrivilegedClient = grpc.makeGenericClientConstructor(LedgerPrivilegedService);
var AdminService = exports.AdminService = {
pause: {
path: '/rpc.Admin/Pause',
requestStream: false,
responseStream: false,
requestType: scalar_pb.PauseRequest,
responseType: google_protobuf_empty_pb.Empty,
requestSerialize: serialize_rpc_PauseRequest,
requestDeserialize: deserialize_rpc_PauseRequest,
responseSerialize: serialize_google_protobuf_Empty,
responseDeserialize: deserialize_google_protobuf_Empty,
},
unpause: {
path: '/rpc.Admin/Unpause',
requestStream: false,
responseStream: false,
requestType: google_protobuf_empty_pb.Empty,
responseType: google_protobuf_empty_pb.Empty,
requestSerialize: serialize_google_protobuf_Empty,
requestDeserialize: deserialize_google_protobuf_Empty,
responseSerialize: serialize_google_protobuf_Empty,
responseDeserialize: deserialize_google_protobuf_Empty,
},
stats: {
path: '/rpc.Admin/Stats',
requestStream: false,
responseStream: false,
requestType: google_protobuf_empty_pb.Empty,
responseType: scalar_pb.StatsResponse,
requestSerialize: serialize_google_protobuf_Empty,
requestDeserialize: deserialize_google_protobuf_Empty,
responseSerialize: serialize_rpc_StatsResponse,
responseDeserialize: deserialize_rpc_StatsResponse,
},
};
exports.AdminClient = grpc.makeGenericClientConstructor(AdminService);
// Proof registry service definition.
var ProofRegistryService = exports.ProofRegistryService = {
registerProofs: {
path: '/rpc.ProofRegistry/RegisterProofs',
requestStream: false,
responseStream: false,
requestType: scalar_pb.ProofsRegistrationRequest,
responseType: google_protobuf_empty_pb.Empty,
requestSerialize: serialize_rpc_ProofsRegistrationRequest,
requestDeserialize: deserialize_rpc_ProofsRegistrationRequest,
responseSerialize: serialize_google_protobuf_Empty,
responseDeserialize: deserialize_google_protobuf_Empty,
},
retrieveProof: {
path: '/rpc.ProofRegistry/RetrieveProof',
requestStream: false,
responseStream: false,
requestType: scalar_pb.ProofRetrievalRequest,
responseType: scalar_pb.ProofRetrievalResponse,
requestSerialize: serialize_rpc_ProofRetrievalRequest,
requestDeserialize: deserialize_rpc_ProofRetrievalRequest,
responseSerialize: serialize_rpc_ProofRetrievalResponse,
responseDeserialize: deserialize_rpc_ProofRetrievalResponse,
},
};
exports.ProofRegistryClient = grpc.makeGenericClientConstructor(ProofRegistryService);
// Result retriever service definition.
var ResultRetrieverService = exports.ResultRetrieverService = {
retrieveExecutionResponse: {
path: '/rpc.ResultRetriever/RetrieveExecutionResponse',
requestStream: false,
responseStream: false,
requestType: scalar_pb.ResultRetrievalRequest,
responseType: scalar_pb.ContractExecutionResponse,
requestSerialize: serialize_rpc_ResultRetrievalRequest,
requestDeserialize: deserialize_rpc_ResultRetrievalRequest,
responseSerialize: serialize_rpc_ContractExecutionResponse,
responseDeserialize: deserialize_rpc_ContractExecutionResponse,
},
};
exports.ResultRetrieverClient = grpc.makeGenericClientConstructor(ResultRetrieverService);
var ProxyService = exports.ProxyService = {
executeContract: {
path: '/rpc.Proxy/ExecuteContract',
requestStream: false,
responseStream: false,
requestType: scalar_pb.ContractExecutionRequest,
responseType: scalar_pb.ContractExecutionResponse,
requestSerialize: serialize_rpc_ContractExecutionRequest,
requestDeserialize: deserialize_rpc_ContractExecutionRequest,
responseSerialize: serialize_rpc_ContractExecutionResponse,
responseDeserialize: deserialize_rpc_ContractExecutionResponse,
},
proxyResponse: {
path: '/rpc.Proxy/ProxyResponse',
requestStream: false,
responseStream: false,
requestType: scalar_pb.IdentifiableContractExecutionResponse,
responseType: google_protobuf_empty_pb.Empty,
requestSerialize: serialize_rpc_IdentifiableContractExecutionResponse,
requestDeserialize: deserialize_rpc_IdentifiableContractExecutionResponse,
responseSerialize: serialize_google_protobuf_Empty,
responseDeserialize: deserialize_google_protobuf_Empty,
},
};
exports.ProxyClient = grpc.makeGenericClientConstructor(ProxyService);