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, set the `type` to `NODE_ROUTER` and the `tag`
16/// to the pre-configured tag value. - For MEV protection, set only the `type`
17/// property to `MEV` (`tag` is not required at this stage).  **Note:** This is
18/// a premium feature that should be enabled in your workspace. Please contact
19/// your Customer Success Manager or Fireblocks Support for more information.
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, 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
36    /// is a premium feature that should be enabled in your workspace. Please
37    /// contact your Customer Success Manager or Fireblocks Support for more
38    /// information.
39    pub fn new() -> NodeControls {
40        NodeControls {
41            r#type: None,
42            tag: None,
43        }
44    }
45}
46/// `NODE_ROUTER` - used for transaction routing to a custom node `MEV` - used
47/// for transaction routing to a MEV protection provider
48#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
49pub enum Type {
50    #[serde(rename = "MEV")]
51    Mev,
52    #[serde(rename = "NODE_ROUTER")]
53    NodeRouter,
54}
55
56impl Default for Type {
57    fn default() -> Type {
58        Self::Mev
59    }
60}