@dashevo/dapi-grpc 1.0.0-pr.1621.9 → 1.0.0-pr.1694.2
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 +5 -3
- package/build.rs +33 -15
- package/clients/core/v0/rust/core_example.rs +1 -1
- package/clients/platform/v0/rust/platform_example.rs +1 -1
- package/package.json +2 -2
- package/src/core/proto/org.dash.platform.dapi.v0.rs +55 -0
- package/src/lib.rs +6 -0
- package/src/mock.rs +68 -0
- package/src/platform/proto/org.dash.platform.dapi.v0.rs +101 -0
package/Cargo.toml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "dapi-grpc"
|
|
3
3
|
description = "GRPC client for Dash Platform"
|
|
4
|
-
version = "1.0.0-pr.
|
|
4
|
+
version = "1.0.0-pr.1694.2"
|
|
5
5
|
authors = [
|
|
6
6
|
"Samuel Westrich <sam@dash.org>",
|
|
7
7
|
"Igor Markin <igor.markin@dash.org>",
|
|
@@ -10,7 +10,7 @@ authors = [
|
|
|
10
10
|
"Ivan Shumkov <shumkov@dash.org>",
|
|
11
11
|
]
|
|
12
12
|
edition = "2021"
|
|
13
|
-
rust-version = "1.
|
|
13
|
+
rust-version = "1.76"
|
|
14
14
|
license = "MIT"
|
|
15
15
|
|
|
16
16
|
[features]
|
|
@@ -21,6 +21,7 @@ platform = []
|
|
|
21
21
|
tenderdash-proto = []
|
|
22
22
|
client = ["tonic/channel", "tonic/tls", "tonic/tls-roots", "platform"]
|
|
23
23
|
serde = ["dep:serde", "dep:serde_bytes"]
|
|
24
|
+
mocks = ["dep:serde_json"]
|
|
24
25
|
|
|
25
26
|
[dependencies]
|
|
26
27
|
prost = { version = "0.11.9" }
|
|
@@ -30,7 +31,8 @@ tonic = { version = "0.9.2", features = [
|
|
|
30
31
|
], default-features = false }
|
|
31
32
|
serde = { version = "1.0.171", optional = true, features = ["derive"] }
|
|
32
33
|
serde_bytes = { version = "0.11.12", optional = true }
|
|
33
|
-
|
|
34
|
+
serde_json = { version = "1.0", optional = true }
|
|
35
|
+
tenderdash-proto = { git = "https://github.com/dashpay/rs-tenderdash-abci", version = "0.14.0-dev.6" }
|
|
34
36
|
dapi-grpc-macros = { path = "../rs-dapi-grpc-macros" }
|
|
35
37
|
platform-version = { path = "../rs-platform-version" }
|
|
36
38
|
|
package/build.rs
CHANGED
|
@@ -6,7 +6,21 @@ use std::{
|
|
|
6
6
|
use tonic_build::Builder;
|
|
7
7
|
|
|
8
8
|
fn main() {
|
|
9
|
-
|
|
9
|
+
let core = MappingConfig::new(
|
|
10
|
+
PathBuf::from("protos/core/v0/core.proto"),
|
|
11
|
+
PathBuf::from("src/core/proto"),
|
|
12
|
+
);
|
|
13
|
+
configure_core(core)
|
|
14
|
+
.generate()
|
|
15
|
+
.expect("generate core proto");
|
|
16
|
+
|
|
17
|
+
let platform = MappingConfig::new(
|
|
18
|
+
PathBuf::from("protos/platform/v0/platform.proto"),
|
|
19
|
+
PathBuf::from("src/platform/proto"),
|
|
20
|
+
);
|
|
21
|
+
configure_platform(platform)
|
|
22
|
+
.generate()
|
|
23
|
+
.expect("generate platform proto");
|
|
10
24
|
|
|
11
25
|
println!("cargo:rerun-if-changed=./protos");
|
|
12
26
|
println!("cargo:rerun-if-env-changed=CARGO_FEATURE_SERDE");
|
|
@@ -18,19 +32,8 @@ struct MappingConfig {
|
|
|
18
32
|
builder: Builder,
|
|
19
33
|
proto_includes: Vec<PathBuf>,
|
|
20
34
|
}
|
|
21
|
-
/// Generate Rust definitions from Protobuf definitions
|
|
22
|
-
pub fn generate() -> Result<(), std::io::Error> {
|
|
23
|
-
let core = MappingConfig::new(
|
|
24
|
-
PathBuf::from("protos/core/v0/core.proto"),
|
|
25
|
-
PathBuf::from("src/core/proto"),
|
|
26
|
-
);
|
|
27
|
-
core.generate().unwrap();
|
|
28
|
-
|
|
29
|
-
let mut platform = MappingConfig::new(
|
|
30
|
-
PathBuf::from("protos/platform/v0/platform.proto"),
|
|
31
|
-
PathBuf::from("src/platform/proto"),
|
|
32
|
-
);
|
|
33
35
|
|
|
36
|
+
fn configure_platform(mut platform: MappingConfig) -> MappingConfig {
|
|
34
37
|
// Derive features for versioned messages
|
|
35
38
|
//
|
|
36
39
|
// "GetConsensusParamsRequest" is excluded as this message does not support proofs
|
|
@@ -92,6 +95,9 @@ pub fn generate() -> Result<(), std::io::Error> {
|
|
|
92
95
|
.message_attribute(msg, r#"#[grpc_versions(0)]"#);
|
|
93
96
|
}
|
|
94
97
|
|
|
98
|
+
// All messages can be mocked.
|
|
99
|
+
platform = platform.message_attribute(".", r#"#[derive( ::dapi_grpc_macros::Mockable)]"#);
|
|
100
|
+
|
|
95
101
|
#[cfg(feature = "serde")]
|
|
96
102
|
let platform = platform
|
|
97
103
|
.type_attribute(
|
|
@@ -132,9 +138,21 @@ pub fn generate() -> Result<(), std::io::Error> {
|
|
|
132
138
|
.field_attribute("Proof.signature", r#"#[serde(with = "serde_bytes")]"#)
|
|
133
139
|
.field_attribute("Proof.block_id_hash", r#"#[serde(with = "serde_bytes")]"#);
|
|
134
140
|
|
|
135
|
-
platform
|
|
141
|
+
platform
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
fn configure_core(mut core: MappingConfig) -> MappingConfig {
|
|
145
|
+
// All messages can be mocked.
|
|
146
|
+
core = core.message_attribute(".", r#"#[derive( ::dapi_grpc_macros::Mockable)]"#);
|
|
147
|
+
|
|
148
|
+
// Serde support
|
|
149
|
+
#[cfg(feature = "serde")]
|
|
150
|
+
let core = core.type_attribute(
|
|
151
|
+
".",
|
|
152
|
+
r#"#[derive(::serde::Serialize, ::serde::Deserialize)]"#,
|
|
153
|
+
);
|
|
136
154
|
|
|
137
|
-
|
|
155
|
+
core
|
|
138
156
|
}
|
|
139
157
|
|
|
140
158
|
impl MappingConfig {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/dapi-grpc",
|
|
3
|
-
"version": "1.0.0-pr.
|
|
3
|
+
"version": "1.0.0-pr.1694.2",
|
|
4
4
|
"description": "DAPI GRPC definition file and generated clients",
|
|
5
5
|
"browser": "browser.js",
|
|
6
6
|
"main": "node.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://github.com/dashevo/dapi-grpc#readme",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@dashevo/grpc-common": "1.0.0-pr.
|
|
48
|
+
"@dashevo/grpc-common": "1.0.0-pr.1694.2",
|
|
49
49
|
"@dashevo/protobufjs": "6.10.5",
|
|
50
50
|
"@grpc/grpc-js": "1.4.4",
|
|
51
51
|
"@improbable-eng/grpc-web": "^0.15.0",
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
2
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1
3
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
2
4
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
3
5
|
pub struct GetStatusRequest {}
|
|
6
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
7
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
4
8
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
5
9
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
6
10
|
pub struct GetStatusResponse {
|
|
@@ -21,6 +25,8 @@ pub struct GetStatusResponse {
|
|
|
21
25
|
}
|
|
22
26
|
/// Nested message and enum types in `GetStatusResponse`.
|
|
23
27
|
pub mod get_status_response {
|
|
28
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
29
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
24
30
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
25
31
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
26
32
|
pub struct Version {
|
|
@@ -31,6 +37,8 @@ pub mod get_status_response {
|
|
|
31
37
|
#[prost(string, tag = "3")]
|
|
32
38
|
pub agent: ::prost::alloc::string::String,
|
|
33
39
|
}
|
|
40
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
41
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
34
42
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
35
43
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
36
44
|
pub struct Time {
|
|
@@ -41,6 +49,8 @@ pub mod get_status_response {
|
|
|
41
49
|
#[prost(uint32, tag = "3")]
|
|
42
50
|
pub median: u32,
|
|
43
51
|
}
|
|
52
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
53
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
44
54
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
45
55
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
46
56
|
pub struct Chain {
|
|
@@ -61,6 +71,8 @@ pub mod get_status_response {
|
|
|
61
71
|
#[prost(double, tag = "8")]
|
|
62
72
|
pub sync_progress: f64,
|
|
63
73
|
}
|
|
74
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
75
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
64
76
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
65
77
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
66
78
|
pub struct Masternode {
|
|
@@ -77,6 +89,7 @@ pub mod get_status_response {
|
|
|
77
89
|
}
|
|
78
90
|
/// Nested message and enum types in `Masternode`.
|
|
79
91
|
pub mod masternode {
|
|
92
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
80
93
|
#[derive(
|
|
81
94
|
Clone,
|
|
82
95
|
Copy,
|
|
@@ -132,6 +145,8 @@ pub mod get_status_response {
|
|
|
132
145
|
}
|
|
133
146
|
}
|
|
134
147
|
}
|
|
148
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
149
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
135
150
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
136
151
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
137
152
|
pub struct NetworkFee {
|
|
@@ -140,6 +155,8 @@ pub mod get_status_response {
|
|
|
140
155
|
#[prost(double, tag = "2")]
|
|
141
156
|
pub incremental: f64,
|
|
142
157
|
}
|
|
158
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
159
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
143
160
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
144
161
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
145
162
|
pub struct Network {
|
|
@@ -148,6 +165,7 @@ pub mod get_status_response {
|
|
|
148
165
|
#[prost(message, optional, tag = "2")]
|
|
149
166
|
pub fee: ::core::option::Option<NetworkFee>,
|
|
150
167
|
}
|
|
168
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
151
169
|
#[derive(
|
|
152
170
|
Clone,
|
|
153
171
|
Copy,
|
|
@@ -191,6 +209,8 @@ pub mod get_status_response {
|
|
|
191
209
|
}
|
|
192
210
|
}
|
|
193
211
|
}
|
|
212
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
213
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
194
214
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
195
215
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
196
216
|
pub struct GetBlockRequest {
|
|
@@ -199,6 +219,7 @@ pub struct GetBlockRequest {
|
|
|
199
219
|
}
|
|
200
220
|
/// Nested message and enum types in `GetBlockRequest`.
|
|
201
221
|
pub mod get_block_request {
|
|
222
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
202
223
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
203
224
|
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
204
225
|
pub enum Block {
|
|
@@ -208,12 +229,16 @@ pub mod get_block_request {
|
|
|
208
229
|
Hash(::prost::alloc::string::String),
|
|
209
230
|
}
|
|
210
231
|
}
|
|
232
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
233
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
211
234
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
212
235
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
213
236
|
pub struct GetBlockResponse {
|
|
214
237
|
#[prost(bytes = "vec", tag = "1")]
|
|
215
238
|
pub block: ::prost::alloc::vec::Vec<u8>,
|
|
216
239
|
}
|
|
240
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
241
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
217
242
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
218
243
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
219
244
|
pub struct BroadcastTransactionRequest {
|
|
@@ -224,18 +249,24 @@ pub struct BroadcastTransactionRequest {
|
|
|
224
249
|
#[prost(bool, tag = "3")]
|
|
225
250
|
pub bypass_limits: bool,
|
|
226
251
|
}
|
|
252
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
253
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
227
254
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
228
255
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
229
256
|
pub struct BroadcastTransactionResponse {
|
|
230
257
|
#[prost(string, tag = "1")]
|
|
231
258
|
pub transaction_id: ::prost::alloc::string::String,
|
|
232
259
|
}
|
|
260
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
261
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
233
262
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
234
263
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
235
264
|
pub struct GetTransactionRequest {
|
|
236
265
|
#[prost(string, tag = "1")]
|
|
237
266
|
pub id: ::prost::alloc::string::String,
|
|
238
267
|
}
|
|
268
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
269
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
239
270
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
240
271
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
241
272
|
pub struct GetTransactionResponse {
|
|
@@ -252,6 +283,8 @@ pub struct GetTransactionResponse {
|
|
|
252
283
|
#[prost(bool, tag = "6")]
|
|
253
284
|
pub is_chain_locked: bool,
|
|
254
285
|
}
|
|
286
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
287
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
255
288
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
256
289
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
257
290
|
pub struct BlockHeadersWithChainLocksRequest {
|
|
@@ -264,6 +297,7 @@ pub struct BlockHeadersWithChainLocksRequest {
|
|
|
264
297
|
}
|
|
265
298
|
/// Nested message and enum types in `BlockHeadersWithChainLocksRequest`.
|
|
266
299
|
pub mod block_headers_with_chain_locks_request {
|
|
300
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
267
301
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
268
302
|
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
269
303
|
pub enum FromBlock {
|
|
@@ -273,6 +307,8 @@ pub mod block_headers_with_chain_locks_request {
|
|
|
273
307
|
FromBlockHeight(u32),
|
|
274
308
|
}
|
|
275
309
|
}
|
|
310
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
311
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
276
312
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
277
313
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
278
314
|
pub struct BlockHeadersWithChainLocksResponse {
|
|
@@ -283,6 +319,7 @@ pub struct BlockHeadersWithChainLocksResponse {
|
|
|
283
319
|
}
|
|
284
320
|
/// Nested message and enum types in `BlockHeadersWithChainLocksResponse`.
|
|
285
321
|
pub mod block_headers_with_chain_locks_response {
|
|
322
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
286
323
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
287
324
|
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
288
325
|
pub enum Responses {
|
|
@@ -292,24 +329,32 @@ pub mod block_headers_with_chain_locks_response {
|
|
|
292
329
|
ChainLock(::prost::alloc::vec::Vec<u8>),
|
|
293
330
|
}
|
|
294
331
|
}
|
|
332
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
333
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
295
334
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
296
335
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
297
336
|
pub struct BlockHeaders {
|
|
298
337
|
#[prost(bytes = "vec", repeated, tag = "1")]
|
|
299
338
|
pub headers: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
|
|
300
339
|
}
|
|
340
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
341
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
301
342
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
302
343
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
303
344
|
pub struct GetEstimatedTransactionFeeRequest {
|
|
304
345
|
#[prost(uint32, tag = "1")]
|
|
305
346
|
pub blocks: u32,
|
|
306
347
|
}
|
|
348
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
349
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
307
350
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
308
351
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
309
352
|
pub struct GetEstimatedTransactionFeeResponse {
|
|
310
353
|
#[prost(double, tag = "1")]
|
|
311
354
|
pub fee: f64,
|
|
312
355
|
}
|
|
356
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
357
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
313
358
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
314
359
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
315
360
|
pub struct TransactionsWithProofsRequest {
|
|
@@ -324,6 +369,7 @@ pub struct TransactionsWithProofsRequest {
|
|
|
324
369
|
}
|
|
325
370
|
/// Nested message and enum types in `TransactionsWithProofsRequest`.
|
|
326
371
|
pub mod transactions_with_proofs_request {
|
|
372
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
327
373
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
328
374
|
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
329
375
|
pub enum FromBlock {
|
|
@@ -333,6 +379,8 @@ pub mod transactions_with_proofs_request {
|
|
|
333
379
|
FromBlockHeight(u32),
|
|
334
380
|
}
|
|
335
381
|
}
|
|
382
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
383
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
336
384
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
337
385
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
338
386
|
pub struct BloomFilter {
|
|
@@ -345,6 +393,8 @@ pub struct BloomFilter {
|
|
|
345
393
|
#[prost(uint32, tag = "4")]
|
|
346
394
|
pub n_flags: u32,
|
|
347
395
|
}
|
|
396
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
397
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
348
398
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
349
399
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
350
400
|
pub struct TransactionsWithProofsResponse {
|
|
@@ -353,6 +403,7 @@ pub struct TransactionsWithProofsResponse {
|
|
|
353
403
|
}
|
|
354
404
|
/// Nested message and enum types in `TransactionsWithProofsResponse`.
|
|
355
405
|
pub mod transactions_with_proofs_response {
|
|
406
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
356
407
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
357
408
|
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
|
358
409
|
pub enum Responses {
|
|
@@ -364,12 +415,16 @@ pub mod transactions_with_proofs_response {
|
|
|
364
415
|
RawMerkleBlock(::prost::alloc::vec::Vec<u8>),
|
|
365
416
|
}
|
|
366
417
|
}
|
|
418
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
419
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
367
420
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
368
421
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
369
422
|
pub struct RawTransactions {
|
|
370
423
|
#[prost(bytes = "vec", repeated, tag = "1")]
|
|
371
424
|
pub transactions: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
|
|
372
425
|
}
|
|
426
|
+
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
427
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
373
428
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
374
429
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
375
430
|
pub struct InstantSendLockMessages {
|
package/src/lib.rs
CHANGED
|
@@ -22,3 +22,9 @@ pub mod platform {
|
|
|
22
22
|
#[cfg(feature = "serde")]
|
|
23
23
|
// Serde deserialization logic
|
|
24
24
|
pub mod deserialization;
|
|
25
|
+
|
|
26
|
+
// We need mock module even if the feature is disabled
|
|
27
|
+
pub mod mock;
|
|
28
|
+
|
|
29
|
+
// Re-export tonic to ensure everyone uses the same version
|
|
30
|
+
pub use tonic;
|
package/src/mock.rs
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//! Mocking support for messages.
|
|
2
|
+
//!
|
|
3
|
+
//! Contains [Mockable] trait that should be implemented by any object that can be used in the DAPI.
|
|
4
|
+
//!
|
|
5
|
+
//! Note that this trait is defined even if mocks are not supported, but it should always return `None` on serialization.
|
|
6
|
+
use tonic::Streaming;
|
|
7
|
+
|
|
8
|
+
/// Mocking support for messages.
|
|
9
|
+
///
|
|
10
|
+
/// This trait should be implemented by any object that can be used in the DAPI.
|
|
11
|
+
///
|
|
12
|
+
/// We use serde_json to serialize/deserialize messages.
|
|
13
|
+
// TODO: Move to a different crate where it can be easily shared by dapi-grpc, dash-platform-sdk, and rs-dapi-client.
|
|
14
|
+
pub trait Mockable
|
|
15
|
+
where
|
|
16
|
+
Self: std::marker::Sized,
|
|
17
|
+
{
|
|
18
|
+
/// Serialize the message to bytes for mocking purposes.
|
|
19
|
+
///
|
|
20
|
+
/// Returns None if the message is not serializable or mocking is disabled.
|
|
21
|
+
///
|
|
22
|
+
/// # Panics
|
|
23
|
+
///
|
|
24
|
+
/// Panics on any error.
|
|
25
|
+
fn mock_serialize(&self) -> Option<Vec<u8>> {
|
|
26
|
+
None
|
|
27
|
+
}
|
|
28
|
+
/// Deserialize the message serialized with [mock_serialize()].
|
|
29
|
+
///
|
|
30
|
+
/// Returns None if the message is not serializable or mocking is disabled.
|
|
31
|
+
///
|
|
32
|
+
/// # Panics
|
|
33
|
+
///
|
|
34
|
+
/// Panics on any error.
|
|
35
|
+
fn mock_deserialize(_data: &[u8]) -> Option<Self> {
|
|
36
|
+
None
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
impl<T: Mockable> Mockable for Option<T> {
|
|
41
|
+
#[cfg(feature = "mocks")]
|
|
42
|
+
fn mock_serialize(&self) -> Option<Vec<u8>> {
|
|
43
|
+
self.as_ref().and_then(|value| value.mock_serialize())
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
#[cfg(feature = "mocks")]
|
|
47
|
+
fn mock_deserialize(data: &[u8]) -> Option<Self> {
|
|
48
|
+
T::mock_deserialize(data).map(Some)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
impl Mockable for Vec<u8> {
|
|
53
|
+
#[cfg(feature = "mocks")]
|
|
54
|
+
fn mock_serialize(&self) -> Option<Vec<u8>> {
|
|
55
|
+
serde_json::to_vec(self).ok()
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
#[cfg(feature = "mocks")]
|
|
59
|
+
fn mock_deserialize(data: &[u8]) -> Option<Self> {
|
|
60
|
+
serde_json::from_slice(data).ok()
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/// Mocking of gRPC streaming responses is not supported.
|
|
65
|
+
///
|
|
66
|
+
/// This will return `None` on serialization,
|
|
67
|
+
/// effectively disabling mocking of streaming responses.
|
|
68
|
+
impl<T: Mockable> Mockable for Streaming<T> {}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
2
2
|
#[serde(rename_all = "snake_case")]
|
|
3
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
3
4
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
4
5
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
5
6
|
pub struct Proof {
|
|
@@ -22,6 +23,7 @@ pub struct Proof {
|
|
|
22
23
|
}
|
|
23
24
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
24
25
|
#[serde(rename_all = "snake_case")]
|
|
26
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
25
27
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
26
28
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
27
29
|
pub struct ResponseMetadata {
|
|
@@ -42,6 +44,7 @@ pub struct ResponseMetadata {
|
|
|
42
44
|
}
|
|
43
45
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
44
46
|
#[serde(rename_all = "snake_case")]
|
|
47
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
45
48
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
46
49
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
47
50
|
pub struct StateTransitionBroadcastError {
|
|
@@ -54,6 +57,7 @@ pub struct StateTransitionBroadcastError {
|
|
|
54
57
|
}
|
|
55
58
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
56
59
|
#[serde(rename_all = "snake_case")]
|
|
60
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
57
61
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
58
62
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
59
63
|
pub struct BroadcastStateTransitionRequest {
|
|
@@ -62,6 +66,7 @@ pub struct BroadcastStateTransitionRequest {
|
|
|
62
66
|
}
|
|
63
67
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
64
68
|
#[serde(rename_all = "snake_case")]
|
|
69
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
65
70
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
66
71
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
67
72
|
pub struct BroadcastStateTransitionResponse {}
|
|
@@ -69,6 +74,7 @@ pub struct BroadcastStateTransitionResponse {}
|
|
|
69
74
|
#[serde(rename_all = "snake_case")]
|
|
70
75
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
71
76
|
#[grpc_versions(0)]
|
|
77
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
72
78
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
73
79
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
74
80
|
pub struct GetIdentityRequest {
|
|
@@ -79,6 +85,7 @@ pub struct GetIdentityRequest {
|
|
|
79
85
|
pub mod get_identity_request {
|
|
80
86
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
81
87
|
#[serde(rename_all = "snake_case")]
|
|
88
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
82
89
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
83
90
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
84
91
|
pub struct GetIdentityRequestV0 {
|
|
@@ -101,6 +108,7 @@ pub mod get_identity_request {
|
|
|
101
108
|
#[serde(rename_all = "snake_case")]
|
|
102
109
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
103
110
|
#[grpc_versions(0)]
|
|
111
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
104
112
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
105
113
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
106
114
|
pub struct GetIdentityBalanceRequest {
|
|
@@ -111,6 +119,7 @@ pub struct GetIdentityBalanceRequest {
|
|
|
111
119
|
pub mod get_identity_balance_request {
|
|
112
120
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
113
121
|
#[serde(rename_all = "snake_case")]
|
|
122
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
114
123
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
115
124
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
116
125
|
pub struct GetIdentityBalanceRequestV0 {
|
|
@@ -133,6 +142,7 @@ pub mod get_identity_balance_request {
|
|
|
133
142
|
#[serde(rename_all = "snake_case")]
|
|
134
143
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
135
144
|
#[grpc_versions(0)]
|
|
145
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
136
146
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
137
147
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
138
148
|
pub struct GetIdentityBalanceAndRevisionRequest {
|
|
@@ -145,6 +155,7 @@ pub struct GetIdentityBalanceAndRevisionRequest {
|
|
|
145
155
|
pub mod get_identity_balance_and_revision_request {
|
|
146
156
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
147
157
|
#[serde(rename_all = "snake_case")]
|
|
158
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
148
159
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
149
160
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
150
161
|
pub struct GetIdentityBalanceAndRevisionRequestV0 {
|
|
@@ -170,6 +181,7 @@ pub mod get_identity_balance_and_revision_request {
|
|
|
170
181
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
171
182
|
)]
|
|
172
183
|
#[grpc_versions(0)]
|
|
184
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
173
185
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
174
186
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
175
187
|
pub struct GetIdentityResponse {
|
|
@@ -180,6 +192,7 @@ pub struct GetIdentityResponse {
|
|
|
180
192
|
pub mod get_identity_response {
|
|
181
193
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
182
194
|
#[serde(rename_all = "snake_case")]
|
|
195
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
183
196
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
184
197
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
185
198
|
pub struct GetIdentityResponseV0 {
|
|
@@ -214,6 +227,7 @@ pub mod get_identity_response {
|
|
|
214
227
|
#[serde(rename_all = "snake_case")]
|
|
215
228
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
216
229
|
#[grpc_versions(0)]
|
|
230
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
217
231
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
218
232
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
219
233
|
pub struct GetIdentitiesRequest {
|
|
@@ -224,6 +238,7 @@ pub struct GetIdentitiesRequest {
|
|
|
224
238
|
pub mod get_identities_request {
|
|
225
239
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
226
240
|
#[serde(rename_all = "snake_case")]
|
|
241
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
227
242
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
228
243
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
229
244
|
pub struct GetIdentitiesRequestV0 {
|
|
@@ -249,6 +264,7 @@ pub mod get_identities_request {
|
|
|
249
264
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
250
265
|
)]
|
|
251
266
|
#[grpc_versions(0)]
|
|
267
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
252
268
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
253
269
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
254
270
|
pub struct GetIdentitiesResponse {
|
|
@@ -259,6 +275,7 @@ pub struct GetIdentitiesResponse {
|
|
|
259
275
|
pub mod get_identities_response {
|
|
260
276
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
261
277
|
#[serde(rename_all = "snake_case")]
|
|
278
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
262
279
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
263
280
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
264
281
|
pub struct IdentityValue {
|
|
@@ -267,6 +284,7 @@ pub mod get_identities_response {
|
|
|
267
284
|
}
|
|
268
285
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
269
286
|
#[serde(rename_all = "snake_case")]
|
|
287
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
270
288
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
271
289
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
272
290
|
pub struct IdentityEntry {
|
|
@@ -277,6 +295,7 @@ pub mod get_identities_response {
|
|
|
277
295
|
}
|
|
278
296
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
279
297
|
#[serde(rename_all = "snake_case")]
|
|
298
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
280
299
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
281
300
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
282
301
|
pub struct Identities {
|
|
@@ -285,6 +304,7 @@ pub mod get_identities_response {
|
|
|
285
304
|
}
|
|
286
305
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
287
306
|
#[serde(rename_all = "snake_case")]
|
|
307
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
288
308
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
289
309
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
290
310
|
pub struct GetIdentitiesResponseV0 {
|
|
@@ -322,6 +342,7 @@ pub mod get_identities_response {
|
|
|
322
342
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
323
343
|
)]
|
|
324
344
|
#[grpc_versions(0)]
|
|
345
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
325
346
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
326
347
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
327
348
|
pub struct GetIdentityBalanceResponse {
|
|
@@ -332,6 +353,7 @@ pub struct GetIdentityBalanceResponse {
|
|
|
332
353
|
pub mod get_identity_balance_response {
|
|
333
354
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
334
355
|
#[serde(rename_all = "snake_case")]
|
|
356
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
335
357
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
336
358
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
337
359
|
pub struct GetIdentityBalanceResponseV0 {
|
|
@@ -369,6 +391,7 @@ pub mod get_identity_balance_response {
|
|
|
369
391
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
370
392
|
)]
|
|
371
393
|
#[grpc_versions(0)]
|
|
394
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
372
395
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
373
396
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
374
397
|
pub struct GetIdentityBalanceAndRevisionResponse {
|
|
@@ -381,6 +404,7 @@ pub struct GetIdentityBalanceAndRevisionResponse {
|
|
|
381
404
|
pub mod get_identity_balance_and_revision_response {
|
|
382
405
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
383
406
|
#[serde(rename_all = "snake_case")]
|
|
407
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
384
408
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
385
409
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
386
410
|
pub struct GetIdentityBalanceAndRevisionResponseV0 {
|
|
@@ -398,6 +422,7 @@ pub mod get_identity_balance_and_revision_response {
|
|
|
398
422
|
pub mod get_identity_balance_and_revision_response_v0 {
|
|
399
423
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
400
424
|
#[serde(rename_all = "snake_case")]
|
|
425
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
401
426
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
402
427
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
403
428
|
pub struct BalanceAndRevision {
|
|
@@ -428,6 +453,7 @@ pub mod get_identity_balance_and_revision_response {
|
|
|
428
453
|
}
|
|
429
454
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
430
455
|
#[serde(rename_all = "snake_case")]
|
|
456
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
431
457
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
432
458
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
433
459
|
pub struct KeyRequestType {
|
|
@@ -451,11 +477,13 @@ pub mod key_request_type {
|
|
|
451
477
|
}
|
|
452
478
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
453
479
|
#[serde(rename_all = "snake_case")]
|
|
480
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
454
481
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
455
482
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
456
483
|
pub struct AllKeys {}
|
|
457
484
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
458
485
|
#[serde(rename_all = "snake_case")]
|
|
486
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
459
487
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
460
488
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
461
489
|
pub struct SpecificKeys {
|
|
@@ -464,6 +492,7 @@ pub struct SpecificKeys {
|
|
|
464
492
|
}
|
|
465
493
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
466
494
|
#[serde(rename_all = "snake_case")]
|
|
495
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
467
496
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
468
497
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
469
498
|
pub struct SearchKey {
|
|
@@ -472,6 +501,7 @@ pub struct SearchKey {
|
|
|
472
501
|
}
|
|
473
502
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
474
503
|
#[serde(rename_all = "snake_case")]
|
|
504
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
475
505
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
476
506
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
477
507
|
pub struct SecurityLevelMap {
|
|
@@ -528,6 +558,7 @@ pub mod security_level_map {
|
|
|
528
558
|
#[serde(rename_all = "snake_case")]
|
|
529
559
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
530
560
|
#[grpc_versions(0)]
|
|
561
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
531
562
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
532
563
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
533
564
|
pub struct GetIdentityKeysRequest {
|
|
@@ -538,6 +569,7 @@ pub struct GetIdentityKeysRequest {
|
|
|
538
569
|
pub mod get_identity_keys_request {
|
|
539
570
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
540
571
|
#[serde(rename_all = "snake_case")]
|
|
572
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
541
573
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
542
574
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
543
575
|
pub struct GetIdentityKeysRequestV0 {
|
|
@@ -569,6 +601,7 @@ pub mod get_identity_keys_request {
|
|
|
569
601
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
570
602
|
)]
|
|
571
603
|
#[grpc_versions(0)]
|
|
604
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
572
605
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
573
606
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
574
607
|
pub struct GetIdentityKeysResponse {
|
|
@@ -579,6 +612,7 @@ pub struct GetIdentityKeysResponse {
|
|
|
579
612
|
pub mod get_identity_keys_response {
|
|
580
613
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
581
614
|
#[serde(rename_all = "snake_case")]
|
|
615
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
582
616
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
583
617
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
584
618
|
pub struct GetIdentityKeysResponseV0 {
|
|
@@ -591,6 +625,7 @@ pub mod get_identity_keys_response {
|
|
|
591
625
|
pub mod get_identity_keys_response_v0 {
|
|
592
626
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
593
627
|
#[serde(rename_all = "snake_case")]
|
|
628
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
594
629
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
595
630
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
596
631
|
pub struct Keys {
|
|
@@ -621,6 +656,7 @@ pub mod get_identity_keys_response {
|
|
|
621
656
|
#[serde(rename_all = "snake_case")]
|
|
622
657
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
623
658
|
#[grpc_versions(0)]
|
|
659
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
624
660
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
625
661
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
626
662
|
pub struct GetProofsRequest {
|
|
@@ -631,6 +667,7 @@ pub struct GetProofsRequest {
|
|
|
631
667
|
pub mod get_proofs_request {
|
|
632
668
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
633
669
|
#[serde(rename_all = "snake_case")]
|
|
670
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
634
671
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
635
672
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
636
673
|
pub struct GetProofsRequestV0 {
|
|
@@ -645,6 +682,7 @@ pub mod get_proofs_request {
|
|
|
645
682
|
pub mod get_proofs_request_v0 {
|
|
646
683
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
647
684
|
#[serde(rename_all = "snake_case")]
|
|
685
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
648
686
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
649
687
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
650
688
|
pub struct DocumentRequest {
|
|
@@ -659,6 +697,7 @@ pub mod get_proofs_request {
|
|
|
659
697
|
}
|
|
660
698
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
661
699
|
#[serde(rename_all = "snake_case")]
|
|
700
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
662
701
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
663
702
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
664
703
|
pub struct IdentityRequest {
|
|
@@ -714,6 +753,7 @@ pub mod get_proofs_request {
|
|
|
714
753
|
}
|
|
715
754
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
716
755
|
#[serde(rename_all = "snake_case")]
|
|
756
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
717
757
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
718
758
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
719
759
|
pub struct ContractRequest {
|
|
@@ -737,6 +777,7 @@ pub mod get_proofs_request {
|
|
|
737
777
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
738
778
|
)]
|
|
739
779
|
#[grpc_versions(0)]
|
|
780
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
740
781
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
741
782
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
742
783
|
pub struct GetProofsResponse {
|
|
@@ -747,6 +788,7 @@ pub struct GetProofsResponse {
|
|
|
747
788
|
pub mod get_proofs_response {
|
|
748
789
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
749
790
|
#[serde(rename_all = "snake_case")]
|
|
791
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
750
792
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
751
793
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
752
794
|
pub struct GetProofsResponseV0 {
|
|
@@ -779,6 +821,7 @@ pub mod get_proofs_response {
|
|
|
779
821
|
#[serde(rename_all = "snake_case")]
|
|
780
822
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
781
823
|
#[grpc_versions(0)]
|
|
824
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
782
825
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
783
826
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
784
827
|
pub struct GetDataContractRequest {
|
|
@@ -789,6 +832,7 @@ pub struct GetDataContractRequest {
|
|
|
789
832
|
pub mod get_data_contract_request {
|
|
790
833
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
791
834
|
#[serde(rename_all = "snake_case")]
|
|
835
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
792
836
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
793
837
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
794
838
|
pub struct GetDataContractRequestV0 {
|
|
@@ -814,6 +858,7 @@ pub mod get_data_contract_request {
|
|
|
814
858
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
815
859
|
)]
|
|
816
860
|
#[grpc_versions(0)]
|
|
861
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
817
862
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
818
863
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
819
864
|
pub struct GetDataContractResponse {
|
|
@@ -824,6 +869,7 @@ pub struct GetDataContractResponse {
|
|
|
824
869
|
pub mod get_data_contract_response {
|
|
825
870
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
826
871
|
#[serde(rename_all = "snake_case")]
|
|
872
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
827
873
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
828
874
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
829
875
|
pub struct GetDataContractResponseV0 {
|
|
@@ -858,6 +904,7 @@ pub mod get_data_contract_response {
|
|
|
858
904
|
#[serde(rename_all = "snake_case")]
|
|
859
905
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
860
906
|
#[grpc_versions(0)]
|
|
907
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
861
908
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
862
909
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
863
910
|
pub struct GetDataContractsRequest {
|
|
@@ -868,6 +915,7 @@ pub struct GetDataContractsRequest {
|
|
|
868
915
|
pub mod get_data_contracts_request {
|
|
869
916
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
870
917
|
#[serde(rename_all = "snake_case")]
|
|
918
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
871
919
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
872
920
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
873
921
|
pub struct GetDataContractsRequestV0 {
|
|
@@ -893,6 +941,7 @@ pub mod get_data_contracts_request {
|
|
|
893
941
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
894
942
|
)]
|
|
895
943
|
#[grpc_versions(0)]
|
|
944
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
896
945
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
897
946
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
898
947
|
pub struct GetDataContractsResponse {
|
|
@@ -903,6 +952,7 @@ pub struct GetDataContractsResponse {
|
|
|
903
952
|
pub mod get_data_contracts_response {
|
|
904
953
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
905
954
|
#[serde(rename_all = "snake_case")]
|
|
955
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
906
956
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
907
957
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
908
958
|
pub struct DataContractEntry {
|
|
@@ -913,6 +963,7 @@ pub mod get_data_contracts_response {
|
|
|
913
963
|
}
|
|
914
964
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
915
965
|
#[serde(rename_all = "snake_case")]
|
|
966
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
916
967
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
917
968
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
918
969
|
pub struct DataContracts {
|
|
@@ -921,6 +972,7 @@ pub mod get_data_contracts_response {
|
|
|
921
972
|
}
|
|
922
973
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
923
974
|
#[serde(rename_all = "snake_case")]
|
|
975
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
924
976
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
925
977
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
926
978
|
pub struct GetDataContractsResponseV0 {
|
|
@@ -955,6 +1007,7 @@ pub mod get_data_contracts_response {
|
|
|
955
1007
|
#[serde(rename_all = "snake_case")]
|
|
956
1008
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
957
1009
|
#[grpc_versions(0)]
|
|
1010
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
958
1011
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
959
1012
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
960
1013
|
pub struct GetDataContractHistoryRequest {
|
|
@@ -965,6 +1018,7 @@ pub struct GetDataContractHistoryRequest {
|
|
|
965
1018
|
pub mod get_data_contract_history_request {
|
|
966
1019
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
967
1020
|
#[serde(rename_all = "snake_case")]
|
|
1021
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
968
1022
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
969
1023
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
970
1024
|
pub struct GetDataContractHistoryRequestV0 {
|
|
@@ -997,6 +1051,7 @@ pub mod get_data_contract_history_request {
|
|
|
997
1051
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
998
1052
|
)]
|
|
999
1053
|
#[grpc_versions(0)]
|
|
1054
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1000
1055
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1001
1056
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1002
1057
|
pub struct GetDataContractHistoryResponse {
|
|
@@ -1007,6 +1062,7 @@ pub struct GetDataContractHistoryResponse {
|
|
|
1007
1062
|
pub mod get_data_contract_history_response {
|
|
1008
1063
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1009
1064
|
#[serde(rename_all = "snake_case")]
|
|
1065
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1010
1066
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1011
1067
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1012
1068
|
pub struct GetDataContractHistoryResponseV0 {
|
|
@@ -1021,6 +1077,7 @@ pub mod get_data_contract_history_response {
|
|
|
1021
1077
|
pub mod get_data_contract_history_response_v0 {
|
|
1022
1078
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1023
1079
|
#[serde(rename_all = "snake_case")]
|
|
1080
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1024
1081
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1025
1082
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1026
1083
|
pub struct DataContractHistoryEntry {
|
|
@@ -1031,6 +1088,7 @@ pub mod get_data_contract_history_response {
|
|
|
1031
1088
|
}
|
|
1032
1089
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1033
1090
|
#[serde(rename_all = "snake_case")]
|
|
1091
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1034
1092
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1035
1093
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1036
1094
|
pub struct DataContractHistory {
|
|
@@ -1063,6 +1121,7 @@ pub mod get_data_contract_history_response {
|
|
|
1063
1121
|
#[serde(rename_all = "snake_case")]
|
|
1064
1122
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
1065
1123
|
#[grpc_versions(0)]
|
|
1124
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1066
1125
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1067
1126
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1068
1127
|
pub struct GetDocumentsRequest {
|
|
@@ -1073,6 +1132,7 @@ pub struct GetDocumentsRequest {
|
|
|
1073
1132
|
pub mod get_documents_request {
|
|
1074
1133
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1075
1134
|
#[serde(rename_all = "snake_case")]
|
|
1135
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1076
1136
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1077
1137
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1078
1138
|
pub struct GetDocumentsRequestV0 {
|
|
@@ -1123,6 +1183,7 @@ pub mod get_documents_request {
|
|
|
1123
1183
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
1124
1184
|
)]
|
|
1125
1185
|
#[grpc_versions(0)]
|
|
1186
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1126
1187
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1127
1188
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1128
1189
|
pub struct GetDocumentsResponse {
|
|
@@ -1133,6 +1194,7 @@ pub struct GetDocumentsResponse {
|
|
|
1133
1194
|
pub mod get_documents_response {
|
|
1134
1195
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1135
1196
|
#[serde(rename_all = "snake_case")]
|
|
1197
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1136
1198
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1137
1199
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1138
1200
|
pub struct GetDocumentsResponseV0 {
|
|
@@ -1145,6 +1207,7 @@ pub mod get_documents_response {
|
|
|
1145
1207
|
pub mod get_documents_response_v0 {
|
|
1146
1208
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1147
1209
|
#[serde(rename_all = "snake_case")]
|
|
1210
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1148
1211
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1149
1212
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1150
1213
|
pub struct Documents {
|
|
@@ -1175,6 +1238,7 @@ pub mod get_documents_response {
|
|
|
1175
1238
|
#[serde(rename_all = "snake_case")]
|
|
1176
1239
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
1177
1240
|
#[grpc_versions(0)]
|
|
1241
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1178
1242
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1179
1243
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1180
1244
|
pub struct GetIdentitiesByPublicKeyHashesRequest {
|
|
@@ -1187,6 +1251,7 @@ pub struct GetIdentitiesByPublicKeyHashesRequest {
|
|
|
1187
1251
|
pub mod get_identities_by_public_key_hashes_request {
|
|
1188
1252
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1189
1253
|
#[serde(rename_all = "snake_case")]
|
|
1254
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1190
1255
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1191
1256
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1192
1257
|
pub struct GetIdentitiesByPublicKeyHashesRequestV0 {
|
|
@@ -1212,6 +1277,7 @@ pub mod get_identities_by_public_key_hashes_request {
|
|
|
1212
1277
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
1213
1278
|
)]
|
|
1214
1279
|
#[grpc_versions(0)]
|
|
1280
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1215
1281
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1216
1282
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1217
1283
|
pub struct GetIdentitiesByPublicKeyHashesResponse {
|
|
@@ -1224,6 +1290,7 @@ pub struct GetIdentitiesByPublicKeyHashesResponse {
|
|
|
1224
1290
|
pub mod get_identities_by_public_key_hashes_response {
|
|
1225
1291
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1226
1292
|
#[serde(rename_all = "snake_case")]
|
|
1293
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1227
1294
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1228
1295
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1229
1296
|
pub struct PublicKeyHashIdentityEntry {
|
|
@@ -1235,6 +1302,7 @@ pub mod get_identities_by_public_key_hashes_response {
|
|
|
1235
1302
|
}
|
|
1236
1303
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1237
1304
|
#[serde(rename_all = "snake_case")]
|
|
1305
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1238
1306
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1239
1307
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1240
1308
|
pub struct IdentitiesByPublicKeyHashes {
|
|
@@ -1243,6 +1311,7 @@ pub mod get_identities_by_public_key_hashes_response {
|
|
|
1243
1311
|
}
|
|
1244
1312
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1245
1313
|
#[serde(rename_all = "snake_case")]
|
|
1314
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1246
1315
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1247
1316
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1248
1317
|
pub struct GetIdentitiesByPublicKeyHashesResponseV0 {
|
|
@@ -1282,6 +1351,7 @@ pub mod get_identities_by_public_key_hashes_response {
|
|
|
1282
1351
|
#[serde(rename_all = "snake_case")]
|
|
1283
1352
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
1284
1353
|
#[grpc_versions(0)]
|
|
1354
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1285
1355
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1286
1356
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1287
1357
|
pub struct GetIdentityByPublicKeyHashRequest {
|
|
@@ -1294,6 +1364,7 @@ pub struct GetIdentityByPublicKeyHashRequest {
|
|
|
1294
1364
|
pub mod get_identity_by_public_key_hash_request {
|
|
1295
1365
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1296
1366
|
#[serde(rename_all = "snake_case")]
|
|
1367
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1297
1368
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1298
1369
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1299
1370
|
pub struct GetIdentityByPublicKeyHashRequestV0 {
|
|
@@ -1319,6 +1390,7 @@ pub mod get_identity_by_public_key_hash_request {
|
|
|
1319
1390
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
1320
1391
|
)]
|
|
1321
1392
|
#[grpc_versions(0)]
|
|
1393
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1322
1394
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1323
1395
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1324
1396
|
pub struct GetIdentityByPublicKeyHashResponse {
|
|
@@ -1331,6 +1403,7 @@ pub struct GetIdentityByPublicKeyHashResponse {
|
|
|
1331
1403
|
pub mod get_identity_by_public_key_hash_response {
|
|
1332
1404
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1333
1405
|
#[serde(rename_all = "snake_case")]
|
|
1406
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1334
1407
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1335
1408
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1336
1409
|
pub struct GetIdentityByPublicKeyHashResponseV0 {
|
|
@@ -1370,6 +1443,7 @@ pub mod get_identity_by_public_key_hash_response {
|
|
|
1370
1443
|
#[serde(rename_all = "snake_case")]
|
|
1371
1444
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
1372
1445
|
#[grpc_versions(0)]
|
|
1446
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1373
1447
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1374
1448
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1375
1449
|
pub struct WaitForStateTransitionResultRequest {
|
|
@@ -1382,6 +1456,7 @@ pub struct WaitForStateTransitionResultRequest {
|
|
|
1382
1456
|
pub mod wait_for_state_transition_result_request {
|
|
1383
1457
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1384
1458
|
#[serde(rename_all = "snake_case")]
|
|
1459
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1385
1460
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1386
1461
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1387
1462
|
pub struct WaitForStateTransitionResultRequestV0 {
|
|
@@ -1406,6 +1481,7 @@ pub mod wait_for_state_transition_result_request {
|
|
|
1406
1481
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
1407
1482
|
)]
|
|
1408
1483
|
#[grpc_versions(0)]
|
|
1484
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1409
1485
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1410
1486
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1411
1487
|
pub struct WaitForStateTransitionResultResponse {
|
|
@@ -1418,6 +1494,7 @@ pub struct WaitForStateTransitionResultResponse {
|
|
|
1418
1494
|
pub mod wait_for_state_transition_result_response {
|
|
1419
1495
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1420
1496
|
#[serde(rename_all = "snake_case")]
|
|
1497
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1421
1498
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1422
1499
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1423
1500
|
pub struct WaitForStateTransitionResultResponseV0 {
|
|
@@ -1455,6 +1532,7 @@ pub mod wait_for_state_transition_result_response {
|
|
|
1455
1532
|
}
|
|
1456
1533
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1457
1534
|
#[serde(rename_all = "snake_case")]
|
|
1535
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1458
1536
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1459
1537
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1460
1538
|
pub struct GetConsensusParamsRequest {
|
|
@@ -1465,6 +1543,7 @@ pub struct GetConsensusParamsRequest {
|
|
|
1465
1543
|
pub mod get_consensus_params_request {
|
|
1466
1544
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1467
1545
|
#[serde(rename_all = "snake_case")]
|
|
1546
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1468
1547
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1469
1548
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1470
1549
|
pub struct GetConsensusParamsRequestV0 {
|
|
@@ -1484,6 +1563,7 @@ pub mod get_consensus_params_request {
|
|
|
1484
1563
|
}
|
|
1485
1564
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1486
1565
|
#[serde(rename_all = "snake_case")]
|
|
1566
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1487
1567
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1488
1568
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1489
1569
|
pub struct GetConsensusParamsResponse {
|
|
@@ -1494,6 +1574,7 @@ pub struct GetConsensusParamsResponse {
|
|
|
1494
1574
|
pub mod get_consensus_params_response {
|
|
1495
1575
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1496
1576
|
#[serde(rename_all = "snake_case")]
|
|
1577
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1497
1578
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1498
1579
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1499
1580
|
pub struct ConsensusParamsBlock {
|
|
@@ -1506,6 +1587,7 @@ pub mod get_consensus_params_response {
|
|
|
1506
1587
|
}
|
|
1507
1588
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1508
1589
|
#[serde(rename_all = "snake_case")]
|
|
1590
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1509
1591
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1510
1592
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1511
1593
|
pub struct ConsensusParamsEvidence {
|
|
@@ -1518,6 +1600,7 @@ pub mod get_consensus_params_response {
|
|
|
1518
1600
|
}
|
|
1519
1601
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1520
1602
|
#[serde(rename_all = "snake_case")]
|
|
1603
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1521
1604
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1522
1605
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1523
1606
|
pub struct GetConsensusParamsResponseV0 {
|
|
@@ -1539,6 +1622,7 @@ pub mod get_consensus_params_response {
|
|
|
1539
1622
|
#[serde(rename_all = "snake_case")]
|
|
1540
1623
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
1541
1624
|
#[grpc_versions(0)]
|
|
1625
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1542
1626
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1543
1627
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1544
1628
|
pub struct GetProtocolVersionUpgradeStateRequest {
|
|
@@ -1551,6 +1635,7 @@ pub struct GetProtocolVersionUpgradeStateRequest {
|
|
|
1551
1635
|
pub mod get_protocol_version_upgrade_state_request {
|
|
1552
1636
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1553
1637
|
#[serde(rename_all = "snake_case")]
|
|
1638
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1554
1639
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1555
1640
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1556
1641
|
pub struct GetProtocolVersionUpgradeStateRequestV0 {
|
|
@@ -1573,6 +1658,7 @@ pub mod get_protocol_version_upgrade_state_request {
|
|
|
1573
1658
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
1574
1659
|
)]
|
|
1575
1660
|
#[grpc_versions(0)]
|
|
1661
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1576
1662
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1577
1663
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1578
1664
|
pub struct GetProtocolVersionUpgradeStateResponse {
|
|
@@ -1585,6 +1671,7 @@ pub struct GetProtocolVersionUpgradeStateResponse {
|
|
|
1585
1671
|
pub mod get_protocol_version_upgrade_state_response {
|
|
1586
1672
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1587
1673
|
#[serde(rename_all = "snake_case")]
|
|
1674
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1588
1675
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1589
1676
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1590
1677
|
pub struct GetProtocolVersionUpgradeStateResponseV0 {
|
|
@@ -1602,6 +1689,7 @@ pub mod get_protocol_version_upgrade_state_response {
|
|
|
1602
1689
|
pub mod get_protocol_version_upgrade_state_response_v0 {
|
|
1603
1690
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1604
1691
|
#[serde(rename_all = "snake_case")]
|
|
1692
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1605
1693
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1606
1694
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1607
1695
|
pub struct Versions {
|
|
@@ -1610,6 +1698,7 @@ pub mod get_protocol_version_upgrade_state_response {
|
|
|
1610
1698
|
}
|
|
1611
1699
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1612
1700
|
#[serde(rename_all = "snake_case")]
|
|
1701
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1613
1702
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1614
1703
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1615
1704
|
pub struct VersionEntry {
|
|
@@ -1642,6 +1731,7 @@ pub mod get_protocol_version_upgrade_state_response {
|
|
|
1642
1731
|
#[serde(rename_all = "snake_case")]
|
|
1643
1732
|
#[derive(::dapi_grpc_macros::VersionedGrpcMessage)]
|
|
1644
1733
|
#[grpc_versions(0)]
|
|
1734
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1645
1735
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1646
1736
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1647
1737
|
pub struct GetProtocolVersionUpgradeVoteStatusRequest {
|
|
@@ -1657,6 +1747,7 @@ pub struct GetProtocolVersionUpgradeVoteStatusRequest {
|
|
|
1657
1747
|
pub mod get_protocol_version_upgrade_vote_status_request {
|
|
1658
1748
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1659
1749
|
#[serde(rename_all = "snake_case")]
|
|
1750
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1660
1751
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1661
1752
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1662
1753
|
pub struct GetProtocolVersionUpgradeVoteStatusRequestV0 {
|
|
@@ -1683,6 +1774,7 @@ pub mod get_protocol_version_upgrade_vote_status_request {
|
|
|
1683
1774
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
1684
1775
|
)]
|
|
1685
1776
|
#[grpc_versions(0)]
|
|
1777
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1686
1778
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1687
1779
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1688
1780
|
pub struct GetProtocolVersionUpgradeVoteStatusResponse {
|
|
@@ -1698,6 +1790,7 @@ pub struct GetProtocolVersionUpgradeVoteStatusResponse {
|
|
|
1698
1790
|
pub mod get_protocol_version_upgrade_vote_status_response {
|
|
1699
1791
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1700
1792
|
#[serde(rename_all = "snake_case")]
|
|
1793
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1701
1794
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1702
1795
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1703
1796
|
pub struct GetProtocolVersionUpgradeVoteStatusResponseV0 {
|
|
@@ -1715,6 +1808,7 @@ pub mod get_protocol_version_upgrade_vote_status_response {
|
|
|
1715
1808
|
pub mod get_protocol_version_upgrade_vote_status_response_v0 {
|
|
1716
1809
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1717
1810
|
#[serde(rename_all = "snake_case")]
|
|
1811
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1718
1812
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1719
1813
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1720
1814
|
pub struct VersionSignals {
|
|
@@ -1723,6 +1817,7 @@ pub mod get_protocol_version_upgrade_vote_status_response {
|
|
|
1723
1817
|
}
|
|
1724
1818
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1725
1819
|
#[serde(rename_all = "snake_case")]
|
|
1820
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1726
1821
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1727
1822
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1728
1823
|
pub struct VersionSignal {
|
|
@@ -1753,6 +1848,7 @@ pub mod get_protocol_version_upgrade_vote_status_response {
|
|
|
1753
1848
|
}
|
|
1754
1849
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1755
1850
|
#[serde(rename_all = "snake_case")]
|
|
1851
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1756
1852
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1757
1853
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1758
1854
|
pub struct GetEpochsInfoRequest {
|
|
@@ -1763,6 +1859,7 @@ pub struct GetEpochsInfoRequest {
|
|
|
1763
1859
|
pub mod get_epochs_info_request {
|
|
1764
1860
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1765
1861
|
#[serde(rename_all = "snake_case")]
|
|
1862
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1766
1863
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1767
1864
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1768
1865
|
pub struct GetEpochsInfoRequestV0 {
|
|
@@ -1791,6 +1888,7 @@ pub mod get_epochs_info_request {
|
|
|
1791
1888
|
::dapi_grpc_macros::VersionedGrpcResponse
|
|
1792
1889
|
)]
|
|
1793
1890
|
#[grpc_versions(0)]
|
|
1891
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1794
1892
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1795
1893
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1796
1894
|
pub struct GetEpochsInfoResponse {
|
|
@@ -1801,6 +1899,7 @@ pub struct GetEpochsInfoResponse {
|
|
|
1801
1899
|
pub mod get_epochs_info_response {
|
|
1802
1900
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1803
1901
|
#[serde(rename_all = "snake_case")]
|
|
1902
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1804
1903
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1805
1904
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1806
1905
|
pub struct GetEpochsInfoResponseV0 {
|
|
@@ -1813,6 +1912,7 @@ pub mod get_epochs_info_response {
|
|
|
1813
1912
|
pub mod get_epochs_info_response_v0 {
|
|
1814
1913
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1815
1914
|
#[serde(rename_all = "snake_case")]
|
|
1915
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1816
1916
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1817
1917
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1818
1918
|
pub struct EpochInfos {
|
|
@@ -1821,6 +1921,7 @@ pub mod get_epochs_info_response {
|
|
|
1821
1921
|
}
|
|
1822
1922
|
#[derive(::serde::Serialize, ::serde::Deserialize)]
|
|
1823
1923
|
#[serde(rename_all = "snake_case")]
|
|
1924
|
+
#[derive(::dapi_grpc_macros::Mockable)]
|
|
1824
1925
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
|
1825
1926
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
|
1826
1927
|
pub struct EpochInfo {
|