fireblocks-sdk 2026.3.27

Rust implementation of the Fireblocks SDK
Documentation
// Fireblocks API
//
// 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)
//
// The version of the OpenAPI document: 1.8.0
// Contact: developers@fireblocks.com
// Generated by: https://openapi-generator.tech

use {
    crate::models,
    serde::{Deserialize, Serialize},
};

/// 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).
/// * `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).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum GetTransactionOperation {
    #[serde(rename = "TRANSFER")]
    Transfer,
    #[serde(rename = "BURN")]
    Burn,
    #[serde(rename = "CONTRACT_CALL")]
    ContractCall,
    #[serde(rename = "MINT")]
    Mint,
    #[serde(rename = "RAW")]
    Raw,
    #[serde(rename = "TYPED_MESSAGE")]
    TypedMessage,
    #[serde(rename = "PROGRAM_CALL")]
    ProgramCall,
    #[serde(rename = "ENABLE_ASSET")]
    EnableAsset,
    #[serde(rename = "STAKE")]
    Stake,
    #[serde(rename = "UNSTAKE")]
    Unstake,
    #[serde(rename = "WITHDRAW")]
    Withdraw,
    #[serde(rename = "REDEEM_FROM_COMPOUND")]
    RedeemFromCompound,
    #[serde(rename = "SUPPLY_TO_COMPOUND")]
    SupplyToCompound,
    #[serde(rename = "APPROVE")]
    Approve,
}

impl std::fmt::Display for GetTransactionOperation {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Transfer => write!(f, "TRANSFER"),
            Self::Burn => write!(f, "BURN"),
            Self::ContractCall => write!(f, "CONTRACT_CALL"),
            Self::Mint => write!(f, "MINT"),
            Self::Raw => write!(f, "RAW"),
            Self::TypedMessage => write!(f, "TYPED_MESSAGE"),
            Self::ProgramCall => write!(f, "PROGRAM_CALL"),
            Self::EnableAsset => write!(f, "ENABLE_ASSET"),
            Self::Stake => write!(f, "STAKE"),
            Self::Unstake => write!(f, "UNSTAKE"),
            Self::Withdraw => write!(f, "WITHDRAW"),
            Self::RedeemFromCompound => write!(f, "REDEEM_FROM_COMPOUND"),
            Self::SupplyToCompound => write!(f, "SUPPLY_TO_COMPOUND"),
            Self::Approve => write!(f, "APPROVE"),
        }
    }
}

impl Default for GetTransactionOperation {
    fn default() -> GetTransactionOperation {
        Self::Transfer
    }
}