fireblocks_sdk/models/
stake_request.rs

1// Fireblocks API
2//
3// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use {
10    crate::models,
11    serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct StakeRequest {
16    /// The source vault account to stake from
17    #[serde(rename = "vaultAccountId")]
18    pub vault_account_id: String,
19    #[serde(rename = "providerId")]
20    pub provider_id: models::StakingProvider,
21    /// Amount of tokens to stake
22    #[serde(rename = "stakeAmount")]
23    pub stake_amount: String,
24    /// The note to associate with the stake transactions.
25    #[serde(rename = "txNote", skip_serializing_if = "Option::is_none")]
26    pub tx_note: Option<String>,
27    /// Represents the fee for a transaction, which can be specified as a
28    /// percentage value. Only one of fee/feeLevel is required.
29    #[serde(rename = "fee", skip_serializing_if = "Option::is_none")]
30    pub fee: Option<String>,
31    #[serde(rename = "feeLevel", skip_serializing_if = "Option::is_none")]
32    pub fee_level: Option<models::FeeLevel>,
33}
34
35impl StakeRequest {
36    pub fn new(
37        vault_account_id: String,
38        provider_id: models::StakingProvider,
39        stake_amount: String,
40    ) -> StakeRequest {
41        StakeRequest {
42            vault_account_id,
43            provider_id,
44            stake_amount,
45            tx_note: None,
46            fee: None,
47            fee_level: None,
48        }
49    }
50}