@dashevo/dapi-grpc 1.0.0-dev.15 → 1.0.0-dev.16

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.
@@ -1,4060 +0,0 @@
1
- #[derive(::serde::Serialize, ::serde::Deserialize)]
2
- #[serde(rename_all = "snake_case")]
3
- #[derive(::dapi_grpc_macros::Mockable)]
4
- #[allow(clippy::derive_partial_eq_without_eq)]
5
- #[derive(Clone, PartialEq, ::prost::Message)]
6
- pub struct Proof {
7
- #[prost(bytes = "vec", tag = "1")]
8
- #[serde(with = "serde_bytes")]
9
- pub grovedb_proof: ::prost::alloc::vec::Vec<u8>,
10
- #[prost(bytes = "vec", tag = "2")]
11
- #[serde(with = "serde_bytes")]
12
- pub quorum_hash: ::prost::alloc::vec::Vec<u8>,
13
- #[prost(bytes = "vec", tag = "3")]
14
- #[serde(with = "serde_bytes")]
15
- pub signature: ::prost::alloc::vec::Vec<u8>,
16
- #[prost(uint32, tag = "4")]
17
- pub round: u32,
18
- #[prost(bytes = "vec", tag = "5")]
19
- #[serde(with = "serde_bytes")]
20
- pub block_id_hash: ::prost::alloc::vec::Vec<u8>,
21
- #[prost(uint32, tag = "6")]
22
- pub quorum_type: u32,
23
- }
24
- #[derive(::serde::Serialize, ::serde::Deserialize)]
25
- #[serde(rename_all = "snake_case")]
26
- #[derive(::dapi_grpc_macros::Mockable)]
27
- #[allow(clippy::derive_partial_eq_without_eq)]
28
- #[derive(Clone, PartialEq, ::prost::Message)]
29
- pub struct ResponseMetadata {
30
- #[prost(uint64, tag = "1")]
31
- #[serde(with = "crate::deserialization::from_to_string")]
32
- pub height: u64,
33
- #[prost(uint32, tag = "2")]
34
- pub core_chain_locked_height: u32,
35
- #[prost(uint32, tag = "3")]
36
- pub epoch: u32,
37
- #[prost(uint64, tag = "4")]
38
- #[serde(with = "crate::deserialization::from_to_string")]
39
- pub time_ms: u64,
40
- #[prost(uint32, tag = "5")]
41
- pub protocol_version: u32,
42
- #[prost(string, tag = "6")]
43
- pub chain_id: ::prost::alloc::string::String,
44
- }
45
- #[derive(::serde::Serialize, ::serde::Deserialize)]
46
- #[serde(rename_all = "snake_case")]
47
- #[derive(::dapi_grpc_macros::Mockable)]
48
- #[allow(clippy::derive_partial_eq_without_eq)]
49
- #[derive(Clone, PartialEq, ::prost::Message)]
50
- pub struct StateTransitionBroadcastError {
51
- #[prost(uint32, tag = "1")]
52
- pub code: u32,
53
- #[prost(string, tag = "2")]
54
- pub message: ::prost::alloc::string::String,
55
- #[prost(bytes = "vec", tag = "3")]
56
- pub data: ::prost::alloc::vec::Vec<u8>,
57
- }
58
- #[derive(::serde::Serialize, ::serde::Deserialize)]
59
- #[serde(rename_all = "snake_case")]
60
- #[derive(::dapi_grpc_macros::Mockable)]
61
- #[allow(clippy::derive_partial_eq_without_eq)]
62
- #[derive(Clone, PartialEq, ::prost::Message)]
63
- pub struct BroadcastStateTransitionRequest {
64
- #[prost(bytes = "vec", tag = "1")]
65
- pub state_transition: ::prost::alloc::vec::Vec<u8>,
66
- }
67
- #[derive(::serde::Serialize, ::serde::Deserialize)]
68
- #[serde(rename_all = "snake_case")]
69
- #[derive(::dapi_grpc_macros::Mockable)]
70
- #[allow(clippy::derive_partial_eq_without_eq)]
71
- #[derive(Clone, PartialEq, ::prost::Message)]
72
- pub struct BroadcastStateTransitionResponse {}
73
- #[derive(::serde::Serialize, ::serde::Deserialize)]
74
- #[serde(rename_all = "snake_case")]
75
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
76
- #[grpc_versions(0)]
77
- #[derive(::dapi_grpc_macros::Mockable)]
78
- #[allow(clippy::derive_partial_eq_without_eq)]
79
- #[derive(Clone, PartialEq, ::prost::Message)]
80
- pub struct GetIdentityRequest {
81
- #[prost(oneof = "get_identity_request::Version", tags = "1")]
82
- pub version: ::core::option::Option<get_identity_request::Version>,
83
- }
84
- /// Nested message and enum types in `GetIdentityRequest`.
85
- pub mod get_identity_request {
86
- #[derive(::serde::Serialize, ::serde::Deserialize)]
87
- #[serde(rename_all = "snake_case")]
88
- #[derive(::dapi_grpc_macros::Mockable)]
89
- #[allow(clippy::derive_partial_eq_without_eq)]
90
- #[derive(Clone, PartialEq, ::prost::Message)]
91
- pub struct GetIdentityRequestV0 {
92
- #[prost(bytes = "vec", tag = "1")]
93
- #[serde(with = "serde_bytes")]
94
- pub id: ::prost::alloc::vec::Vec<u8>,
95
- #[prost(bool, tag = "2")]
96
- pub prove: bool,
97
- }
98
- #[derive(::serde::Serialize, ::serde::Deserialize)]
99
- #[serde(rename_all = "snake_case")]
100
- #[allow(clippy::derive_partial_eq_without_eq)]
101
- #[derive(Clone, PartialEq, ::prost::Oneof)]
102
- pub enum Version {
103
- #[prost(message, tag = "1")]
104
- V0(GetIdentityRequestV0),
105
- }
106
- }
107
- #[derive(::serde::Serialize, ::serde::Deserialize)]
108
- #[serde(rename_all = "snake_case")]
109
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
110
- #[grpc_versions(0)]
111
- #[derive(::dapi_grpc_macros::Mockable)]
112
- #[allow(clippy::derive_partial_eq_without_eq)]
113
- #[derive(Clone, PartialEq, ::prost::Message)]
114
- pub struct GetIdentityNonceRequest {
115
- #[prost(oneof = "get_identity_nonce_request::Version", tags = "1")]
116
- pub version: ::core::option::Option<get_identity_nonce_request::Version>,
117
- }
118
- /// Nested message and enum types in `GetIdentityNonceRequest`.
119
- pub mod get_identity_nonce_request {
120
- #[derive(::serde::Serialize, ::serde::Deserialize)]
121
- #[serde(rename_all = "snake_case")]
122
- #[derive(::dapi_grpc_macros::Mockable)]
123
- #[allow(clippy::derive_partial_eq_without_eq)]
124
- #[derive(Clone, PartialEq, ::prost::Message)]
125
- pub struct GetIdentityNonceRequestV0 {
126
- #[prost(bytes = "vec", tag = "1")]
127
- #[serde(with = "serde_bytes")]
128
- pub identity_id: ::prost::alloc::vec::Vec<u8>,
129
- #[prost(bool, tag = "2")]
130
- pub prove: bool,
131
- }
132
- #[derive(::serde::Serialize, ::serde::Deserialize)]
133
- #[serde(rename_all = "snake_case")]
134
- #[allow(clippy::derive_partial_eq_without_eq)]
135
- #[derive(Clone, PartialEq, ::prost::Oneof)]
136
- pub enum Version {
137
- #[prost(message, tag = "1")]
138
- V0(GetIdentityNonceRequestV0),
139
- }
140
- }
141
- #[derive(::serde::Serialize, ::serde::Deserialize)]
142
- #[serde(rename_all = "snake_case")]
143
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
144
- #[grpc_versions(0)]
145
- #[derive(::dapi_grpc_macros::Mockable)]
146
- #[allow(clippy::derive_partial_eq_without_eq)]
147
- #[derive(Clone, PartialEq, ::prost::Message)]
148
- pub struct GetIdentityContractNonceRequest {
149
- #[prost(oneof = "get_identity_contract_nonce_request::Version", tags = "1")]
150
- pub version: ::core::option::Option<get_identity_contract_nonce_request::Version>,
151
- }
152
- /// Nested message and enum types in `GetIdentityContractNonceRequest`.
153
- pub mod get_identity_contract_nonce_request {
154
- #[derive(::serde::Serialize, ::serde::Deserialize)]
155
- #[serde(rename_all = "snake_case")]
156
- #[derive(::dapi_grpc_macros::Mockable)]
157
- #[allow(clippy::derive_partial_eq_without_eq)]
158
- #[derive(Clone, PartialEq, ::prost::Message)]
159
- pub struct GetIdentityContractNonceRequestV0 {
160
- #[prost(bytes = "vec", tag = "1")]
161
- #[serde(with = "serde_bytes")]
162
- pub identity_id: ::prost::alloc::vec::Vec<u8>,
163
- #[prost(bytes = "vec", tag = "2")]
164
- pub contract_id: ::prost::alloc::vec::Vec<u8>,
165
- #[prost(bool, tag = "3")]
166
- pub prove: bool,
167
- }
168
- #[derive(::serde::Serialize, ::serde::Deserialize)]
169
- #[serde(rename_all = "snake_case")]
170
- #[allow(clippy::derive_partial_eq_without_eq)]
171
- #[derive(Clone, PartialEq, ::prost::Oneof)]
172
- pub enum Version {
173
- #[prost(message, tag = "1")]
174
- V0(GetIdentityContractNonceRequestV0),
175
- }
176
- }
177
- #[derive(::serde::Serialize, ::serde::Deserialize)]
178
- #[serde(rename_all = "snake_case")]
179
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
180
- #[grpc_versions(0)]
181
- #[derive(::dapi_grpc_macros::Mockable)]
182
- #[allow(clippy::derive_partial_eq_without_eq)]
183
- #[derive(Clone, PartialEq, ::prost::Message)]
184
- pub struct GetIdentityBalanceRequest {
185
- #[prost(oneof = "get_identity_balance_request::Version", tags = "1")]
186
- pub version: ::core::option::Option<get_identity_balance_request::Version>,
187
- }
188
- /// Nested message and enum types in `GetIdentityBalanceRequest`.
189
- pub mod get_identity_balance_request {
190
- #[derive(::serde::Serialize, ::serde::Deserialize)]
191
- #[serde(rename_all = "snake_case")]
192
- #[derive(::dapi_grpc_macros::Mockable)]
193
- #[allow(clippy::derive_partial_eq_without_eq)]
194
- #[derive(Clone, PartialEq, ::prost::Message)]
195
- pub struct GetIdentityBalanceRequestV0 {
196
- #[prost(bytes = "vec", tag = "1")]
197
- #[serde(with = "serde_bytes")]
198
- pub id: ::prost::alloc::vec::Vec<u8>,
199
- #[prost(bool, tag = "2")]
200
- pub prove: bool,
201
- }
202
- #[derive(::serde::Serialize, ::serde::Deserialize)]
203
- #[serde(rename_all = "snake_case")]
204
- #[allow(clippy::derive_partial_eq_without_eq)]
205
- #[derive(Clone, PartialEq, ::prost::Oneof)]
206
- pub enum Version {
207
- #[prost(message, tag = "1")]
208
- V0(GetIdentityBalanceRequestV0),
209
- }
210
- }
211
- #[derive(::serde::Serialize, ::serde::Deserialize)]
212
- #[serde(rename_all = "snake_case")]
213
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
214
- #[grpc_versions(0)]
215
- #[derive(::dapi_grpc_macros::Mockable)]
216
- #[allow(clippy::derive_partial_eq_without_eq)]
217
- #[derive(Clone, PartialEq, ::prost::Message)]
218
- pub struct GetIdentityBalanceAndRevisionRequest {
219
- #[prost(oneof = "get_identity_balance_and_revision_request::Version", tags = "1")]
220
- pub version: ::core::option::Option<
221
- get_identity_balance_and_revision_request::Version,
222
- >,
223
- }
224
- /// Nested message and enum types in `GetIdentityBalanceAndRevisionRequest`.
225
- pub mod get_identity_balance_and_revision_request {
226
- #[derive(::serde::Serialize, ::serde::Deserialize)]
227
- #[serde(rename_all = "snake_case")]
228
- #[derive(::dapi_grpc_macros::Mockable)]
229
- #[allow(clippy::derive_partial_eq_without_eq)]
230
- #[derive(Clone, PartialEq, ::prost::Message)]
231
- pub struct GetIdentityBalanceAndRevisionRequestV0 {
232
- #[prost(bytes = "vec", tag = "1")]
233
- #[serde(with = "serde_bytes")]
234
- pub id: ::prost::alloc::vec::Vec<u8>,
235
- #[prost(bool, tag = "2")]
236
- pub prove: bool,
237
- }
238
- #[derive(::serde::Serialize, ::serde::Deserialize)]
239
- #[serde(rename_all = "snake_case")]
240
- #[allow(clippy::derive_partial_eq_without_eq)]
241
- #[derive(Clone, PartialEq, ::prost::Oneof)]
242
- pub enum Version {
243
- #[prost(message, tag = "1")]
244
- V0(GetIdentityBalanceAndRevisionRequestV0),
245
- }
246
- }
247
- #[derive(::serde::Serialize, ::serde::Deserialize)]
248
- #[serde(rename_all = "snake_case")]
249
- #[derive(
250
- ::dapi_grpc_macros::VersionedGrpcMessage,
251
- ::dapi_grpc_macros::VersionedGrpcResponse
252
- )]
253
- #[grpc_versions(0)]
254
- #[derive(::dapi_grpc_macros::Mockable)]
255
- #[allow(clippy::derive_partial_eq_without_eq)]
256
- #[derive(Clone, PartialEq, ::prost::Message)]
257
- pub struct GetIdentityResponse {
258
- #[prost(oneof = "get_identity_response::Version", tags = "1")]
259
- pub version: ::core::option::Option<get_identity_response::Version>,
260
- }
261
- /// Nested message and enum types in `GetIdentityResponse`.
262
- pub mod get_identity_response {
263
- #[derive(::serde::Serialize, ::serde::Deserialize)]
264
- #[serde(rename_all = "snake_case")]
265
- #[derive(::dapi_grpc_macros::Mockable)]
266
- #[allow(clippy::derive_partial_eq_without_eq)]
267
- #[derive(Clone, PartialEq, ::prost::Message)]
268
- pub struct GetIdentityResponseV0 {
269
- #[prost(message, optional, tag = "3")]
270
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
271
- #[prost(oneof = "get_identity_response_v0::Result", tags = "1, 2")]
272
- pub result: ::core::option::Option<get_identity_response_v0::Result>,
273
- }
274
- /// Nested message and enum types in `GetIdentityResponseV0`.
275
- pub mod get_identity_response_v0 {
276
- #[derive(::serde::Serialize, ::serde::Deserialize)]
277
- #[serde(rename_all = "snake_case")]
278
- #[allow(clippy::derive_partial_eq_without_eq)]
279
- #[derive(Clone, PartialEq, ::prost::Oneof)]
280
- pub enum Result {
281
- #[prost(bytes, tag = "1")]
282
- Identity(::prost::alloc::vec::Vec<u8>),
283
- #[prost(message, tag = "2")]
284
- Proof(super::super::Proof),
285
- }
286
- }
287
- #[derive(::serde::Serialize, ::serde::Deserialize)]
288
- #[serde(rename_all = "snake_case")]
289
- #[allow(clippy::derive_partial_eq_without_eq)]
290
- #[derive(Clone, PartialEq, ::prost::Oneof)]
291
- pub enum Version {
292
- #[prost(message, tag = "1")]
293
- V0(GetIdentityResponseV0),
294
- }
295
- }
296
- #[derive(::serde::Serialize, ::serde::Deserialize)]
297
- #[serde(rename_all = "snake_case")]
298
- #[derive(
299
- ::dapi_grpc_macros::VersionedGrpcMessage,
300
- ::dapi_grpc_macros::VersionedGrpcResponse
301
- )]
302
- #[grpc_versions(0)]
303
- #[derive(::dapi_grpc_macros::Mockable)]
304
- #[allow(clippy::derive_partial_eq_without_eq)]
305
- #[derive(Clone, PartialEq, ::prost::Message)]
306
- pub struct GetIdentityNonceResponse {
307
- #[prost(oneof = "get_identity_nonce_response::Version", tags = "1")]
308
- pub version: ::core::option::Option<get_identity_nonce_response::Version>,
309
- }
310
- /// Nested message and enum types in `GetIdentityNonceResponse`.
311
- pub mod get_identity_nonce_response {
312
- #[derive(::serde::Serialize, ::serde::Deserialize)]
313
- #[serde(rename_all = "snake_case")]
314
- #[derive(::dapi_grpc_macros::Mockable)]
315
- #[allow(clippy::derive_partial_eq_without_eq)]
316
- #[derive(Clone, PartialEq, ::prost::Message)]
317
- pub struct GetIdentityNonceResponseV0 {
318
- #[prost(message, optional, tag = "3")]
319
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
320
- #[prost(oneof = "get_identity_nonce_response_v0::Result", tags = "1, 2")]
321
- pub result: ::core::option::Option<get_identity_nonce_response_v0::Result>,
322
- }
323
- /// Nested message and enum types in `GetIdentityNonceResponseV0`.
324
- pub mod get_identity_nonce_response_v0 {
325
- #[derive(::serde::Serialize, ::serde::Deserialize)]
326
- #[serde(rename_all = "snake_case")]
327
- #[allow(clippy::derive_partial_eq_without_eq)]
328
- #[derive(Clone, PartialEq, ::prost::Oneof)]
329
- pub enum Result {
330
- #[prost(uint64, tag = "1")]
331
- IdentityNonce(u64),
332
- #[prost(message, tag = "2")]
333
- Proof(super::super::Proof),
334
- }
335
- }
336
- #[derive(::serde::Serialize, ::serde::Deserialize)]
337
- #[serde(rename_all = "snake_case")]
338
- #[allow(clippy::derive_partial_eq_without_eq)]
339
- #[derive(Clone, PartialEq, ::prost::Oneof)]
340
- pub enum Version {
341
- #[prost(message, tag = "1")]
342
- V0(GetIdentityNonceResponseV0),
343
- }
344
- }
345
- #[derive(::serde::Serialize, ::serde::Deserialize)]
346
- #[serde(rename_all = "snake_case")]
347
- #[derive(
348
- ::dapi_grpc_macros::VersionedGrpcMessage,
349
- ::dapi_grpc_macros::VersionedGrpcResponse
350
- )]
351
- #[grpc_versions(0)]
352
- #[derive(::dapi_grpc_macros::Mockable)]
353
- #[allow(clippy::derive_partial_eq_without_eq)]
354
- #[derive(Clone, PartialEq, ::prost::Message)]
355
- pub struct GetIdentityContractNonceResponse {
356
- #[prost(oneof = "get_identity_contract_nonce_response::Version", tags = "1")]
357
- pub version: ::core::option::Option<get_identity_contract_nonce_response::Version>,
358
- }
359
- /// Nested message and enum types in `GetIdentityContractNonceResponse`.
360
- pub mod get_identity_contract_nonce_response {
361
- #[derive(::serde::Serialize, ::serde::Deserialize)]
362
- #[serde(rename_all = "snake_case")]
363
- #[derive(::dapi_grpc_macros::Mockable)]
364
- #[allow(clippy::derive_partial_eq_without_eq)]
365
- #[derive(Clone, PartialEq, ::prost::Message)]
366
- pub struct GetIdentityContractNonceResponseV0 {
367
- #[prost(message, optional, tag = "3")]
368
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
369
- #[prost(
370
- oneof = "get_identity_contract_nonce_response_v0::Result",
371
- tags = "1, 2"
372
- )]
373
- pub result: ::core::option::Option<
374
- get_identity_contract_nonce_response_v0::Result,
375
- >,
376
- }
377
- /// Nested message and enum types in `GetIdentityContractNonceResponseV0`.
378
- pub mod get_identity_contract_nonce_response_v0 {
379
- #[derive(::serde::Serialize, ::serde::Deserialize)]
380
- #[serde(rename_all = "snake_case")]
381
- #[allow(clippy::derive_partial_eq_without_eq)]
382
- #[derive(Clone, PartialEq, ::prost::Oneof)]
383
- pub enum Result {
384
- #[prost(uint64, tag = "1")]
385
- IdentityContractNonce(u64),
386
- #[prost(message, tag = "2")]
387
- Proof(super::super::Proof),
388
- }
389
- }
390
- #[derive(::serde::Serialize, ::serde::Deserialize)]
391
- #[serde(rename_all = "snake_case")]
392
- #[allow(clippy::derive_partial_eq_without_eq)]
393
- #[derive(Clone, PartialEq, ::prost::Oneof)]
394
- pub enum Version {
395
- #[prost(message, tag = "1")]
396
- V0(GetIdentityContractNonceResponseV0),
397
- }
398
- }
399
- #[derive(::serde::Serialize, ::serde::Deserialize)]
400
- #[serde(rename_all = "snake_case")]
401
- #[derive(
402
- ::dapi_grpc_macros::VersionedGrpcMessage,
403
- ::dapi_grpc_macros::VersionedGrpcResponse
404
- )]
405
- #[grpc_versions(0)]
406
- #[derive(::dapi_grpc_macros::Mockable)]
407
- #[allow(clippy::derive_partial_eq_without_eq)]
408
- #[derive(Clone, PartialEq, ::prost::Message)]
409
- pub struct GetIdentityBalanceResponse {
410
- #[prost(oneof = "get_identity_balance_response::Version", tags = "1")]
411
- pub version: ::core::option::Option<get_identity_balance_response::Version>,
412
- }
413
- /// Nested message and enum types in `GetIdentityBalanceResponse`.
414
- pub mod get_identity_balance_response {
415
- #[derive(::serde::Serialize, ::serde::Deserialize)]
416
- #[serde(rename_all = "snake_case")]
417
- #[derive(::dapi_grpc_macros::Mockable)]
418
- #[allow(clippy::derive_partial_eq_without_eq)]
419
- #[derive(Clone, PartialEq, ::prost::Message)]
420
- pub struct GetIdentityBalanceResponseV0 {
421
- #[prost(message, optional, tag = "3")]
422
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
423
- #[prost(oneof = "get_identity_balance_response_v0::Result", tags = "1, 2")]
424
- pub result: ::core::option::Option<get_identity_balance_response_v0::Result>,
425
- }
426
- /// Nested message and enum types in `GetIdentityBalanceResponseV0`.
427
- pub mod get_identity_balance_response_v0 {
428
- #[derive(::serde::Serialize, ::serde::Deserialize)]
429
- #[serde(rename_all = "snake_case")]
430
- #[allow(clippy::derive_partial_eq_without_eq)]
431
- #[derive(Clone, PartialEq, ::prost::Oneof)]
432
- pub enum Result {
433
- #[prost(uint64, tag = "1")]
434
- Balance(u64),
435
- #[prost(message, tag = "2")]
436
- Proof(super::super::Proof),
437
- }
438
- }
439
- #[derive(::serde::Serialize, ::serde::Deserialize)]
440
- #[serde(rename_all = "snake_case")]
441
- #[allow(clippy::derive_partial_eq_without_eq)]
442
- #[derive(Clone, PartialEq, ::prost::Oneof)]
443
- pub enum Version {
444
- #[prost(message, tag = "1")]
445
- V0(GetIdentityBalanceResponseV0),
446
- }
447
- }
448
- #[derive(::serde::Serialize, ::serde::Deserialize)]
449
- #[serde(rename_all = "snake_case")]
450
- #[derive(
451
- ::dapi_grpc_macros::VersionedGrpcMessage,
452
- ::dapi_grpc_macros::VersionedGrpcResponse
453
- )]
454
- #[grpc_versions(0)]
455
- #[derive(::dapi_grpc_macros::Mockable)]
456
- #[allow(clippy::derive_partial_eq_without_eq)]
457
- #[derive(Clone, PartialEq, ::prost::Message)]
458
- pub struct GetIdentityBalanceAndRevisionResponse {
459
- #[prost(oneof = "get_identity_balance_and_revision_response::Version", tags = "1")]
460
- pub version: ::core::option::Option<
461
- get_identity_balance_and_revision_response::Version,
462
- >,
463
- }
464
- /// Nested message and enum types in `GetIdentityBalanceAndRevisionResponse`.
465
- pub mod get_identity_balance_and_revision_response {
466
- #[derive(::serde::Serialize, ::serde::Deserialize)]
467
- #[serde(rename_all = "snake_case")]
468
- #[derive(::dapi_grpc_macros::Mockable)]
469
- #[allow(clippy::derive_partial_eq_without_eq)]
470
- #[derive(Clone, PartialEq, ::prost::Message)]
471
- pub struct GetIdentityBalanceAndRevisionResponseV0 {
472
- #[prost(message, optional, tag = "3")]
473
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
474
- #[prost(
475
- oneof = "get_identity_balance_and_revision_response_v0::Result",
476
- tags = "1, 2"
477
- )]
478
- pub result: ::core::option::Option<
479
- get_identity_balance_and_revision_response_v0::Result,
480
- >,
481
- }
482
- /// Nested message and enum types in `GetIdentityBalanceAndRevisionResponseV0`.
483
- pub mod get_identity_balance_and_revision_response_v0 {
484
- #[derive(::serde::Serialize, ::serde::Deserialize)]
485
- #[serde(rename_all = "snake_case")]
486
- #[derive(::dapi_grpc_macros::Mockable)]
487
- #[allow(clippy::derive_partial_eq_without_eq)]
488
- #[derive(Clone, PartialEq, ::prost::Message)]
489
- pub struct BalanceAndRevision {
490
- #[prost(uint64, tag = "1")]
491
- pub balance: u64,
492
- #[prost(uint64, tag = "2")]
493
- pub revision: u64,
494
- }
495
- #[derive(::serde::Serialize, ::serde::Deserialize)]
496
- #[serde(rename_all = "snake_case")]
497
- #[allow(clippy::derive_partial_eq_without_eq)]
498
- #[derive(Clone, PartialEq, ::prost::Oneof)]
499
- pub enum Result {
500
- #[prost(message, tag = "1")]
501
- BalanceAndRevision(BalanceAndRevision),
502
- #[prost(message, tag = "2")]
503
- Proof(super::super::Proof),
504
- }
505
- }
506
- #[derive(::serde::Serialize, ::serde::Deserialize)]
507
- #[serde(rename_all = "snake_case")]
508
- #[allow(clippy::derive_partial_eq_without_eq)]
509
- #[derive(Clone, PartialEq, ::prost::Oneof)]
510
- pub enum Version {
511
- #[prost(message, tag = "1")]
512
- V0(GetIdentityBalanceAndRevisionResponseV0),
513
- }
514
- }
515
- #[derive(::serde::Serialize, ::serde::Deserialize)]
516
- #[serde(rename_all = "snake_case")]
517
- #[derive(::dapi_grpc_macros::Mockable)]
518
- #[allow(clippy::derive_partial_eq_without_eq)]
519
- #[derive(Clone, PartialEq, ::prost::Message)]
520
- pub struct KeyRequestType {
521
- #[prost(oneof = "key_request_type::Request", tags = "1, 2, 3")]
522
- pub request: ::core::option::Option<key_request_type::Request>,
523
- }
524
- /// Nested message and enum types in `KeyRequestType`.
525
- pub mod key_request_type {
526
- #[derive(::serde::Serialize, ::serde::Deserialize)]
527
- #[serde(rename_all = "snake_case")]
528
- #[allow(clippy::derive_partial_eq_without_eq)]
529
- #[derive(Clone, PartialEq, ::prost::Oneof)]
530
- pub enum Request {
531
- #[prost(message, tag = "1")]
532
- AllKeys(super::AllKeys),
533
- #[prost(message, tag = "2")]
534
- SpecificKeys(super::SpecificKeys),
535
- #[prost(message, tag = "3")]
536
- SearchKey(super::SearchKey),
537
- }
538
- }
539
- #[derive(::serde::Serialize, ::serde::Deserialize)]
540
- #[serde(rename_all = "snake_case")]
541
- #[derive(::dapi_grpc_macros::Mockable)]
542
- #[allow(clippy::derive_partial_eq_without_eq)]
543
- #[derive(Clone, PartialEq, ::prost::Message)]
544
- pub struct AllKeys {}
545
- #[derive(::serde::Serialize, ::serde::Deserialize)]
546
- #[serde(rename_all = "snake_case")]
547
- #[derive(::dapi_grpc_macros::Mockable)]
548
- #[allow(clippy::derive_partial_eq_without_eq)]
549
- #[derive(Clone, PartialEq, ::prost::Message)]
550
- pub struct SpecificKeys {
551
- #[prost(uint32, repeated, tag = "1")]
552
- pub key_ids: ::prost::alloc::vec::Vec<u32>,
553
- }
554
- #[derive(::serde::Serialize, ::serde::Deserialize)]
555
- #[serde(rename_all = "snake_case")]
556
- #[derive(::dapi_grpc_macros::Mockable)]
557
- #[allow(clippy::derive_partial_eq_without_eq)]
558
- #[derive(Clone, PartialEq, ::prost::Message)]
559
- pub struct SearchKey {
560
- #[prost(map = "uint32, message", tag = "1")]
561
- pub purpose_map: ::std::collections::HashMap<u32, SecurityLevelMap>,
562
- }
563
- #[derive(::serde::Serialize, ::serde::Deserialize)]
564
- #[serde(rename_all = "snake_case")]
565
- #[derive(::dapi_grpc_macros::Mockable)]
566
- #[allow(clippy::derive_partial_eq_without_eq)]
567
- #[derive(Clone, PartialEq, ::prost::Message)]
568
- pub struct SecurityLevelMap {
569
- #[prost(
570
- map = "uint32, enumeration(security_level_map::KeyKindRequestType)",
571
- tag = "1"
572
- )]
573
- pub security_level_map: ::std::collections::HashMap<u32, i32>,
574
- }
575
- /// Nested message and enum types in `SecurityLevelMap`.
576
- pub mod security_level_map {
577
- #[derive(::serde::Serialize, ::serde::Deserialize)]
578
- #[serde(rename_all = "snake_case")]
579
- #[derive(
580
- Clone,
581
- Copy,
582
- Debug,
583
- PartialEq,
584
- Eq,
585
- Hash,
586
- PartialOrd,
587
- Ord,
588
- ::prost::Enumeration
589
- )]
590
- #[repr(i32)]
591
- pub enum KeyKindRequestType {
592
- CurrentKeyOfKindRequest = 0,
593
- AllKeysOfKindRequest = 1,
594
- }
595
- impl KeyKindRequestType {
596
- /// String value of the enum field names used in the ProtoBuf definition.
597
- ///
598
- /// The values are not transformed in any way and thus are considered stable
599
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
600
- pub fn as_str_name(&self) -> &'static str {
601
- match self {
602
- KeyKindRequestType::CurrentKeyOfKindRequest => {
603
- "CURRENT_KEY_OF_KIND_REQUEST"
604
- }
605
- KeyKindRequestType::AllKeysOfKindRequest => "ALL_KEYS_OF_KIND_REQUEST",
606
- }
607
- }
608
- /// Creates an enum from field names used in the ProtoBuf definition.
609
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
610
- match value {
611
- "CURRENT_KEY_OF_KIND_REQUEST" => Some(Self::CurrentKeyOfKindRequest),
612
- "ALL_KEYS_OF_KIND_REQUEST" => Some(Self::AllKeysOfKindRequest),
613
- _ => None,
614
- }
615
- }
616
- }
617
- }
618
- #[derive(::serde::Serialize, ::serde::Deserialize)]
619
- #[serde(rename_all = "snake_case")]
620
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
621
- #[grpc_versions(0)]
622
- #[derive(::dapi_grpc_macros::Mockable)]
623
- #[allow(clippy::derive_partial_eq_without_eq)]
624
- #[derive(Clone, PartialEq, ::prost::Message)]
625
- pub struct GetIdentityKeysRequest {
626
- #[prost(oneof = "get_identity_keys_request::Version", tags = "1")]
627
- pub version: ::core::option::Option<get_identity_keys_request::Version>,
628
- }
629
- /// Nested message and enum types in `GetIdentityKeysRequest`.
630
- pub mod get_identity_keys_request {
631
- #[derive(::serde::Serialize, ::serde::Deserialize)]
632
- #[serde(rename_all = "snake_case")]
633
- #[derive(::dapi_grpc_macros::Mockable)]
634
- #[allow(clippy::derive_partial_eq_without_eq)]
635
- #[derive(Clone, PartialEq, ::prost::Message)]
636
- pub struct GetIdentityKeysRequestV0 {
637
- #[prost(bytes = "vec", tag = "1")]
638
- #[serde(with = "serde_bytes")]
639
- pub identity_id: ::prost::alloc::vec::Vec<u8>,
640
- #[prost(message, optional, tag = "2")]
641
- pub request_type: ::core::option::Option<super::KeyRequestType>,
642
- #[prost(message, optional, tag = "3")]
643
- pub limit: ::core::option::Option<u32>,
644
- #[prost(message, optional, tag = "4")]
645
- pub offset: ::core::option::Option<u32>,
646
- #[prost(bool, tag = "5")]
647
- pub prove: bool,
648
- }
649
- #[derive(::serde::Serialize, ::serde::Deserialize)]
650
- #[serde(rename_all = "snake_case")]
651
- #[allow(clippy::derive_partial_eq_without_eq)]
652
- #[derive(Clone, PartialEq, ::prost::Oneof)]
653
- pub enum Version {
654
- #[prost(message, tag = "1")]
655
- V0(GetIdentityKeysRequestV0),
656
- }
657
- }
658
- #[derive(::serde::Serialize, ::serde::Deserialize)]
659
- #[serde(rename_all = "snake_case")]
660
- #[derive(
661
- ::dapi_grpc_macros::VersionedGrpcMessage,
662
- ::dapi_grpc_macros::VersionedGrpcResponse
663
- )]
664
- #[grpc_versions(0)]
665
- #[derive(::dapi_grpc_macros::Mockable)]
666
- #[allow(clippy::derive_partial_eq_without_eq)]
667
- #[derive(Clone, PartialEq, ::prost::Message)]
668
- pub struct GetIdentityKeysResponse {
669
- #[prost(oneof = "get_identity_keys_response::Version", tags = "1")]
670
- pub version: ::core::option::Option<get_identity_keys_response::Version>,
671
- }
672
- /// Nested message and enum types in `GetIdentityKeysResponse`.
673
- pub mod get_identity_keys_response {
674
- #[derive(::serde::Serialize, ::serde::Deserialize)]
675
- #[serde(rename_all = "snake_case")]
676
- #[derive(::dapi_grpc_macros::Mockable)]
677
- #[allow(clippy::derive_partial_eq_without_eq)]
678
- #[derive(Clone, PartialEq, ::prost::Message)]
679
- pub struct GetIdentityKeysResponseV0 {
680
- #[prost(message, optional, tag = "3")]
681
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
682
- #[prost(oneof = "get_identity_keys_response_v0::Result", tags = "1, 2")]
683
- pub result: ::core::option::Option<get_identity_keys_response_v0::Result>,
684
- }
685
- /// Nested message and enum types in `GetIdentityKeysResponseV0`.
686
- pub mod get_identity_keys_response_v0 {
687
- #[derive(::serde::Serialize, ::serde::Deserialize)]
688
- #[serde(rename_all = "snake_case")]
689
- #[derive(::dapi_grpc_macros::Mockable)]
690
- #[allow(clippy::derive_partial_eq_without_eq)]
691
- #[derive(Clone, PartialEq, ::prost::Message)]
692
- pub struct Keys {
693
- #[prost(bytes = "vec", repeated, tag = "1")]
694
- pub keys_bytes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
695
- }
696
- #[derive(::serde::Serialize, ::serde::Deserialize)]
697
- #[serde(rename_all = "snake_case")]
698
- #[allow(clippy::derive_partial_eq_without_eq)]
699
- #[derive(Clone, PartialEq, ::prost::Oneof)]
700
- pub enum Result {
701
- #[prost(message, tag = "1")]
702
- Keys(Keys),
703
- #[prost(message, tag = "2")]
704
- Proof(super::super::Proof),
705
- }
706
- }
707
- #[derive(::serde::Serialize, ::serde::Deserialize)]
708
- #[serde(rename_all = "snake_case")]
709
- #[allow(clippy::derive_partial_eq_without_eq)]
710
- #[derive(Clone, PartialEq, ::prost::Oneof)]
711
- pub enum Version {
712
- #[prost(message, tag = "1")]
713
- V0(GetIdentityKeysResponseV0),
714
- }
715
- }
716
- #[derive(::serde::Serialize, ::serde::Deserialize)]
717
- #[serde(rename_all = "snake_case")]
718
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
719
- #[grpc_versions(0)]
720
- #[derive(::dapi_grpc_macros::Mockable)]
721
- #[allow(clippy::derive_partial_eq_without_eq)]
722
- #[derive(Clone, PartialEq, ::prost::Message)]
723
- pub struct GetIdentitiesContractKeysRequest {
724
- #[prost(oneof = "get_identities_contract_keys_request::Version", tags = "1")]
725
- pub version: ::core::option::Option<get_identities_contract_keys_request::Version>,
726
- }
727
- /// Nested message and enum types in `GetIdentitiesContractKeysRequest`.
728
- pub mod get_identities_contract_keys_request {
729
- #[derive(::serde::Serialize, ::serde::Deserialize)]
730
- #[serde(rename_all = "snake_case")]
731
- #[derive(::dapi_grpc_macros::Mockable)]
732
- #[allow(clippy::derive_partial_eq_without_eq)]
733
- #[derive(Clone, PartialEq, ::prost::Message)]
734
- pub struct GetIdentitiesContractKeysRequestV0 {
735
- #[prost(bytes = "vec", repeated, tag = "1")]
736
- pub identities_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
737
- #[prost(bytes = "vec", tag = "2")]
738
- pub contract_id: ::prost::alloc::vec::Vec<u8>,
739
- #[prost(string, optional, tag = "3")]
740
- pub document_type_name: ::core::option::Option<::prost::alloc::string::String>,
741
- #[prost(enumeration = "super::KeyPurpose", repeated, tag = "4")]
742
- pub purposes: ::prost::alloc::vec::Vec<i32>,
743
- #[prost(bool, tag = "5")]
744
- pub prove: bool,
745
- }
746
- #[derive(::serde::Serialize, ::serde::Deserialize)]
747
- #[serde(rename_all = "snake_case")]
748
- #[allow(clippy::derive_partial_eq_without_eq)]
749
- #[derive(Clone, PartialEq, ::prost::Oneof)]
750
- pub enum Version {
751
- #[prost(message, tag = "1")]
752
- V0(GetIdentitiesContractKeysRequestV0),
753
- }
754
- }
755
- #[derive(::serde::Serialize, ::serde::Deserialize)]
756
- #[serde(rename_all = "snake_case")]
757
- #[derive(
758
- ::dapi_grpc_macros::VersionedGrpcMessage,
759
- ::dapi_grpc_macros::VersionedGrpcResponse
760
- )]
761
- #[grpc_versions(0)]
762
- #[derive(::dapi_grpc_macros::Mockable)]
763
- #[allow(clippy::derive_partial_eq_without_eq)]
764
- #[derive(Clone, PartialEq, ::prost::Message)]
765
- pub struct GetIdentitiesContractKeysResponse {
766
- #[prost(oneof = "get_identities_contract_keys_response::Version", tags = "1")]
767
- pub version: ::core::option::Option<get_identities_contract_keys_response::Version>,
768
- }
769
- /// Nested message and enum types in `GetIdentitiesContractKeysResponse`.
770
- pub mod get_identities_contract_keys_response {
771
- #[derive(::serde::Serialize, ::serde::Deserialize)]
772
- #[serde(rename_all = "snake_case")]
773
- #[derive(::dapi_grpc_macros::Mockable)]
774
- #[allow(clippy::derive_partial_eq_without_eq)]
775
- #[derive(Clone, PartialEq, ::prost::Message)]
776
- pub struct GetIdentitiesContractKeysResponseV0 {
777
- #[prost(message, optional, tag = "3")]
778
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
779
- #[prost(
780
- oneof = "get_identities_contract_keys_response_v0::Result",
781
- tags = "1, 2"
782
- )]
783
- pub result: ::core::option::Option<
784
- get_identities_contract_keys_response_v0::Result,
785
- >,
786
- }
787
- /// Nested message and enum types in `GetIdentitiesContractKeysResponseV0`.
788
- pub mod get_identities_contract_keys_response_v0 {
789
- #[derive(::serde::Serialize, ::serde::Deserialize)]
790
- #[serde(rename_all = "snake_case")]
791
- #[derive(::dapi_grpc_macros::Mockable)]
792
- #[allow(clippy::derive_partial_eq_without_eq)]
793
- #[derive(Clone, PartialEq, ::prost::Message)]
794
- pub struct PurposeKeys {
795
- #[prost(enumeration = "super::super::KeyPurpose", tag = "1")]
796
- pub purpose: i32,
797
- #[prost(bytes = "vec", repeated, tag = "2")]
798
- pub keys_bytes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
799
- }
800
- #[derive(::serde::Serialize, ::serde::Deserialize)]
801
- #[serde(rename_all = "snake_case")]
802
- #[derive(::dapi_grpc_macros::Mockable)]
803
- #[allow(clippy::derive_partial_eq_without_eq)]
804
- #[derive(Clone, PartialEq, ::prost::Message)]
805
- pub struct IdentityKeys {
806
- #[prost(bytes = "vec", tag = "1")]
807
- #[serde(with = "serde_bytes")]
808
- pub identity_id: ::prost::alloc::vec::Vec<u8>,
809
- #[prost(message, repeated, tag = "2")]
810
- pub keys: ::prost::alloc::vec::Vec<PurposeKeys>,
811
- }
812
- #[derive(::serde::Serialize, ::serde::Deserialize)]
813
- #[serde(rename_all = "snake_case")]
814
- #[derive(::dapi_grpc_macros::Mockable)]
815
- #[allow(clippy::derive_partial_eq_without_eq)]
816
- #[derive(Clone, PartialEq, ::prost::Message)]
817
- pub struct IdentitiesKeys {
818
- #[prost(message, repeated, tag = "1")]
819
- pub entries: ::prost::alloc::vec::Vec<IdentityKeys>,
820
- }
821
- #[derive(::serde::Serialize, ::serde::Deserialize)]
822
- #[serde(rename_all = "snake_case")]
823
- #[allow(clippy::derive_partial_eq_without_eq)]
824
- #[derive(Clone, PartialEq, ::prost::Oneof)]
825
- pub enum Result {
826
- #[prost(message, tag = "1")]
827
- IdentitiesKeys(IdentitiesKeys),
828
- #[prost(message, tag = "2")]
829
- Proof(super::super::Proof),
830
- }
831
- }
832
- #[derive(::serde::Serialize, ::serde::Deserialize)]
833
- #[serde(rename_all = "snake_case")]
834
- #[allow(clippy::derive_partial_eq_without_eq)]
835
- #[derive(Clone, PartialEq, ::prost::Oneof)]
836
- pub enum Version {
837
- #[prost(message, tag = "1")]
838
- V0(GetIdentitiesContractKeysResponseV0),
839
- }
840
- }
841
- #[derive(::serde::Serialize, ::serde::Deserialize)]
842
- #[serde(rename_all = "snake_case")]
843
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
844
- #[grpc_versions(0)]
845
- #[derive(::dapi_grpc_macros::Mockable)]
846
- #[allow(clippy::derive_partial_eq_without_eq)]
847
- #[derive(Clone, PartialEq, ::prost::Message)]
848
- pub struct GetProofsRequest {
849
- #[prost(oneof = "get_proofs_request::Version", tags = "1")]
850
- pub version: ::core::option::Option<get_proofs_request::Version>,
851
- }
852
- /// Nested message and enum types in `GetProofsRequest`.
853
- pub mod get_proofs_request {
854
- #[derive(::serde::Serialize, ::serde::Deserialize)]
855
- #[serde(rename_all = "snake_case")]
856
- #[derive(::dapi_grpc_macros::Mockable)]
857
- #[allow(clippy::derive_partial_eq_without_eq)]
858
- #[derive(Clone, PartialEq, ::prost::Message)]
859
- pub struct GetProofsRequestV0 {
860
- #[prost(message, repeated, tag = "1")]
861
- pub identities: ::prost::alloc::vec::Vec<get_proofs_request_v0::IdentityRequest>,
862
- #[prost(message, repeated, tag = "2")]
863
- pub contracts: ::prost::alloc::vec::Vec<get_proofs_request_v0::ContractRequest>,
864
- #[prost(message, repeated, tag = "3")]
865
- pub documents: ::prost::alloc::vec::Vec<get_proofs_request_v0::DocumentRequest>,
866
- }
867
- /// Nested message and enum types in `GetProofsRequestV0`.
868
- pub mod get_proofs_request_v0 {
869
- #[derive(::serde::Serialize, ::serde::Deserialize)]
870
- #[serde(rename_all = "snake_case")]
871
- #[derive(::dapi_grpc_macros::Mockable)]
872
- #[allow(clippy::derive_partial_eq_without_eq)]
873
- #[derive(Clone, PartialEq, ::prost::Message)]
874
- pub struct DocumentRequest {
875
- #[prost(bytes = "vec", tag = "1")]
876
- pub contract_id: ::prost::alloc::vec::Vec<u8>,
877
- #[prost(string, tag = "2")]
878
- pub document_type: ::prost::alloc::string::String,
879
- #[prost(bool, tag = "3")]
880
- pub document_type_keeps_history: bool,
881
- #[prost(bytes = "vec", tag = "4")]
882
- pub document_id: ::prost::alloc::vec::Vec<u8>,
883
- }
884
- #[derive(::serde::Serialize, ::serde::Deserialize)]
885
- #[serde(rename_all = "snake_case")]
886
- #[derive(::dapi_grpc_macros::Mockable)]
887
- #[allow(clippy::derive_partial_eq_without_eq)]
888
- #[derive(Clone, PartialEq, ::prost::Message)]
889
- pub struct IdentityRequest {
890
- #[prost(bytes = "vec", tag = "1")]
891
- #[serde(with = "serde_bytes")]
892
- pub identity_id: ::prost::alloc::vec::Vec<u8>,
893
- #[prost(enumeration = "identity_request::Type", tag = "2")]
894
- pub request_type: i32,
895
- }
896
- /// Nested message and enum types in `IdentityRequest`.
897
- pub mod identity_request {
898
- #[derive(::serde::Serialize, ::serde::Deserialize)]
899
- #[serde(rename_all = "snake_case")]
900
- #[derive(
901
- Clone,
902
- Copy,
903
- Debug,
904
- PartialEq,
905
- Eq,
906
- Hash,
907
- PartialOrd,
908
- Ord,
909
- ::prost::Enumeration
910
- )]
911
- #[repr(i32)]
912
- pub enum Type {
913
- FullIdentity = 0,
914
- Balance = 1,
915
- Keys = 2,
916
- Revision = 3,
917
- }
918
- impl Type {
919
- /// String value of the enum field names used in the ProtoBuf definition.
920
- ///
921
- /// The values are not transformed in any way and thus are considered stable
922
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
923
- pub fn as_str_name(&self) -> &'static str {
924
- match self {
925
- Type::FullIdentity => "FULL_IDENTITY",
926
- Type::Balance => "BALANCE",
927
- Type::Keys => "KEYS",
928
- Type::Revision => "REVISION",
929
- }
930
- }
931
- /// Creates an enum from field names used in the ProtoBuf definition.
932
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
933
- match value {
934
- "FULL_IDENTITY" => Some(Self::FullIdentity),
935
- "BALANCE" => Some(Self::Balance),
936
- "KEYS" => Some(Self::Keys),
937
- "REVISION" => Some(Self::Revision),
938
- _ => None,
939
- }
940
- }
941
- }
942
- }
943
- #[derive(::serde::Serialize, ::serde::Deserialize)]
944
- #[serde(rename_all = "snake_case")]
945
- #[derive(::dapi_grpc_macros::Mockable)]
946
- #[allow(clippy::derive_partial_eq_without_eq)]
947
- #[derive(Clone, PartialEq, ::prost::Message)]
948
- pub struct ContractRequest {
949
- #[prost(bytes = "vec", tag = "1")]
950
- pub contract_id: ::prost::alloc::vec::Vec<u8>,
951
- }
952
- }
953
- #[derive(::serde::Serialize, ::serde::Deserialize)]
954
- #[serde(rename_all = "snake_case")]
955
- #[allow(clippy::derive_partial_eq_without_eq)]
956
- #[derive(Clone, PartialEq, ::prost::Oneof)]
957
- pub enum Version {
958
- #[prost(message, tag = "1")]
959
- V0(GetProofsRequestV0),
960
- }
961
- }
962
- #[derive(::serde::Serialize, ::serde::Deserialize)]
963
- #[serde(rename_all = "snake_case")]
964
- #[derive(
965
- ::dapi_grpc_macros::VersionedGrpcMessage,
966
- ::dapi_grpc_macros::VersionedGrpcResponse
967
- )]
968
- #[grpc_versions(0)]
969
- #[derive(::dapi_grpc_macros::Mockable)]
970
- #[allow(clippy::derive_partial_eq_without_eq)]
971
- #[derive(Clone, PartialEq, ::prost::Message)]
972
- pub struct GetProofsResponse {
973
- #[prost(oneof = "get_proofs_response::Version", tags = "1")]
974
- pub version: ::core::option::Option<get_proofs_response::Version>,
975
- }
976
- /// Nested message and enum types in `GetProofsResponse`.
977
- pub mod get_proofs_response {
978
- #[derive(::serde::Serialize, ::serde::Deserialize)]
979
- #[serde(rename_all = "snake_case")]
980
- #[derive(::dapi_grpc_macros::Mockable)]
981
- #[allow(clippy::derive_partial_eq_without_eq)]
982
- #[derive(Clone, PartialEq, ::prost::Message)]
983
- pub struct GetProofsResponseV0 {
984
- #[prost(message, optional, tag = "2")]
985
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
986
- #[prost(oneof = "get_proofs_response_v0::Result", tags = "1")]
987
- pub result: ::core::option::Option<get_proofs_response_v0::Result>,
988
- }
989
- /// Nested message and enum types in `GetProofsResponseV0`.
990
- pub mod get_proofs_response_v0 {
991
- #[derive(::serde::Serialize, ::serde::Deserialize)]
992
- #[serde(rename_all = "snake_case")]
993
- #[allow(clippy::derive_partial_eq_without_eq)]
994
- #[derive(Clone, PartialEq, ::prost::Oneof)]
995
- pub enum Result {
996
- #[prost(message, tag = "1")]
997
- Proof(super::super::Proof),
998
- }
999
- }
1000
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1001
- #[serde(rename_all = "snake_case")]
1002
- #[allow(clippy::derive_partial_eq_without_eq)]
1003
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1004
- pub enum Version {
1005
- #[prost(message, tag = "1")]
1006
- V0(GetProofsResponseV0),
1007
- }
1008
- }
1009
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1010
- #[serde(rename_all = "snake_case")]
1011
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
1012
- #[grpc_versions(0)]
1013
- #[derive(::dapi_grpc_macros::Mockable)]
1014
- #[allow(clippy::derive_partial_eq_without_eq)]
1015
- #[derive(Clone, PartialEq, ::prost::Message)]
1016
- pub struct GetDataContractRequest {
1017
- #[prost(oneof = "get_data_contract_request::Version", tags = "1")]
1018
- pub version: ::core::option::Option<get_data_contract_request::Version>,
1019
- }
1020
- /// Nested message and enum types in `GetDataContractRequest`.
1021
- pub mod get_data_contract_request {
1022
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1023
- #[serde(rename_all = "snake_case")]
1024
- #[derive(::dapi_grpc_macros::Mockable)]
1025
- #[allow(clippy::derive_partial_eq_without_eq)]
1026
- #[derive(Clone, PartialEq, ::prost::Message)]
1027
- pub struct GetDataContractRequestV0 {
1028
- #[prost(bytes = "vec", tag = "1")]
1029
- #[serde(with = "serde_bytes")]
1030
- pub id: ::prost::alloc::vec::Vec<u8>,
1031
- #[prost(bool, tag = "2")]
1032
- pub prove: bool,
1033
- }
1034
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1035
- #[serde(rename_all = "snake_case")]
1036
- #[allow(clippy::derive_partial_eq_without_eq)]
1037
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1038
- pub enum Version {
1039
- #[prost(message, tag = "1")]
1040
- V0(GetDataContractRequestV0),
1041
- }
1042
- }
1043
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1044
- #[serde(rename_all = "snake_case")]
1045
- #[derive(
1046
- ::dapi_grpc_macros::VersionedGrpcMessage,
1047
- ::dapi_grpc_macros::VersionedGrpcResponse
1048
- )]
1049
- #[grpc_versions(0)]
1050
- #[derive(::dapi_grpc_macros::Mockable)]
1051
- #[allow(clippy::derive_partial_eq_without_eq)]
1052
- #[derive(Clone, PartialEq, ::prost::Message)]
1053
- pub struct GetDataContractResponse {
1054
- #[prost(oneof = "get_data_contract_response::Version", tags = "1")]
1055
- pub version: ::core::option::Option<get_data_contract_response::Version>,
1056
- }
1057
- /// Nested message and enum types in `GetDataContractResponse`.
1058
- pub mod get_data_contract_response {
1059
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1060
- #[serde(rename_all = "snake_case")]
1061
- #[derive(::dapi_grpc_macros::Mockable)]
1062
- #[allow(clippy::derive_partial_eq_without_eq)]
1063
- #[derive(Clone, PartialEq, ::prost::Message)]
1064
- pub struct GetDataContractResponseV0 {
1065
- #[prost(message, optional, tag = "3")]
1066
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
1067
- #[prost(oneof = "get_data_contract_response_v0::Result", tags = "1, 2")]
1068
- pub result: ::core::option::Option<get_data_contract_response_v0::Result>,
1069
- }
1070
- /// Nested message and enum types in `GetDataContractResponseV0`.
1071
- pub mod get_data_contract_response_v0 {
1072
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1073
- #[serde(rename_all = "snake_case")]
1074
- #[allow(clippy::derive_partial_eq_without_eq)]
1075
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1076
- pub enum Result {
1077
- #[prost(bytes, tag = "1")]
1078
- DataContract(::prost::alloc::vec::Vec<u8>),
1079
- #[prost(message, tag = "2")]
1080
- Proof(super::super::Proof),
1081
- }
1082
- }
1083
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1084
- #[serde(rename_all = "snake_case")]
1085
- #[allow(clippy::derive_partial_eq_without_eq)]
1086
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1087
- pub enum Version {
1088
- #[prost(message, tag = "1")]
1089
- V0(GetDataContractResponseV0),
1090
- }
1091
- }
1092
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1093
- #[serde(rename_all = "snake_case")]
1094
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
1095
- #[grpc_versions(0)]
1096
- #[derive(::dapi_grpc_macros::Mockable)]
1097
- #[allow(clippy::derive_partial_eq_without_eq)]
1098
- #[derive(Clone, PartialEq, ::prost::Message)]
1099
- pub struct GetDataContractsRequest {
1100
- #[prost(oneof = "get_data_contracts_request::Version", tags = "1")]
1101
- pub version: ::core::option::Option<get_data_contracts_request::Version>,
1102
- }
1103
- /// Nested message and enum types in `GetDataContractsRequest`.
1104
- pub mod get_data_contracts_request {
1105
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1106
- #[serde(rename_all = "snake_case")]
1107
- #[derive(::dapi_grpc_macros::Mockable)]
1108
- #[allow(clippy::derive_partial_eq_without_eq)]
1109
- #[derive(Clone, PartialEq, ::prost::Message)]
1110
- pub struct GetDataContractsRequestV0 {
1111
- #[prost(bytes = "vec", repeated, tag = "1")]
1112
- #[serde(with = "crate::deserialization::vec_base64string")]
1113
- pub ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
1114
- #[prost(bool, tag = "2")]
1115
- pub prove: bool,
1116
- }
1117
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1118
- #[serde(rename_all = "snake_case")]
1119
- #[allow(clippy::derive_partial_eq_without_eq)]
1120
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1121
- pub enum Version {
1122
- #[prost(message, tag = "1")]
1123
- V0(GetDataContractsRequestV0),
1124
- }
1125
- }
1126
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1127
- #[serde(rename_all = "snake_case")]
1128
- #[derive(
1129
- ::dapi_grpc_macros::VersionedGrpcMessage,
1130
- ::dapi_grpc_macros::VersionedGrpcResponse
1131
- )]
1132
- #[grpc_versions(0)]
1133
- #[derive(::dapi_grpc_macros::Mockable)]
1134
- #[allow(clippy::derive_partial_eq_without_eq)]
1135
- #[derive(Clone, PartialEq, ::prost::Message)]
1136
- pub struct GetDataContractsResponse {
1137
- #[prost(oneof = "get_data_contracts_response::Version", tags = "1")]
1138
- pub version: ::core::option::Option<get_data_contracts_response::Version>,
1139
- }
1140
- /// Nested message and enum types in `GetDataContractsResponse`.
1141
- pub mod get_data_contracts_response {
1142
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1143
- #[serde(rename_all = "snake_case")]
1144
- #[derive(::dapi_grpc_macros::Mockable)]
1145
- #[allow(clippy::derive_partial_eq_without_eq)]
1146
- #[derive(Clone, PartialEq, ::prost::Message)]
1147
- pub struct DataContractEntry {
1148
- #[prost(bytes = "vec", tag = "1")]
1149
- pub identifier: ::prost::alloc::vec::Vec<u8>,
1150
- #[prost(message, optional, tag = "2")]
1151
- pub data_contract: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
1152
- }
1153
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1154
- #[serde(rename_all = "snake_case")]
1155
- #[derive(::dapi_grpc_macros::Mockable)]
1156
- #[allow(clippy::derive_partial_eq_without_eq)]
1157
- #[derive(Clone, PartialEq, ::prost::Message)]
1158
- pub struct DataContracts {
1159
- #[prost(message, repeated, tag = "1")]
1160
- pub data_contract_entries: ::prost::alloc::vec::Vec<DataContractEntry>,
1161
- }
1162
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1163
- #[serde(rename_all = "snake_case")]
1164
- #[derive(::dapi_grpc_macros::Mockable)]
1165
- #[allow(clippy::derive_partial_eq_without_eq)]
1166
- #[derive(Clone, PartialEq, ::prost::Message)]
1167
- pub struct GetDataContractsResponseV0 {
1168
- #[prost(message, optional, tag = "3")]
1169
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
1170
- #[prost(oneof = "get_data_contracts_response_v0::Result", tags = "1, 2")]
1171
- pub result: ::core::option::Option<get_data_contracts_response_v0::Result>,
1172
- }
1173
- /// Nested message and enum types in `GetDataContractsResponseV0`.
1174
- pub mod get_data_contracts_response_v0 {
1175
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1176
- #[serde(rename_all = "snake_case")]
1177
- #[allow(clippy::derive_partial_eq_without_eq)]
1178
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1179
- pub enum Result {
1180
- #[prost(message, tag = "1")]
1181
- DataContracts(super::DataContracts),
1182
- #[prost(message, tag = "2")]
1183
- Proof(super::super::Proof),
1184
- }
1185
- }
1186
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1187
- #[serde(rename_all = "snake_case")]
1188
- #[allow(clippy::derive_partial_eq_without_eq)]
1189
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1190
- pub enum Version {
1191
- #[prost(message, tag = "1")]
1192
- V0(GetDataContractsResponseV0),
1193
- }
1194
- }
1195
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1196
- #[serde(rename_all = "snake_case")]
1197
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
1198
- #[grpc_versions(0)]
1199
- #[derive(::dapi_grpc_macros::Mockable)]
1200
- #[allow(clippy::derive_partial_eq_without_eq)]
1201
- #[derive(Clone, PartialEq, ::prost::Message)]
1202
- pub struct GetDataContractHistoryRequest {
1203
- #[prost(oneof = "get_data_contract_history_request::Version", tags = "1")]
1204
- pub version: ::core::option::Option<get_data_contract_history_request::Version>,
1205
- }
1206
- /// Nested message and enum types in `GetDataContractHistoryRequest`.
1207
- pub mod get_data_contract_history_request {
1208
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1209
- #[serde(rename_all = "snake_case")]
1210
- #[derive(::dapi_grpc_macros::Mockable)]
1211
- #[allow(clippy::derive_partial_eq_without_eq)]
1212
- #[derive(Clone, PartialEq, ::prost::Message)]
1213
- pub struct GetDataContractHistoryRequestV0 {
1214
- #[prost(bytes = "vec", tag = "1")]
1215
- #[serde(with = "serde_bytes")]
1216
- pub id: ::prost::alloc::vec::Vec<u8>,
1217
- #[prost(message, optional, tag = "2")]
1218
- pub limit: ::core::option::Option<u32>,
1219
- #[prost(message, optional, tag = "3")]
1220
- pub offset: ::core::option::Option<u32>,
1221
- #[prost(uint64, tag = "4")]
1222
- #[serde(with = "crate::deserialization::from_to_string")]
1223
- pub start_at_ms: u64,
1224
- #[prost(bool, tag = "5")]
1225
- pub prove: bool,
1226
- }
1227
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1228
- #[serde(rename_all = "snake_case")]
1229
- #[allow(clippy::derive_partial_eq_without_eq)]
1230
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1231
- pub enum Version {
1232
- #[prost(message, tag = "1")]
1233
- V0(GetDataContractHistoryRequestV0),
1234
- }
1235
- }
1236
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1237
- #[serde(rename_all = "snake_case")]
1238
- #[derive(
1239
- ::dapi_grpc_macros::VersionedGrpcMessage,
1240
- ::dapi_grpc_macros::VersionedGrpcResponse
1241
- )]
1242
- #[grpc_versions(0)]
1243
- #[derive(::dapi_grpc_macros::Mockable)]
1244
- #[allow(clippy::derive_partial_eq_without_eq)]
1245
- #[derive(Clone, PartialEq, ::prost::Message)]
1246
- pub struct GetDataContractHistoryResponse {
1247
- #[prost(oneof = "get_data_contract_history_response::Version", tags = "1")]
1248
- pub version: ::core::option::Option<get_data_contract_history_response::Version>,
1249
- }
1250
- /// Nested message and enum types in `GetDataContractHistoryResponse`.
1251
- pub mod get_data_contract_history_response {
1252
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1253
- #[serde(rename_all = "snake_case")]
1254
- #[derive(::dapi_grpc_macros::Mockable)]
1255
- #[allow(clippy::derive_partial_eq_without_eq)]
1256
- #[derive(Clone, PartialEq, ::prost::Message)]
1257
- pub struct GetDataContractHistoryResponseV0 {
1258
- #[prost(message, optional, tag = "3")]
1259
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
1260
- #[prost(oneof = "get_data_contract_history_response_v0::Result", tags = "1, 2")]
1261
- pub result: ::core::option::Option<
1262
- get_data_contract_history_response_v0::Result,
1263
- >,
1264
- }
1265
- /// Nested message and enum types in `GetDataContractHistoryResponseV0`.
1266
- pub mod get_data_contract_history_response_v0 {
1267
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1268
- #[serde(rename_all = "snake_case")]
1269
- #[derive(::dapi_grpc_macros::Mockable)]
1270
- #[allow(clippy::derive_partial_eq_without_eq)]
1271
- #[derive(Clone, PartialEq, ::prost::Message)]
1272
- pub struct DataContractHistoryEntry {
1273
- #[prost(uint64, tag = "1")]
1274
- pub date: u64,
1275
- #[prost(bytes = "vec", tag = "2")]
1276
- pub value: ::prost::alloc::vec::Vec<u8>,
1277
- }
1278
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1279
- #[serde(rename_all = "snake_case")]
1280
- #[derive(::dapi_grpc_macros::Mockable)]
1281
- #[allow(clippy::derive_partial_eq_without_eq)]
1282
- #[derive(Clone, PartialEq, ::prost::Message)]
1283
- pub struct DataContractHistory {
1284
- #[prost(message, repeated, tag = "1")]
1285
- pub data_contract_entries: ::prost::alloc::vec::Vec<
1286
- DataContractHistoryEntry,
1287
- >,
1288
- }
1289
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1290
- #[serde(rename_all = "snake_case")]
1291
- #[allow(clippy::derive_partial_eq_without_eq)]
1292
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1293
- pub enum Result {
1294
- #[prost(message, tag = "1")]
1295
- DataContractHistory(DataContractHistory),
1296
- #[prost(message, tag = "2")]
1297
- Proof(super::super::Proof),
1298
- }
1299
- }
1300
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1301
- #[serde(rename_all = "snake_case")]
1302
- #[allow(clippy::derive_partial_eq_without_eq)]
1303
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1304
- pub enum Version {
1305
- #[prost(message, tag = "1")]
1306
- V0(GetDataContractHistoryResponseV0),
1307
- }
1308
- }
1309
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1310
- #[serde(rename_all = "snake_case")]
1311
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
1312
- #[grpc_versions(0)]
1313
- #[derive(::dapi_grpc_macros::Mockable)]
1314
- #[allow(clippy::derive_partial_eq_without_eq)]
1315
- #[derive(Clone, PartialEq, ::prost::Message)]
1316
- pub struct GetDocumentsRequest {
1317
- #[prost(oneof = "get_documents_request::Version", tags = "1")]
1318
- pub version: ::core::option::Option<get_documents_request::Version>,
1319
- }
1320
- /// Nested message and enum types in `GetDocumentsRequest`.
1321
- pub mod get_documents_request {
1322
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1323
- #[serde(rename_all = "snake_case")]
1324
- #[derive(::dapi_grpc_macros::Mockable)]
1325
- #[allow(clippy::derive_partial_eq_without_eq)]
1326
- #[derive(Clone, PartialEq, ::prost::Message)]
1327
- pub struct GetDocumentsRequestV0 {
1328
- #[prost(bytes = "vec", tag = "1")]
1329
- #[serde(with = "serde_bytes")]
1330
- pub data_contract_id: ::prost::alloc::vec::Vec<u8>,
1331
- #[prost(string, tag = "2")]
1332
- pub document_type: ::prost::alloc::string::String,
1333
- #[prost(bytes = "vec", tag = "3")]
1334
- #[serde(with = "serde_bytes")]
1335
- pub r#where: ::prost::alloc::vec::Vec<u8>,
1336
- #[prost(bytes = "vec", tag = "4")]
1337
- #[serde(with = "serde_bytes")]
1338
- pub order_by: ::prost::alloc::vec::Vec<u8>,
1339
- #[prost(uint32, tag = "5")]
1340
- pub limit: u32,
1341
- #[prost(bool, tag = "8")]
1342
- pub prove: bool,
1343
- #[prost(oneof = "get_documents_request_v0::Start", tags = "6, 7")]
1344
- pub start: ::core::option::Option<get_documents_request_v0::Start>,
1345
- }
1346
- /// Nested message and enum types in `GetDocumentsRequestV0`.
1347
- pub mod get_documents_request_v0 {
1348
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1349
- #[serde(rename_all = "snake_case")]
1350
- #[allow(clippy::derive_partial_eq_without_eq)]
1351
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1352
- pub enum Start {
1353
- #[prost(bytes, tag = "6")]
1354
- StartAfter(::prost::alloc::vec::Vec<u8>),
1355
- #[prost(bytes, tag = "7")]
1356
- StartAt(::prost::alloc::vec::Vec<u8>),
1357
- }
1358
- }
1359
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1360
- #[serde(rename_all = "snake_case")]
1361
- #[allow(clippy::derive_partial_eq_without_eq)]
1362
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1363
- pub enum Version {
1364
- #[prost(message, tag = "1")]
1365
- V0(GetDocumentsRequestV0),
1366
- }
1367
- }
1368
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1369
- #[serde(rename_all = "snake_case")]
1370
- #[derive(
1371
- ::dapi_grpc_macros::VersionedGrpcMessage,
1372
- ::dapi_grpc_macros::VersionedGrpcResponse
1373
- )]
1374
- #[grpc_versions(0)]
1375
- #[derive(::dapi_grpc_macros::Mockable)]
1376
- #[allow(clippy::derive_partial_eq_without_eq)]
1377
- #[derive(Clone, PartialEq, ::prost::Message)]
1378
- pub struct GetDocumentsResponse {
1379
- #[prost(oneof = "get_documents_response::Version", tags = "1")]
1380
- pub version: ::core::option::Option<get_documents_response::Version>,
1381
- }
1382
- /// Nested message and enum types in `GetDocumentsResponse`.
1383
- pub mod get_documents_response {
1384
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1385
- #[serde(rename_all = "snake_case")]
1386
- #[derive(::dapi_grpc_macros::Mockable)]
1387
- #[allow(clippy::derive_partial_eq_without_eq)]
1388
- #[derive(Clone, PartialEq, ::prost::Message)]
1389
- pub struct GetDocumentsResponseV0 {
1390
- #[prost(message, optional, tag = "3")]
1391
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
1392
- #[prost(oneof = "get_documents_response_v0::Result", tags = "1, 2")]
1393
- pub result: ::core::option::Option<get_documents_response_v0::Result>,
1394
- }
1395
- /// Nested message and enum types in `GetDocumentsResponseV0`.
1396
- pub mod get_documents_response_v0 {
1397
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1398
- #[serde(rename_all = "snake_case")]
1399
- #[derive(::dapi_grpc_macros::Mockable)]
1400
- #[allow(clippy::derive_partial_eq_without_eq)]
1401
- #[derive(Clone, PartialEq, ::prost::Message)]
1402
- pub struct Documents {
1403
- #[prost(bytes = "vec", repeated, tag = "1")]
1404
- pub documents: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
1405
- }
1406
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1407
- #[serde(rename_all = "snake_case")]
1408
- #[allow(clippy::derive_partial_eq_without_eq)]
1409
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1410
- pub enum Result {
1411
- #[prost(message, tag = "1")]
1412
- Documents(Documents),
1413
- #[prost(message, tag = "2")]
1414
- Proof(super::super::Proof),
1415
- }
1416
- }
1417
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1418
- #[serde(rename_all = "snake_case")]
1419
- #[allow(clippy::derive_partial_eq_without_eq)]
1420
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1421
- pub enum Version {
1422
- #[prost(message, tag = "1")]
1423
- V0(GetDocumentsResponseV0),
1424
- }
1425
- }
1426
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1427
- #[serde(rename_all = "snake_case")]
1428
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
1429
- #[grpc_versions(0)]
1430
- #[derive(::dapi_grpc_macros::Mockable)]
1431
- #[allow(clippy::derive_partial_eq_without_eq)]
1432
- #[derive(Clone, PartialEq, ::prost::Message)]
1433
- pub struct GetIdentityByPublicKeyHashRequest {
1434
- #[prost(oneof = "get_identity_by_public_key_hash_request::Version", tags = "1")]
1435
- pub version: ::core::option::Option<
1436
- get_identity_by_public_key_hash_request::Version,
1437
- >,
1438
- }
1439
- /// Nested message and enum types in `GetIdentityByPublicKeyHashRequest`.
1440
- pub mod get_identity_by_public_key_hash_request {
1441
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1442
- #[serde(rename_all = "snake_case")]
1443
- #[derive(::dapi_grpc_macros::Mockable)]
1444
- #[allow(clippy::derive_partial_eq_without_eq)]
1445
- #[derive(Clone, PartialEq, ::prost::Message)]
1446
- pub struct GetIdentityByPublicKeyHashRequestV0 {
1447
- #[prost(bytes = "vec", tag = "1")]
1448
- #[serde(with = "serde_bytes")]
1449
- pub public_key_hash: ::prost::alloc::vec::Vec<u8>,
1450
- #[prost(bool, tag = "2")]
1451
- pub prove: bool,
1452
- }
1453
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1454
- #[serde(rename_all = "snake_case")]
1455
- #[allow(clippy::derive_partial_eq_without_eq)]
1456
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1457
- pub enum Version {
1458
- #[prost(message, tag = "1")]
1459
- V0(GetIdentityByPublicKeyHashRequestV0),
1460
- }
1461
- }
1462
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1463
- #[serde(rename_all = "snake_case")]
1464
- #[derive(
1465
- ::dapi_grpc_macros::VersionedGrpcMessage,
1466
- ::dapi_grpc_macros::VersionedGrpcResponse
1467
- )]
1468
- #[grpc_versions(0)]
1469
- #[derive(::dapi_grpc_macros::Mockable)]
1470
- #[allow(clippy::derive_partial_eq_without_eq)]
1471
- #[derive(Clone, PartialEq, ::prost::Message)]
1472
- pub struct GetIdentityByPublicKeyHashResponse {
1473
- #[prost(oneof = "get_identity_by_public_key_hash_response::Version", tags = "1")]
1474
- pub version: ::core::option::Option<
1475
- get_identity_by_public_key_hash_response::Version,
1476
- >,
1477
- }
1478
- /// Nested message and enum types in `GetIdentityByPublicKeyHashResponse`.
1479
- pub mod get_identity_by_public_key_hash_response {
1480
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1481
- #[serde(rename_all = "snake_case")]
1482
- #[derive(::dapi_grpc_macros::Mockable)]
1483
- #[allow(clippy::derive_partial_eq_without_eq)]
1484
- #[derive(Clone, PartialEq, ::prost::Message)]
1485
- pub struct GetIdentityByPublicKeyHashResponseV0 {
1486
- #[prost(message, optional, tag = "3")]
1487
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
1488
- #[prost(
1489
- oneof = "get_identity_by_public_key_hash_response_v0::Result",
1490
- tags = "1, 2"
1491
- )]
1492
- pub result: ::core::option::Option<
1493
- get_identity_by_public_key_hash_response_v0::Result,
1494
- >,
1495
- }
1496
- /// Nested message and enum types in `GetIdentityByPublicKeyHashResponseV0`.
1497
- pub mod get_identity_by_public_key_hash_response_v0 {
1498
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1499
- #[serde(rename_all = "snake_case")]
1500
- #[allow(clippy::derive_partial_eq_without_eq)]
1501
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1502
- pub enum Result {
1503
- #[prost(bytes, tag = "1")]
1504
- Identity(::prost::alloc::vec::Vec<u8>),
1505
- #[prost(message, tag = "2")]
1506
- Proof(super::super::Proof),
1507
- }
1508
- }
1509
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1510
- #[serde(rename_all = "snake_case")]
1511
- #[allow(clippy::derive_partial_eq_without_eq)]
1512
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1513
- pub enum Version {
1514
- #[prost(message, tag = "1")]
1515
- V0(GetIdentityByPublicKeyHashResponseV0),
1516
- }
1517
- }
1518
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1519
- #[serde(rename_all = "snake_case")]
1520
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
1521
- #[grpc_versions(0)]
1522
- #[derive(::dapi_grpc_macros::Mockable)]
1523
- #[allow(clippy::derive_partial_eq_without_eq)]
1524
- #[derive(Clone, PartialEq, ::prost::Message)]
1525
- pub struct WaitForStateTransitionResultRequest {
1526
- #[prost(oneof = "wait_for_state_transition_result_request::Version", tags = "1")]
1527
- pub version: ::core::option::Option<
1528
- wait_for_state_transition_result_request::Version,
1529
- >,
1530
- }
1531
- /// Nested message and enum types in `WaitForStateTransitionResultRequest`.
1532
- pub mod wait_for_state_transition_result_request {
1533
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1534
- #[serde(rename_all = "snake_case")]
1535
- #[derive(::dapi_grpc_macros::Mockable)]
1536
- #[allow(clippy::derive_partial_eq_without_eq)]
1537
- #[derive(Clone, PartialEq, ::prost::Message)]
1538
- pub struct WaitForStateTransitionResultRequestV0 {
1539
- #[prost(bytes = "vec", tag = "1")]
1540
- pub state_transition_hash: ::prost::alloc::vec::Vec<u8>,
1541
- #[prost(bool, tag = "2")]
1542
- pub prove: bool,
1543
- }
1544
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1545
- #[serde(rename_all = "snake_case")]
1546
- #[allow(clippy::derive_partial_eq_without_eq)]
1547
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1548
- pub enum Version {
1549
- #[prost(message, tag = "1")]
1550
- V0(WaitForStateTransitionResultRequestV0),
1551
- }
1552
- }
1553
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1554
- #[serde(rename_all = "snake_case")]
1555
- #[derive(
1556
- ::dapi_grpc_macros::VersionedGrpcMessage,
1557
- ::dapi_grpc_macros::VersionedGrpcResponse
1558
- )]
1559
- #[grpc_versions(0)]
1560
- #[derive(::dapi_grpc_macros::Mockable)]
1561
- #[allow(clippy::derive_partial_eq_without_eq)]
1562
- #[derive(Clone, PartialEq, ::prost::Message)]
1563
- pub struct WaitForStateTransitionResultResponse {
1564
- #[prost(oneof = "wait_for_state_transition_result_response::Version", tags = "1")]
1565
- pub version: ::core::option::Option<
1566
- wait_for_state_transition_result_response::Version,
1567
- >,
1568
- }
1569
- /// Nested message and enum types in `WaitForStateTransitionResultResponse`.
1570
- pub mod wait_for_state_transition_result_response {
1571
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1572
- #[serde(rename_all = "snake_case")]
1573
- #[derive(::dapi_grpc_macros::Mockable)]
1574
- #[allow(clippy::derive_partial_eq_without_eq)]
1575
- #[derive(Clone, PartialEq, ::prost::Message)]
1576
- pub struct WaitForStateTransitionResultResponseV0 {
1577
- #[prost(message, optional, tag = "3")]
1578
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
1579
- #[prost(
1580
- oneof = "wait_for_state_transition_result_response_v0::Result",
1581
- tags = "1, 2"
1582
- )]
1583
- pub result: ::core::option::Option<
1584
- wait_for_state_transition_result_response_v0::Result,
1585
- >,
1586
- }
1587
- /// Nested message and enum types in `WaitForStateTransitionResultResponseV0`.
1588
- pub mod wait_for_state_transition_result_response_v0 {
1589
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1590
- #[serde(rename_all = "snake_case")]
1591
- #[allow(clippy::derive_partial_eq_without_eq)]
1592
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1593
- pub enum Result {
1594
- #[prost(message, tag = "1")]
1595
- Error(super::super::StateTransitionBroadcastError),
1596
- #[prost(message, tag = "2")]
1597
- Proof(super::super::Proof),
1598
- }
1599
- }
1600
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1601
- #[serde(rename_all = "snake_case")]
1602
- #[allow(clippy::derive_partial_eq_without_eq)]
1603
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1604
- pub enum Version {
1605
- #[prost(message, tag = "1")]
1606
- V0(WaitForStateTransitionResultResponseV0),
1607
- }
1608
- }
1609
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1610
- #[serde(rename_all = "snake_case")]
1611
- #[derive(::dapi_grpc_macros::Mockable)]
1612
- #[allow(clippy::derive_partial_eq_without_eq)]
1613
- #[derive(Clone, PartialEq, ::prost::Message)]
1614
- pub struct GetConsensusParamsRequest {
1615
- #[prost(oneof = "get_consensus_params_request::Version", tags = "1")]
1616
- pub version: ::core::option::Option<get_consensus_params_request::Version>,
1617
- }
1618
- /// Nested message and enum types in `GetConsensusParamsRequest`.
1619
- pub mod get_consensus_params_request {
1620
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1621
- #[serde(rename_all = "snake_case")]
1622
- #[derive(::dapi_grpc_macros::Mockable)]
1623
- #[allow(clippy::derive_partial_eq_without_eq)]
1624
- #[derive(Clone, PartialEq, ::prost::Message)]
1625
- pub struct GetConsensusParamsRequestV0 {
1626
- #[prost(int32, tag = "1")]
1627
- pub height: i32,
1628
- #[prost(bool, tag = "2")]
1629
- pub prove: bool,
1630
- }
1631
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1632
- #[serde(rename_all = "snake_case")]
1633
- #[allow(clippy::derive_partial_eq_without_eq)]
1634
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1635
- pub enum Version {
1636
- #[prost(message, tag = "1")]
1637
- V0(GetConsensusParamsRequestV0),
1638
- }
1639
- }
1640
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1641
- #[serde(rename_all = "snake_case")]
1642
- #[derive(::dapi_grpc_macros::Mockable)]
1643
- #[allow(clippy::derive_partial_eq_without_eq)]
1644
- #[derive(Clone, PartialEq, ::prost::Message)]
1645
- pub struct GetConsensusParamsResponse {
1646
- #[prost(oneof = "get_consensus_params_response::Version", tags = "1")]
1647
- pub version: ::core::option::Option<get_consensus_params_response::Version>,
1648
- }
1649
- /// Nested message and enum types in `GetConsensusParamsResponse`.
1650
- pub mod get_consensus_params_response {
1651
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1652
- #[serde(rename_all = "snake_case")]
1653
- #[derive(::dapi_grpc_macros::Mockable)]
1654
- #[allow(clippy::derive_partial_eq_without_eq)]
1655
- #[derive(Clone, PartialEq, ::prost::Message)]
1656
- pub struct ConsensusParamsBlock {
1657
- #[prost(string, tag = "1")]
1658
- pub max_bytes: ::prost::alloc::string::String,
1659
- #[prost(string, tag = "2")]
1660
- pub max_gas: ::prost::alloc::string::String,
1661
- #[prost(string, tag = "3")]
1662
- pub time_iota_ms: ::prost::alloc::string::String,
1663
- }
1664
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1665
- #[serde(rename_all = "snake_case")]
1666
- #[derive(::dapi_grpc_macros::Mockable)]
1667
- #[allow(clippy::derive_partial_eq_without_eq)]
1668
- #[derive(Clone, PartialEq, ::prost::Message)]
1669
- pub struct ConsensusParamsEvidence {
1670
- #[prost(string, tag = "1")]
1671
- pub max_age_num_blocks: ::prost::alloc::string::String,
1672
- #[prost(string, tag = "2")]
1673
- pub max_age_duration: ::prost::alloc::string::String,
1674
- #[prost(string, tag = "3")]
1675
- pub max_bytes: ::prost::alloc::string::String,
1676
- }
1677
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1678
- #[serde(rename_all = "snake_case")]
1679
- #[derive(::dapi_grpc_macros::Mockable)]
1680
- #[allow(clippy::derive_partial_eq_without_eq)]
1681
- #[derive(Clone, PartialEq, ::prost::Message)]
1682
- pub struct GetConsensusParamsResponseV0 {
1683
- #[prost(message, optional, tag = "1")]
1684
- pub block: ::core::option::Option<ConsensusParamsBlock>,
1685
- #[prost(message, optional, tag = "2")]
1686
- pub evidence: ::core::option::Option<ConsensusParamsEvidence>,
1687
- }
1688
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1689
- #[serde(rename_all = "snake_case")]
1690
- #[allow(clippy::derive_partial_eq_without_eq)]
1691
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1692
- pub enum Version {
1693
- #[prost(message, tag = "1")]
1694
- V0(GetConsensusParamsResponseV0),
1695
- }
1696
- }
1697
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1698
- #[serde(rename_all = "snake_case")]
1699
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
1700
- #[grpc_versions(0)]
1701
- #[derive(::dapi_grpc_macros::Mockable)]
1702
- #[allow(clippy::derive_partial_eq_without_eq)]
1703
- #[derive(Clone, PartialEq, ::prost::Message)]
1704
- pub struct GetProtocolVersionUpgradeStateRequest {
1705
- #[prost(oneof = "get_protocol_version_upgrade_state_request::Version", tags = "1")]
1706
- pub version: ::core::option::Option<
1707
- get_protocol_version_upgrade_state_request::Version,
1708
- >,
1709
- }
1710
- /// Nested message and enum types in `GetProtocolVersionUpgradeStateRequest`.
1711
- pub mod get_protocol_version_upgrade_state_request {
1712
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1713
- #[serde(rename_all = "snake_case")]
1714
- #[derive(::dapi_grpc_macros::Mockable)]
1715
- #[allow(clippy::derive_partial_eq_without_eq)]
1716
- #[derive(Clone, PartialEq, ::prost::Message)]
1717
- pub struct GetProtocolVersionUpgradeStateRequestV0 {
1718
- #[prost(bool, tag = "1")]
1719
- pub prove: bool,
1720
- }
1721
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1722
- #[serde(rename_all = "snake_case")]
1723
- #[allow(clippy::derive_partial_eq_without_eq)]
1724
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1725
- pub enum Version {
1726
- #[prost(message, tag = "1")]
1727
- V0(GetProtocolVersionUpgradeStateRequestV0),
1728
- }
1729
- }
1730
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1731
- #[serde(rename_all = "snake_case")]
1732
- #[derive(
1733
- ::dapi_grpc_macros::VersionedGrpcMessage,
1734
- ::dapi_grpc_macros::VersionedGrpcResponse
1735
- )]
1736
- #[grpc_versions(0)]
1737
- #[derive(::dapi_grpc_macros::Mockable)]
1738
- #[allow(clippy::derive_partial_eq_without_eq)]
1739
- #[derive(Clone, PartialEq, ::prost::Message)]
1740
- pub struct GetProtocolVersionUpgradeStateResponse {
1741
- #[prost(oneof = "get_protocol_version_upgrade_state_response::Version", tags = "1")]
1742
- pub version: ::core::option::Option<
1743
- get_protocol_version_upgrade_state_response::Version,
1744
- >,
1745
- }
1746
- /// Nested message and enum types in `GetProtocolVersionUpgradeStateResponse`.
1747
- pub mod get_protocol_version_upgrade_state_response {
1748
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1749
- #[serde(rename_all = "snake_case")]
1750
- #[derive(::dapi_grpc_macros::Mockable)]
1751
- #[allow(clippy::derive_partial_eq_without_eq)]
1752
- #[derive(Clone, PartialEq, ::prost::Message)]
1753
- pub struct GetProtocolVersionUpgradeStateResponseV0 {
1754
- #[prost(message, optional, tag = "3")]
1755
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
1756
- #[prost(
1757
- oneof = "get_protocol_version_upgrade_state_response_v0::Result",
1758
- tags = "1, 2"
1759
- )]
1760
- pub result: ::core::option::Option<
1761
- get_protocol_version_upgrade_state_response_v0::Result,
1762
- >,
1763
- }
1764
- /// Nested message and enum types in `GetProtocolVersionUpgradeStateResponseV0`.
1765
- pub mod get_protocol_version_upgrade_state_response_v0 {
1766
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1767
- #[serde(rename_all = "snake_case")]
1768
- #[derive(::dapi_grpc_macros::Mockable)]
1769
- #[allow(clippy::derive_partial_eq_without_eq)]
1770
- #[derive(Clone, PartialEq, ::prost::Message)]
1771
- pub struct Versions {
1772
- #[prost(message, repeated, tag = "1")]
1773
- pub versions: ::prost::alloc::vec::Vec<VersionEntry>,
1774
- }
1775
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1776
- #[serde(rename_all = "snake_case")]
1777
- #[derive(::dapi_grpc_macros::Mockable)]
1778
- #[allow(clippy::derive_partial_eq_without_eq)]
1779
- #[derive(Clone, PartialEq, ::prost::Message)]
1780
- pub struct VersionEntry {
1781
- #[prost(uint32, tag = "1")]
1782
- pub version_number: u32,
1783
- #[prost(uint32, tag = "2")]
1784
- pub vote_count: u32,
1785
- }
1786
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1787
- #[serde(rename_all = "snake_case")]
1788
- #[allow(clippy::derive_partial_eq_without_eq)]
1789
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1790
- pub enum Result {
1791
- #[prost(message, tag = "1")]
1792
- Versions(Versions),
1793
- #[prost(message, tag = "2")]
1794
- Proof(super::super::Proof),
1795
- }
1796
- }
1797
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1798
- #[serde(rename_all = "snake_case")]
1799
- #[allow(clippy::derive_partial_eq_without_eq)]
1800
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1801
- pub enum Version {
1802
- #[prost(message, tag = "1")]
1803
- V0(GetProtocolVersionUpgradeStateResponseV0),
1804
- }
1805
- }
1806
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1807
- #[serde(rename_all = "snake_case")]
1808
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
1809
- #[grpc_versions(0)]
1810
- #[derive(::dapi_grpc_macros::Mockable)]
1811
- #[allow(clippy::derive_partial_eq_without_eq)]
1812
- #[derive(Clone, PartialEq, ::prost::Message)]
1813
- pub struct GetProtocolVersionUpgradeVoteStatusRequest {
1814
- #[prost(
1815
- oneof = "get_protocol_version_upgrade_vote_status_request::Version",
1816
- tags = "1"
1817
- )]
1818
- pub version: ::core::option::Option<
1819
- get_protocol_version_upgrade_vote_status_request::Version,
1820
- >,
1821
- }
1822
- /// Nested message and enum types in `GetProtocolVersionUpgradeVoteStatusRequest`.
1823
- pub mod get_protocol_version_upgrade_vote_status_request {
1824
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1825
- #[serde(rename_all = "snake_case")]
1826
- #[derive(::dapi_grpc_macros::Mockable)]
1827
- #[allow(clippy::derive_partial_eq_without_eq)]
1828
- #[derive(Clone, PartialEq, ::prost::Message)]
1829
- pub struct GetProtocolVersionUpgradeVoteStatusRequestV0 {
1830
- #[prost(bytes = "vec", tag = "1")]
1831
- pub start_pro_tx_hash: ::prost::alloc::vec::Vec<u8>,
1832
- #[prost(uint32, tag = "2")]
1833
- pub count: u32,
1834
- #[prost(bool, tag = "3")]
1835
- pub prove: bool,
1836
- }
1837
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1838
- #[serde(rename_all = "snake_case")]
1839
- #[allow(clippy::derive_partial_eq_without_eq)]
1840
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1841
- pub enum Version {
1842
- #[prost(message, tag = "1")]
1843
- V0(GetProtocolVersionUpgradeVoteStatusRequestV0),
1844
- }
1845
- }
1846
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1847
- #[serde(rename_all = "snake_case")]
1848
- #[derive(
1849
- ::dapi_grpc_macros::VersionedGrpcMessage,
1850
- ::dapi_grpc_macros::VersionedGrpcResponse
1851
- )]
1852
- #[grpc_versions(0)]
1853
- #[derive(::dapi_grpc_macros::Mockable)]
1854
- #[allow(clippy::derive_partial_eq_without_eq)]
1855
- #[derive(Clone, PartialEq, ::prost::Message)]
1856
- pub struct GetProtocolVersionUpgradeVoteStatusResponse {
1857
- #[prost(
1858
- oneof = "get_protocol_version_upgrade_vote_status_response::Version",
1859
- tags = "1"
1860
- )]
1861
- pub version: ::core::option::Option<
1862
- get_protocol_version_upgrade_vote_status_response::Version,
1863
- >,
1864
- }
1865
- /// Nested message and enum types in `GetProtocolVersionUpgradeVoteStatusResponse`.
1866
- pub mod get_protocol_version_upgrade_vote_status_response {
1867
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1868
- #[serde(rename_all = "snake_case")]
1869
- #[derive(::dapi_grpc_macros::Mockable)]
1870
- #[allow(clippy::derive_partial_eq_without_eq)]
1871
- #[derive(Clone, PartialEq, ::prost::Message)]
1872
- pub struct GetProtocolVersionUpgradeVoteStatusResponseV0 {
1873
- #[prost(message, optional, tag = "3")]
1874
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
1875
- #[prost(
1876
- oneof = "get_protocol_version_upgrade_vote_status_response_v0::Result",
1877
- tags = "1, 2"
1878
- )]
1879
- pub result: ::core::option::Option<
1880
- get_protocol_version_upgrade_vote_status_response_v0::Result,
1881
- >,
1882
- }
1883
- /// Nested message and enum types in `GetProtocolVersionUpgradeVoteStatusResponseV0`.
1884
- pub mod get_protocol_version_upgrade_vote_status_response_v0 {
1885
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1886
- #[serde(rename_all = "snake_case")]
1887
- #[derive(::dapi_grpc_macros::Mockable)]
1888
- #[allow(clippy::derive_partial_eq_without_eq)]
1889
- #[derive(Clone, PartialEq, ::prost::Message)]
1890
- pub struct VersionSignals {
1891
- #[prost(message, repeated, tag = "1")]
1892
- pub version_signals: ::prost::alloc::vec::Vec<VersionSignal>,
1893
- }
1894
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1895
- #[serde(rename_all = "snake_case")]
1896
- #[derive(::dapi_grpc_macros::Mockable)]
1897
- #[allow(clippy::derive_partial_eq_without_eq)]
1898
- #[derive(Clone, PartialEq, ::prost::Message)]
1899
- pub struct VersionSignal {
1900
- #[prost(bytes = "vec", tag = "1")]
1901
- pub pro_tx_hash: ::prost::alloc::vec::Vec<u8>,
1902
- #[prost(uint32, tag = "2")]
1903
- pub version: u32,
1904
- }
1905
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1906
- #[serde(rename_all = "snake_case")]
1907
- #[allow(clippy::derive_partial_eq_without_eq)]
1908
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1909
- pub enum Result {
1910
- #[prost(message, tag = "1")]
1911
- Versions(VersionSignals),
1912
- #[prost(message, tag = "2")]
1913
- Proof(super::super::Proof),
1914
- }
1915
- }
1916
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1917
- #[serde(rename_all = "snake_case")]
1918
- #[allow(clippy::derive_partial_eq_without_eq)]
1919
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1920
- pub enum Version {
1921
- #[prost(message, tag = "1")]
1922
- V0(GetProtocolVersionUpgradeVoteStatusResponseV0),
1923
- }
1924
- }
1925
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1926
- #[serde(rename_all = "snake_case")]
1927
- #[derive(::dapi_grpc_macros::Mockable)]
1928
- #[allow(clippy::derive_partial_eq_without_eq)]
1929
- #[derive(Clone, PartialEq, ::prost::Message)]
1930
- pub struct GetEpochsInfoRequest {
1931
- #[prost(oneof = "get_epochs_info_request::Version", tags = "1")]
1932
- pub version: ::core::option::Option<get_epochs_info_request::Version>,
1933
- }
1934
- /// Nested message and enum types in `GetEpochsInfoRequest`.
1935
- pub mod get_epochs_info_request {
1936
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1937
- #[serde(rename_all = "snake_case")]
1938
- #[derive(::dapi_grpc_macros::Mockable)]
1939
- #[allow(clippy::derive_partial_eq_without_eq)]
1940
- #[derive(Clone, PartialEq, ::prost::Message)]
1941
- pub struct GetEpochsInfoRequestV0 {
1942
- #[prost(message, optional, tag = "1")]
1943
- pub start_epoch: ::core::option::Option<u32>,
1944
- #[prost(uint32, tag = "2")]
1945
- pub count: u32,
1946
- #[prost(bool, tag = "3")]
1947
- pub ascending: bool,
1948
- #[prost(bool, tag = "4")]
1949
- pub prove: bool,
1950
- }
1951
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1952
- #[serde(rename_all = "snake_case")]
1953
- #[allow(clippy::derive_partial_eq_without_eq)]
1954
- #[derive(Clone, PartialEq, ::prost::Oneof)]
1955
- pub enum Version {
1956
- #[prost(message, tag = "1")]
1957
- V0(GetEpochsInfoRequestV0),
1958
- }
1959
- }
1960
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1961
- #[serde(rename_all = "snake_case")]
1962
- #[derive(
1963
- ::dapi_grpc_macros::VersionedGrpcMessage,
1964
- ::dapi_grpc_macros::VersionedGrpcResponse
1965
- )]
1966
- #[grpc_versions(0)]
1967
- #[derive(::dapi_grpc_macros::Mockable)]
1968
- #[allow(clippy::derive_partial_eq_without_eq)]
1969
- #[derive(Clone, PartialEq, ::prost::Message)]
1970
- pub struct GetEpochsInfoResponse {
1971
- #[prost(oneof = "get_epochs_info_response::Version", tags = "1")]
1972
- pub version: ::core::option::Option<get_epochs_info_response::Version>,
1973
- }
1974
- /// Nested message and enum types in `GetEpochsInfoResponse`.
1975
- pub mod get_epochs_info_response {
1976
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1977
- #[serde(rename_all = "snake_case")]
1978
- #[derive(::dapi_grpc_macros::Mockable)]
1979
- #[allow(clippy::derive_partial_eq_without_eq)]
1980
- #[derive(Clone, PartialEq, ::prost::Message)]
1981
- pub struct GetEpochsInfoResponseV0 {
1982
- #[prost(message, optional, tag = "3")]
1983
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
1984
- #[prost(oneof = "get_epochs_info_response_v0::Result", tags = "1, 2")]
1985
- pub result: ::core::option::Option<get_epochs_info_response_v0::Result>,
1986
- }
1987
- /// Nested message and enum types in `GetEpochsInfoResponseV0`.
1988
- pub mod get_epochs_info_response_v0 {
1989
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1990
- #[serde(rename_all = "snake_case")]
1991
- #[derive(::dapi_grpc_macros::Mockable)]
1992
- #[allow(clippy::derive_partial_eq_without_eq)]
1993
- #[derive(Clone, PartialEq, ::prost::Message)]
1994
- pub struct EpochInfos {
1995
- #[prost(message, repeated, tag = "1")]
1996
- pub epoch_infos: ::prost::alloc::vec::Vec<EpochInfo>,
1997
- }
1998
- #[derive(::serde::Serialize, ::serde::Deserialize)]
1999
- #[serde(rename_all = "snake_case")]
2000
- #[derive(::dapi_grpc_macros::Mockable)]
2001
- #[allow(clippy::derive_partial_eq_without_eq)]
2002
- #[derive(Clone, PartialEq, ::prost::Message)]
2003
- pub struct EpochInfo {
2004
- #[prost(uint32, tag = "1")]
2005
- pub number: u32,
2006
- #[prost(uint64, tag = "2")]
2007
- pub first_block_height: u64,
2008
- #[prost(uint32, tag = "3")]
2009
- pub first_core_block_height: u32,
2010
- #[prost(uint64, tag = "4")]
2011
- pub start_time: u64,
2012
- #[prost(double, tag = "5")]
2013
- pub fee_multiplier: f64,
2014
- #[prost(uint32, tag = "6")]
2015
- pub protocol_version: u32,
2016
- }
2017
- #[derive(::serde::Serialize, ::serde::Deserialize)]
2018
- #[serde(rename_all = "snake_case")]
2019
- #[allow(clippy::derive_partial_eq_without_eq)]
2020
- #[derive(Clone, PartialEq, ::prost::Oneof)]
2021
- pub enum Result {
2022
- #[prost(message, tag = "1")]
2023
- Epochs(EpochInfos),
2024
- #[prost(message, tag = "2")]
2025
- Proof(super::super::Proof),
2026
- }
2027
- }
2028
- #[derive(::serde::Serialize, ::serde::Deserialize)]
2029
- #[serde(rename_all = "snake_case")]
2030
- #[allow(clippy::derive_partial_eq_without_eq)]
2031
- #[derive(Clone, PartialEq, ::prost::Oneof)]
2032
- pub enum Version {
2033
- #[prost(message, tag = "1")]
2034
- V0(GetEpochsInfoResponseV0),
2035
- }
2036
- }
2037
- #[derive(::serde::Serialize, ::serde::Deserialize)]
2038
- #[serde(rename_all = "snake_case")]
2039
- #[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
2040
- #[grpc_versions(0)]
2041
- #[derive(::dapi_grpc_macros::Mockable)]
2042
- #[allow(clippy::derive_partial_eq_without_eq)]
2043
- #[derive(Clone, PartialEq, ::prost::Message)]
2044
- pub struct GetPathElementsRequest {
2045
- #[prost(oneof = "get_path_elements_request::Version", tags = "1")]
2046
- pub version: ::core::option::Option<get_path_elements_request::Version>,
2047
- }
2048
- /// Nested message and enum types in `GetPathElementsRequest`.
2049
- pub mod get_path_elements_request {
2050
- #[derive(::serde::Serialize, ::serde::Deserialize)]
2051
- #[serde(rename_all = "snake_case")]
2052
- #[derive(::dapi_grpc_macros::Mockable)]
2053
- #[allow(clippy::derive_partial_eq_without_eq)]
2054
- #[derive(Clone, PartialEq, ::prost::Message)]
2055
- pub struct GetPathElementsRequestV0 {
2056
- #[prost(bytes = "vec", repeated, tag = "1")]
2057
- pub path: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
2058
- #[prost(bytes = "vec", repeated, tag = "2")]
2059
- pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
2060
- #[prost(bool, tag = "3")]
2061
- pub prove: bool,
2062
- }
2063
- #[derive(::serde::Serialize, ::serde::Deserialize)]
2064
- #[serde(rename_all = "snake_case")]
2065
- #[allow(clippy::derive_partial_eq_without_eq)]
2066
- #[derive(Clone, PartialEq, ::prost::Oneof)]
2067
- pub enum Version {
2068
- #[prost(message, tag = "1")]
2069
- V0(GetPathElementsRequestV0),
2070
- }
2071
- }
2072
- #[derive(::serde::Serialize, ::serde::Deserialize)]
2073
- #[serde(rename_all = "snake_case")]
2074
- #[derive(
2075
- ::dapi_grpc_macros::VersionedGrpcMessage,
2076
- ::dapi_grpc_macros::VersionedGrpcResponse
2077
- )]
2078
- #[grpc_versions(0)]
2079
- #[derive(::dapi_grpc_macros::Mockable)]
2080
- #[allow(clippy::derive_partial_eq_without_eq)]
2081
- #[derive(Clone, PartialEq, ::prost::Message)]
2082
- pub struct GetPathElementsResponse {
2083
- #[prost(oneof = "get_path_elements_response::Version", tags = "1")]
2084
- pub version: ::core::option::Option<get_path_elements_response::Version>,
2085
- }
2086
- /// Nested message and enum types in `GetPathElementsResponse`.
2087
- pub mod get_path_elements_response {
2088
- #[derive(::serde::Serialize, ::serde::Deserialize)]
2089
- #[serde(rename_all = "snake_case")]
2090
- #[derive(::dapi_grpc_macros::Mockable)]
2091
- #[allow(clippy::derive_partial_eq_without_eq)]
2092
- #[derive(Clone, PartialEq, ::prost::Message)]
2093
- pub struct GetPathElementsResponseV0 {
2094
- #[prost(message, optional, tag = "3")]
2095
- pub metadata: ::core::option::Option<super::ResponseMetadata>,
2096
- #[prost(oneof = "get_path_elements_response_v0::Result", tags = "1, 2")]
2097
- pub result: ::core::option::Option<get_path_elements_response_v0::Result>,
2098
- }
2099
- /// Nested message and enum types in `GetPathElementsResponseV0`.
2100
- pub mod get_path_elements_response_v0 {
2101
- #[derive(::serde::Serialize, ::serde::Deserialize)]
2102
- #[serde(rename_all = "snake_case")]
2103
- #[derive(::dapi_grpc_macros::Mockable)]
2104
- #[allow(clippy::derive_partial_eq_without_eq)]
2105
- #[derive(Clone, PartialEq, ::prost::Message)]
2106
- pub struct Elements {
2107
- #[prost(bytes = "vec", repeated, tag = "1")]
2108
- pub elements: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
2109
- }
2110
- #[derive(::serde::Serialize, ::serde::Deserialize)]
2111
- #[serde(rename_all = "snake_case")]
2112
- #[allow(clippy::derive_partial_eq_without_eq)]
2113
- #[derive(Clone, PartialEq, ::prost::Oneof)]
2114
- pub enum Result {
2115
- #[prost(message, tag = "1")]
2116
- Elements(Elements),
2117
- #[prost(message, tag = "2")]
2118
- Proof(super::super::Proof),
2119
- }
2120
- }
2121
- #[derive(::serde::Serialize, ::serde::Deserialize)]
2122
- #[serde(rename_all = "snake_case")]
2123
- #[allow(clippy::derive_partial_eq_without_eq)]
2124
- #[derive(Clone, PartialEq, ::prost::Oneof)]
2125
- pub enum Version {
2126
- #[prost(message, tag = "1")]
2127
- V0(GetPathElementsResponseV0),
2128
- }
2129
- }
2130
- #[derive(::serde::Serialize, ::serde::Deserialize)]
2131
- #[serde(rename_all = "snake_case")]
2132
- #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2133
- #[repr(i32)]
2134
- pub enum KeyPurpose {
2135
- Authentication = 0,
2136
- Encryption = 1,
2137
- Decryption = 2,
2138
- Transfer = 3,
2139
- Voting = 5,
2140
- }
2141
- impl KeyPurpose {
2142
- /// String value of the enum field names used in the ProtoBuf definition.
2143
- ///
2144
- /// The values are not transformed in any way and thus are considered stable
2145
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2146
- pub fn as_str_name(&self) -> &'static str {
2147
- match self {
2148
- KeyPurpose::Authentication => "AUTHENTICATION",
2149
- KeyPurpose::Encryption => "ENCRYPTION",
2150
- KeyPurpose::Decryption => "DECRYPTION",
2151
- KeyPurpose::Transfer => "TRANSFER",
2152
- KeyPurpose::Voting => "VOTING",
2153
- }
2154
- }
2155
- /// Creates an enum from field names used in the ProtoBuf definition.
2156
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2157
- match value {
2158
- "AUTHENTICATION" => Some(Self::Authentication),
2159
- "ENCRYPTION" => Some(Self::Encryption),
2160
- "DECRYPTION" => Some(Self::Decryption),
2161
- "TRANSFER" => Some(Self::Transfer),
2162
- "VOTING" => Some(Self::Voting),
2163
- _ => None,
2164
- }
2165
- }
2166
- }
2167
- /// Generated client implementations.
2168
- pub mod platform_client {
2169
- #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
2170
- use tonic::codegen::*;
2171
- use tonic::codegen::http::Uri;
2172
- #[derive(Debug, Clone)]
2173
- pub struct PlatformClient<T> {
2174
- inner: tonic::client::Grpc<T>,
2175
- }
2176
- impl PlatformClient<tonic::transport::Channel> {
2177
- /// Attempt to create a new client by connecting to a given endpoint.
2178
- pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2179
- where
2180
- D: TryInto<tonic::transport::Endpoint>,
2181
- D::Error: Into<StdError>,
2182
- {
2183
- let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2184
- Ok(Self::new(conn))
2185
- }
2186
- }
2187
- impl<T> PlatformClient<T>
2188
- where
2189
- T: tonic::client::GrpcService<tonic::body::BoxBody>,
2190
- T::Error: Into<StdError>,
2191
- T::ResponseBody: Body<Data = Bytes> + Send + 'static,
2192
- <T::ResponseBody as Body>::Error: Into<StdError> + Send,
2193
- {
2194
- pub fn new(inner: T) -> Self {
2195
- let inner = tonic::client::Grpc::new(inner);
2196
- Self { inner }
2197
- }
2198
- pub fn with_origin(inner: T, origin: Uri) -> Self {
2199
- let inner = tonic::client::Grpc::with_origin(inner, origin);
2200
- Self { inner }
2201
- }
2202
- pub fn with_interceptor<F>(
2203
- inner: T,
2204
- interceptor: F,
2205
- ) -> PlatformClient<InterceptedService<T, F>>
2206
- where
2207
- F: tonic::service::Interceptor,
2208
- T::ResponseBody: Default,
2209
- T: tonic::codegen::Service<
2210
- http::Request<tonic::body::BoxBody>,
2211
- Response = http::Response<
2212
- <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2213
- >,
2214
- >,
2215
- <T as tonic::codegen::Service<
2216
- http::Request<tonic::body::BoxBody>,
2217
- >>::Error: Into<StdError> + Send + Sync,
2218
- {
2219
- PlatformClient::new(InterceptedService::new(inner, interceptor))
2220
- }
2221
- /// Compress requests with the given encoding.
2222
- ///
2223
- /// This requires the server to support it otherwise it might respond with an
2224
- /// error.
2225
- #[must_use]
2226
- pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2227
- self.inner = self.inner.send_compressed(encoding);
2228
- self
2229
- }
2230
- /// Enable decompressing responses.
2231
- #[must_use]
2232
- pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2233
- self.inner = self.inner.accept_compressed(encoding);
2234
- self
2235
- }
2236
- /// Limits the maximum size of a decoded message.
2237
- ///
2238
- /// Default: `4MB`
2239
- #[must_use]
2240
- pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2241
- self.inner = self.inner.max_decoding_message_size(limit);
2242
- self
2243
- }
2244
- /// Limits the maximum size of an encoded message.
2245
- ///
2246
- /// Default: `usize::MAX`
2247
- #[must_use]
2248
- pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2249
- self.inner = self.inner.max_encoding_message_size(limit);
2250
- self
2251
- }
2252
- pub async fn broadcast_state_transition(
2253
- &mut self,
2254
- request: impl tonic::IntoRequest<super::BroadcastStateTransitionRequest>,
2255
- ) -> std::result::Result<
2256
- tonic::Response<super::BroadcastStateTransitionResponse>,
2257
- tonic::Status,
2258
- > {
2259
- self.inner
2260
- .ready()
2261
- .await
2262
- .map_err(|e| {
2263
- tonic::Status::new(
2264
- tonic::Code::Unknown,
2265
- format!("Service was not ready: {}", e.into()),
2266
- )
2267
- })?;
2268
- let codec = tonic::codec::ProstCodec::default();
2269
- let path = http::uri::PathAndQuery::from_static(
2270
- "/org.dash.platform.dapi.v0.Platform/broadcastStateTransition",
2271
- );
2272
- let mut req = request.into_request();
2273
- req.extensions_mut()
2274
- .insert(
2275
- GrpcMethod::new(
2276
- "org.dash.platform.dapi.v0.Platform",
2277
- "broadcastStateTransition",
2278
- ),
2279
- );
2280
- self.inner.unary(req, path, codec).await
2281
- }
2282
- pub async fn get_identity(
2283
- &mut self,
2284
- request: impl tonic::IntoRequest<super::GetIdentityRequest>,
2285
- ) -> std::result::Result<
2286
- tonic::Response<super::GetIdentityResponse>,
2287
- tonic::Status,
2288
- > {
2289
- self.inner
2290
- .ready()
2291
- .await
2292
- .map_err(|e| {
2293
- tonic::Status::new(
2294
- tonic::Code::Unknown,
2295
- format!("Service was not ready: {}", e.into()),
2296
- )
2297
- })?;
2298
- let codec = tonic::codec::ProstCodec::default();
2299
- let path = http::uri::PathAndQuery::from_static(
2300
- "/org.dash.platform.dapi.v0.Platform/getIdentity",
2301
- );
2302
- let mut req = request.into_request();
2303
- req.extensions_mut()
2304
- .insert(
2305
- GrpcMethod::new("org.dash.platform.dapi.v0.Platform", "getIdentity"),
2306
- );
2307
- self.inner.unary(req, path, codec).await
2308
- }
2309
- pub async fn get_identity_keys(
2310
- &mut self,
2311
- request: impl tonic::IntoRequest<super::GetIdentityKeysRequest>,
2312
- ) -> std::result::Result<
2313
- tonic::Response<super::GetIdentityKeysResponse>,
2314
- tonic::Status,
2315
- > {
2316
- self.inner
2317
- .ready()
2318
- .await
2319
- .map_err(|e| {
2320
- tonic::Status::new(
2321
- tonic::Code::Unknown,
2322
- format!("Service was not ready: {}", e.into()),
2323
- )
2324
- })?;
2325
- let codec = tonic::codec::ProstCodec::default();
2326
- let path = http::uri::PathAndQuery::from_static(
2327
- "/org.dash.platform.dapi.v0.Platform/getIdentityKeys",
2328
- );
2329
- let mut req = request.into_request();
2330
- req.extensions_mut()
2331
- .insert(
2332
- GrpcMethod::new(
2333
- "org.dash.platform.dapi.v0.Platform",
2334
- "getIdentityKeys",
2335
- ),
2336
- );
2337
- self.inner.unary(req, path, codec).await
2338
- }
2339
- pub async fn get_identities_contract_keys(
2340
- &mut self,
2341
- request: impl tonic::IntoRequest<super::GetIdentitiesContractKeysRequest>,
2342
- ) -> std::result::Result<
2343
- tonic::Response<super::GetIdentitiesContractKeysResponse>,
2344
- tonic::Status,
2345
- > {
2346
- self.inner
2347
- .ready()
2348
- .await
2349
- .map_err(|e| {
2350
- tonic::Status::new(
2351
- tonic::Code::Unknown,
2352
- format!("Service was not ready: {}", e.into()),
2353
- )
2354
- })?;
2355
- let codec = tonic::codec::ProstCodec::default();
2356
- let path = http::uri::PathAndQuery::from_static(
2357
- "/org.dash.platform.dapi.v0.Platform/getIdentitiesContractKeys",
2358
- );
2359
- let mut req = request.into_request();
2360
- req.extensions_mut()
2361
- .insert(
2362
- GrpcMethod::new(
2363
- "org.dash.platform.dapi.v0.Platform",
2364
- "getIdentitiesContractKeys",
2365
- ),
2366
- );
2367
- self.inner.unary(req, path, codec).await
2368
- }
2369
- pub async fn get_identity_nonce(
2370
- &mut self,
2371
- request: impl tonic::IntoRequest<super::GetIdentityNonceRequest>,
2372
- ) -> std::result::Result<
2373
- tonic::Response<super::GetIdentityNonceResponse>,
2374
- tonic::Status,
2375
- > {
2376
- self.inner
2377
- .ready()
2378
- .await
2379
- .map_err(|e| {
2380
- tonic::Status::new(
2381
- tonic::Code::Unknown,
2382
- format!("Service was not ready: {}", e.into()),
2383
- )
2384
- })?;
2385
- let codec = tonic::codec::ProstCodec::default();
2386
- let path = http::uri::PathAndQuery::from_static(
2387
- "/org.dash.platform.dapi.v0.Platform/getIdentityNonce",
2388
- );
2389
- let mut req = request.into_request();
2390
- req.extensions_mut()
2391
- .insert(
2392
- GrpcMethod::new(
2393
- "org.dash.platform.dapi.v0.Platform",
2394
- "getIdentityNonce",
2395
- ),
2396
- );
2397
- self.inner.unary(req, path, codec).await
2398
- }
2399
- pub async fn get_identity_contract_nonce(
2400
- &mut self,
2401
- request: impl tonic::IntoRequest<super::GetIdentityContractNonceRequest>,
2402
- ) -> std::result::Result<
2403
- tonic::Response<super::GetIdentityContractNonceResponse>,
2404
- tonic::Status,
2405
- > {
2406
- self.inner
2407
- .ready()
2408
- .await
2409
- .map_err(|e| {
2410
- tonic::Status::new(
2411
- tonic::Code::Unknown,
2412
- format!("Service was not ready: {}", e.into()),
2413
- )
2414
- })?;
2415
- let codec = tonic::codec::ProstCodec::default();
2416
- let path = http::uri::PathAndQuery::from_static(
2417
- "/org.dash.platform.dapi.v0.Platform/getIdentityContractNonce",
2418
- );
2419
- let mut req = request.into_request();
2420
- req.extensions_mut()
2421
- .insert(
2422
- GrpcMethod::new(
2423
- "org.dash.platform.dapi.v0.Platform",
2424
- "getIdentityContractNonce",
2425
- ),
2426
- );
2427
- self.inner.unary(req, path, codec).await
2428
- }
2429
- pub async fn get_identity_balance(
2430
- &mut self,
2431
- request: impl tonic::IntoRequest<super::GetIdentityBalanceRequest>,
2432
- ) -> std::result::Result<
2433
- tonic::Response<super::GetIdentityBalanceResponse>,
2434
- tonic::Status,
2435
- > {
2436
- self.inner
2437
- .ready()
2438
- .await
2439
- .map_err(|e| {
2440
- tonic::Status::new(
2441
- tonic::Code::Unknown,
2442
- format!("Service was not ready: {}", e.into()),
2443
- )
2444
- })?;
2445
- let codec = tonic::codec::ProstCodec::default();
2446
- let path = http::uri::PathAndQuery::from_static(
2447
- "/org.dash.platform.dapi.v0.Platform/getIdentityBalance",
2448
- );
2449
- let mut req = request.into_request();
2450
- req.extensions_mut()
2451
- .insert(
2452
- GrpcMethod::new(
2453
- "org.dash.platform.dapi.v0.Platform",
2454
- "getIdentityBalance",
2455
- ),
2456
- );
2457
- self.inner.unary(req, path, codec).await
2458
- }
2459
- pub async fn get_identity_balance_and_revision(
2460
- &mut self,
2461
- request: impl tonic::IntoRequest<super::GetIdentityBalanceAndRevisionRequest>,
2462
- ) -> std::result::Result<
2463
- tonic::Response<super::GetIdentityBalanceAndRevisionResponse>,
2464
- tonic::Status,
2465
- > {
2466
- self.inner
2467
- .ready()
2468
- .await
2469
- .map_err(|e| {
2470
- tonic::Status::new(
2471
- tonic::Code::Unknown,
2472
- format!("Service was not ready: {}", e.into()),
2473
- )
2474
- })?;
2475
- let codec = tonic::codec::ProstCodec::default();
2476
- let path = http::uri::PathAndQuery::from_static(
2477
- "/org.dash.platform.dapi.v0.Platform/getIdentityBalanceAndRevision",
2478
- );
2479
- let mut req = request.into_request();
2480
- req.extensions_mut()
2481
- .insert(
2482
- GrpcMethod::new(
2483
- "org.dash.platform.dapi.v0.Platform",
2484
- "getIdentityBalanceAndRevision",
2485
- ),
2486
- );
2487
- self.inner.unary(req, path, codec).await
2488
- }
2489
- pub async fn get_proofs(
2490
- &mut self,
2491
- request: impl tonic::IntoRequest<super::GetProofsRequest>,
2492
- ) -> std::result::Result<
2493
- tonic::Response<super::GetProofsResponse>,
2494
- tonic::Status,
2495
- > {
2496
- self.inner
2497
- .ready()
2498
- .await
2499
- .map_err(|e| {
2500
- tonic::Status::new(
2501
- tonic::Code::Unknown,
2502
- format!("Service was not ready: {}", e.into()),
2503
- )
2504
- })?;
2505
- let codec = tonic::codec::ProstCodec::default();
2506
- let path = http::uri::PathAndQuery::from_static(
2507
- "/org.dash.platform.dapi.v0.Platform/getProofs",
2508
- );
2509
- let mut req = request.into_request();
2510
- req.extensions_mut()
2511
- .insert(
2512
- GrpcMethod::new("org.dash.platform.dapi.v0.Platform", "getProofs"),
2513
- );
2514
- self.inner.unary(req, path, codec).await
2515
- }
2516
- pub async fn get_data_contract(
2517
- &mut self,
2518
- request: impl tonic::IntoRequest<super::GetDataContractRequest>,
2519
- ) -> std::result::Result<
2520
- tonic::Response<super::GetDataContractResponse>,
2521
- tonic::Status,
2522
- > {
2523
- self.inner
2524
- .ready()
2525
- .await
2526
- .map_err(|e| {
2527
- tonic::Status::new(
2528
- tonic::Code::Unknown,
2529
- format!("Service was not ready: {}", e.into()),
2530
- )
2531
- })?;
2532
- let codec = tonic::codec::ProstCodec::default();
2533
- let path = http::uri::PathAndQuery::from_static(
2534
- "/org.dash.platform.dapi.v0.Platform/getDataContract",
2535
- );
2536
- let mut req = request.into_request();
2537
- req.extensions_mut()
2538
- .insert(
2539
- GrpcMethod::new(
2540
- "org.dash.platform.dapi.v0.Platform",
2541
- "getDataContract",
2542
- ),
2543
- );
2544
- self.inner.unary(req, path, codec).await
2545
- }
2546
- pub async fn get_data_contract_history(
2547
- &mut self,
2548
- request: impl tonic::IntoRequest<super::GetDataContractHistoryRequest>,
2549
- ) -> std::result::Result<
2550
- tonic::Response<super::GetDataContractHistoryResponse>,
2551
- tonic::Status,
2552
- > {
2553
- self.inner
2554
- .ready()
2555
- .await
2556
- .map_err(|e| {
2557
- tonic::Status::new(
2558
- tonic::Code::Unknown,
2559
- format!("Service was not ready: {}", e.into()),
2560
- )
2561
- })?;
2562
- let codec = tonic::codec::ProstCodec::default();
2563
- let path = http::uri::PathAndQuery::from_static(
2564
- "/org.dash.platform.dapi.v0.Platform/getDataContractHistory",
2565
- );
2566
- let mut req = request.into_request();
2567
- req.extensions_mut()
2568
- .insert(
2569
- GrpcMethod::new(
2570
- "org.dash.platform.dapi.v0.Platform",
2571
- "getDataContractHistory",
2572
- ),
2573
- );
2574
- self.inner.unary(req, path, codec).await
2575
- }
2576
- pub async fn get_data_contracts(
2577
- &mut self,
2578
- request: impl tonic::IntoRequest<super::GetDataContractsRequest>,
2579
- ) -> std::result::Result<
2580
- tonic::Response<super::GetDataContractsResponse>,
2581
- tonic::Status,
2582
- > {
2583
- self.inner
2584
- .ready()
2585
- .await
2586
- .map_err(|e| {
2587
- tonic::Status::new(
2588
- tonic::Code::Unknown,
2589
- format!("Service was not ready: {}", e.into()),
2590
- )
2591
- })?;
2592
- let codec = tonic::codec::ProstCodec::default();
2593
- let path = http::uri::PathAndQuery::from_static(
2594
- "/org.dash.platform.dapi.v0.Platform/getDataContracts",
2595
- );
2596
- let mut req = request.into_request();
2597
- req.extensions_mut()
2598
- .insert(
2599
- GrpcMethod::new(
2600
- "org.dash.platform.dapi.v0.Platform",
2601
- "getDataContracts",
2602
- ),
2603
- );
2604
- self.inner.unary(req, path, codec).await
2605
- }
2606
- pub async fn get_documents(
2607
- &mut self,
2608
- request: impl tonic::IntoRequest<super::GetDocumentsRequest>,
2609
- ) -> std::result::Result<
2610
- tonic::Response<super::GetDocumentsResponse>,
2611
- tonic::Status,
2612
- > {
2613
- self.inner
2614
- .ready()
2615
- .await
2616
- .map_err(|e| {
2617
- tonic::Status::new(
2618
- tonic::Code::Unknown,
2619
- format!("Service was not ready: {}", e.into()),
2620
- )
2621
- })?;
2622
- let codec = tonic::codec::ProstCodec::default();
2623
- let path = http::uri::PathAndQuery::from_static(
2624
- "/org.dash.platform.dapi.v0.Platform/getDocuments",
2625
- );
2626
- let mut req = request.into_request();
2627
- req.extensions_mut()
2628
- .insert(
2629
- GrpcMethod::new("org.dash.platform.dapi.v0.Platform", "getDocuments"),
2630
- );
2631
- self.inner.unary(req, path, codec).await
2632
- }
2633
- pub async fn get_identity_by_public_key_hash(
2634
- &mut self,
2635
- request: impl tonic::IntoRequest<super::GetIdentityByPublicKeyHashRequest>,
2636
- ) -> std::result::Result<
2637
- tonic::Response<super::GetIdentityByPublicKeyHashResponse>,
2638
- tonic::Status,
2639
- > {
2640
- self.inner
2641
- .ready()
2642
- .await
2643
- .map_err(|e| {
2644
- tonic::Status::new(
2645
- tonic::Code::Unknown,
2646
- format!("Service was not ready: {}", e.into()),
2647
- )
2648
- })?;
2649
- let codec = tonic::codec::ProstCodec::default();
2650
- let path = http::uri::PathAndQuery::from_static(
2651
- "/org.dash.platform.dapi.v0.Platform/getIdentityByPublicKeyHash",
2652
- );
2653
- let mut req = request.into_request();
2654
- req.extensions_mut()
2655
- .insert(
2656
- GrpcMethod::new(
2657
- "org.dash.platform.dapi.v0.Platform",
2658
- "getIdentityByPublicKeyHash",
2659
- ),
2660
- );
2661
- self.inner.unary(req, path, codec).await
2662
- }
2663
- pub async fn wait_for_state_transition_result(
2664
- &mut self,
2665
- request: impl tonic::IntoRequest<super::WaitForStateTransitionResultRequest>,
2666
- ) -> std::result::Result<
2667
- tonic::Response<super::WaitForStateTransitionResultResponse>,
2668
- tonic::Status,
2669
- > {
2670
- self.inner
2671
- .ready()
2672
- .await
2673
- .map_err(|e| {
2674
- tonic::Status::new(
2675
- tonic::Code::Unknown,
2676
- format!("Service was not ready: {}", e.into()),
2677
- )
2678
- })?;
2679
- let codec = tonic::codec::ProstCodec::default();
2680
- let path = http::uri::PathAndQuery::from_static(
2681
- "/org.dash.platform.dapi.v0.Platform/waitForStateTransitionResult",
2682
- );
2683
- let mut req = request.into_request();
2684
- req.extensions_mut()
2685
- .insert(
2686
- GrpcMethod::new(
2687
- "org.dash.platform.dapi.v0.Platform",
2688
- "waitForStateTransitionResult",
2689
- ),
2690
- );
2691
- self.inner.unary(req, path, codec).await
2692
- }
2693
- pub async fn get_consensus_params(
2694
- &mut self,
2695
- request: impl tonic::IntoRequest<super::GetConsensusParamsRequest>,
2696
- ) -> std::result::Result<
2697
- tonic::Response<super::GetConsensusParamsResponse>,
2698
- tonic::Status,
2699
- > {
2700
- self.inner
2701
- .ready()
2702
- .await
2703
- .map_err(|e| {
2704
- tonic::Status::new(
2705
- tonic::Code::Unknown,
2706
- format!("Service was not ready: {}", e.into()),
2707
- )
2708
- })?;
2709
- let codec = tonic::codec::ProstCodec::default();
2710
- let path = http::uri::PathAndQuery::from_static(
2711
- "/org.dash.platform.dapi.v0.Platform/getConsensusParams",
2712
- );
2713
- let mut req = request.into_request();
2714
- req.extensions_mut()
2715
- .insert(
2716
- GrpcMethod::new(
2717
- "org.dash.platform.dapi.v0.Platform",
2718
- "getConsensusParams",
2719
- ),
2720
- );
2721
- self.inner.unary(req, path, codec).await
2722
- }
2723
- pub async fn get_protocol_version_upgrade_state(
2724
- &mut self,
2725
- request: impl tonic::IntoRequest<
2726
- super::GetProtocolVersionUpgradeStateRequest,
2727
- >,
2728
- ) -> std::result::Result<
2729
- tonic::Response<super::GetProtocolVersionUpgradeStateResponse>,
2730
- tonic::Status,
2731
- > {
2732
- self.inner
2733
- .ready()
2734
- .await
2735
- .map_err(|e| {
2736
- tonic::Status::new(
2737
- tonic::Code::Unknown,
2738
- format!("Service was not ready: {}", e.into()),
2739
- )
2740
- })?;
2741
- let codec = tonic::codec::ProstCodec::default();
2742
- let path = http::uri::PathAndQuery::from_static(
2743
- "/org.dash.platform.dapi.v0.Platform/getProtocolVersionUpgradeState",
2744
- );
2745
- let mut req = request.into_request();
2746
- req.extensions_mut()
2747
- .insert(
2748
- GrpcMethod::new(
2749
- "org.dash.platform.dapi.v0.Platform",
2750
- "getProtocolVersionUpgradeState",
2751
- ),
2752
- );
2753
- self.inner.unary(req, path, codec).await
2754
- }
2755
- pub async fn get_protocol_version_upgrade_vote_status(
2756
- &mut self,
2757
- request: impl tonic::IntoRequest<
2758
- super::GetProtocolVersionUpgradeVoteStatusRequest,
2759
- >,
2760
- ) -> std::result::Result<
2761
- tonic::Response<super::GetProtocolVersionUpgradeVoteStatusResponse>,
2762
- tonic::Status,
2763
- > {
2764
- self.inner
2765
- .ready()
2766
- .await
2767
- .map_err(|e| {
2768
- tonic::Status::new(
2769
- tonic::Code::Unknown,
2770
- format!("Service was not ready: {}", e.into()),
2771
- )
2772
- })?;
2773
- let codec = tonic::codec::ProstCodec::default();
2774
- let path = http::uri::PathAndQuery::from_static(
2775
- "/org.dash.platform.dapi.v0.Platform/getProtocolVersionUpgradeVoteStatus",
2776
- );
2777
- let mut req = request.into_request();
2778
- req.extensions_mut()
2779
- .insert(
2780
- GrpcMethod::new(
2781
- "org.dash.platform.dapi.v0.Platform",
2782
- "getProtocolVersionUpgradeVoteStatus",
2783
- ),
2784
- );
2785
- self.inner.unary(req, path, codec).await
2786
- }
2787
- pub async fn get_epochs_info(
2788
- &mut self,
2789
- request: impl tonic::IntoRequest<super::GetEpochsInfoRequest>,
2790
- ) -> std::result::Result<
2791
- tonic::Response<super::GetEpochsInfoResponse>,
2792
- tonic::Status,
2793
- > {
2794
- self.inner
2795
- .ready()
2796
- .await
2797
- .map_err(|e| {
2798
- tonic::Status::new(
2799
- tonic::Code::Unknown,
2800
- format!("Service was not ready: {}", e.into()),
2801
- )
2802
- })?;
2803
- let codec = tonic::codec::ProstCodec::default();
2804
- let path = http::uri::PathAndQuery::from_static(
2805
- "/org.dash.platform.dapi.v0.Platform/getEpochsInfo",
2806
- );
2807
- let mut req = request.into_request();
2808
- req.extensions_mut()
2809
- .insert(
2810
- GrpcMethod::new(
2811
- "org.dash.platform.dapi.v0.Platform",
2812
- "getEpochsInfo",
2813
- ),
2814
- );
2815
- self.inner.unary(req, path, codec).await
2816
- }
2817
- pub async fn get_path_elements(
2818
- &mut self,
2819
- request: impl tonic::IntoRequest<super::GetPathElementsRequest>,
2820
- ) -> std::result::Result<
2821
- tonic::Response<super::GetPathElementsResponse>,
2822
- tonic::Status,
2823
- > {
2824
- self.inner
2825
- .ready()
2826
- .await
2827
- .map_err(|e| {
2828
- tonic::Status::new(
2829
- tonic::Code::Unknown,
2830
- format!("Service was not ready: {}", e.into()),
2831
- )
2832
- })?;
2833
- let codec = tonic::codec::ProstCodec::default();
2834
- let path = http::uri::PathAndQuery::from_static(
2835
- "/org.dash.platform.dapi.v0.Platform/getPathElements",
2836
- );
2837
- let mut req = request.into_request();
2838
- req.extensions_mut()
2839
- .insert(
2840
- GrpcMethod::new(
2841
- "org.dash.platform.dapi.v0.Platform",
2842
- "getPathElements",
2843
- ),
2844
- );
2845
- self.inner.unary(req, path, codec).await
2846
- }
2847
- }
2848
- }
2849
- /// Generated server implementations.
2850
- pub mod platform_server {
2851
- #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
2852
- use tonic::codegen::*;
2853
- /// Generated trait containing gRPC methods that should be implemented for use with PlatformServer.
2854
- #[async_trait]
2855
- pub trait Platform: Send + Sync + 'static {
2856
- async fn broadcast_state_transition(
2857
- &self,
2858
- request: tonic::Request<super::BroadcastStateTransitionRequest>,
2859
- ) -> std::result::Result<
2860
- tonic::Response<super::BroadcastStateTransitionResponse>,
2861
- tonic::Status,
2862
- >;
2863
- async fn get_identity(
2864
- &self,
2865
- request: tonic::Request<super::GetIdentityRequest>,
2866
- ) -> std::result::Result<
2867
- tonic::Response<super::GetIdentityResponse>,
2868
- tonic::Status,
2869
- >;
2870
- async fn get_identity_keys(
2871
- &self,
2872
- request: tonic::Request<super::GetIdentityKeysRequest>,
2873
- ) -> std::result::Result<
2874
- tonic::Response<super::GetIdentityKeysResponse>,
2875
- tonic::Status,
2876
- >;
2877
- async fn get_identities_contract_keys(
2878
- &self,
2879
- request: tonic::Request<super::GetIdentitiesContractKeysRequest>,
2880
- ) -> std::result::Result<
2881
- tonic::Response<super::GetIdentitiesContractKeysResponse>,
2882
- tonic::Status,
2883
- >;
2884
- async fn get_identity_nonce(
2885
- &self,
2886
- request: tonic::Request<super::GetIdentityNonceRequest>,
2887
- ) -> std::result::Result<
2888
- tonic::Response<super::GetIdentityNonceResponse>,
2889
- tonic::Status,
2890
- >;
2891
- async fn get_identity_contract_nonce(
2892
- &self,
2893
- request: tonic::Request<super::GetIdentityContractNonceRequest>,
2894
- ) -> std::result::Result<
2895
- tonic::Response<super::GetIdentityContractNonceResponse>,
2896
- tonic::Status,
2897
- >;
2898
- async fn get_identity_balance(
2899
- &self,
2900
- request: tonic::Request<super::GetIdentityBalanceRequest>,
2901
- ) -> std::result::Result<
2902
- tonic::Response<super::GetIdentityBalanceResponse>,
2903
- tonic::Status,
2904
- >;
2905
- async fn get_identity_balance_and_revision(
2906
- &self,
2907
- request: tonic::Request<super::GetIdentityBalanceAndRevisionRequest>,
2908
- ) -> std::result::Result<
2909
- tonic::Response<super::GetIdentityBalanceAndRevisionResponse>,
2910
- tonic::Status,
2911
- >;
2912
- async fn get_proofs(
2913
- &self,
2914
- request: tonic::Request<super::GetProofsRequest>,
2915
- ) -> std::result::Result<
2916
- tonic::Response<super::GetProofsResponse>,
2917
- tonic::Status,
2918
- >;
2919
- async fn get_data_contract(
2920
- &self,
2921
- request: tonic::Request<super::GetDataContractRequest>,
2922
- ) -> std::result::Result<
2923
- tonic::Response<super::GetDataContractResponse>,
2924
- tonic::Status,
2925
- >;
2926
- async fn get_data_contract_history(
2927
- &self,
2928
- request: tonic::Request<super::GetDataContractHistoryRequest>,
2929
- ) -> std::result::Result<
2930
- tonic::Response<super::GetDataContractHistoryResponse>,
2931
- tonic::Status,
2932
- >;
2933
- async fn get_data_contracts(
2934
- &self,
2935
- request: tonic::Request<super::GetDataContractsRequest>,
2936
- ) -> std::result::Result<
2937
- tonic::Response<super::GetDataContractsResponse>,
2938
- tonic::Status,
2939
- >;
2940
- async fn get_documents(
2941
- &self,
2942
- request: tonic::Request<super::GetDocumentsRequest>,
2943
- ) -> std::result::Result<
2944
- tonic::Response<super::GetDocumentsResponse>,
2945
- tonic::Status,
2946
- >;
2947
- async fn get_identity_by_public_key_hash(
2948
- &self,
2949
- request: tonic::Request<super::GetIdentityByPublicKeyHashRequest>,
2950
- ) -> std::result::Result<
2951
- tonic::Response<super::GetIdentityByPublicKeyHashResponse>,
2952
- tonic::Status,
2953
- >;
2954
- async fn wait_for_state_transition_result(
2955
- &self,
2956
- request: tonic::Request<super::WaitForStateTransitionResultRequest>,
2957
- ) -> std::result::Result<
2958
- tonic::Response<super::WaitForStateTransitionResultResponse>,
2959
- tonic::Status,
2960
- >;
2961
- async fn get_consensus_params(
2962
- &self,
2963
- request: tonic::Request<super::GetConsensusParamsRequest>,
2964
- ) -> std::result::Result<
2965
- tonic::Response<super::GetConsensusParamsResponse>,
2966
- tonic::Status,
2967
- >;
2968
- async fn get_protocol_version_upgrade_state(
2969
- &self,
2970
- request: tonic::Request<super::GetProtocolVersionUpgradeStateRequest>,
2971
- ) -> std::result::Result<
2972
- tonic::Response<super::GetProtocolVersionUpgradeStateResponse>,
2973
- tonic::Status,
2974
- >;
2975
- async fn get_protocol_version_upgrade_vote_status(
2976
- &self,
2977
- request: tonic::Request<super::GetProtocolVersionUpgradeVoteStatusRequest>,
2978
- ) -> std::result::Result<
2979
- tonic::Response<super::GetProtocolVersionUpgradeVoteStatusResponse>,
2980
- tonic::Status,
2981
- >;
2982
- async fn get_epochs_info(
2983
- &self,
2984
- request: tonic::Request<super::GetEpochsInfoRequest>,
2985
- ) -> std::result::Result<
2986
- tonic::Response<super::GetEpochsInfoResponse>,
2987
- tonic::Status,
2988
- >;
2989
- async fn get_path_elements(
2990
- &self,
2991
- request: tonic::Request<super::GetPathElementsRequest>,
2992
- ) -> std::result::Result<
2993
- tonic::Response<super::GetPathElementsResponse>,
2994
- tonic::Status,
2995
- >;
2996
- }
2997
- #[derive(Debug)]
2998
- pub struct PlatformServer<T: Platform> {
2999
- inner: _Inner<T>,
3000
- accept_compression_encodings: EnabledCompressionEncodings,
3001
- send_compression_encodings: EnabledCompressionEncodings,
3002
- max_decoding_message_size: Option<usize>,
3003
- max_encoding_message_size: Option<usize>,
3004
- }
3005
- struct _Inner<T>(Arc<T>);
3006
- impl<T: Platform> PlatformServer<T> {
3007
- pub fn new(inner: T) -> Self {
3008
- Self::from_arc(Arc::new(inner))
3009
- }
3010
- pub fn from_arc(inner: Arc<T>) -> Self {
3011
- let inner = _Inner(inner);
3012
- Self {
3013
- inner,
3014
- accept_compression_encodings: Default::default(),
3015
- send_compression_encodings: Default::default(),
3016
- max_decoding_message_size: None,
3017
- max_encoding_message_size: None,
3018
- }
3019
- }
3020
- pub fn with_interceptor<F>(
3021
- inner: T,
3022
- interceptor: F,
3023
- ) -> InterceptedService<Self, F>
3024
- where
3025
- F: tonic::service::Interceptor,
3026
- {
3027
- InterceptedService::new(Self::new(inner), interceptor)
3028
- }
3029
- /// Enable decompressing requests with the given encoding.
3030
- #[must_use]
3031
- pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3032
- self.accept_compression_encodings.enable(encoding);
3033
- self
3034
- }
3035
- /// Compress responses with the given encoding, if the client supports it.
3036
- #[must_use]
3037
- pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3038
- self.send_compression_encodings.enable(encoding);
3039
- self
3040
- }
3041
- /// Limits the maximum size of a decoded message.
3042
- ///
3043
- /// Default: `4MB`
3044
- #[must_use]
3045
- pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3046
- self.max_decoding_message_size = Some(limit);
3047
- self
3048
- }
3049
- /// Limits the maximum size of an encoded message.
3050
- ///
3051
- /// Default: `usize::MAX`
3052
- #[must_use]
3053
- pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3054
- self.max_encoding_message_size = Some(limit);
3055
- self
3056
- }
3057
- }
3058
- impl<T, B> tonic::codegen::Service<http::Request<B>> for PlatformServer<T>
3059
- where
3060
- T: Platform,
3061
- B: Body + Send + 'static,
3062
- B::Error: Into<StdError> + Send + 'static,
3063
- {
3064
- type Response = http::Response<tonic::body::BoxBody>;
3065
- type Error = std::convert::Infallible;
3066
- type Future = BoxFuture<Self::Response, Self::Error>;
3067
- fn poll_ready(
3068
- &mut self,
3069
- _cx: &mut Context<'_>,
3070
- ) -> Poll<std::result::Result<(), Self::Error>> {
3071
- Poll::Ready(Ok(()))
3072
- }
3073
- fn call(&mut self, req: http::Request<B>) -> Self::Future {
3074
- let inner = self.inner.clone();
3075
- match req.uri().path() {
3076
- "/org.dash.platform.dapi.v0.Platform/broadcastStateTransition" => {
3077
- #[allow(non_camel_case_types)]
3078
- struct broadcastStateTransitionSvc<T: Platform>(pub Arc<T>);
3079
- impl<
3080
- T: Platform,
3081
- > tonic::server::UnaryService<super::BroadcastStateTransitionRequest>
3082
- for broadcastStateTransitionSvc<T> {
3083
- type Response = super::BroadcastStateTransitionResponse;
3084
- type Future = BoxFuture<
3085
- tonic::Response<Self::Response>,
3086
- tonic::Status,
3087
- >;
3088
- fn call(
3089
- &mut self,
3090
- request: tonic::Request<
3091
- super::BroadcastStateTransitionRequest,
3092
- >,
3093
- ) -> Self::Future {
3094
- let inner = Arc::clone(&self.0);
3095
- let fut = async move {
3096
- (*inner).broadcast_state_transition(request).await
3097
- };
3098
- Box::pin(fut)
3099
- }
3100
- }
3101
- let accept_compression_encodings = self.accept_compression_encodings;
3102
- let send_compression_encodings = self.send_compression_encodings;
3103
- let max_decoding_message_size = self.max_decoding_message_size;
3104
- let max_encoding_message_size = self.max_encoding_message_size;
3105
- let inner = self.inner.clone();
3106
- let fut = async move {
3107
- let inner = inner.0;
3108
- let method = broadcastStateTransitionSvc(inner);
3109
- let codec = tonic::codec::ProstCodec::default();
3110
- let mut grpc = tonic::server::Grpc::new(codec)
3111
- .apply_compression_config(
3112
- accept_compression_encodings,
3113
- send_compression_encodings,
3114
- )
3115
- .apply_max_message_size_config(
3116
- max_decoding_message_size,
3117
- max_encoding_message_size,
3118
- );
3119
- let res = grpc.unary(method, req).await;
3120
- Ok(res)
3121
- };
3122
- Box::pin(fut)
3123
- }
3124
- "/org.dash.platform.dapi.v0.Platform/getIdentity" => {
3125
- #[allow(non_camel_case_types)]
3126
- struct getIdentitySvc<T: Platform>(pub Arc<T>);
3127
- impl<
3128
- T: Platform,
3129
- > tonic::server::UnaryService<super::GetIdentityRequest>
3130
- for getIdentitySvc<T> {
3131
- type Response = super::GetIdentityResponse;
3132
- type Future = BoxFuture<
3133
- tonic::Response<Self::Response>,
3134
- tonic::Status,
3135
- >;
3136
- fn call(
3137
- &mut self,
3138
- request: tonic::Request<super::GetIdentityRequest>,
3139
- ) -> Self::Future {
3140
- let inner = Arc::clone(&self.0);
3141
- let fut = async move {
3142
- (*inner).get_identity(request).await
3143
- };
3144
- Box::pin(fut)
3145
- }
3146
- }
3147
- let accept_compression_encodings = self.accept_compression_encodings;
3148
- let send_compression_encodings = self.send_compression_encodings;
3149
- let max_decoding_message_size = self.max_decoding_message_size;
3150
- let max_encoding_message_size = self.max_encoding_message_size;
3151
- let inner = self.inner.clone();
3152
- let fut = async move {
3153
- let inner = inner.0;
3154
- let method = getIdentitySvc(inner);
3155
- let codec = tonic::codec::ProstCodec::default();
3156
- let mut grpc = tonic::server::Grpc::new(codec)
3157
- .apply_compression_config(
3158
- accept_compression_encodings,
3159
- send_compression_encodings,
3160
- )
3161
- .apply_max_message_size_config(
3162
- max_decoding_message_size,
3163
- max_encoding_message_size,
3164
- );
3165
- let res = grpc.unary(method, req).await;
3166
- Ok(res)
3167
- };
3168
- Box::pin(fut)
3169
- }
3170
- "/org.dash.platform.dapi.v0.Platform/getIdentityKeys" => {
3171
- #[allow(non_camel_case_types)]
3172
- struct getIdentityKeysSvc<T: Platform>(pub Arc<T>);
3173
- impl<
3174
- T: Platform,
3175
- > tonic::server::UnaryService<super::GetIdentityKeysRequest>
3176
- for getIdentityKeysSvc<T> {
3177
- type Response = super::GetIdentityKeysResponse;
3178
- type Future = BoxFuture<
3179
- tonic::Response<Self::Response>,
3180
- tonic::Status,
3181
- >;
3182
- fn call(
3183
- &mut self,
3184
- request: tonic::Request<super::GetIdentityKeysRequest>,
3185
- ) -> Self::Future {
3186
- let inner = Arc::clone(&self.0);
3187
- let fut = async move {
3188
- (*inner).get_identity_keys(request).await
3189
- };
3190
- Box::pin(fut)
3191
- }
3192
- }
3193
- let accept_compression_encodings = self.accept_compression_encodings;
3194
- let send_compression_encodings = self.send_compression_encodings;
3195
- let max_decoding_message_size = self.max_decoding_message_size;
3196
- let max_encoding_message_size = self.max_encoding_message_size;
3197
- let inner = self.inner.clone();
3198
- let fut = async move {
3199
- let inner = inner.0;
3200
- let method = getIdentityKeysSvc(inner);
3201
- let codec = tonic::codec::ProstCodec::default();
3202
- let mut grpc = tonic::server::Grpc::new(codec)
3203
- .apply_compression_config(
3204
- accept_compression_encodings,
3205
- send_compression_encodings,
3206
- )
3207
- .apply_max_message_size_config(
3208
- max_decoding_message_size,
3209
- max_encoding_message_size,
3210
- );
3211
- let res = grpc.unary(method, req).await;
3212
- Ok(res)
3213
- };
3214
- Box::pin(fut)
3215
- }
3216
- "/org.dash.platform.dapi.v0.Platform/getIdentitiesContractKeys" => {
3217
- #[allow(non_camel_case_types)]
3218
- struct getIdentitiesContractKeysSvc<T: Platform>(pub Arc<T>);
3219
- impl<
3220
- T: Platform,
3221
- > tonic::server::UnaryService<
3222
- super::GetIdentitiesContractKeysRequest,
3223
- > for getIdentitiesContractKeysSvc<T> {
3224
- type Response = super::GetIdentitiesContractKeysResponse;
3225
- type Future = BoxFuture<
3226
- tonic::Response<Self::Response>,
3227
- tonic::Status,
3228
- >;
3229
- fn call(
3230
- &mut self,
3231
- request: tonic::Request<
3232
- super::GetIdentitiesContractKeysRequest,
3233
- >,
3234
- ) -> Self::Future {
3235
- let inner = Arc::clone(&self.0);
3236
- let fut = async move {
3237
- (*inner).get_identities_contract_keys(request).await
3238
- };
3239
- Box::pin(fut)
3240
- }
3241
- }
3242
- let accept_compression_encodings = self.accept_compression_encodings;
3243
- let send_compression_encodings = self.send_compression_encodings;
3244
- let max_decoding_message_size = self.max_decoding_message_size;
3245
- let max_encoding_message_size = self.max_encoding_message_size;
3246
- let inner = self.inner.clone();
3247
- let fut = async move {
3248
- let inner = inner.0;
3249
- let method = getIdentitiesContractKeysSvc(inner);
3250
- let codec = tonic::codec::ProstCodec::default();
3251
- let mut grpc = tonic::server::Grpc::new(codec)
3252
- .apply_compression_config(
3253
- accept_compression_encodings,
3254
- send_compression_encodings,
3255
- )
3256
- .apply_max_message_size_config(
3257
- max_decoding_message_size,
3258
- max_encoding_message_size,
3259
- );
3260
- let res = grpc.unary(method, req).await;
3261
- Ok(res)
3262
- };
3263
- Box::pin(fut)
3264
- }
3265
- "/org.dash.platform.dapi.v0.Platform/getIdentityNonce" => {
3266
- #[allow(non_camel_case_types)]
3267
- struct getIdentityNonceSvc<T: Platform>(pub Arc<T>);
3268
- impl<
3269
- T: Platform,
3270
- > tonic::server::UnaryService<super::GetIdentityNonceRequest>
3271
- for getIdentityNonceSvc<T> {
3272
- type Response = super::GetIdentityNonceResponse;
3273
- type Future = BoxFuture<
3274
- tonic::Response<Self::Response>,
3275
- tonic::Status,
3276
- >;
3277
- fn call(
3278
- &mut self,
3279
- request: tonic::Request<super::GetIdentityNonceRequest>,
3280
- ) -> Self::Future {
3281
- let inner = Arc::clone(&self.0);
3282
- let fut = async move {
3283
- (*inner).get_identity_nonce(request).await
3284
- };
3285
- Box::pin(fut)
3286
- }
3287
- }
3288
- let accept_compression_encodings = self.accept_compression_encodings;
3289
- let send_compression_encodings = self.send_compression_encodings;
3290
- let max_decoding_message_size = self.max_decoding_message_size;
3291
- let max_encoding_message_size = self.max_encoding_message_size;
3292
- let inner = self.inner.clone();
3293
- let fut = async move {
3294
- let inner = inner.0;
3295
- let method = getIdentityNonceSvc(inner);
3296
- let codec = tonic::codec::ProstCodec::default();
3297
- let mut grpc = tonic::server::Grpc::new(codec)
3298
- .apply_compression_config(
3299
- accept_compression_encodings,
3300
- send_compression_encodings,
3301
- )
3302
- .apply_max_message_size_config(
3303
- max_decoding_message_size,
3304
- max_encoding_message_size,
3305
- );
3306
- let res = grpc.unary(method, req).await;
3307
- Ok(res)
3308
- };
3309
- Box::pin(fut)
3310
- }
3311
- "/org.dash.platform.dapi.v0.Platform/getIdentityContractNonce" => {
3312
- #[allow(non_camel_case_types)]
3313
- struct getIdentityContractNonceSvc<T: Platform>(pub Arc<T>);
3314
- impl<
3315
- T: Platform,
3316
- > tonic::server::UnaryService<super::GetIdentityContractNonceRequest>
3317
- for getIdentityContractNonceSvc<T> {
3318
- type Response = super::GetIdentityContractNonceResponse;
3319
- type Future = BoxFuture<
3320
- tonic::Response<Self::Response>,
3321
- tonic::Status,
3322
- >;
3323
- fn call(
3324
- &mut self,
3325
- request: tonic::Request<
3326
- super::GetIdentityContractNonceRequest,
3327
- >,
3328
- ) -> Self::Future {
3329
- let inner = Arc::clone(&self.0);
3330
- let fut = async move {
3331
- (*inner).get_identity_contract_nonce(request).await
3332
- };
3333
- Box::pin(fut)
3334
- }
3335
- }
3336
- let accept_compression_encodings = self.accept_compression_encodings;
3337
- let send_compression_encodings = self.send_compression_encodings;
3338
- let max_decoding_message_size = self.max_decoding_message_size;
3339
- let max_encoding_message_size = self.max_encoding_message_size;
3340
- let inner = self.inner.clone();
3341
- let fut = async move {
3342
- let inner = inner.0;
3343
- let method = getIdentityContractNonceSvc(inner);
3344
- let codec = tonic::codec::ProstCodec::default();
3345
- let mut grpc = tonic::server::Grpc::new(codec)
3346
- .apply_compression_config(
3347
- accept_compression_encodings,
3348
- send_compression_encodings,
3349
- )
3350
- .apply_max_message_size_config(
3351
- max_decoding_message_size,
3352
- max_encoding_message_size,
3353
- );
3354
- let res = grpc.unary(method, req).await;
3355
- Ok(res)
3356
- };
3357
- Box::pin(fut)
3358
- }
3359
- "/org.dash.platform.dapi.v0.Platform/getIdentityBalance" => {
3360
- #[allow(non_camel_case_types)]
3361
- struct getIdentityBalanceSvc<T: Platform>(pub Arc<T>);
3362
- impl<
3363
- T: Platform,
3364
- > tonic::server::UnaryService<super::GetIdentityBalanceRequest>
3365
- for getIdentityBalanceSvc<T> {
3366
- type Response = super::GetIdentityBalanceResponse;
3367
- type Future = BoxFuture<
3368
- tonic::Response<Self::Response>,
3369
- tonic::Status,
3370
- >;
3371
- fn call(
3372
- &mut self,
3373
- request: tonic::Request<super::GetIdentityBalanceRequest>,
3374
- ) -> Self::Future {
3375
- let inner = Arc::clone(&self.0);
3376
- let fut = async move {
3377
- (*inner).get_identity_balance(request).await
3378
- };
3379
- Box::pin(fut)
3380
- }
3381
- }
3382
- let accept_compression_encodings = self.accept_compression_encodings;
3383
- let send_compression_encodings = self.send_compression_encodings;
3384
- let max_decoding_message_size = self.max_decoding_message_size;
3385
- let max_encoding_message_size = self.max_encoding_message_size;
3386
- let inner = self.inner.clone();
3387
- let fut = async move {
3388
- let inner = inner.0;
3389
- let method = getIdentityBalanceSvc(inner);
3390
- let codec = tonic::codec::ProstCodec::default();
3391
- let mut grpc = tonic::server::Grpc::new(codec)
3392
- .apply_compression_config(
3393
- accept_compression_encodings,
3394
- send_compression_encodings,
3395
- )
3396
- .apply_max_message_size_config(
3397
- max_decoding_message_size,
3398
- max_encoding_message_size,
3399
- );
3400
- let res = grpc.unary(method, req).await;
3401
- Ok(res)
3402
- };
3403
- Box::pin(fut)
3404
- }
3405
- "/org.dash.platform.dapi.v0.Platform/getIdentityBalanceAndRevision" => {
3406
- #[allow(non_camel_case_types)]
3407
- struct getIdentityBalanceAndRevisionSvc<T: Platform>(pub Arc<T>);
3408
- impl<
3409
- T: Platform,
3410
- > tonic::server::UnaryService<
3411
- super::GetIdentityBalanceAndRevisionRequest,
3412
- > for getIdentityBalanceAndRevisionSvc<T> {
3413
- type Response = super::GetIdentityBalanceAndRevisionResponse;
3414
- type Future = BoxFuture<
3415
- tonic::Response<Self::Response>,
3416
- tonic::Status,
3417
- >;
3418
- fn call(
3419
- &mut self,
3420
- request: tonic::Request<
3421
- super::GetIdentityBalanceAndRevisionRequest,
3422
- >,
3423
- ) -> Self::Future {
3424
- let inner = Arc::clone(&self.0);
3425
- let fut = async move {
3426
- (*inner).get_identity_balance_and_revision(request).await
3427
- };
3428
- Box::pin(fut)
3429
- }
3430
- }
3431
- let accept_compression_encodings = self.accept_compression_encodings;
3432
- let send_compression_encodings = self.send_compression_encodings;
3433
- let max_decoding_message_size = self.max_decoding_message_size;
3434
- let max_encoding_message_size = self.max_encoding_message_size;
3435
- let inner = self.inner.clone();
3436
- let fut = async move {
3437
- let inner = inner.0;
3438
- let method = getIdentityBalanceAndRevisionSvc(inner);
3439
- let codec = tonic::codec::ProstCodec::default();
3440
- let mut grpc = tonic::server::Grpc::new(codec)
3441
- .apply_compression_config(
3442
- accept_compression_encodings,
3443
- send_compression_encodings,
3444
- )
3445
- .apply_max_message_size_config(
3446
- max_decoding_message_size,
3447
- max_encoding_message_size,
3448
- );
3449
- let res = grpc.unary(method, req).await;
3450
- Ok(res)
3451
- };
3452
- Box::pin(fut)
3453
- }
3454
- "/org.dash.platform.dapi.v0.Platform/getProofs" => {
3455
- #[allow(non_camel_case_types)]
3456
- struct getProofsSvc<T: Platform>(pub Arc<T>);
3457
- impl<
3458
- T: Platform,
3459
- > tonic::server::UnaryService<super::GetProofsRequest>
3460
- for getProofsSvc<T> {
3461
- type Response = super::GetProofsResponse;
3462
- type Future = BoxFuture<
3463
- tonic::Response<Self::Response>,
3464
- tonic::Status,
3465
- >;
3466
- fn call(
3467
- &mut self,
3468
- request: tonic::Request<super::GetProofsRequest>,
3469
- ) -> Self::Future {
3470
- let inner = Arc::clone(&self.0);
3471
- let fut = async move { (*inner).get_proofs(request).await };
3472
- Box::pin(fut)
3473
- }
3474
- }
3475
- let accept_compression_encodings = self.accept_compression_encodings;
3476
- let send_compression_encodings = self.send_compression_encodings;
3477
- let max_decoding_message_size = self.max_decoding_message_size;
3478
- let max_encoding_message_size = self.max_encoding_message_size;
3479
- let inner = self.inner.clone();
3480
- let fut = async move {
3481
- let inner = inner.0;
3482
- let method = getProofsSvc(inner);
3483
- let codec = tonic::codec::ProstCodec::default();
3484
- let mut grpc = tonic::server::Grpc::new(codec)
3485
- .apply_compression_config(
3486
- accept_compression_encodings,
3487
- send_compression_encodings,
3488
- )
3489
- .apply_max_message_size_config(
3490
- max_decoding_message_size,
3491
- max_encoding_message_size,
3492
- );
3493
- let res = grpc.unary(method, req).await;
3494
- Ok(res)
3495
- };
3496
- Box::pin(fut)
3497
- }
3498
- "/org.dash.platform.dapi.v0.Platform/getDataContract" => {
3499
- #[allow(non_camel_case_types)]
3500
- struct getDataContractSvc<T: Platform>(pub Arc<T>);
3501
- impl<
3502
- T: Platform,
3503
- > tonic::server::UnaryService<super::GetDataContractRequest>
3504
- for getDataContractSvc<T> {
3505
- type Response = super::GetDataContractResponse;
3506
- type Future = BoxFuture<
3507
- tonic::Response<Self::Response>,
3508
- tonic::Status,
3509
- >;
3510
- fn call(
3511
- &mut self,
3512
- request: tonic::Request<super::GetDataContractRequest>,
3513
- ) -> Self::Future {
3514
- let inner = Arc::clone(&self.0);
3515
- let fut = async move {
3516
- (*inner).get_data_contract(request).await
3517
- };
3518
- Box::pin(fut)
3519
- }
3520
- }
3521
- let accept_compression_encodings = self.accept_compression_encodings;
3522
- let send_compression_encodings = self.send_compression_encodings;
3523
- let max_decoding_message_size = self.max_decoding_message_size;
3524
- let max_encoding_message_size = self.max_encoding_message_size;
3525
- let inner = self.inner.clone();
3526
- let fut = async move {
3527
- let inner = inner.0;
3528
- let method = getDataContractSvc(inner);
3529
- let codec = tonic::codec::ProstCodec::default();
3530
- let mut grpc = tonic::server::Grpc::new(codec)
3531
- .apply_compression_config(
3532
- accept_compression_encodings,
3533
- send_compression_encodings,
3534
- )
3535
- .apply_max_message_size_config(
3536
- max_decoding_message_size,
3537
- max_encoding_message_size,
3538
- );
3539
- let res = grpc.unary(method, req).await;
3540
- Ok(res)
3541
- };
3542
- Box::pin(fut)
3543
- }
3544
- "/org.dash.platform.dapi.v0.Platform/getDataContractHistory" => {
3545
- #[allow(non_camel_case_types)]
3546
- struct getDataContractHistorySvc<T: Platform>(pub Arc<T>);
3547
- impl<
3548
- T: Platform,
3549
- > tonic::server::UnaryService<super::GetDataContractHistoryRequest>
3550
- for getDataContractHistorySvc<T> {
3551
- type Response = super::GetDataContractHistoryResponse;
3552
- type Future = BoxFuture<
3553
- tonic::Response<Self::Response>,
3554
- tonic::Status,
3555
- >;
3556
- fn call(
3557
- &mut self,
3558
- request: tonic::Request<super::GetDataContractHistoryRequest>,
3559
- ) -> Self::Future {
3560
- let inner = Arc::clone(&self.0);
3561
- let fut = async move {
3562
- (*inner).get_data_contract_history(request).await
3563
- };
3564
- Box::pin(fut)
3565
- }
3566
- }
3567
- let accept_compression_encodings = self.accept_compression_encodings;
3568
- let send_compression_encodings = self.send_compression_encodings;
3569
- let max_decoding_message_size = self.max_decoding_message_size;
3570
- let max_encoding_message_size = self.max_encoding_message_size;
3571
- let inner = self.inner.clone();
3572
- let fut = async move {
3573
- let inner = inner.0;
3574
- let method = getDataContractHistorySvc(inner);
3575
- let codec = tonic::codec::ProstCodec::default();
3576
- let mut grpc = tonic::server::Grpc::new(codec)
3577
- .apply_compression_config(
3578
- accept_compression_encodings,
3579
- send_compression_encodings,
3580
- )
3581
- .apply_max_message_size_config(
3582
- max_decoding_message_size,
3583
- max_encoding_message_size,
3584
- );
3585
- let res = grpc.unary(method, req).await;
3586
- Ok(res)
3587
- };
3588
- Box::pin(fut)
3589
- }
3590
- "/org.dash.platform.dapi.v0.Platform/getDataContracts" => {
3591
- #[allow(non_camel_case_types)]
3592
- struct getDataContractsSvc<T: Platform>(pub Arc<T>);
3593
- impl<
3594
- T: Platform,
3595
- > tonic::server::UnaryService<super::GetDataContractsRequest>
3596
- for getDataContractsSvc<T> {
3597
- type Response = super::GetDataContractsResponse;
3598
- type Future = BoxFuture<
3599
- tonic::Response<Self::Response>,
3600
- tonic::Status,
3601
- >;
3602
- fn call(
3603
- &mut self,
3604
- request: tonic::Request<super::GetDataContractsRequest>,
3605
- ) -> Self::Future {
3606
- let inner = Arc::clone(&self.0);
3607
- let fut = async move {
3608
- (*inner).get_data_contracts(request).await
3609
- };
3610
- Box::pin(fut)
3611
- }
3612
- }
3613
- let accept_compression_encodings = self.accept_compression_encodings;
3614
- let send_compression_encodings = self.send_compression_encodings;
3615
- let max_decoding_message_size = self.max_decoding_message_size;
3616
- let max_encoding_message_size = self.max_encoding_message_size;
3617
- let inner = self.inner.clone();
3618
- let fut = async move {
3619
- let inner = inner.0;
3620
- let method = getDataContractsSvc(inner);
3621
- let codec = tonic::codec::ProstCodec::default();
3622
- let mut grpc = tonic::server::Grpc::new(codec)
3623
- .apply_compression_config(
3624
- accept_compression_encodings,
3625
- send_compression_encodings,
3626
- )
3627
- .apply_max_message_size_config(
3628
- max_decoding_message_size,
3629
- max_encoding_message_size,
3630
- );
3631
- let res = grpc.unary(method, req).await;
3632
- Ok(res)
3633
- };
3634
- Box::pin(fut)
3635
- }
3636
- "/org.dash.platform.dapi.v0.Platform/getDocuments" => {
3637
- #[allow(non_camel_case_types)]
3638
- struct getDocumentsSvc<T: Platform>(pub Arc<T>);
3639
- impl<
3640
- T: Platform,
3641
- > tonic::server::UnaryService<super::GetDocumentsRequest>
3642
- for getDocumentsSvc<T> {
3643
- type Response = super::GetDocumentsResponse;
3644
- type Future = BoxFuture<
3645
- tonic::Response<Self::Response>,
3646
- tonic::Status,
3647
- >;
3648
- fn call(
3649
- &mut self,
3650
- request: tonic::Request<super::GetDocumentsRequest>,
3651
- ) -> Self::Future {
3652
- let inner = Arc::clone(&self.0);
3653
- let fut = async move {
3654
- (*inner).get_documents(request).await
3655
- };
3656
- Box::pin(fut)
3657
- }
3658
- }
3659
- let accept_compression_encodings = self.accept_compression_encodings;
3660
- let send_compression_encodings = self.send_compression_encodings;
3661
- let max_decoding_message_size = self.max_decoding_message_size;
3662
- let max_encoding_message_size = self.max_encoding_message_size;
3663
- let inner = self.inner.clone();
3664
- let fut = async move {
3665
- let inner = inner.0;
3666
- let method = getDocumentsSvc(inner);
3667
- let codec = tonic::codec::ProstCodec::default();
3668
- let mut grpc = tonic::server::Grpc::new(codec)
3669
- .apply_compression_config(
3670
- accept_compression_encodings,
3671
- send_compression_encodings,
3672
- )
3673
- .apply_max_message_size_config(
3674
- max_decoding_message_size,
3675
- max_encoding_message_size,
3676
- );
3677
- let res = grpc.unary(method, req).await;
3678
- Ok(res)
3679
- };
3680
- Box::pin(fut)
3681
- }
3682
- "/org.dash.platform.dapi.v0.Platform/getIdentityByPublicKeyHash" => {
3683
- #[allow(non_camel_case_types)]
3684
- struct getIdentityByPublicKeyHashSvc<T: Platform>(pub Arc<T>);
3685
- impl<
3686
- T: Platform,
3687
- > tonic::server::UnaryService<
3688
- super::GetIdentityByPublicKeyHashRequest,
3689
- > for getIdentityByPublicKeyHashSvc<T> {
3690
- type Response = super::GetIdentityByPublicKeyHashResponse;
3691
- type Future = BoxFuture<
3692
- tonic::Response<Self::Response>,
3693
- tonic::Status,
3694
- >;
3695
- fn call(
3696
- &mut self,
3697
- request: tonic::Request<
3698
- super::GetIdentityByPublicKeyHashRequest,
3699
- >,
3700
- ) -> Self::Future {
3701
- let inner = Arc::clone(&self.0);
3702
- let fut = async move {
3703
- (*inner).get_identity_by_public_key_hash(request).await
3704
- };
3705
- Box::pin(fut)
3706
- }
3707
- }
3708
- let accept_compression_encodings = self.accept_compression_encodings;
3709
- let send_compression_encodings = self.send_compression_encodings;
3710
- let max_decoding_message_size = self.max_decoding_message_size;
3711
- let max_encoding_message_size = self.max_encoding_message_size;
3712
- let inner = self.inner.clone();
3713
- let fut = async move {
3714
- let inner = inner.0;
3715
- let method = getIdentityByPublicKeyHashSvc(inner);
3716
- let codec = tonic::codec::ProstCodec::default();
3717
- let mut grpc = tonic::server::Grpc::new(codec)
3718
- .apply_compression_config(
3719
- accept_compression_encodings,
3720
- send_compression_encodings,
3721
- )
3722
- .apply_max_message_size_config(
3723
- max_decoding_message_size,
3724
- max_encoding_message_size,
3725
- );
3726
- let res = grpc.unary(method, req).await;
3727
- Ok(res)
3728
- };
3729
- Box::pin(fut)
3730
- }
3731
- "/org.dash.platform.dapi.v0.Platform/waitForStateTransitionResult" => {
3732
- #[allow(non_camel_case_types)]
3733
- struct waitForStateTransitionResultSvc<T: Platform>(pub Arc<T>);
3734
- impl<
3735
- T: Platform,
3736
- > tonic::server::UnaryService<
3737
- super::WaitForStateTransitionResultRequest,
3738
- > for waitForStateTransitionResultSvc<T> {
3739
- type Response = super::WaitForStateTransitionResultResponse;
3740
- type Future = BoxFuture<
3741
- tonic::Response<Self::Response>,
3742
- tonic::Status,
3743
- >;
3744
- fn call(
3745
- &mut self,
3746
- request: tonic::Request<
3747
- super::WaitForStateTransitionResultRequest,
3748
- >,
3749
- ) -> Self::Future {
3750
- let inner = Arc::clone(&self.0);
3751
- let fut = async move {
3752
- (*inner).wait_for_state_transition_result(request).await
3753
- };
3754
- Box::pin(fut)
3755
- }
3756
- }
3757
- let accept_compression_encodings = self.accept_compression_encodings;
3758
- let send_compression_encodings = self.send_compression_encodings;
3759
- let max_decoding_message_size = self.max_decoding_message_size;
3760
- let max_encoding_message_size = self.max_encoding_message_size;
3761
- let inner = self.inner.clone();
3762
- let fut = async move {
3763
- let inner = inner.0;
3764
- let method = waitForStateTransitionResultSvc(inner);
3765
- let codec = tonic::codec::ProstCodec::default();
3766
- let mut grpc = tonic::server::Grpc::new(codec)
3767
- .apply_compression_config(
3768
- accept_compression_encodings,
3769
- send_compression_encodings,
3770
- )
3771
- .apply_max_message_size_config(
3772
- max_decoding_message_size,
3773
- max_encoding_message_size,
3774
- );
3775
- let res = grpc.unary(method, req).await;
3776
- Ok(res)
3777
- };
3778
- Box::pin(fut)
3779
- }
3780
- "/org.dash.platform.dapi.v0.Platform/getConsensusParams" => {
3781
- #[allow(non_camel_case_types)]
3782
- struct getConsensusParamsSvc<T: Platform>(pub Arc<T>);
3783
- impl<
3784
- T: Platform,
3785
- > tonic::server::UnaryService<super::GetConsensusParamsRequest>
3786
- for getConsensusParamsSvc<T> {
3787
- type Response = super::GetConsensusParamsResponse;
3788
- type Future = BoxFuture<
3789
- tonic::Response<Self::Response>,
3790
- tonic::Status,
3791
- >;
3792
- fn call(
3793
- &mut self,
3794
- request: tonic::Request<super::GetConsensusParamsRequest>,
3795
- ) -> Self::Future {
3796
- let inner = Arc::clone(&self.0);
3797
- let fut = async move {
3798
- (*inner).get_consensus_params(request).await
3799
- };
3800
- Box::pin(fut)
3801
- }
3802
- }
3803
- let accept_compression_encodings = self.accept_compression_encodings;
3804
- let send_compression_encodings = self.send_compression_encodings;
3805
- let max_decoding_message_size = self.max_decoding_message_size;
3806
- let max_encoding_message_size = self.max_encoding_message_size;
3807
- let inner = self.inner.clone();
3808
- let fut = async move {
3809
- let inner = inner.0;
3810
- let method = getConsensusParamsSvc(inner);
3811
- let codec = tonic::codec::ProstCodec::default();
3812
- let mut grpc = tonic::server::Grpc::new(codec)
3813
- .apply_compression_config(
3814
- accept_compression_encodings,
3815
- send_compression_encodings,
3816
- )
3817
- .apply_max_message_size_config(
3818
- max_decoding_message_size,
3819
- max_encoding_message_size,
3820
- );
3821
- let res = grpc.unary(method, req).await;
3822
- Ok(res)
3823
- };
3824
- Box::pin(fut)
3825
- }
3826
- "/org.dash.platform.dapi.v0.Platform/getProtocolVersionUpgradeState" => {
3827
- #[allow(non_camel_case_types)]
3828
- struct getProtocolVersionUpgradeStateSvc<T: Platform>(pub Arc<T>);
3829
- impl<
3830
- T: Platform,
3831
- > tonic::server::UnaryService<
3832
- super::GetProtocolVersionUpgradeStateRequest,
3833
- > for getProtocolVersionUpgradeStateSvc<T> {
3834
- type Response = super::GetProtocolVersionUpgradeStateResponse;
3835
- type Future = BoxFuture<
3836
- tonic::Response<Self::Response>,
3837
- tonic::Status,
3838
- >;
3839
- fn call(
3840
- &mut self,
3841
- request: tonic::Request<
3842
- super::GetProtocolVersionUpgradeStateRequest,
3843
- >,
3844
- ) -> Self::Future {
3845
- let inner = Arc::clone(&self.0);
3846
- let fut = async move {
3847
- (*inner).get_protocol_version_upgrade_state(request).await
3848
- };
3849
- Box::pin(fut)
3850
- }
3851
- }
3852
- let accept_compression_encodings = self.accept_compression_encodings;
3853
- let send_compression_encodings = self.send_compression_encodings;
3854
- let max_decoding_message_size = self.max_decoding_message_size;
3855
- let max_encoding_message_size = self.max_encoding_message_size;
3856
- let inner = self.inner.clone();
3857
- let fut = async move {
3858
- let inner = inner.0;
3859
- let method = getProtocolVersionUpgradeStateSvc(inner);
3860
- let codec = tonic::codec::ProstCodec::default();
3861
- let mut grpc = tonic::server::Grpc::new(codec)
3862
- .apply_compression_config(
3863
- accept_compression_encodings,
3864
- send_compression_encodings,
3865
- )
3866
- .apply_max_message_size_config(
3867
- max_decoding_message_size,
3868
- max_encoding_message_size,
3869
- );
3870
- let res = grpc.unary(method, req).await;
3871
- Ok(res)
3872
- };
3873
- Box::pin(fut)
3874
- }
3875
- "/org.dash.platform.dapi.v0.Platform/getProtocolVersionUpgradeVoteStatus" => {
3876
- #[allow(non_camel_case_types)]
3877
- struct getProtocolVersionUpgradeVoteStatusSvc<T: Platform>(
3878
- pub Arc<T>,
3879
- );
3880
- impl<
3881
- T: Platform,
3882
- > tonic::server::UnaryService<
3883
- super::GetProtocolVersionUpgradeVoteStatusRequest,
3884
- > for getProtocolVersionUpgradeVoteStatusSvc<T> {
3885
- type Response = super::GetProtocolVersionUpgradeVoteStatusResponse;
3886
- type Future = BoxFuture<
3887
- tonic::Response<Self::Response>,
3888
- tonic::Status,
3889
- >;
3890
- fn call(
3891
- &mut self,
3892
- request: tonic::Request<
3893
- super::GetProtocolVersionUpgradeVoteStatusRequest,
3894
- >,
3895
- ) -> Self::Future {
3896
- let inner = Arc::clone(&self.0);
3897
- let fut = async move {
3898
- (*inner)
3899
- .get_protocol_version_upgrade_vote_status(request)
3900
- .await
3901
- };
3902
- Box::pin(fut)
3903
- }
3904
- }
3905
- let accept_compression_encodings = self.accept_compression_encodings;
3906
- let send_compression_encodings = self.send_compression_encodings;
3907
- let max_decoding_message_size = self.max_decoding_message_size;
3908
- let max_encoding_message_size = self.max_encoding_message_size;
3909
- let inner = self.inner.clone();
3910
- let fut = async move {
3911
- let inner = inner.0;
3912
- let method = getProtocolVersionUpgradeVoteStatusSvc(inner);
3913
- let codec = tonic::codec::ProstCodec::default();
3914
- let mut grpc = tonic::server::Grpc::new(codec)
3915
- .apply_compression_config(
3916
- accept_compression_encodings,
3917
- send_compression_encodings,
3918
- )
3919
- .apply_max_message_size_config(
3920
- max_decoding_message_size,
3921
- max_encoding_message_size,
3922
- );
3923
- let res = grpc.unary(method, req).await;
3924
- Ok(res)
3925
- };
3926
- Box::pin(fut)
3927
- }
3928
- "/org.dash.platform.dapi.v0.Platform/getEpochsInfo" => {
3929
- #[allow(non_camel_case_types)]
3930
- struct getEpochsInfoSvc<T: Platform>(pub Arc<T>);
3931
- impl<
3932
- T: Platform,
3933
- > tonic::server::UnaryService<super::GetEpochsInfoRequest>
3934
- for getEpochsInfoSvc<T> {
3935
- type Response = super::GetEpochsInfoResponse;
3936
- type Future = BoxFuture<
3937
- tonic::Response<Self::Response>,
3938
- tonic::Status,
3939
- >;
3940
- fn call(
3941
- &mut self,
3942
- request: tonic::Request<super::GetEpochsInfoRequest>,
3943
- ) -> Self::Future {
3944
- let inner = Arc::clone(&self.0);
3945
- let fut = async move {
3946
- (*inner).get_epochs_info(request).await
3947
- };
3948
- Box::pin(fut)
3949
- }
3950
- }
3951
- let accept_compression_encodings = self.accept_compression_encodings;
3952
- let send_compression_encodings = self.send_compression_encodings;
3953
- let max_decoding_message_size = self.max_decoding_message_size;
3954
- let max_encoding_message_size = self.max_encoding_message_size;
3955
- let inner = self.inner.clone();
3956
- let fut = async move {
3957
- let inner = inner.0;
3958
- let method = getEpochsInfoSvc(inner);
3959
- let codec = tonic::codec::ProstCodec::default();
3960
- let mut grpc = tonic::server::Grpc::new(codec)
3961
- .apply_compression_config(
3962
- accept_compression_encodings,
3963
- send_compression_encodings,
3964
- )
3965
- .apply_max_message_size_config(
3966
- max_decoding_message_size,
3967
- max_encoding_message_size,
3968
- );
3969
- let res = grpc.unary(method, req).await;
3970
- Ok(res)
3971
- };
3972
- Box::pin(fut)
3973
- }
3974
- "/org.dash.platform.dapi.v0.Platform/getPathElements" => {
3975
- #[allow(non_camel_case_types)]
3976
- struct getPathElementsSvc<T: Platform>(pub Arc<T>);
3977
- impl<
3978
- T: Platform,
3979
- > tonic::server::UnaryService<super::GetPathElementsRequest>
3980
- for getPathElementsSvc<T> {
3981
- type Response = super::GetPathElementsResponse;
3982
- type Future = BoxFuture<
3983
- tonic::Response<Self::Response>,
3984
- tonic::Status,
3985
- >;
3986
- fn call(
3987
- &mut self,
3988
- request: tonic::Request<super::GetPathElementsRequest>,
3989
- ) -> Self::Future {
3990
- let inner = Arc::clone(&self.0);
3991
- let fut = async move {
3992
- (*inner).get_path_elements(request).await
3993
- };
3994
- Box::pin(fut)
3995
- }
3996
- }
3997
- let accept_compression_encodings = self.accept_compression_encodings;
3998
- let send_compression_encodings = self.send_compression_encodings;
3999
- let max_decoding_message_size = self.max_decoding_message_size;
4000
- let max_encoding_message_size = self.max_encoding_message_size;
4001
- let inner = self.inner.clone();
4002
- let fut = async move {
4003
- let inner = inner.0;
4004
- let method = getPathElementsSvc(inner);
4005
- let codec = tonic::codec::ProstCodec::default();
4006
- let mut grpc = tonic::server::Grpc::new(codec)
4007
- .apply_compression_config(
4008
- accept_compression_encodings,
4009
- send_compression_encodings,
4010
- )
4011
- .apply_max_message_size_config(
4012
- max_decoding_message_size,
4013
- max_encoding_message_size,
4014
- );
4015
- let res = grpc.unary(method, req).await;
4016
- Ok(res)
4017
- };
4018
- Box::pin(fut)
4019
- }
4020
- _ => {
4021
- Box::pin(async move {
4022
- Ok(
4023
- http::Response::builder()
4024
- .status(200)
4025
- .header("grpc-status", "12")
4026
- .header("content-type", "application/grpc")
4027
- .body(empty_body())
4028
- .unwrap(),
4029
- )
4030
- })
4031
- }
4032
- }
4033
- }
4034
- }
4035
- impl<T: Platform> Clone for PlatformServer<T> {
4036
- fn clone(&self) -> Self {
4037
- let inner = self.inner.clone();
4038
- Self {
4039
- inner,
4040
- accept_compression_encodings: self.accept_compression_encodings,
4041
- send_compression_encodings: self.send_compression_encodings,
4042
- max_decoding_message_size: self.max_decoding_message_size,
4043
- max_encoding_message_size: self.max_encoding_message_size,
4044
- }
4045
- }
4046
- }
4047
- impl<T: Platform> Clone for _Inner<T> {
4048
- fn clone(&self) -> Self {
4049
- Self(Arc::clone(&self.0))
4050
- }
4051
- }
4052
- impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
4053
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4054
- write!(f, "{:?}", self.0)
4055
- }
4056
- }
4057
- impl<T: Platform> tonic::server::NamedService for PlatformServer<T> {
4058
- const NAME: &'static str = "org.dash.platform.dapi.v0.Platform";
4059
- }
4060
- }