fireblocks_sdk/models/
create_ncw_connection_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 CreateNcwConnectionRequest {
16    /// The ID of the Non-Custodial Wallet to connect to the dApp.
17    #[serde(rename = "ncwId")]
18    pub ncw_id: String,
19    /// The NCW account ID to connect to the dApp.
20    #[serde(rename = "ncwAccountId")]
21    pub ncw_account_id: f64,
22    /// The default fee level. Valid values are `MEDIUM` and `HIGH`.
23    #[serde(rename = "feeLevel")]
24    pub fee_level: FeeLevel,
25    /// The WalletConnect uri provided by the dapp.
26    #[serde(rename = "uri")]
27    pub uri: String,
28    /// The IDs of the blockchain networks used in the dApp connection.
29    #[serde(rename = "chainIds", skip_serializing_if = "Option::is_none")]
30    pub chain_ids: Option<Vec<String>>,
31}
32
33impl CreateNcwConnectionRequest {
34    pub fn new(
35        ncw_id: String,
36        ncw_account_id: f64,
37        fee_level: FeeLevel,
38        uri: String,
39    ) -> CreateNcwConnectionRequest {
40        CreateNcwConnectionRequest {
41            ncw_id,
42            ncw_account_id,
43            fee_level,
44            uri,
45            chain_ids: None,
46        }
47    }
48}
49/// The default fee level. Valid values are `MEDIUM` and `HIGH`.
50#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
51pub enum FeeLevel {
52    #[serde(rename = "MEDIUM")]
53    Medium,
54    #[serde(rename = "HIGH")]
55    High,
56}
57
58impl Default for FeeLevel {
59    fn default() -> FeeLevel {
60        Self::Medium
61    }
62}