fireblocks_sdk/models/
node_controls.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/// NodeControls : Configure special node requirements.  For routing
15/// transactions to a custom node please set the `type` to `NODE_ROUTER` and the
16/// `tag` to the pre-configured tag value. For MEV protection, set only the
17/// `type` property to `MEV` (`tag` is not required at this stage)  * Note: This
18/// is a premium feature that should be enabled in your workspace.   Please
19/// contract your Customer Success Manager/Fireblocks Support for more info.
20#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
21pub struct NodeControls {
22    /// `NODE_ROUTER` - used for transaction routing to a custom node `MEV` -
23    /// used for transaction routing to a MEV protection provider
24    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
25    pub r#type: Option<Type>,
26    /// Should be used when type is `NODE_ROUTER` only
27    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
28    pub tag: Option<String>,
29}
30
31impl NodeControls {
32    /// Configure special node requirements.  For routing transactions to a
33    /// custom node please set the `type` to `NODE_ROUTER` and the `tag` to the
34    /// pre-configured tag value. For MEV protection, set only the `type`
35    /// property to `MEV` (`tag` is not required at this stage)  * Note: This is
36    /// a premium feature that should be enabled in your workspace.   Please
37    /// contract your Customer Success Manager/Fireblocks Support for more info.
38    pub fn new() -> NodeControls {
39        NodeControls {
40            r#type: None,
41            tag: None,
42        }
43    }
44}
45/// `NODE_ROUTER` - used for transaction routing to a custom node `MEV` - used
46/// for transaction routing to a MEV protection provider
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
48pub enum Type {
49    #[serde(rename = "MEV")]
50    Mev,
51    #[serde(rename = "NODE_ROUTER")]
52    NodeRouter,
53}
54
55impl Default for Type {
56    fn default() -> Type {
57        Self::Mev
58    }
59}