@dashevo/dapi-grpc 0.25.0-dev.9 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.toml +44 -0
- package/build.rs +69 -0
- package/clients/core/v0/rust/README.md +3 -0
- package/clients/core/v0/rust/core_example.rs +14 -0
- package/clients/platform/v0/nodejs/PlatformPromiseClient.js +39 -0
- package/clients/platform/v0/nodejs/platform_pbjs.js +13976 -1484
- package/clients/platform/v0/nodejs/platform_protoc.js +11116 -1468
- package/clients/platform/v0/rust/README.md +3 -0
- package/clients/platform/v0/rust/platform_example.rs +15 -0
- package/clients/platform/v0/web/PlatformPromiseClient.js +15 -0
- package/clients/platform/v0/web/platform_pb.d.ts +1278 -22
- package/clients/platform/v0/web/platform_pb.js +11116 -1468
- package/clients/platform/v0/web/platform_pb_service.d.ts +152 -0
- package/clients/platform/v0/web/platform_pb_service.js +320 -0
- package/package.json +16 -4
- package/protos/platform/v0/platform.proto +274 -16
- package/scripts/build.sh +91 -115
- package/scripts/patch-protobuf-js.sh +10 -9
- package/src/core/proto/org.dash.platform.dapi.v0.rs +666 -0
- package/src/lib.rs +15 -0
- package/src/platform/proto/org.dash.platform.dapi.v0.rs +1324 -0
- package/clients/core/v0/rust/core.rs +0 -4956
- package/clients/core/v0/rust/core_grpc.rs +0 -223
- package/clients/core/v0/rust/mod.rs +0 -3
- package/clients/platform/v0/rust/mod.rs +0 -3
- package/clients/platform/v0/rust/platform.rs +0 -3555
- package/clients/platform/v0/rust/platform_grpc.rs +0 -223
|
@@ -0,0 +1,1324 @@
|
|
|
1
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
2
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
3
|
+
pub struct Proof {
|
|
4
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
5
|
+
pub grovedb_proof: ::prost::alloc::vec::Vec<u8>,
|
|
6
|
+
#[prost(bytes = "vec", tag = "2")]
|
|
7
|
+
pub quorum_hash: ::prost::alloc::vec::Vec<u8>,
|
|
8
|
+
#[prost(bytes = "vec", tag = "3")]
|
|
9
|
+
pub signature: ::prost::alloc::vec::Vec<u8>,
|
|
10
|
+
#[prost(uint32, tag = "4")]
|
|
11
|
+
pub round: u32,
|
|
12
|
+
#[prost(bytes = "vec", tag = "5")]
|
|
13
|
+
pub block_id_hash: ::prost::alloc::vec::Vec<u8>,
|
|
14
|
+
#[prost(uint32, tag = "6")]
|
|
15
|
+
pub quorum_type: u32,
|
|
16
|
+
}
|
|
17
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
18
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
19
|
+
pub struct ResponseMetadata {
|
|
20
|
+
#[prost(uint64, tag = "1")]
|
|
21
|
+
pub height: u64,
|
|
22
|
+
#[prost(uint32, tag = "2")]
|
|
23
|
+
pub core_chain_locked_height: u32,
|
|
24
|
+
#[prost(uint64, tag = "3")]
|
|
25
|
+
pub time_ms: u64,
|
|
26
|
+
#[prost(uint32, tag = "4")]
|
|
27
|
+
pub protocol_version: u32,
|
|
28
|
+
#[prost(string, tag = "5")]
|
|
29
|
+
pub chain_id: ::prost::alloc::string::String,
|
|
30
|
+
}
|
|
31
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
32
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
33
|
+
pub struct StateTransitionBroadcastError {
|
|
34
|
+
#[prost(uint32, tag = "1")]
|
|
35
|
+
pub code: u32,
|
|
36
|
+
#[prost(string, tag = "2")]
|
|
37
|
+
pub message: ::prost::alloc::string::String,
|
|
38
|
+
#[prost(bytes = "vec", tag = "3")]
|
|
39
|
+
pub data: ::prost::alloc::vec::Vec<u8>,
|
|
40
|
+
}
|
|
41
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
42
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
43
|
+
pub struct BroadcastStateTransitionRequest {
|
|
44
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
45
|
+
pub state_transition: ::prost::alloc::vec::Vec<u8>,
|
|
46
|
+
}
|
|
47
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
48
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
49
|
+
pub struct BroadcastStateTransitionResponse {}
|
|
50
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
51
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
52
|
+
pub struct GetIdentityRequest {
|
|
53
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
54
|
+
pub id: ::prost::alloc::vec::Vec<u8>,
|
|
55
|
+
#[prost(bool, tag = "2")]
|
|
56
|
+
pub prove: bool,
|
|
57
|
+
}
|
|
58
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
59
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
60
|
+
pub struct GetIdentityResponse {
|
|
61
|
+
#[prost(message, optional, tag = "3")]
|
|
62
|
+
pub metadata: ::core::option::Option<ResponseMetadata>,
|
|
63
|
+
#[prost(oneof = "get_identity_response::Result", tags = "1, 2")]
|
|
64
|
+
pub result: ::core::option::Option<get_identity_response::Result>,
|
|
65
|
+
}
|
|
66
|
+
/// Nested message and enum types in `GetIdentityResponse`.
|
|
67
|
+
pub mod get_identity_response {
|
|
68
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
69
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
70
|
+
pub enum Result {
|
|
71
|
+
#[prost(bytes, tag = "1")]
|
|
72
|
+
Identity(::prost::alloc::vec::Vec<u8>),
|
|
73
|
+
#[prost(message, tag = "2")]
|
|
74
|
+
Proof(super::Proof),
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
78
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
79
|
+
pub struct GetIdentitiesRequest {
|
|
80
|
+
#[prost(bytes = "vec", repeated, tag = "1")]
|
|
81
|
+
pub ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
|
|
82
|
+
#[prost(bool, tag = "2")]
|
|
83
|
+
pub prove: bool,
|
|
84
|
+
}
|
|
85
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
86
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
87
|
+
pub struct GetIdentitiesResponse {
|
|
88
|
+
#[prost(message, optional, tag = "3")]
|
|
89
|
+
pub metadata: ::core::option::Option<ResponseMetadata>,
|
|
90
|
+
#[prost(oneof = "get_identities_response::Result", tags = "1, 2")]
|
|
91
|
+
pub result: ::core::option::Option<get_identities_response::Result>,
|
|
92
|
+
}
|
|
93
|
+
/// Nested message and enum types in `GetIdentitiesResponse`.
|
|
94
|
+
pub mod get_identities_response {
|
|
95
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
96
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
97
|
+
pub struct IdentityValue {
|
|
98
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
99
|
+
pub value: ::prost::alloc::vec::Vec<u8>,
|
|
100
|
+
}
|
|
101
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
102
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
103
|
+
pub struct IdentityEntry {
|
|
104
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
105
|
+
pub key: ::prost::alloc::vec::Vec<u8>,
|
|
106
|
+
#[prost(message, optional, tag = "2")]
|
|
107
|
+
pub value: ::core::option::Option<IdentityValue>,
|
|
108
|
+
}
|
|
109
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
110
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
111
|
+
pub struct Identities {
|
|
112
|
+
#[prost(message, repeated, tag = "1")]
|
|
113
|
+
pub identity_entries: ::prost::alloc::vec::Vec<IdentityEntry>,
|
|
114
|
+
}
|
|
115
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
116
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
117
|
+
pub enum Result {
|
|
118
|
+
#[prost(message, tag = "1")]
|
|
119
|
+
Identities(Identities),
|
|
120
|
+
#[prost(message, tag = "2")]
|
|
121
|
+
Proof(super::Proof),
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
125
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
126
|
+
pub struct GetIdentityBalanceResponse {
|
|
127
|
+
#[prost(message, optional, tag = "3")]
|
|
128
|
+
pub metadata: ::core::option::Option<ResponseMetadata>,
|
|
129
|
+
#[prost(oneof = "get_identity_balance_response::Result", tags = "1, 2")]
|
|
130
|
+
pub result: ::core::option::Option<get_identity_balance_response::Result>,
|
|
131
|
+
}
|
|
132
|
+
/// Nested message and enum types in `GetIdentityBalanceResponse`.
|
|
133
|
+
pub mod get_identity_balance_response {
|
|
134
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
135
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
136
|
+
pub enum Result {
|
|
137
|
+
#[prost(message, tag = "1")]
|
|
138
|
+
Balance(u64),
|
|
139
|
+
#[prost(message, tag = "2")]
|
|
140
|
+
Proof(super::Proof),
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
144
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
145
|
+
pub struct GetIdentityBalanceAndRevisionResponse {
|
|
146
|
+
#[prost(message, optional, tag = "3")]
|
|
147
|
+
pub metadata: ::core::option::Option<ResponseMetadata>,
|
|
148
|
+
#[prost(oneof = "get_identity_balance_and_revision_response::Result", tags = "1, 2")]
|
|
149
|
+
pub result: ::core::option::Option<
|
|
150
|
+
get_identity_balance_and_revision_response::Result,
|
|
151
|
+
>,
|
|
152
|
+
}
|
|
153
|
+
/// Nested message and enum types in `GetIdentityBalanceAndRevisionResponse`.
|
|
154
|
+
pub mod get_identity_balance_and_revision_response {
|
|
155
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
156
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
157
|
+
pub struct BalanceAndRevision {
|
|
158
|
+
#[prost(message, optional, tag = "1")]
|
|
159
|
+
pub balance: ::core::option::Option<u64>,
|
|
160
|
+
#[prost(message, optional, tag = "2")]
|
|
161
|
+
pub revision: ::core::option::Option<u64>,
|
|
162
|
+
}
|
|
163
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
164
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
165
|
+
pub enum Result {
|
|
166
|
+
#[prost(message, tag = "1")]
|
|
167
|
+
BalanceAndRevision(BalanceAndRevision),
|
|
168
|
+
#[prost(message, tag = "2")]
|
|
169
|
+
Proof(super::Proof),
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
173
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
174
|
+
pub struct KeyRequestType {
|
|
175
|
+
#[prost(oneof = "key_request_type::Request", tags = "1, 2, 3")]
|
|
176
|
+
pub request: ::core::option::Option<key_request_type::Request>,
|
|
177
|
+
}
|
|
178
|
+
/// Nested message and enum types in `KeyRequestType`.
|
|
179
|
+
pub mod key_request_type {
|
|
180
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
181
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
182
|
+
pub enum Request {
|
|
183
|
+
#[prost(message, tag = "1")]
|
|
184
|
+
AllKeys(super::AllKeys),
|
|
185
|
+
#[prost(message, tag = "2")]
|
|
186
|
+
SpecificKeys(super::SpecificKeys),
|
|
187
|
+
#[prost(message, tag = "3")]
|
|
188
|
+
SearchKey(super::SearchKey),
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
192
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
193
|
+
pub struct AllKeys {}
|
|
194
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
195
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
196
|
+
pub struct SpecificKeys {
|
|
197
|
+
#[prost(uint32, repeated, tag = "1")]
|
|
198
|
+
pub key_ids: ::prost::alloc::vec::Vec<u32>,
|
|
199
|
+
}
|
|
200
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
201
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
202
|
+
pub struct SearchKey {
|
|
203
|
+
#[prost(map = "uint32, message", tag = "1")]
|
|
204
|
+
pub purpose_map: ::std::collections::HashMap<u32, SecurityLevelMap>,
|
|
205
|
+
}
|
|
206
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
207
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
208
|
+
pub struct SecurityLevelMap {
|
|
209
|
+
#[prost(
|
|
210
|
+
map = "uint32, enumeration(security_level_map::KeyKindRequestType)",
|
|
211
|
+
tag = "1"
|
|
212
|
+
)]
|
|
213
|
+
pub security_level_map: ::std::collections::HashMap<u32, i32>,
|
|
214
|
+
}
|
|
215
|
+
/// Nested message and enum types in `SecurityLevelMap`.
|
|
216
|
+
pub mod security_level_map {
|
|
217
|
+
#[derive(
|
|
218
|
+
Clone,
|
|
219
|
+
Copy,
|
|
220
|
+
Debug,
|
|
221
|
+
PartialEq,
|
|
222
|
+
Eq,
|
|
223
|
+
Hash,
|
|
224
|
+
PartialOrd,
|
|
225
|
+
Ord,
|
|
226
|
+
::prost::Enumeration
|
|
227
|
+
)]
|
|
228
|
+
#[repr(i32)]
|
|
229
|
+
pub enum KeyKindRequestType {
|
|
230
|
+
CurrentKeyOfKindRequest = 0,
|
|
231
|
+
AllKeysOfKindRequest = 1,
|
|
232
|
+
}
|
|
233
|
+
impl KeyKindRequestType {
|
|
234
|
+
/// String value of the enum field names used in the ProtoBuf definition.
|
|
235
|
+
///
|
|
236
|
+
/// The values are not transformed in any way and thus are considered stable
|
|
237
|
+
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
|
|
238
|
+
pub fn as_str_name(&self) -> &'static str {
|
|
239
|
+
match self {
|
|
240
|
+
KeyKindRequestType::CurrentKeyOfKindRequest => {
|
|
241
|
+
"CURRENT_KEY_OF_KIND_REQUEST"
|
|
242
|
+
}
|
|
243
|
+
KeyKindRequestType::AllKeysOfKindRequest => "ALL_KEYS_OF_KIND_REQUEST",
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
/// Creates an enum from field names used in the ProtoBuf definition.
|
|
247
|
+
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
|
|
248
|
+
match value {
|
|
249
|
+
"CURRENT_KEY_OF_KIND_REQUEST" => Some(Self::CurrentKeyOfKindRequest),
|
|
250
|
+
"ALL_KEYS_OF_KIND_REQUEST" => Some(Self::AllKeysOfKindRequest),
|
|
251
|
+
_ => None,
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
257
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
258
|
+
pub struct GetIdentityKeysRequest {
|
|
259
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
260
|
+
pub identity_id: ::prost::alloc::vec::Vec<u8>,
|
|
261
|
+
#[prost(message, optional, tag = "2")]
|
|
262
|
+
pub request_type: ::core::option::Option<KeyRequestType>,
|
|
263
|
+
#[prost(message, optional, tag = "3")]
|
|
264
|
+
pub limit: ::core::option::Option<u32>,
|
|
265
|
+
#[prost(message, optional, tag = "4")]
|
|
266
|
+
pub offset: ::core::option::Option<u32>,
|
|
267
|
+
#[prost(bool, tag = "5")]
|
|
268
|
+
pub prove: bool,
|
|
269
|
+
}
|
|
270
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
271
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
272
|
+
pub struct GetIdentityKeysResponse {
|
|
273
|
+
#[prost(message, optional, tag = "3")]
|
|
274
|
+
pub metadata: ::core::option::Option<ResponseMetadata>,
|
|
275
|
+
#[prost(oneof = "get_identity_keys_response::Result", tags = "1, 2")]
|
|
276
|
+
pub result: ::core::option::Option<get_identity_keys_response::Result>,
|
|
277
|
+
}
|
|
278
|
+
/// Nested message and enum types in `GetIdentityKeysResponse`.
|
|
279
|
+
pub mod get_identity_keys_response {
|
|
280
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
281
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
282
|
+
pub struct Keys {
|
|
283
|
+
#[prost(bytes = "vec", repeated, tag = "1")]
|
|
284
|
+
pub keys_bytes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
|
|
285
|
+
}
|
|
286
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
287
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
288
|
+
pub enum Result {
|
|
289
|
+
#[prost(message, tag = "1")]
|
|
290
|
+
Keys(Keys),
|
|
291
|
+
#[prost(message, tag = "2")]
|
|
292
|
+
Proof(super::Proof),
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
296
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
297
|
+
pub struct GetIdentitiesKeysRequest {
|
|
298
|
+
#[prost(bytes = "vec", repeated, tag = "1")]
|
|
299
|
+
pub identity_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
|
|
300
|
+
#[prost(message, optional, tag = "2")]
|
|
301
|
+
pub request_type: ::core::option::Option<KeyRequestType>,
|
|
302
|
+
#[prost(message, optional, tag = "3")]
|
|
303
|
+
pub limit: ::core::option::Option<u32>,
|
|
304
|
+
#[prost(message, optional, tag = "4")]
|
|
305
|
+
pub offset: ::core::option::Option<u32>,
|
|
306
|
+
#[prost(bool, tag = "5")]
|
|
307
|
+
pub prove: bool,
|
|
308
|
+
}
|
|
309
|
+
/// Nested message and enum types in `GetIdentitiesKeysRequest`.
|
|
310
|
+
pub mod get_identities_keys_request {
|
|
311
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
312
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
313
|
+
pub struct SecurityLevelMap {
|
|
314
|
+
#[prost(
|
|
315
|
+
map = "uint32, enumeration(security_level_map::KeyKindRequestType)",
|
|
316
|
+
tag = "1"
|
|
317
|
+
)]
|
|
318
|
+
pub security_level_map: ::std::collections::HashMap<u32, i32>,
|
|
319
|
+
}
|
|
320
|
+
/// Nested message and enum types in `SecurityLevelMap`.
|
|
321
|
+
pub mod security_level_map {
|
|
322
|
+
#[derive(
|
|
323
|
+
Clone,
|
|
324
|
+
Copy,
|
|
325
|
+
Debug,
|
|
326
|
+
PartialEq,
|
|
327
|
+
Eq,
|
|
328
|
+
Hash,
|
|
329
|
+
PartialOrd,
|
|
330
|
+
Ord,
|
|
331
|
+
::prost::Enumeration
|
|
332
|
+
)]
|
|
333
|
+
#[repr(i32)]
|
|
334
|
+
pub enum KeyKindRequestType {
|
|
335
|
+
CurrentKeyOfKindRequest = 0,
|
|
336
|
+
}
|
|
337
|
+
impl KeyKindRequestType {
|
|
338
|
+
/// String value of the enum field names used in the ProtoBuf definition.
|
|
339
|
+
///
|
|
340
|
+
/// The values are not transformed in any way and thus are considered stable
|
|
341
|
+
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
|
|
342
|
+
pub fn as_str_name(&self) -> &'static str {
|
|
343
|
+
match self {
|
|
344
|
+
KeyKindRequestType::CurrentKeyOfKindRequest => {
|
|
345
|
+
"CURRENT_KEY_OF_KIND_REQUEST"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
/// Creates an enum from field names used in the ProtoBuf definition.
|
|
350
|
+
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
|
|
351
|
+
match value {
|
|
352
|
+
"CURRENT_KEY_OF_KIND_REQUEST" => Some(Self::CurrentKeyOfKindRequest),
|
|
353
|
+
_ => None,
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
360
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
361
|
+
pub struct GetIdentitiesKeysResponse {
|
|
362
|
+
#[prost(message, optional, tag = "3")]
|
|
363
|
+
pub metadata: ::core::option::Option<ResponseMetadata>,
|
|
364
|
+
#[prost(oneof = "get_identities_keys_response::Result", tags = "1, 2")]
|
|
365
|
+
pub result: ::core::option::Option<get_identities_keys_response::Result>,
|
|
366
|
+
}
|
|
367
|
+
/// Nested message and enum types in `GetIdentitiesKeysResponse`.
|
|
368
|
+
pub mod get_identities_keys_response {
|
|
369
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
370
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
371
|
+
pub struct PublicKey {
|
|
372
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
373
|
+
pub value: ::prost::alloc::vec::Vec<u8>,
|
|
374
|
+
}
|
|
375
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
376
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
377
|
+
pub struct PublicKeyEntry {
|
|
378
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
379
|
+
pub key: ::prost::alloc::vec::Vec<u8>,
|
|
380
|
+
#[prost(message, optional, tag = "2")]
|
|
381
|
+
pub value: ::core::option::Option<PublicKey>,
|
|
382
|
+
}
|
|
383
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
384
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
385
|
+
pub struct PublicKeyEntries {
|
|
386
|
+
#[prost(message, repeated, tag = "1")]
|
|
387
|
+
pub public_key_entries: ::prost::alloc::vec::Vec<PublicKeyEntry>,
|
|
388
|
+
}
|
|
389
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
390
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
391
|
+
pub enum Result {
|
|
392
|
+
#[prost(message, tag = "1")]
|
|
393
|
+
PublicKeys(PublicKeyEntries),
|
|
394
|
+
#[prost(message, tag = "2")]
|
|
395
|
+
Proof(super::Proof),
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
399
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
400
|
+
pub struct GetProofsRequest {
|
|
401
|
+
#[prost(message, repeated, tag = "1")]
|
|
402
|
+
pub identities: ::prost::alloc::vec::Vec<get_proofs_request::IdentityRequest>,
|
|
403
|
+
#[prost(message, repeated, tag = "2")]
|
|
404
|
+
pub contracts: ::prost::alloc::vec::Vec<get_proofs_request::ContractRequest>,
|
|
405
|
+
#[prost(message, repeated, tag = "3")]
|
|
406
|
+
pub documents: ::prost::alloc::vec::Vec<get_proofs_request::DocumentRequest>,
|
|
407
|
+
}
|
|
408
|
+
/// Nested message and enum types in `GetProofsRequest`.
|
|
409
|
+
pub mod get_proofs_request {
|
|
410
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
411
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
412
|
+
pub struct DocumentRequest {
|
|
413
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
414
|
+
pub contract_id: ::prost::alloc::vec::Vec<u8>,
|
|
415
|
+
#[prost(string, tag = "2")]
|
|
416
|
+
pub document_type: ::prost::alloc::string::String,
|
|
417
|
+
#[prost(bool, tag = "3")]
|
|
418
|
+
pub document_type_keeps_history: bool,
|
|
419
|
+
#[prost(bytes = "vec", tag = "4")]
|
|
420
|
+
pub document_id: ::prost::alloc::vec::Vec<u8>,
|
|
421
|
+
}
|
|
422
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
423
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
424
|
+
pub struct IdentityRequest {
|
|
425
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
426
|
+
pub identity_id: ::prost::alloc::vec::Vec<u8>,
|
|
427
|
+
#[prost(enumeration = "identity_request::Type", tag = "2")]
|
|
428
|
+
pub request_type: i32,
|
|
429
|
+
}
|
|
430
|
+
/// Nested message and enum types in `IdentityRequest`.
|
|
431
|
+
pub mod identity_request {
|
|
432
|
+
#[derive(
|
|
433
|
+
Clone,
|
|
434
|
+
Copy,
|
|
435
|
+
Debug,
|
|
436
|
+
PartialEq,
|
|
437
|
+
Eq,
|
|
438
|
+
Hash,
|
|
439
|
+
PartialOrd,
|
|
440
|
+
Ord,
|
|
441
|
+
::prost::Enumeration
|
|
442
|
+
)]
|
|
443
|
+
#[repr(i32)]
|
|
444
|
+
pub enum Type {
|
|
445
|
+
FullIdentity = 0,
|
|
446
|
+
Balance = 1,
|
|
447
|
+
Keys = 2,
|
|
448
|
+
}
|
|
449
|
+
impl Type {
|
|
450
|
+
/// String value of the enum field names used in the ProtoBuf definition.
|
|
451
|
+
///
|
|
452
|
+
/// The values are not transformed in any way and thus are considered stable
|
|
453
|
+
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
|
|
454
|
+
pub fn as_str_name(&self) -> &'static str {
|
|
455
|
+
match self {
|
|
456
|
+
Type::FullIdentity => "FULL_IDENTITY",
|
|
457
|
+
Type::Balance => "BALANCE",
|
|
458
|
+
Type::Keys => "KEYS",
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
/// Creates an enum from field names used in the ProtoBuf definition.
|
|
462
|
+
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
|
|
463
|
+
match value {
|
|
464
|
+
"FULL_IDENTITY" => Some(Self::FullIdentity),
|
|
465
|
+
"BALANCE" => Some(Self::Balance),
|
|
466
|
+
"KEYS" => Some(Self::Keys),
|
|
467
|
+
_ => None,
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
473
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
474
|
+
pub struct ContractRequest {
|
|
475
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
476
|
+
pub contract_id: ::prost::alloc::vec::Vec<u8>,
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
480
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
481
|
+
pub struct GetProofsResponse {
|
|
482
|
+
#[prost(message, optional, tag = "1")]
|
|
483
|
+
pub proof: ::core::option::Option<Proof>,
|
|
484
|
+
#[prost(message, optional, tag = "2")]
|
|
485
|
+
pub metadata: ::core::option::Option<ResponseMetadata>,
|
|
486
|
+
}
|
|
487
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
488
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
489
|
+
pub struct GetDataContractRequest {
|
|
490
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
491
|
+
pub id: ::prost::alloc::vec::Vec<u8>,
|
|
492
|
+
#[prost(bool, tag = "2")]
|
|
493
|
+
pub prove: bool,
|
|
494
|
+
}
|
|
495
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
496
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
497
|
+
pub struct GetDataContractResponse {
|
|
498
|
+
#[prost(message, optional, tag = "3")]
|
|
499
|
+
pub metadata: ::core::option::Option<ResponseMetadata>,
|
|
500
|
+
#[prost(oneof = "get_data_contract_response::Result", tags = "1, 2")]
|
|
501
|
+
pub result: ::core::option::Option<get_data_contract_response::Result>,
|
|
502
|
+
}
|
|
503
|
+
/// Nested message and enum types in `GetDataContractResponse`.
|
|
504
|
+
pub mod get_data_contract_response {
|
|
505
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
506
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
507
|
+
pub enum Result {
|
|
508
|
+
#[prost(bytes, tag = "1")]
|
|
509
|
+
DataContract(::prost::alloc::vec::Vec<u8>),
|
|
510
|
+
#[prost(message, tag = "2")]
|
|
511
|
+
Proof(super::Proof),
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
515
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
516
|
+
pub struct GetDataContractsRequest {
|
|
517
|
+
#[prost(bytes = "vec", repeated, tag = "1")]
|
|
518
|
+
pub ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
|
|
519
|
+
#[prost(bool, tag = "2")]
|
|
520
|
+
pub prove: bool,
|
|
521
|
+
}
|
|
522
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
523
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
524
|
+
pub struct GetDataContractsResponse {
|
|
525
|
+
#[prost(message, optional, tag = "3")]
|
|
526
|
+
pub metadata: ::core::option::Option<ResponseMetadata>,
|
|
527
|
+
#[prost(oneof = "get_data_contracts_response::Result", tags = "1, 2")]
|
|
528
|
+
pub result: ::core::option::Option<get_data_contracts_response::Result>,
|
|
529
|
+
}
|
|
530
|
+
/// Nested message and enum types in `GetDataContractsResponse`.
|
|
531
|
+
pub mod get_data_contracts_response {
|
|
532
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
533
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
534
|
+
pub struct DataContractValue {
|
|
535
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
536
|
+
pub value: ::prost::alloc::vec::Vec<u8>,
|
|
537
|
+
}
|
|
538
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
539
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
540
|
+
pub struct DataContractEntry {
|
|
541
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
542
|
+
pub key: ::prost::alloc::vec::Vec<u8>,
|
|
543
|
+
#[prost(message, optional, tag = "2")]
|
|
544
|
+
pub value: ::core::option::Option<DataContractValue>,
|
|
545
|
+
}
|
|
546
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
547
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
548
|
+
pub struct DataContracts {
|
|
549
|
+
#[prost(message, repeated, tag = "1")]
|
|
550
|
+
pub data_contract_entries: ::prost::alloc::vec::Vec<DataContractEntry>,
|
|
551
|
+
}
|
|
552
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
553
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
554
|
+
pub enum Result {
|
|
555
|
+
#[prost(message, tag = "1")]
|
|
556
|
+
DataContracts(DataContracts),
|
|
557
|
+
#[prost(message, tag = "2")]
|
|
558
|
+
Proof(super::Proof),
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
562
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
563
|
+
pub struct GetDataContractHistoryRequest {
|
|
564
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
565
|
+
pub id: ::prost::alloc::vec::Vec<u8>,
|
|
566
|
+
#[prost(message, optional, tag = "2")]
|
|
567
|
+
pub limit: ::core::option::Option<u32>,
|
|
568
|
+
#[prost(message, optional, tag = "3")]
|
|
569
|
+
pub offset: ::core::option::Option<u32>,
|
|
570
|
+
#[prost(uint64, tag = "4")]
|
|
571
|
+
pub start_at_ms: u64,
|
|
572
|
+
#[prost(bool, tag = "5")]
|
|
573
|
+
pub prove: bool,
|
|
574
|
+
}
|
|
575
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
576
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
577
|
+
pub struct GetDataContractHistoryResponse {
|
|
578
|
+
#[prost(message, optional, tag = "3")]
|
|
579
|
+
pub metadata: ::core::option::Option<ResponseMetadata>,
|
|
580
|
+
#[prost(oneof = "get_data_contract_history_response::Result", tags = "1, 2")]
|
|
581
|
+
pub result: ::core::option::Option<get_data_contract_history_response::Result>,
|
|
582
|
+
}
|
|
583
|
+
/// Nested message and enum types in `GetDataContractHistoryResponse`.
|
|
584
|
+
pub mod get_data_contract_history_response {
|
|
585
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
586
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
587
|
+
pub struct DataContractHistoryEntry {
|
|
588
|
+
#[prost(uint64, tag = "1")]
|
|
589
|
+
pub date: u64,
|
|
590
|
+
#[prost(bytes = "vec", tag = "2")]
|
|
591
|
+
pub value: ::prost::alloc::vec::Vec<u8>,
|
|
592
|
+
}
|
|
593
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
594
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
595
|
+
pub struct DataContractHistory {
|
|
596
|
+
#[prost(message, repeated, tag = "1")]
|
|
597
|
+
pub data_contract_entries: ::prost::alloc::vec::Vec<DataContractHistoryEntry>,
|
|
598
|
+
}
|
|
599
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
600
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
601
|
+
pub enum Result {
|
|
602
|
+
#[prost(message, tag = "1")]
|
|
603
|
+
DataContractHistory(DataContractHistory),
|
|
604
|
+
#[prost(message, tag = "2")]
|
|
605
|
+
Proof(super::Proof),
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
609
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
610
|
+
pub struct GetDocumentsRequest {
|
|
611
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
612
|
+
pub data_contract_id: ::prost::alloc::vec::Vec<u8>,
|
|
613
|
+
#[prost(string, tag = "2")]
|
|
614
|
+
pub document_type: ::prost::alloc::string::String,
|
|
615
|
+
#[prost(bytes = "vec", tag = "3")]
|
|
616
|
+
pub r#where: ::prost::alloc::vec::Vec<u8>,
|
|
617
|
+
#[prost(bytes = "vec", tag = "4")]
|
|
618
|
+
pub order_by: ::prost::alloc::vec::Vec<u8>,
|
|
619
|
+
#[prost(uint32, tag = "5")]
|
|
620
|
+
pub limit: u32,
|
|
621
|
+
#[prost(bool, tag = "8")]
|
|
622
|
+
pub prove: bool,
|
|
623
|
+
#[prost(oneof = "get_documents_request::Start", tags = "6, 7")]
|
|
624
|
+
pub start: ::core::option::Option<get_documents_request::Start>,
|
|
625
|
+
}
|
|
626
|
+
/// Nested message and enum types in `GetDocumentsRequest`.
|
|
627
|
+
pub mod get_documents_request {
|
|
628
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
629
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
630
|
+
pub enum Start {
|
|
631
|
+
#[prost(bytes, tag = "6")]
|
|
632
|
+
StartAfter(::prost::alloc::vec::Vec<u8>),
|
|
633
|
+
#[prost(bytes, tag = "7")]
|
|
634
|
+
StartAt(::prost::alloc::vec::Vec<u8>),
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
638
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
639
|
+
pub struct GetDocumentsResponse {
|
|
640
|
+
#[prost(message, optional, tag = "3")]
|
|
641
|
+
pub metadata: ::core::option::Option<ResponseMetadata>,
|
|
642
|
+
#[prost(oneof = "get_documents_response::Result", tags = "1, 2")]
|
|
643
|
+
pub result: ::core::option::Option<get_documents_response::Result>,
|
|
644
|
+
}
|
|
645
|
+
/// Nested message and enum types in `GetDocumentsResponse`.
|
|
646
|
+
pub mod get_documents_response {
|
|
647
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
648
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
649
|
+
pub struct Documents {
|
|
650
|
+
#[prost(bytes = "vec", repeated, tag = "1")]
|
|
651
|
+
pub documents: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
|
|
652
|
+
}
|
|
653
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
654
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
655
|
+
pub enum Result {
|
|
656
|
+
#[prost(message, tag = "1")]
|
|
657
|
+
Documents(Documents),
|
|
658
|
+
#[prost(message, tag = "2")]
|
|
659
|
+
Proof(super::Proof),
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
663
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
664
|
+
pub struct GetIdentitiesByPublicKeyHashesRequest {
|
|
665
|
+
#[prost(bytes = "vec", repeated, tag = "1")]
|
|
666
|
+
pub public_key_hashes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
|
|
667
|
+
#[prost(bool, tag = "2")]
|
|
668
|
+
pub prove: bool,
|
|
669
|
+
}
|
|
670
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
671
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
672
|
+
pub struct GetIdentitiesByPublicKeyHashesResponse {
|
|
673
|
+
#[prost(message, optional, tag = "3")]
|
|
674
|
+
pub metadata: ::core::option::Option<ResponseMetadata>,
|
|
675
|
+
#[prost(
|
|
676
|
+
oneof = "get_identities_by_public_key_hashes_response::Result",
|
|
677
|
+
tags = "1, 2"
|
|
678
|
+
)]
|
|
679
|
+
pub result: ::core::option::Option<
|
|
680
|
+
get_identities_by_public_key_hashes_response::Result,
|
|
681
|
+
>,
|
|
682
|
+
}
|
|
683
|
+
/// Nested message and enum types in `GetIdentitiesByPublicKeyHashesResponse`.
|
|
684
|
+
pub mod get_identities_by_public_key_hashes_response {
|
|
685
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
686
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
687
|
+
pub struct Identities {
|
|
688
|
+
#[prost(bytes = "vec", repeated, tag = "1")]
|
|
689
|
+
pub identities: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
|
|
690
|
+
}
|
|
691
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
692
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
693
|
+
pub enum Result {
|
|
694
|
+
#[prost(message, tag = "1")]
|
|
695
|
+
Identities(Identities),
|
|
696
|
+
#[prost(message, tag = "2")]
|
|
697
|
+
Proof(super::Proof),
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
701
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
702
|
+
pub struct GetIdentityByPublicKeyHashesRequest {
|
|
703
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
704
|
+
pub public_key_hash: ::prost::alloc::vec::Vec<u8>,
|
|
705
|
+
#[prost(bool, tag = "2")]
|
|
706
|
+
pub prove: bool,
|
|
707
|
+
}
|
|
708
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
709
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
710
|
+
pub struct GetIdentityByPublicKeyHashesResponse {
|
|
711
|
+
#[prost(message, optional, tag = "3")]
|
|
712
|
+
pub metadata: ::core::option::Option<ResponseMetadata>,
|
|
713
|
+
#[prost(oneof = "get_identity_by_public_key_hashes_response::Result", tags = "1, 2")]
|
|
714
|
+
pub result: ::core::option::Option<
|
|
715
|
+
get_identity_by_public_key_hashes_response::Result,
|
|
716
|
+
>,
|
|
717
|
+
}
|
|
718
|
+
/// Nested message and enum types in `GetIdentityByPublicKeyHashesResponse`.
|
|
719
|
+
pub mod get_identity_by_public_key_hashes_response {
|
|
720
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
721
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
722
|
+
pub enum Result {
|
|
723
|
+
#[prost(bytes, tag = "1")]
|
|
724
|
+
Identity(::prost::alloc::vec::Vec<u8>),
|
|
725
|
+
#[prost(message, tag = "2")]
|
|
726
|
+
Proof(super::Proof),
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
730
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
731
|
+
pub struct WaitForStateTransitionResultRequest {
|
|
732
|
+
#[prost(bytes = "vec", tag = "1")]
|
|
733
|
+
pub state_transition_hash: ::prost::alloc::vec::Vec<u8>,
|
|
734
|
+
#[prost(bool, tag = "2")]
|
|
735
|
+
pub prove: bool,
|
|
736
|
+
}
|
|
737
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
738
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
739
|
+
pub struct WaitForStateTransitionResultResponse {
|
|
740
|
+
#[prost(message, optional, tag = "3")]
|
|
741
|
+
pub metadata: ::core::option::Option<ResponseMetadata>,
|
|
742
|
+
#[prost(oneof = "wait_for_state_transition_result_response::Result", tags = "1, 2")]
|
|
743
|
+
pub result: ::core::option::Option<
|
|
744
|
+
wait_for_state_transition_result_response::Result,
|
|
745
|
+
>,
|
|
746
|
+
}
|
|
747
|
+
/// Nested message and enum types in `WaitForStateTransitionResultResponse`.
|
|
748
|
+
pub mod wait_for_state_transition_result_response {
|
|
749
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
750
|
+
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
751
|
+
pub enum Result {
|
|
752
|
+
#[prost(message, tag = "1")]
|
|
753
|
+
Error(super::StateTransitionBroadcastError),
|
|
754
|
+
#[prost(message, tag = "2")]
|
|
755
|
+
Proof(super::Proof),
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
759
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
760
|
+
pub struct ConsensusParamsBlock {
|
|
761
|
+
#[prost(string, tag = "1")]
|
|
762
|
+
pub max_bytes: ::prost::alloc::string::String,
|
|
763
|
+
#[prost(string, tag = "2")]
|
|
764
|
+
pub max_gas: ::prost::alloc::string::String,
|
|
765
|
+
#[prost(string, tag = "3")]
|
|
766
|
+
pub time_iota_ms: ::prost::alloc::string::String,
|
|
767
|
+
}
|
|
768
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
769
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
770
|
+
pub struct ConsensusParamsEvidence {
|
|
771
|
+
#[prost(string, tag = "1")]
|
|
772
|
+
pub max_age_num_blocks: ::prost::alloc::string::String,
|
|
773
|
+
#[prost(string, tag = "2")]
|
|
774
|
+
pub max_age_duration: ::prost::alloc::string::String,
|
|
775
|
+
#[prost(string, tag = "3")]
|
|
776
|
+
pub max_bytes: ::prost::alloc::string::String,
|
|
777
|
+
}
|
|
778
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
779
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
780
|
+
pub struct GetConsensusParamsRequest {
|
|
781
|
+
#[prost(int64, tag = "1")]
|
|
782
|
+
pub height: i64,
|
|
783
|
+
#[prost(bool, tag = "2")]
|
|
784
|
+
pub prove: bool,
|
|
785
|
+
}
|
|
786
|
+
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
787
|
+
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
788
|
+
pub struct GetConsensusParamsResponse {
|
|
789
|
+
#[prost(message, optional, tag = "1")]
|
|
790
|
+
pub block: ::core::option::Option<ConsensusParamsBlock>,
|
|
791
|
+
#[prost(message, optional, tag = "2")]
|
|
792
|
+
pub evidence: ::core::option::Option<ConsensusParamsEvidence>,
|
|
793
|
+
}
|
|
794
|
+
/// Generated client implementations.
|
|
795
|
+
pub mod platform_client {
|
|
796
|
+
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
|
797
|
+
use tonic::codegen::*;
|
|
798
|
+
use tonic::codegen::http::Uri;
|
|
799
|
+
#[derive(Debug, Clone)]
|
|
800
|
+
pub struct PlatformClient<T> {
|
|
801
|
+
inner: tonic::client::Grpc<T>,
|
|
802
|
+
}
|
|
803
|
+
impl PlatformClient<tonic::transport::Channel> {
|
|
804
|
+
/// Attempt to create a new client by connecting to a given endpoint.
|
|
805
|
+
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
|
|
806
|
+
where
|
|
807
|
+
D: TryInto<tonic::transport::Endpoint>,
|
|
808
|
+
D::Error: Into<StdError>,
|
|
809
|
+
{
|
|
810
|
+
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
|
|
811
|
+
Ok(Self::new(conn))
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
impl<T> PlatformClient<T>
|
|
815
|
+
where
|
|
816
|
+
T: tonic::client::GrpcService<tonic::body::BoxBody>,
|
|
817
|
+
T::Error: Into<StdError>,
|
|
818
|
+
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
|
|
819
|
+
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
|
|
820
|
+
{
|
|
821
|
+
pub fn new(inner: T) -> Self {
|
|
822
|
+
let inner = tonic::client::Grpc::new(inner);
|
|
823
|
+
Self { inner }
|
|
824
|
+
}
|
|
825
|
+
pub fn with_origin(inner: T, origin: Uri) -> Self {
|
|
826
|
+
let inner = tonic::client::Grpc::with_origin(inner, origin);
|
|
827
|
+
Self { inner }
|
|
828
|
+
}
|
|
829
|
+
pub fn with_interceptor<F>(
|
|
830
|
+
inner: T,
|
|
831
|
+
interceptor: F,
|
|
832
|
+
) -> PlatformClient<InterceptedService<T, F>>
|
|
833
|
+
where
|
|
834
|
+
F: tonic::service::Interceptor,
|
|
835
|
+
T::ResponseBody: Default,
|
|
836
|
+
T: tonic::codegen::Service<
|
|
837
|
+
http::Request<tonic::body::BoxBody>,
|
|
838
|
+
Response = http::Response<
|
|
839
|
+
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
|
|
840
|
+
>,
|
|
841
|
+
>,
|
|
842
|
+
<T as tonic::codegen::Service<
|
|
843
|
+
http::Request<tonic::body::BoxBody>,
|
|
844
|
+
>>::Error: Into<StdError> + Send + Sync,
|
|
845
|
+
{
|
|
846
|
+
PlatformClient::new(InterceptedService::new(inner, interceptor))
|
|
847
|
+
}
|
|
848
|
+
/// Compress requests with the given encoding.
|
|
849
|
+
///
|
|
850
|
+
/// This requires the server to support it otherwise it might respond with an
|
|
851
|
+
/// error.
|
|
852
|
+
#[must_use]
|
|
853
|
+
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
|
854
|
+
self.inner = self.inner.send_compressed(encoding);
|
|
855
|
+
self
|
|
856
|
+
}
|
|
857
|
+
/// Enable decompressing responses.
|
|
858
|
+
#[must_use]
|
|
859
|
+
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
|
860
|
+
self.inner = self.inner.accept_compressed(encoding);
|
|
861
|
+
self
|
|
862
|
+
}
|
|
863
|
+
/// Limits the maximum size of a decoded message.
|
|
864
|
+
///
|
|
865
|
+
/// Default: `4MB`
|
|
866
|
+
#[must_use]
|
|
867
|
+
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
|
|
868
|
+
self.inner = self.inner.max_decoding_message_size(limit);
|
|
869
|
+
self
|
|
870
|
+
}
|
|
871
|
+
/// Limits the maximum size of an encoded message.
|
|
872
|
+
///
|
|
873
|
+
/// Default: `usize::MAX`
|
|
874
|
+
#[must_use]
|
|
875
|
+
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
|
|
876
|
+
self.inner = self.inner.max_encoding_message_size(limit);
|
|
877
|
+
self
|
|
878
|
+
}
|
|
879
|
+
pub async fn broadcast_state_transition(
|
|
880
|
+
&mut self,
|
|
881
|
+
request: impl tonic::IntoRequest<super::BroadcastStateTransitionRequest>,
|
|
882
|
+
) -> std::result::Result<
|
|
883
|
+
tonic::Response<super::BroadcastStateTransitionResponse>,
|
|
884
|
+
tonic::Status,
|
|
885
|
+
> {
|
|
886
|
+
self.inner
|
|
887
|
+
.ready()
|
|
888
|
+
.await
|
|
889
|
+
.map_err(|e| {
|
|
890
|
+
tonic::Status::new(
|
|
891
|
+
tonic::Code::Unknown,
|
|
892
|
+
format!("Service was not ready: {}", e.into()),
|
|
893
|
+
)
|
|
894
|
+
})?;
|
|
895
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
896
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
897
|
+
"/org.dash.platform.dapi.v0.Platform/broadcastStateTransition",
|
|
898
|
+
);
|
|
899
|
+
let mut req = request.into_request();
|
|
900
|
+
req.extensions_mut()
|
|
901
|
+
.insert(
|
|
902
|
+
GrpcMethod::new(
|
|
903
|
+
"org.dash.platform.dapi.v0.Platform",
|
|
904
|
+
"broadcastStateTransition",
|
|
905
|
+
),
|
|
906
|
+
);
|
|
907
|
+
self.inner.unary(req, path, codec).await
|
|
908
|
+
}
|
|
909
|
+
pub async fn get_identity(
|
|
910
|
+
&mut self,
|
|
911
|
+
request: impl tonic::IntoRequest<super::GetIdentityRequest>,
|
|
912
|
+
) -> std::result::Result<
|
|
913
|
+
tonic::Response<super::GetIdentityResponse>,
|
|
914
|
+
tonic::Status,
|
|
915
|
+
> {
|
|
916
|
+
self.inner
|
|
917
|
+
.ready()
|
|
918
|
+
.await
|
|
919
|
+
.map_err(|e| {
|
|
920
|
+
tonic::Status::new(
|
|
921
|
+
tonic::Code::Unknown,
|
|
922
|
+
format!("Service was not ready: {}", e.into()),
|
|
923
|
+
)
|
|
924
|
+
})?;
|
|
925
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
926
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
927
|
+
"/org.dash.platform.dapi.v0.Platform/getIdentity",
|
|
928
|
+
);
|
|
929
|
+
let mut req = request.into_request();
|
|
930
|
+
req.extensions_mut()
|
|
931
|
+
.insert(
|
|
932
|
+
GrpcMethod::new("org.dash.platform.dapi.v0.Platform", "getIdentity"),
|
|
933
|
+
);
|
|
934
|
+
self.inner.unary(req, path, codec).await
|
|
935
|
+
}
|
|
936
|
+
pub async fn get_identities(
|
|
937
|
+
&mut self,
|
|
938
|
+
request: impl tonic::IntoRequest<super::GetIdentitiesRequest>,
|
|
939
|
+
) -> std::result::Result<
|
|
940
|
+
tonic::Response<super::GetIdentitiesResponse>,
|
|
941
|
+
tonic::Status,
|
|
942
|
+
> {
|
|
943
|
+
self.inner
|
|
944
|
+
.ready()
|
|
945
|
+
.await
|
|
946
|
+
.map_err(|e| {
|
|
947
|
+
tonic::Status::new(
|
|
948
|
+
tonic::Code::Unknown,
|
|
949
|
+
format!("Service was not ready: {}", e.into()),
|
|
950
|
+
)
|
|
951
|
+
})?;
|
|
952
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
953
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
954
|
+
"/org.dash.platform.dapi.v0.Platform/getIdentities",
|
|
955
|
+
);
|
|
956
|
+
let mut req = request.into_request();
|
|
957
|
+
req.extensions_mut()
|
|
958
|
+
.insert(
|
|
959
|
+
GrpcMethod::new(
|
|
960
|
+
"org.dash.platform.dapi.v0.Platform",
|
|
961
|
+
"getIdentities",
|
|
962
|
+
),
|
|
963
|
+
);
|
|
964
|
+
self.inner.unary(req, path, codec).await
|
|
965
|
+
}
|
|
966
|
+
pub async fn get_identity_keys(
|
|
967
|
+
&mut self,
|
|
968
|
+
request: impl tonic::IntoRequest<super::GetIdentityKeysRequest>,
|
|
969
|
+
) -> std::result::Result<
|
|
970
|
+
tonic::Response<super::GetIdentityKeysResponse>,
|
|
971
|
+
tonic::Status,
|
|
972
|
+
> {
|
|
973
|
+
self.inner
|
|
974
|
+
.ready()
|
|
975
|
+
.await
|
|
976
|
+
.map_err(|e| {
|
|
977
|
+
tonic::Status::new(
|
|
978
|
+
tonic::Code::Unknown,
|
|
979
|
+
format!("Service was not ready: {}", e.into()),
|
|
980
|
+
)
|
|
981
|
+
})?;
|
|
982
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
983
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
984
|
+
"/org.dash.platform.dapi.v0.Platform/getIdentityKeys",
|
|
985
|
+
);
|
|
986
|
+
let mut req = request.into_request();
|
|
987
|
+
req.extensions_mut()
|
|
988
|
+
.insert(
|
|
989
|
+
GrpcMethod::new(
|
|
990
|
+
"org.dash.platform.dapi.v0.Platform",
|
|
991
|
+
"getIdentityKeys",
|
|
992
|
+
),
|
|
993
|
+
);
|
|
994
|
+
self.inner.unary(req, path, codec).await
|
|
995
|
+
}
|
|
996
|
+
/// rpc getIdentitiesKeys (GetIdentitiesKeysRequest) returns (GetIdentitiesKeysResponse);
|
|
997
|
+
pub async fn get_identity_balance(
|
|
998
|
+
&mut self,
|
|
999
|
+
request: impl tonic::IntoRequest<super::GetIdentityRequest>,
|
|
1000
|
+
) -> std::result::Result<
|
|
1001
|
+
tonic::Response<super::GetIdentityBalanceResponse>,
|
|
1002
|
+
tonic::Status,
|
|
1003
|
+
> {
|
|
1004
|
+
self.inner
|
|
1005
|
+
.ready()
|
|
1006
|
+
.await
|
|
1007
|
+
.map_err(|e| {
|
|
1008
|
+
tonic::Status::new(
|
|
1009
|
+
tonic::Code::Unknown,
|
|
1010
|
+
format!("Service was not ready: {}", e.into()),
|
|
1011
|
+
)
|
|
1012
|
+
})?;
|
|
1013
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
1014
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
1015
|
+
"/org.dash.platform.dapi.v0.Platform/getIdentityBalance",
|
|
1016
|
+
);
|
|
1017
|
+
let mut req = request.into_request();
|
|
1018
|
+
req.extensions_mut()
|
|
1019
|
+
.insert(
|
|
1020
|
+
GrpcMethod::new(
|
|
1021
|
+
"org.dash.platform.dapi.v0.Platform",
|
|
1022
|
+
"getIdentityBalance",
|
|
1023
|
+
),
|
|
1024
|
+
);
|
|
1025
|
+
self.inner.unary(req, path, codec).await
|
|
1026
|
+
}
|
|
1027
|
+
pub async fn get_identity_balance_and_revision(
|
|
1028
|
+
&mut self,
|
|
1029
|
+
request: impl tonic::IntoRequest<super::GetIdentityRequest>,
|
|
1030
|
+
) -> std::result::Result<
|
|
1031
|
+
tonic::Response<super::GetIdentityBalanceAndRevisionResponse>,
|
|
1032
|
+
tonic::Status,
|
|
1033
|
+
> {
|
|
1034
|
+
self.inner
|
|
1035
|
+
.ready()
|
|
1036
|
+
.await
|
|
1037
|
+
.map_err(|e| {
|
|
1038
|
+
tonic::Status::new(
|
|
1039
|
+
tonic::Code::Unknown,
|
|
1040
|
+
format!("Service was not ready: {}", e.into()),
|
|
1041
|
+
)
|
|
1042
|
+
})?;
|
|
1043
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
1044
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
1045
|
+
"/org.dash.platform.dapi.v0.Platform/getIdentityBalanceAndRevision",
|
|
1046
|
+
);
|
|
1047
|
+
let mut req = request.into_request();
|
|
1048
|
+
req.extensions_mut()
|
|
1049
|
+
.insert(
|
|
1050
|
+
GrpcMethod::new(
|
|
1051
|
+
"org.dash.platform.dapi.v0.Platform",
|
|
1052
|
+
"getIdentityBalanceAndRevision",
|
|
1053
|
+
),
|
|
1054
|
+
);
|
|
1055
|
+
self.inner.unary(req, path, codec).await
|
|
1056
|
+
}
|
|
1057
|
+
pub async fn get_proofs(
|
|
1058
|
+
&mut self,
|
|
1059
|
+
request: impl tonic::IntoRequest<super::GetProofsRequest>,
|
|
1060
|
+
) -> std::result::Result<
|
|
1061
|
+
tonic::Response<super::GetProofsResponse>,
|
|
1062
|
+
tonic::Status,
|
|
1063
|
+
> {
|
|
1064
|
+
self.inner
|
|
1065
|
+
.ready()
|
|
1066
|
+
.await
|
|
1067
|
+
.map_err(|e| {
|
|
1068
|
+
tonic::Status::new(
|
|
1069
|
+
tonic::Code::Unknown,
|
|
1070
|
+
format!("Service was not ready: {}", e.into()),
|
|
1071
|
+
)
|
|
1072
|
+
})?;
|
|
1073
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
1074
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
1075
|
+
"/org.dash.platform.dapi.v0.Platform/getProofs",
|
|
1076
|
+
);
|
|
1077
|
+
let mut req = request.into_request();
|
|
1078
|
+
req.extensions_mut()
|
|
1079
|
+
.insert(
|
|
1080
|
+
GrpcMethod::new("org.dash.platform.dapi.v0.Platform", "getProofs"),
|
|
1081
|
+
);
|
|
1082
|
+
self.inner.unary(req, path, codec).await
|
|
1083
|
+
}
|
|
1084
|
+
pub async fn get_data_contract(
|
|
1085
|
+
&mut self,
|
|
1086
|
+
request: impl tonic::IntoRequest<super::GetDataContractRequest>,
|
|
1087
|
+
) -> std::result::Result<
|
|
1088
|
+
tonic::Response<super::GetDataContractResponse>,
|
|
1089
|
+
tonic::Status,
|
|
1090
|
+
> {
|
|
1091
|
+
self.inner
|
|
1092
|
+
.ready()
|
|
1093
|
+
.await
|
|
1094
|
+
.map_err(|e| {
|
|
1095
|
+
tonic::Status::new(
|
|
1096
|
+
tonic::Code::Unknown,
|
|
1097
|
+
format!("Service was not ready: {}", e.into()),
|
|
1098
|
+
)
|
|
1099
|
+
})?;
|
|
1100
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
1101
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
1102
|
+
"/org.dash.platform.dapi.v0.Platform/getDataContract",
|
|
1103
|
+
);
|
|
1104
|
+
let mut req = request.into_request();
|
|
1105
|
+
req.extensions_mut()
|
|
1106
|
+
.insert(
|
|
1107
|
+
GrpcMethod::new(
|
|
1108
|
+
"org.dash.platform.dapi.v0.Platform",
|
|
1109
|
+
"getDataContract",
|
|
1110
|
+
),
|
|
1111
|
+
);
|
|
1112
|
+
self.inner.unary(req, path, codec).await
|
|
1113
|
+
}
|
|
1114
|
+
pub async fn get_data_contract_history(
|
|
1115
|
+
&mut self,
|
|
1116
|
+
request: impl tonic::IntoRequest<super::GetDataContractHistoryRequest>,
|
|
1117
|
+
) -> std::result::Result<
|
|
1118
|
+
tonic::Response<super::GetDataContractHistoryResponse>,
|
|
1119
|
+
tonic::Status,
|
|
1120
|
+
> {
|
|
1121
|
+
self.inner
|
|
1122
|
+
.ready()
|
|
1123
|
+
.await
|
|
1124
|
+
.map_err(|e| {
|
|
1125
|
+
tonic::Status::new(
|
|
1126
|
+
tonic::Code::Unknown,
|
|
1127
|
+
format!("Service was not ready: {}", e.into()),
|
|
1128
|
+
)
|
|
1129
|
+
})?;
|
|
1130
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
1131
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
1132
|
+
"/org.dash.platform.dapi.v0.Platform/getDataContractHistory",
|
|
1133
|
+
);
|
|
1134
|
+
let mut req = request.into_request();
|
|
1135
|
+
req.extensions_mut()
|
|
1136
|
+
.insert(
|
|
1137
|
+
GrpcMethod::new(
|
|
1138
|
+
"org.dash.platform.dapi.v0.Platform",
|
|
1139
|
+
"getDataContractHistory",
|
|
1140
|
+
),
|
|
1141
|
+
);
|
|
1142
|
+
self.inner.unary(req, path, codec).await
|
|
1143
|
+
}
|
|
1144
|
+
pub async fn get_data_contracts(
|
|
1145
|
+
&mut self,
|
|
1146
|
+
request: impl tonic::IntoRequest<super::GetDataContractsRequest>,
|
|
1147
|
+
) -> std::result::Result<
|
|
1148
|
+
tonic::Response<super::GetDataContractsResponse>,
|
|
1149
|
+
tonic::Status,
|
|
1150
|
+
> {
|
|
1151
|
+
self.inner
|
|
1152
|
+
.ready()
|
|
1153
|
+
.await
|
|
1154
|
+
.map_err(|e| {
|
|
1155
|
+
tonic::Status::new(
|
|
1156
|
+
tonic::Code::Unknown,
|
|
1157
|
+
format!("Service was not ready: {}", e.into()),
|
|
1158
|
+
)
|
|
1159
|
+
})?;
|
|
1160
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
1161
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
1162
|
+
"/org.dash.platform.dapi.v0.Platform/getDataContracts",
|
|
1163
|
+
);
|
|
1164
|
+
let mut req = request.into_request();
|
|
1165
|
+
req.extensions_mut()
|
|
1166
|
+
.insert(
|
|
1167
|
+
GrpcMethod::new(
|
|
1168
|
+
"org.dash.platform.dapi.v0.Platform",
|
|
1169
|
+
"getDataContracts",
|
|
1170
|
+
),
|
|
1171
|
+
);
|
|
1172
|
+
self.inner.unary(req, path, codec).await
|
|
1173
|
+
}
|
|
1174
|
+
pub async fn get_documents(
|
|
1175
|
+
&mut self,
|
|
1176
|
+
request: impl tonic::IntoRequest<super::GetDocumentsRequest>,
|
|
1177
|
+
) -> std::result::Result<
|
|
1178
|
+
tonic::Response<super::GetDocumentsResponse>,
|
|
1179
|
+
tonic::Status,
|
|
1180
|
+
> {
|
|
1181
|
+
self.inner
|
|
1182
|
+
.ready()
|
|
1183
|
+
.await
|
|
1184
|
+
.map_err(|e| {
|
|
1185
|
+
tonic::Status::new(
|
|
1186
|
+
tonic::Code::Unknown,
|
|
1187
|
+
format!("Service was not ready: {}", e.into()),
|
|
1188
|
+
)
|
|
1189
|
+
})?;
|
|
1190
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
1191
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
1192
|
+
"/org.dash.platform.dapi.v0.Platform/getDocuments",
|
|
1193
|
+
);
|
|
1194
|
+
let mut req = request.into_request();
|
|
1195
|
+
req.extensions_mut()
|
|
1196
|
+
.insert(
|
|
1197
|
+
GrpcMethod::new("org.dash.platform.dapi.v0.Platform", "getDocuments"),
|
|
1198
|
+
);
|
|
1199
|
+
self.inner.unary(req, path, codec).await
|
|
1200
|
+
}
|
|
1201
|
+
pub async fn get_identities_by_public_key_hashes(
|
|
1202
|
+
&mut self,
|
|
1203
|
+
request: impl tonic::IntoRequest<
|
|
1204
|
+
super::GetIdentitiesByPublicKeyHashesRequest,
|
|
1205
|
+
>,
|
|
1206
|
+
) -> std::result::Result<
|
|
1207
|
+
tonic::Response<super::GetIdentitiesByPublicKeyHashesResponse>,
|
|
1208
|
+
tonic::Status,
|
|
1209
|
+
> {
|
|
1210
|
+
self.inner
|
|
1211
|
+
.ready()
|
|
1212
|
+
.await
|
|
1213
|
+
.map_err(|e| {
|
|
1214
|
+
tonic::Status::new(
|
|
1215
|
+
tonic::Code::Unknown,
|
|
1216
|
+
format!("Service was not ready: {}", e.into()),
|
|
1217
|
+
)
|
|
1218
|
+
})?;
|
|
1219
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
1220
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
1221
|
+
"/org.dash.platform.dapi.v0.Platform/getIdentitiesByPublicKeyHashes",
|
|
1222
|
+
);
|
|
1223
|
+
let mut req = request.into_request();
|
|
1224
|
+
req.extensions_mut()
|
|
1225
|
+
.insert(
|
|
1226
|
+
GrpcMethod::new(
|
|
1227
|
+
"org.dash.platform.dapi.v0.Platform",
|
|
1228
|
+
"getIdentitiesByPublicKeyHashes",
|
|
1229
|
+
),
|
|
1230
|
+
);
|
|
1231
|
+
self.inner.unary(req, path, codec).await
|
|
1232
|
+
}
|
|
1233
|
+
pub async fn get_identity_by_public_key_hashes(
|
|
1234
|
+
&mut self,
|
|
1235
|
+
request: impl tonic::IntoRequest<super::GetIdentityByPublicKeyHashesRequest>,
|
|
1236
|
+
) -> std::result::Result<
|
|
1237
|
+
tonic::Response<super::GetIdentityByPublicKeyHashesResponse>,
|
|
1238
|
+
tonic::Status,
|
|
1239
|
+
> {
|
|
1240
|
+
self.inner
|
|
1241
|
+
.ready()
|
|
1242
|
+
.await
|
|
1243
|
+
.map_err(|e| {
|
|
1244
|
+
tonic::Status::new(
|
|
1245
|
+
tonic::Code::Unknown,
|
|
1246
|
+
format!("Service was not ready: {}", e.into()),
|
|
1247
|
+
)
|
|
1248
|
+
})?;
|
|
1249
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
1250
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
1251
|
+
"/org.dash.platform.dapi.v0.Platform/getIdentityByPublicKeyHashes",
|
|
1252
|
+
);
|
|
1253
|
+
let mut req = request.into_request();
|
|
1254
|
+
req.extensions_mut()
|
|
1255
|
+
.insert(
|
|
1256
|
+
GrpcMethod::new(
|
|
1257
|
+
"org.dash.platform.dapi.v0.Platform",
|
|
1258
|
+
"getIdentityByPublicKeyHashes",
|
|
1259
|
+
),
|
|
1260
|
+
);
|
|
1261
|
+
self.inner.unary(req, path, codec).await
|
|
1262
|
+
}
|
|
1263
|
+
pub async fn wait_for_state_transition_result(
|
|
1264
|
+
&mut self,
|
|
1265
|
+
request: impl tonic::IntoRequest<super::WaitForStateTransitionResultRequest>,
|
|
1266
|
+
) -> std::result::Result<
|
|
1267
|
+
tonic::Response<super::WaitForStateTransitionResultResponse>,
|
|
1268
|
+
tonic::Status,
|
|
1269
|
+
> {
|
|
1270
|
+
self.inner
|
|
1271
|
+
.ready()
|
|
1272
|
+
.await
|
|
1273
|
+
.map_err(|e| {
|
|
1274
|
+
tonic::Status::new(
|
|
1275
|
+
tonic::Code::Unknown,
|
|
1276
|
+
format!("Service was not ready: {}", e.into()),
|
|
1277
|
+
)
|
|
1278
|
+
})?;
|
|
1279
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
1280
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
1281
|
+
"/org.dash.platform.dapi.v0.Platform/waitForStateTransitionResult",
|
|
1282
|
+
);
|
|
1283
|
+
let mut req = request.into_request();
|
|
1284
|
+
req.extensions_mut()
|
|
1285
|
+
.insert(
|
|
1286
|
+
GrpcMethod::new(
|
|
1287
|
+
"org.dash.platform.dapi.v0.Platform",
|
|
1288
|
+
"waitForStateTransitionResult",
|
|
1289
|
+
),
|
|
1290
|
+
);
|
|
1291
|
+
self.inner.unary(req, path, codec).await
|
|
1292
|
+
}
|
|
1293
|
+
pub async fn get_consensus_params(
|
|
1294
|
+
&mut self,
|
|
1295
|
+
request: impl tonic::IntoRequest<super::GetConsensusParamsRequest>,
|
|
1296
|
+
) -> std::result::Result<
|
|
1297
|
+
tonic::Response<super::GetConsensusParamsResponse>,
|
|
1298
|
+
tonic::Status,
|
|
1299
|
+
> {
|
|
1300
|
+
self.inner
|
|
1301
|
+
.ready()
|
|
1302
|
+
.await
|
|
1303
|
+
.map_err(|e| {
|
|
1304
|
+
tonic::Status::new(
|
|
1305
|
+
tonic::Code::Unknown,
|
|
1306
|
+
format!("Service was not ready: {}", e.into()),
|
|
1307
|
+
)
|
|
1308
|
+
})?;
|
|
1309
|
+
let codec = tonic::codec::ProstCodec::default();
|
|
1310
|
+
let path = http::uri::PathAndQuery::from_static(
|
|
1311
|
+
"/org.dash.platform.dapi.v0.Platform/getConsensusParams",
|
|
1312
|
+
);
|
|
1313
|
+
let mut req = request.into_request();
|
|
1314
|
+
req.extensions_mut()
|
|
1315
|
+
.insert(
|
|
1316
|
+
GrpcMethod::new(
|
|
1317
|
+
"org.dash.platform.dapi.v0.Platform",
|
|
1318
|
+
"getConsensusParams",
|
|
1319
|
+
),
|
|
1320
|
+
);
|
|
1321
|
+
self.inner.unary(req, path, codec).await
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
}
|