Skip to main content

dfns_sdk_rust/staking/
types.rs

1// Code generated by rust-sdk-generator. DO NOT EDIT.
2
3#![allow(clippy::all)]
4
5/// List Stakes
6#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
7pub struct ListStakesResponse {
8    #[serde(rename = "items")]
9    pub items: Vec<serde_json::Value>,
10    #[serde(
11        rename = "nextPageToken",
12        default,
13        skip_serializing_if = "Option::is_none"
14    )]
15    pub next_page_token: Option<String>,
16}
17
18/// Query parameters for the ListStakesQuery operation.
19#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
20pub struct ListStakesQuery {
21    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
22    pub limit: Option<i64>,
23    #[serde(
24        rename = "paginationToken",
25        default,
26        skip_serializing_if = "Option::is_none"
27    )]
28    pub pagination_token: Option<String>,
29}
30
31/// Create Stake
32#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
33pub struct CreateStakeRequest {
34    #[serde(
35        rename = "externalId",
36        default,
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub external_id: Option<String>,
40}
41
42/// Create Stake
43#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
44pub struct CreateStakeResponse {
45    #[serde(rename = "actions")]
46    pub actions: Vec<crate::types::StakeAction>,
47}
48
49/// List Stake Actions
50#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
51pub struct ListStakeActionsResponse {
52    #[serde(rename = "items")]
53    pub items: Vec<crate::types::StakeAction>,
54    #[serde(
55        rename = "nextPageToken",
56        default,
57        skip_serializing_if = "Option::is_none"
58    )]
59    pub next_page_token: Option<String>,
60}
61
62/// Query parameters for the ListStakeActionsQuery operation.
63#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
64pub struct ListStakeActionsQuery {
65    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
66    pub limit: Option<i64>,
67    #[serde(
68        rename = "paginationToken",
69        default,
70        skip_serializing_if = "Option::is_none"
71    )]
72    pub pagination_token: Option<String>,
73}
74
75/// Create Stake Action
76#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
77pub struct CreateStakeActionRequest {
78    #[serde(
79        rename = "externalId",
80        default,
81        skip_serializing_if = "Option::is_none"
82    )]
83    pub external_id: Option<String>,
84}
85
86/// Create Stake Action
87#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
88pub struct CreateStakeActionResponse {
89    #[serde(rename = "actions")]
90    pub actions: Vec<crate::types::StakeAction>,
91}
92
93/// Get Stakes
94#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
95pub struct GetStakesResponse {
96    #[serde(rename = "actions")]
97    pub actions: Vec<crate::types::StakeAction>,
98}
99
100/// Query parameters for the GetStakesQuery operation.
101#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
102pub struct GetStakesQuery {
103    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
104    pub limit: Option<i64>,
105    #[serde(
106        rename = "paginationToken",
107        default,
108        skip_serializing_if = "Option::is_none"
109    )]
110    pub pagination_token: Option<String>,
111}
112
113/// Get Stake Rewards
114#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
115pub struct GetStakeRewardsResponse {
116    #[serde(rename = "symbol")]
117    pub symbol: String,
118    #[serde(rename = "balance")]
119    pub balance: String,
120}