side-proto 2.0.0-alpha.19

Rust Client for Side Chain
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
// @generated
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssetMetadata {
    #[prost(string, tag = "1")]
    pub denom: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(int32, tag = "3")]
    pub decimals: i32,
    #[prost(string, tag = "4")]
    pub price_symbol: ::prost::alloc::string::String,
    #[prost(bool, tag = "5")]
    pub is_base_price_asset: bool,
}
impl ::prost::Name for AssetMetadata {
    const NAME: &'static str = "AssetMetadata";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Liquidation {
    #[prost(uint64, tag = "1")]
    pub id: u64,
    #[prost(string, tag = "2")]
    pub loan_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub debtor: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub dcm: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "5")]
    pub collateral_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
    #[prost(message, optional, tag = "6")]
    pub actual_collateral_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
    #[prost(message, optional, tag = "7")]
    pub debt_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
    #[prost(message, optional, tag = "8")]
    pub collateral_asset: ::core::option::Option<AssetMetadata>,
    #[prost(message, optional, tag = "9")]
    pub debt_asset: ::core::option::Option<AssetMetadata>,
    #[prost(string, tag = "10")]
    pub liquidation_price: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "11")]
    pub liquidation_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>,
    #[prost(message, optional, tag = "12")]
    pub liquidated_collateral_amount:
        ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
    #[prost(message, optional, tag = "13")]
    pub liquidated_debt_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
    #[prost(message, optional, tag = "14")]
    pub liquidation_bonus_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
    #[prost(message, optional, tag = "15")]
    pub protocol_liquidation_fee: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
    #[prost(message, optional, tag = "16")]
    pub unliquidated_collateral_amount:
        ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
    #[prost(string, tag = "17")]
    pub liquidation_cet: ::prost::alloc::string::String,
    #[prost(string, tag = "18")]
    pub settlement_tx: ::prost::alloc::string::String,
    #[prost(string, tag = "19")]
    pub settlement_tx_id: ::prost::alloc::string::String,
    #[prost(enumeration = "LiquidationStatus", tag = "20")]
    pub status: i32,
}
impl ::prost::Name for Liquidation {
    const NAME: &'static str = "Liquidation";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LiquidationRecord {
    #[prost(uint64, tag = "1")]
    pub id: u64,
    #[prost(uint64, tag = "2")]
    pub liquidation_id: u64,
    #[prost(string, tag = "3")]
    pub liquidator: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub debt_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
    #[prost(message, optional, tag = "5")]
    pub collateral_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
    #[prost(message, optional, tag = "6")]
    pub bonus_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
    #[prost(message, optional, tag = "7")]
    pub time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>,
}
impl ::prost::Name for LiquidationRecord {
    const NAME: &'static str = "LiquidationRecord";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LiquidationStatus {
    Unspecified = 0,
    Liquidating = 1,
    Liquidated = 2,
    Settling = 3,
    Settled = 4,
}
impl LiquidationStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            LiquidationStatus::Unspecified => "LIQUIDATION_STATUS_UNSPECIFIED",
            LiquidationStatus::Liquidating => "LIQUIDATION_STATUS_LIQUIDATING",
            LiquidationStatus::Liquidated => "LIQUIDATION_STATUS_LIQUIDATED",
            LiquidationStatus::Settling => "LIQUIDATION_STATUS_SETTLING",
            LiquidationStatus::Settled => "LIQUIDATION_STATUS_SETTLED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "LIQUIDATION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "LIQUIDATION_STATUS_LIQUIDATING" => Some(Self::Liquidating),
            "LIQUIDATION_STATUS_LIQUIDATED" => Some(Self::Liquidated),
            "LIQUIDATION_STATUS_SETTLING" => Some(Self::Settling),
            "LIQUIDATION_STATUS_SETTLED" => Some(Self::Settled),
            _ => None,
        }
    }
}
/// Signing intent
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SigningIntent {
    Default = 0,
}
impl SigningIntent {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            SigningIntent::Default => "SIGNING_INTENT_DEFAULT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SIGNING_INTENT_DEFAULT" => Some(Self::Default),
            _ => None,
        }
    }
}
/// Params defines the parameters for the module.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
    /// minimum liquidation factor
    #[prost(string, tag = "1")]
    pub min_liquidation_factor: ::prost::alloc::string::String,
    /// liquidation bonus factor
    #[prost(string, tag = "2")]
    pub liquidation_bonus_factor: ::prost::alloc::string::String,
    /// protocol liquidation fee factor
    #[prost(string, tag = "3")]
    pub protocol_liquidation_fee_factor: ::prost::alloc::string::String,
    /// protocol liquidation fee collector
    #[prost(string, tag = "4")]
    pub protocol_liquidation_fee_collector: ::prost::alloc::string::String,
}
impl ::prost::Name for Params {
    const NAME: &'static str = "Params";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// GenesisState defines the liquidation module's genesis state.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
    #[prost(message, optional, tag = "1")]
    pub params: ::core::option::Option<Params>,
    #[prost(message, repeated, tag = "2")]
    pub liquidations: ::prost::alloc::vec::Vec<Liquidation>,
    #[prost(message, repeated, tag = "3")]
    pub liquidation_records: ::prost::alloc::vec::Vec<LiquidationRecord>,
}
impl ::prost::Name for GenesisState {
    const NAME: &'static str = "GenesisState";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// QueryParamsRequest is request type for the Query/Params RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsRequest {}
impl ::prost::Name for QueryParamsRequest {
    const NAME: &'static str = "QueryParamsRequest";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// QueryParamsResponse is response type for the Query/Params RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsResponse {
    #[prost(message, optional, tag = "1")]
    pub params: ::core::option::Option<Params>,
}
impl ::prost::Name for QueryParamsResponse {
    const NAME: &'static str = "QueryParamsResponse";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// QueryLiquidationRequest is request type for the Query/Liquidation RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryLiquidationRequest {
    #[prost(uint64, tag = "1")]
    pub id: u64,
}
impl ::prost::Name for QueryLiquidationRequest {
    const NAME: &'static str = "QueryLiquidationRequest";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// QueryLiquidationResponse is response type for the Query/Liquidation RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryLiquidationResponse {
    #[prost(message, optional, tag = "1")]
    pub liquidation: ::core::option::Option<Liquidation>,
}
impl ::prost::Name for QueryLiquidationResponse {
    const NAME: &'static str = "QueryLiquidationResponse";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// QueryLiquidationsRequest is request type for the Query/Liquidations RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryLiquidationsRequest {
    #[prost(enumeration = "LiquidationStatus", tag = "1")]
    pub status: i32,
    #[prost(message, optional, tag = "2")]
    pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
}
impl ::prost::Name for QueryLiquidationsRequest {
    const NAME: &'static str = "QueryLiquidationsRequest";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// QueryLiquidationsResponse is response type for the Query/Liquidations RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryLiquidationsResponse {
    #[prost(message, repeated, tag = "1")]
    pub liquidations: ::prost::alloc::vec::Vec<Liquidation>,
    #[prost(message, optional, tag = "2")]
    pub pagination:
        ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
}
impl ::prost::Name for QueryLiquidationsResponse {
    const NAME: &'static str = "QueryLiquidationsResponse";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// QueryLiquidationRecordRequest is request type for the Query/LiquidationRecord RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryLiquidationRecordRequest {
    #[prost(uint64, tag = "1")]
    pub id: u64,
}
impl ::prost::Name for QueryLiquidationRecordRequest {
    const NAME: &'static str = "QueryLiquidationRecordRequest";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// QueryLiquidationRecordResponse is response type for the Query/LiquidationRecord RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryLiquidationRecordResponse {
    #[prost(message, optional, tag = "1")]
    pub liquidation_record: ::core::option::Option<LiquidationRecord>,
}
impl ::prost::Name for QueryLiquidationRecordResponse {
    const NAME: &'static str = "QueryLiquidationRecordResponse";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// QueryLiquidationRecordsRequest is request type for the Query/LiquidationRecords RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryLiquidationRecordsRequest {
    #[prost(uint64, tag = "1")]
    pub liquidation_id: u64,
    #[prost(message, optional, tag = "2")]
    pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
}
impl ::prost::Name for QueryLiquidationRecordsRequest {
    const NAME: &'static str = "QueryLiquidationRecordsRequest";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// QueryLiquidationRecordsResponse is response type for the Query/LiquidationRecords RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryLiquidationRecordsResponse {
    #[prost(message, repeated, tag = "1")]
    pub liquidation_records: ::prost::alloc::vec::Vec<LiquidationRecord>,
    #[prost(message, optional, tag = "2")]
    pub pagination:
        ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
}
impl ::prost::Name for QueryLiquidationRecordsResponse {
    const NAME: &'static str = "QueryLiquidationRecordsResponse";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// MsgLiquidate defines the Msg/Liquidate request type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgLiquidate {
    #[prost(string, tag = "1")]
    pub liquidator: ::prost::alloc::string::String,
    #[prost(uint64, tag = "2")]
    pub liquidation_id: u64,
    #[prost(message, optional, tag = "3")]
    pub debt_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
}
impl ::prost::Name for MsgLiquidate {
    const NAME: &'static str = "MsgLiquidate";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// MsgLiquidateResponse defines the Msg/Liquidate response type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgLiquidateResponse {}
impl ::prost::Name for MsgLiquidateResponse {
    const NAME: &'static str = "MsgLiquidateResponse";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// MsgUpdateParams is the Msg/UpdateParams request type.
///
/// Since: cosmos-sdk 0.47
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpdateParams {
    /// authority is the address that controls the module (defaults to x/gov unless overwritten).
    #[prost(string, tag = "1")]
    pub authority: ::prost::alloc::string::String,
    /// params defines the x/btcbridge parameters to be updated.
    ///
    /// NOTE: All parameters must be supplied.
    #[prost(message, optional, tag = "2")]
    pub params: ::core::option::Option<Params>,
}
impl ::prost::Name for MsgUpdateParams {
    const NAME: &'static str = "MsgUpdateParams";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
/// MsgUpdateParamsResponse defines the Msg/UpdateParams response type.
///
/// Since: cosmos-sdk 0.47
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpdateParamsResponse {}
impl ::prost::Name for MsgUpdateParamsResponse {
    const NAME: &'static str = "MsgUpdateParamsResponse";
    const PACKAGE: &'static str = "side.liquidation";
    fn full_name() -> ::prost::alloc::string::String {
        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
    }
}
include!("side.liquidation.serde.rs");
include!("side.liquidation.tonic.rs");
// @@protoc_insertion_point(module)