fireblocks_sdk/models/get_transaction_operation.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/// GetTransactionOperation : * `TRANSFER` - Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address. * `MINT` - Mints new tokens. Supported for Stellar, Ripple, and EVM-based blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple, and EVM-based blockchains. * `CONTRACT_CALL` - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that Fireblocks do not natively support. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) * `PROGRAM_CALL` - Calls a smart contract for web3 operations on the Solana blockchain. Read more in the [Solana Programs Interactions guide](https://developers.fireblocks.com/reference/interact-with-solana-programs) * `ENABLE_ASSET` - Algorand, DigitalBits, Solana, and Stellar require an on-chain transaction to create an asset wallet and enable the deposit address. This transaction is automatically created when adding assets on these blockchains at a vault account. * `STAKE` - Assign assets to a staking pool managed by a staking validator. Supported for Stellar and EVM-based blockchains. This transaction is automatically created when performing staking operations. * `UNSTAKE` - Remove assets from a staking pool managed by a staking validator. Supported for Stellar and EVM-based blockchains. This transaction is automatically created when performing staking operations. * `WITHDRAW` - Transfer assets from a dedicated staking vault account to another address. Supported for Stellar and EVM-based blockchains. This transaction is automatically created when performing staking operations. **Note:** Fireblocks will rename this type from `WITHDRAW` to a different type name soon. There will be a 7-day notice regarding the new type name. * `SUPPLY_TO_COMPOUND` - Deprecated since April 1st, 2023. Older transactions may have this as their operation, in case users in the workspace have used the direct integration between Fireblocks and the Compound DeFI protocol. * `REDEEM_FROM_COMPOUND` - Deprecated since April 1st, 2023. Older transactions may have this as their operation, in case users in the workspace have used the direct integration between Fireblocks and the Compound DeFI protocol. * `APPROVE` - Enables the approve function for a smart contract to withdraw from a designated wallet. [Learn more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Approve-Transaction-Amount-Cap).
15/// * `TRANSFER` - Transfers funds from one account to another. UTXO blockchains
16/// allow multi-input and multi-output transfers. All other blockchains allow
17/// transfers with one source address and one destination address. * `MINT` -
18/// Mints new tokens. Supported for Stellar, Ripple, and EVM-based
19/// blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple, and
20/// EVM-based blockchains. * `CONTRACT_CALL`
21/// - Calls a smart contract method for web3 operations on any EVM blockchain.
22/// The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries)
23/// are recommended for building contract call transactions. * `TYPED_MESSAGE`
24/// - An off-chain message in either Ethereum Personal Message or EIP712
25/// format.
26/// Use it to sign specific readable messages that are not actual
27/// transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing).
28/// * `RAW` - An off-chain message with no predefined format. Use it to sign
29/// any
30/// message with your private key, including protocols such as blockchains and
31/// custom transaction types that Fireblocks do not natively support. [Learn
32/// more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing)
33/// * `PROGRAM_CALL` - Calls a smart contract for web3 operations on the
34/// Solana
35/// blockchain. Read more in the [Solana Programs Interactions guide](https://developers.fireblocks.com/reference/interact-with-solana-programs)
36/// * `ENABLE_ASSET` - Algorand, DigitalBits, Solana, and Stellar require an
37/// on-chain
38/// transaction to create an asset wallet and enable the deposit address. This
39/// transaction is automatically created when adding assets on these
40/// blockchains at a vault account. * `STAKE` - Assign assets to a staking
41/// pool managed by a staking validator. Supported for Stellar and EVM-based
42/// blockchains. This transaction is automatically created when performing
43/// staking operations. * `UNSTAKE` - Remove assets from a staking pool
44/// managed by a staking validator. Supported for Stellar and EVM-based
45/// blockchains. This transaction is automatically created when performing
46/// staking operations. * `WITHDRAW` - Transfer assets from a dedicated
47/// staking vault account to another address. Supported for Stellar
48/// and EVM-based blockchains. This transaction is automatically created when
49/// performing staking operations. **Note:** Fireblocks will rename this
50/// type from `WITHDRAW` to a different type name soon. There will be a 7-day
51/// notice regarding the new type name. * `SUPPLY_TO_COMPOUND` - Deprecated
52/// since April 1st, 2023. Older transactions may have this as their
53/// operation, in case users in the workspace have used the direct integration
54/// between Fireblocks and the Compound DeFI protocol.
55/// * `REDEEM_FROM_COMPOUND` - Deprecated since April 1st, 2023. Older
56/// transactions
57/// may have this as their operation, in case users in the workspace have used
58/// the direct integration between Fireblocks and the Compound DeFI protocol.
59/// * `APPROVE` - Enables the approve function for a smart contract to
60/// withdraw from a designated wallet. [Learn more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Approve-Transaction-Amount-Cap).
61#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
62pub enum GetTransactionOperation {
63 #[serde(rename = "TRANSFER")]
64 Transfer,
65 #[serde(rename = "BURN")]
66 Burn,
67 #[serde(rename = "CONTRACT_CALL")]
68 ContractCall,
69 #[serde(rename = "MINT")]
70 Mint,
71 #[serde(rename = "RAW")]
72 Raw,
73 #[serde(rename = "TYPED_MESSAGE")]
74 TypedMessage,
75 #[serde(rename = "PROGRAM_CALL")]
76 ProgramCall,
77 #[serde(rename = "ENABLE_ASSET")]
78 EnableAsset,
79 #[serde(rename = "STAKE")]
80 Stake,
81 #[serde(rename = "UNSTAKE")]
82 Unstake,
83 #[serde(rename = "WITHDRAW")]
84 Withdraw,
85 #[serde(rename = "REDEEM_FROM_COMPOUND")]
86 RedeemFromCompound,
87 #[serde(rename = "SUPPLY_TO_COMPOUND")]
88 SupplyToCompound,
89 #[serde(rename = "APPROVE")]
90 Approve,
91}
92
93impl std::fmt::Display for GetTransactionOperation {
94 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
95 match self {
96 Self::Transfer => write!(f, "TRANSFER"),
97 Self::Burn => write!(f, "BURN"),
98 Self::ContractCall => write!(f, "CONTRACT_CALL"),
99 Self::Mint => write!(f, "MINT"),
100 Self::Raw => write!(f, "RAW"),
101 Self::TypedMessage => write!(f, "TYPED_MESSAGE"),
102 Self::ProgramCall => write!(f, "PROGRAM_CALL"),
103 Self::EnableAsset => write!(f, "ENABLE_ASSET"),
104 Self::Stake => write!(f, "STAKE"),
105 Self::Unstake => write!(f, "UNSTAKE"),
106 Self::Withdraw => write!(f, "WITHDRAW"),
107 Self::RedeemFromCompound => write!(f, "REDEEM_FROM_COMPOUND"),
108 Self::SupplyToCompound => write!(f, "SUPPLY_TO_COMPOUND"),
109 Self::Approve => write!(f, "APPROVE"),
110 }
111 }
112}
113
114impl Default for GetTransactionOperation {
115 fn default() -> GetTransactionOperation {
116 Self::Transfer
117 }
118}