pub struct SwapOperation {Show 18 fields
pub id: String,
pub account_id: String,
pub provider_id: String,
pub category: ProviderCategoryEnum,
pub protocol: SwapProviderProtocolsEnum,
pub status: Status,
pub input_amount: String,
pub input_asset: String,
pub slippage_tolerance: f64,
pub output_min_amount: String,
pub output_max_amount: String,
pub output_asset: String,
pub output_final_amount: Option<Option<String>>,
pub required_actions: Vec<SwapRequiredAction>,
pub error: Option<Option<SwapFlowError>>,
pub created_at: String,
pub updated_at: String,
pub created_by: Uuid,
}
Fields§
§id: String
The id of the swap operation
account_id: String
The id of the vault account or account id
provider_id: String
The ID of the provider
category: ProviderCategoryEnum
§protocol: SwapProviderProtocolsEnum
§status: Status
CREATED – The swap request has been created but not yet started. PENDING_USER_ACTION – Awaiting a user action (e.g. signature or approval). PENDING_PROVIDER_ACTION – Awaiting the provider to process the request. PROCESSING – The swap is actively being executed on‐chain. COMPLETED – The swap has finished successfully. CANCELED – The swap was cancelled by user or provider before completion. FAILED – The swap attempted but encountered an error.
input_amount: String
The amount of tokens the swapper will provide
input_asset: String
The id of the asset the swapper will provide
slippage_tolerance: f64
The slippage tolerance is a percentage. The slippage tolerance is the maximum amount the price can change between the time the transaction is submitted and the time it is executed
output_min_amount: String
The minimum amount of tokens the swapper will receive
output_max_amount: String
Maximum amount of tokens that the swapper will receive
output_asset: String
The id of the asset the swapper will receive
output_final_amount: Option<Option<String>>
Final amount of tokens that the swapper will receive
required_actions: Vec<SwapRequiredAction>
The required actions for the swap, including the type of action, the status of the action, and the transaction id
error: Option<Option<SwapFlowError>>
§created_at: String
The creation time of the swap operation (ISO Date time).
updated_at: String
The last update time of the swap operation (ISO Date time).
created_by: Uuid
Fireblocks user id that issued the swap
Implementations§
Source§impl SwapOperation
impl SwapOperation
pub fn new( id: String, account_id: String, provider_id: String, category: ProviderCategoryEnum, protocol: SwapProviderProtocolsEnum, status: Status, input_amount: String, input_asset: String, slippage_tolerance: f64, output_min_amount: String, output_max_amount: String, output_asset: String, required_actions: Vec<SwapRequiredAction>, created_at: String, updated_at: String, created_by: Uuid, ) -> SwapOperation
Trait Implementations§
Source§impl Clone for SwapOperation
impl Clone for SwapOperation
Source§fn clone(&self) -> SwapOperation
fn clone(&self) -> SwapOperation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more