fireblocks_sdk/models/
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/// TransactionOperation : * `TRANSFER` - The default value for an operation. 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. * `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).  * `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-1). * `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 are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-signing)
15/// * `TRANSFER` - The default value for an operation. 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. * `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).  * `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-1). * `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 are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-signing)
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum TransactionOperation {
18    #[serde(rename = "TRANSFER")]
19    Transfer,
20    #[serde(rename = "BURN")]
21    Burn,
22    #[serde(rename = "CONTRACT_CALL")]
23    ContractCall,
24    #[serde(rename = "MINT")]
25    Mint,
26    #[serde(rename = "RAW")]
27    Raw,
28    #[serde(rename = "TYPED_MESSAGE")]
29    TypedMessage,
30    #[serde(rename = "PROGRAM_CALL")]
31    ProgramCall,
32}
33
34impl std::fmt::Display for TransactionOperation {
35    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
36        match self {
37            Self::Transfer => write!(f, "TRANSFER"),
38            Self::Burn => write!(f, "BURN"),
39            Self::ContractCall => write!(f, "CONTRACT_CALL"),
40            Self::Mint => write!(f, "MINT"),
41            Self::Raw => write!(f, "RAW"),
42            Self::TypedMessage => write!(f, "TYPED_MESSAGE"),
43            Self::ProgramCall => write!(f, "PROGRAM_CALL"),
44        }
45    }
46}
47
48impl Default for TransactionOperation {
49    fn default() -> TransactionOperation {
50        Self::Transfer
51    }
52}