fireblocks_sdk/models/
create_token_request_dto.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 CreateTokenRequestDto {
16    /// The id of the blockchain the request was initiated on
17    #[serde(rename = "blockchainId", skip_serializing_if = "Option::is_none")]
18    pub blockchain_id: Option<String>,
19    /// The base asset identifier of the blockchain you want to deploy to
20    #[serde(rename = "assetId", skip_serializing_if = "Option::is_none")]
21    pub asset_id: Option<String>,
22    /// The id of the vault account that initiated the request to issue the
23    /// token
24    #[serde(rename = "vaultAccountId")]
25    pub vault_account_id: String,
26    #[serde(rename = "createParams")]
27    pub create_params: models::CreateTokenRequestDtoCreateParams,
28    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
29    pub display_name: Option<String>,
30    /// Indicates whether the token should be created in a gasless manner,
31    /// utilizing the ERC-2771 standard. When set to true, the transaction will
32    /// be relayed by a designated relayer. The workspace must be configured to
33    /// use Fireblocks gasless relay.
34    #[serde(rename = "useGasless", skip_serializing_if = "Option::is_none")]
35    pub use_gasless: Option<bool>,
36    /// Max fee amount for the write function transaction. interchangeable with
37    /// the 'feeLevel' field
38    #[serde(rename = "fee", skip_serializing_if = "Option::is_none")]
39    pub fee: Option<String>,
40    /// Fee level for the write function transaction. interchangeable with the
41    /// 'fee' field
42    #[serde(rename = "feeLevel", skip_serializing_if = "Option::is_none")]
43    pub fee_level: Option<FeeLevel>,
44}
45
46impl CreateTokenRequestDto {
47    pub fn new(
48        vault_account_id: String,
49        create_params: models::CreateTokenRequestDtoCreateParams,
50    ) -> CreateTokenRequestDto {
51        CreateTokenRequestDto {
52            blockchain_id: None,
53            asset_id: None,
54            vault_account_id,
55            create_params,
56            display_name: None,
57            use_gasless: None,
58            fee: None,
59            fee_level: None,
60        }
61    }
62}
63/// Fee level for the write function transaction. interchangeable with the 'fee'
64/// field
65#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
66pub enum FeeLevel {
67    #[serde(rename = "LOW")]
68    Low,
69    #[serde(rename = "MEDIUM")]
70    Medium,
71    #[serde(rename = "HIGH")]
72    High,
73}
74
75impl Default for FeeLevel {
76    fn default() -> FeeLevel {
77        Self::Low
78    }
79}