// 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 {
super::{Error, configuration},
crate::{
apis::{ContentType, ResponseContent},
models,
},
async_trait::async_trait,
reqwest,
serde::{Deserialize, Serialize, de::Error as _},
std::sync::Arc,
};
#[async_trait]
pub trait TransactionsApi: Send + Sync {
/// POST /transactions/{txId}/cancel
///
/// Cancels a transaction by Fireblocks Transaction ID. Can be used only
/// for transactions that did not get to the BROADCASTING state.
/// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
/// Editor.
async fn cancel_transaction(
&self,
params: CancelTransactionParams,
) -> Result<models::CancelTransactionResponse, Error<CancelTransactionError>>;
/// POST /transactions
///
/// Creates a new transaction. This endpoint can be used for regular Transfers, Contract Calls, Raw & Typed message signing. - For Transfers, the required parameters are: `assetId`, `source`, `destination` and `amount`. - For Contract Calls, the required parameters are: `operation.CONTRACT_CALL`, `assetId` (Base Asset), `source`, `destination`, `amount` (usually 0) and `extraParameters` object with `contractCallData` string. - For Solana Program Calls, the required parameters are: `operation.PROGRAM_CALL`, `assetId` (SOL/SOL_TEST), `source`, and `extraParameters` object with `programCallData` key while the value is a Base64 encoded unsigned serialized Solana transaction object. - Typed Message Signing is supported for the following asset IDs: 'ETH', 'BTC' and 'TRX'. [Typed Message Signing Guide](https://developers.fireblocks.com/docs/typed-message-signing-overview). - To create ZEC transaction, please call [Get unspent UTXO Input endpoint](https://developers.fireblocks.com/reference/getunspentinputs) to get the amount and use it as an input under `networkfee` on this endpoint. Please use this formula `(0.0001 + 0.00005*N) where N is the number of inputs` to calculate the fee needed and use it as an input under networkFee field - When using `maxFee` and a boost is needed, the user should set a custom `gasPrice` to force the override. Learn more about Fireblocks Transactions management in the following [guide](https://developers.fireblocks.com/reference/create-transactions). </br>Endpoint Permission: Admin, Signer, Editor.
async fn create_transaction(
&self,
params: CreateTransactionParams,
) -> Result<models::CreateTransactionResponse, Error<CreateTransactionError>>;
/// POST /transactions/{txId}/drop
///
/// Drops a stuck ETH (EVM) transaction and creates a replacement
/// transaction with 0 amount. </br>Endpoint Permission: Admin, Non-Signing
/// Admin, Signer, Approver, Editor.
async fn drop_transaction(
&self,
params: DropTransactionParams,
) -> Result<models::DropTransactionResponse, Error<DropTransactionError>>;
/// POST /transactions/estimate_fee
///
/// Estimates the transaction fee for a specific transaction request. This endpoint simulates a transaction which means that the system will expect to have the requested asset and balance in the specified wallet. **Note**: Supports all Fireblocks assets except ZCash (ZEC). Learn more about Fireblocks Fee Management in the following [guide](https://developers.fireblocks.com/reference/estimate-transaction-fee). </br>Endpoint Permission: Admin, Signer, Approver, Editor.
async fn estimate_transaction_fee(
&self,
params: EstimateTransactionFeeParams,
) -> Result<models::EstimatedTransactionFeeResponse, Error<EstimateTransactionFeeError>>;
/// POST /transactions/{txId}/freeze
///
/// Freezes a transaction by ID. Usually used for AML integrations when the
/// incoming funds should be quarantined. For account based assets - the
/// entire amount of the transaction is frozen For UTXO based assets - all
/// UTXOs of the specified transaction are frozen </br>Endpoint Permission:
/// Admin, Non-Signing Admin.
async fn freeze_transaction(
&self,
params: FreezeTransactionParams,
) -> Result<models::FreezeTransactionResponse, Error<FreezeTransactionError>>;
/// GET /transactions/{txId}
///
/// Get a specific transaction data by Fireblocks Transaction ID
/// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
/// Editor, Viewer.
async fn get_transaction(
&self,
params: GetTransactionParams,
) -> Result<models::TransactionResponse, Error<GetTransactionError>>;
/// GET /transactions/external_tx_id/{externalTxId}
///
/// Returns transaction by external transaction ID. </br>Endpoint
/// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
async fn get_transaction_by_external_id(
&self,
params: GetTransactionByExternalIdParams,
) -> Result<models::TransactionResponse, Error<GetTransactionByExternalIdError>>;
/// GET /transactions
///
/// Get the transaction history for your workspace. **Endpoint
/// Permissions:** Admin, Non-Signing Admin, Signer, Approver, Editor,
/// Viewer.
async fn get_transactions(
&self,
params: GetTransactionsParams,
) -> Result<Vec<models::TransactionResponse>, Error<GetTransactionsError>>;
/// POST /txHash/{txHash}/set_confirmation_threshold
///
/// Overrides the required number of confirmations for transaction
/// completion by transaction hash. </br>Endpoint Permission: Admin,
/// Non-Signing Admin, Signer, Approver, Editor.
async fn set_confirmation_threshold_by_transaction_hash(
&self,
params: SetConfirmationThresholdByTransactionHashParams,
) -> Result<
models::SetConfirmationsThresholdResponse,
Error<SetConfirmationThresholdByTransactionHashError>,
>;
/// POST /transactions/{txId}/set_confirmation_threshold
///
/// Overrides the required number of confirmations for transaction
/// completion Fireblocks Transaction ID. </br>Endpoint Permission: Admin,
/// Non-Signing Admin, Signer, Approver, Editor.
async fn set_transaction_confirmation_threshold(
&self,
params: SetTransactionConfirmationThresholdParams,
) -> Result<
models::SetConfirmationsThresholdResponse,
Error<SetTransactionConfirmationThresholdError>,
>;
/// POST /transactions/{txId}/unfreeze
///
/// Unfreezes a transaction by Fireblocks Transaction ID and makes the
/// transaction available again. </br>Endpoint Permission: Admin,
/// Non-Signing Admin.
async fn unfreeze_transaction(
&self,
params: UnfreezeTransactionParams,
) -> Result<models::UnfreezeTransactionResponse, Error<UnfreezeTransactionError>>;
}
pub struct TransactionsApiClient {
configuration: Arc<configuration::Configuration>,
}
impl TransactionsApiClient {
pub fn new(configuration: Arc<configuration::Configuration>) -> Self {
Self { configuration }
}
}
/// struct for passing parameters to the method
/// [`TransactionsApi::cancel_transaction`]
#[derive(Clone, Debug)]
#[cfg_attr(feature = "bon", derive(::bon::Builder))]
pub struct CancelTransactionParams {
/// The Fireblocks Transaction ID of the transaction to cancel
pub tx_id: String,
/// Unique ID of the End-User wallet to the API request. Required for
/// end-user wallet operations.
pub x_end_user_wallet_id: Option<String>,
/// A unique identifier for the request. If the request is sent multiple
/// times with the same idempotency key, the server will return the same
/// response as the first request. The idempotency key is valid for 24
/// hours.
pub idempotency_key: Option<String>,
}
/// struct for passing parameters to the method
/// [`TransactionsApi::create_transaction`]
#[derive(Clone, Debug)]
#[cfg_attr(feature = "bon", derive(::bon::Builder))]
pub struct CreateTransactionParams {
pub transaction_request: models::TransactionRequest,
/// Unique ID of the End-User wallet to the API request. Required for
/// end-user wallet operations.
pub x_end_user_wallet_id: Option<String>,
/// A unique identifier for the request. If the request is sent multiple
/// times with the same idempotency key, the server will return the same
/// response as the first request. The idempotency key is valid for 24
/// hours.
pub idempotency_key: Option<String>,
}
/// struct for passing parameters to the method
/// [`TransactionsApi::drop_transaction`]
#[derive(Clone, Debug)]
#[cfg_attr(feature = "bon", derive(::bon::Builder))]
pub struct DropTransactionParams {
/// The ID of the transaction
pub tx_id: String,
/// Unique ID of the End-User wallet to the API request. Required for
/// end-user wallet operations.
pub x_end_user_wallet_id: Option<String>,
/// A unique identifier for the request. If the request is sent multiple
/// times with the same idempotency key, the server will return the same
/// response as the first request. The idempotency key is valid for 24
/// hours.
pub idempotency_key: Option<String>,
pub drop_transaction_request: Option<models::DropTransactionRequest>,
}
/// struct for passing parameters to the method
/// [`TransactionsApi::estimate_transaction_fee`]
#[derive(Clone, Debug)]
#[cfg_attr(feature = "bon", derive(::bon::Builder))]
pub struct EstimateTransactionFeeParams {
/// A unique identifier for the request. If the request is sent multiple
/// times with the same idempotency key, the server will return the same
/// response as the first request. The idempotency key is valid for 24
/// hours.
pub idempotency_key: Option<String>,
pub transaction_request: Option<models::TransactionRequest>,
}
/// struct for passing parameters to the method
/// [`TransactionsApi::freeze_transaction`]
#[derive(Clone, Debug)]
#[cfg_attr(feature = "bon", derive(::bon::Builder))]
pub struct FreezeTransactionParams {
/// The ID of the transaction to freeze
pub tx_id: String,
/// Unique ID of the End-User wallet to the API request. Required for
/// end-user wallet operations.
pub x_end_user_wallet_id: Option<String>,
/// A unique identifier for the request. If the request is sent multiple
/// times with the same idempotency key, the server will return the same
/// response as the first request. The idempotency key is valid for 24
/// hours.
pub idempotency_key: Option<String>,
}
/// struct for passing parameters to the method
/// [`TransactionsApi::get_transaction`]
#[derive(Clone, Debug)]
#[cfg_attr(feature = "bon", derive(::bon::Builder))]
pub struct GetTransactionParams {
/// The ID of the transaction to return
pub tx_id: String,
}
/// struct for passing parameters to the method
/// [`TransactionsApi::get_transaction_by_external_id`]
#[derive(Clone, Debug)]
#[cfg_attr(feature = "bon", derive(::bon::Builder))]
pub struct GetTransactionByExternalIdParams {
/// The external ID of the transaction to return
pub external_tx_id: String,
}
/// struct for passing parameters to the method
/// [`TransactionsApi::get_transactions`]
#[derive(Clone, Debug)]
#[cfg_attr(feature = "bon", derive(::bon::Builder))]
pub struct GetTransactionsParams {
/// Unix timestamp in milliseconds. Returns only transactions created before
/// the specified date. Provides an explicit end time. If not provided,
/// default value will be applied, and may change over time. The current
/// default value is the past 90 days.
pub before: Option<String>,
/// Unix timestamp in milliseconds. Returns only transactions created after
/// the specified date. Provides an explicit start time. If not provided,
/// default value will be applied, and may change over time. The current
/// default value is the past 90 days.
pub after: Option<String>,
/// You can filter by one of the statuses.
pub status: Option<models::TransactionStatus>,
/// The field to order the results by. **Note:** Ordering by a field that
/// is not `createdAt` may result in transactions that receive updates as
/// you request the next or previous pages of results, resulting in missing
/// those transactions.
pub order_by: Option<String>,
/// The direction to order the results by
pub sort: Option<String>,
/// Limits the number of results. If not provided, a limit of 200 will be
/// used. The maximum allowed limit is 500
pub limit: Option<u32>,
/// The source type of the transaction
pub source_type: Option<String>,
/// The source ID of the transaction
pub source_id: Option<String>,
/// The destination type of the transaction
pub dest_type: Option<String>,
/// The destination ID of the transaction
pub dest_id: Option<String>,
/// A list of assets to filter by, seperated by commas
pub assets: Option<String>,
/// Returns only results with a specified txHash
pub tx_hash: Option<String>,
/// Returns only results where the source is a specific end user wallet
pub source_wallet_id: Option<String>,
/// Returns only results where the destination is a specific end user wallet
pub dest_wallet_id: Option<String>,
}
/// struct for passing parameters to the method
/// [`TransactionsApi::set_confirmation_threshold_by_transaction_hash`]
#[derive(Clone, Debug)]
#[cfg_attr(feature = "bon", derive(::bon::Builder))]
pub struct SetConfirmationThresholdByTransactionHashParams {
/// The TxHash
pub tx_hash: String,
/// A unique identifier for the request. If the request is sent multiple
/// times with the same idempotency key, the server will return the same
/// response as the first request. The idempotency key is valid for 24
/// hours.
pub idempotency_key: Option<String>,
pub set_confirmations_threshold_request: Option<models::SetConfirmationsThresholdRequest>,
}
/// struct for passing parameters to the method
/// [`TransactionsApi::set_transaction_confirmation_threshold`]
#[derive(Clone, Debug)]
#[cfg_attr(feature = "bon", derive(::bon::Builder))]
pub struct SetTransactionConfirmationThresholdParams {
/// The ID of the transaction
pub tx_id: String,
/// A unique identifier for the request. If the request is sent multiple
/// times with the same idempotency key, the server will return the same
/// response as the first request. The idempotency key is valid for 24
/// hours.
pub idempotency_key: Option<String>,
pub set_confirmations_threshold_request: Option<models::SetConfirmationsThresholdRequest>,
}
/// struct for passing parameters to the method
/// [`TransactionsApi::unfreeze_transaction`]
#[derive(Clone, Debug)]
#[cfg_attr(feature = "bon", derive(::bon::Builder))]
pub struct UnfreezeTransactionParams {
/// The ID of the transaction to unfreeze
pub tx_id: String,
/// Unique ID of the End-User wallet to the API request. Required for
/// end-user wallet operations.
pub x_end_user_wallet_id: Option<String>,
/// A unique identifier for the request. If the request is sent multiple
/// times with the same idempotency key, the server will return the same
/// response as the first request. The idempotency key is valid for 24
/// hours.
pub idempotency_key: Option<String>,
}
#[async_trait]
impl TransactionsApi for TransactionsApiClient {
/// Cancels a transaction by Fireblocks Transaction ID. Can be used only
/// for transactions that did not get to the BROADCASTING state.
/// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
/// Editor.
async fn cancel_transaction(
&self,
params: CancelTransactionParams,
) -> Result<models::CancelTransactionResponse, Error<CancelTransactionError>> {
let CancelTransactionParams {
tx_id,
x_end_user_wallet_id,
idempotency_key,
} = params;
let local_var_configuration = &self.configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!(
"{}/transactions/{txId}/cancel",
local_var_configuration.base_path,
txId = crate::apis::urlencode(tx_id)
);
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder
.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(local_var_param_value) = x_end_user_wallet_id {
local_var_req_builder = local_var_req_builder
.header("X-End-User-Wallet-Id", local_var_param_value.to_string());
}
if let Some(local_var_param_value) = idempotency_key {
local_var_req_builder =
local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
}
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
let local_var_status = local_var_resp.status();
let local_var_content_type = local_var_resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let local_var_content_type = super::ContentType::from(local_var_content_type);
let local_var_content = local_var_resp.text().await?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
match local_var_content_type {
ContentType::Json => {
crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
}
ContentType::Text => {
return Err(Error::from(serde_json::Error::custom(
"Received `text/plain` content type response that cannot be converted to \
`models::CancelTransactionResponse`",
)));
}
ContentType::Unsupported(local_var_unknown_type) => {
return Err(Error::from(serde_json::Error::custom(format!(
"Received `{local_var_unknown_type}` content type response that cannot be \
converted to `models::CancelTransactionResponse`"
))));
}
}
} else {
let local_var_entity: Option<CancelTransactionError> =
serde_json::from_str(&local_var_content).ok();
let local_var_error = ResponseContent {
status: local_var_status,
content: local_var_content,
entity: local_var_entity,
};
Err(Error::ResponseError(local_var_error))
}
}
/// Creates a new transaction. This endpoint can be used for regular Transfers, Contract Calls, Raw & Typed message signing. - For Transfers, the required parameters are: `assetId`, `source`, `destination` and `amount`. - For Contract Calls, the required parameters are: `operation.CONTRACT_CALL`, `assetId` (Base Asset), `source`, `destination`, `amount` (usually 0) and `extraParameters` object with `contractCallData` string. - For Solana Program Calls, the required parameters are: `operation.PROGRAM_CALL`, `assetId` (SOL/SOL_TEST), `source`, and `extraParameters` object with `programCallData` key while the value is a Base64 encoded unsigned serialized Solana transaction object. - Typed Message Signing is supported for the following asset IDs: 'ETH', 'BTC' and 'TRX'. [Typed Message Signing Guide](https://developers.fireblocks.com/docs/typed-message-signing-overview). - To create ZEC transaction, please call [Get unspent UTXO Input endpoint](https://developers.fireblocks.com/reference/getunspentinputs) to get the amount and use it as an input under `networkfee` on this endpoint. Please use this formula `(0.0001 + 0.00005*N) where N is the number of inputs` to calculate the fee needed and use it as an input under networkFee field - When using `maxFee` and a boost is needed, the user should set a custom `gasPrice` to force the override. Learn more about Fireblocks Transactions management in the following [guide](https://developers.fireblocks.com/reference/create-transactions). </br>Endpoint Permission: Admin, Signer, Editor.
async fn create_transaction(
&self,
params: CreateTransactionParams,
) -> Result<models::CreateTransactionResponse, Error<CreateTransactionError>> {
let CreateTransactionParams {
transaction_request,
x_end_user_wallet_id,
idempotency_key,
} = params;
let local_var_configuration = &self.configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/transactions", local_var_configuration.base_path);
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder
.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(local_var_param_value) = x_end_user_wallet_id {
local_var_req_builder = local_var_req_builder
.header("X-End-User-Wallet-Id", local_var_param_value.to_string());
}
if let Some(local_var_param_value) = idempotency_key {
local_var_req_builder =
local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
}
local_var_req_builder = local_var_req_builder.json(&transaction_request);
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
let local_var_status = local_var_resp.status();
let local_var_content_type = local_var_resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let local_var_content_type = super::ContentType::from(local_var_content_type);
let local_var_content = local_var_resp.text().await?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
match local_var_content_type {
ContentType::Json => {
crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
}
ContentType::Text => {
return Err(Error::from(serde_json::Error::custom(
"Received `text/plain` content type response that cannot be converted to \
`models::CreateTransactionResponse`",
)));
}
ContentType::Unsupported(local_var_unknown_type) => {
return Err(Error::from(serde_json::Error::custom(format!(
"Received `{local_var_unknown_type}` content type response that cannot be \
converted to `models::CreateTransactionResponse`"
))));
}
}
} else {
let local_var_entity: Option<CreateTransactionError> =
serde_json::from_str(&local_var_content).ok();
let local_var_error = ResponseContent {
status: local_var_status,
content: local_var_content,
entity: local_var_entity,
};
Err(Error::ResponseError(local_var_error))
}
}
/// Drops a stuck ETH (EVM) transaction and creates a replacement
/// transaction with 0 amount. </br>Endpoint Permission: Admin, Non-Signing
/// Admin, Signer, Approver, Editor.
async fn drop_transaction(
&self,
params: DropTransactionParams,
) -> Result<models::DropTransactionResponse, Error<DropTransactionError>> {
let DropTransactionParams {
tx_id,
x_end_user_wallet_id,
idempotency_key,
drop_transaction_request,
} = params;
let local_var_configuration = &self.configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!(
"{}/transactions/{txId}/drop",
local_var_configuration.base_path,
txId = crate::apis::urlencode(tx_id)
);
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder
.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(local_var_param_value) = x_end_user_wallet_id {
local_var_req_builder = local_var_req_builder
.header("X-End-User-Wallet-Id", local_var_param_value.to_string());
}
if let Some(local_var_param_value) = idempotency_key {
local_var_req_builder =
local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
}
local_var_req_builder = local_var_req_builder.json(&drop_transaction_request);
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
let local_var_status = local_var_resp.status();
let local_var_content_type = local_var_resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let local_var_content_type = super::ContentType::from(local_var_content_type);
let local_var_content = local_var_resp.text().await?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
match local_var_content_type {
ContentType::Json => {
crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
}
ContentType::Text => {
return Err(Error::from(serde_json::Error::custom(
"Received `text/plain` content type response that cannot be converted to \
`models::DropTransactionResponse`",
)));
}
ContentType::Unsupported(local_var_unknown_type) => {
return Err(Error::from(serde_json::Error::custom(format!(
"Received `{local_var_unknown_type}` content type response that cannot be \
converted to `models::DropTransactionResponse`"
))));
}
}
} else {
let local_var_entity: Option<DropTransactionError> =
serde_json::from_str(&local_var_content).ok();
let local_var_error = ResponseContent {
status: local_var_status,
content: local_var_content,
entity: local_var_entity,
};
Err(Error::ResponseError(local_var_error))
}
}
/// Estimates the transaction fee for a specific transaction request. This endpoint simulates a transaction which means that the system will expect to have the requested asset and balance in the specified wallet. **Note**: Supports all Fireblocks assets except ZCash (ZEC). Learn more about Fireblocks Fee Management in the following [guide](https://developers.fireblocks.com/reference/estimate-transaction-fee). </br>Endpoint Permission: Admin, Signer, Approver, Editor.
async fn estimate_transaction_fee(
&self,
params: EstimateTransactionFeeParams,
) -> Result<models::EstimatedTransactionFeeResponse, Error<EstimateTransactionFeeError>> {
let EstimateTransactionFeeParams {
idempotency_key,
transaction_request,
} = params;
let local_var_configuration = &self.configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!(
"{}/transactions/estimate_fee",
local_var_configuration.base_path
);
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder
.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(local_var_param_value) = idempotency_key {
local_var_req_builder =
local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
}
local_var_req_builder = local_var_req_builder.json(&transaction_request);
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
let local_var_status = local_var_resp.status();
let local_var_content_type = local_var_resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let local_var_content_type = super::ContentType::from(local_var_content_type);
let local_var_content = local_var_resp.text().await?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
match local_var_content_type {
ContentType::Json => {
crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
}
ContentType::Text => {
return Err(Error::from(serde_json::Error::custom(
"Received `text/plain` content type response that cannot be converted to \
`models::EstimatedTransactionFeeResponse`",
)));
}
ContentType::Unsupported(local_var_unknown_type) => {
return Err(Error::from(serde_json::Error::custom(format!(
"Received `{local_var_unknown_type}` content type response that cannot be \
converted to `models::EstimatedTransactionFeeResponse`"
))));
}
}
} else {
let local_var_entity: Option<EstimateTransactionFeeError> =
serde_json::from_str(&local_var_content).ok();
let local_var_error = ResponseContent {
status: local_var_status,
content: local_var_content,
entity: local_var_entity,
};
Err(Error::ResponseError(local_var_error))
}
}
/// Freezes a transaction by ID. Usually used for AML integrations when the
/// incoming funds should be quarantined. For account based assets - the
/// entire amount of the transaction is frozen For UTXO based assets - all
/// UTXOs of the specified transaction are frozen </br>Endpoint Permission:
/// Admin, Non-Signing Admin.
async fn freeze_transaction(
&self,
params: FreezeTransactionParams,
) -> Result<models::FreezeTransactionResponse, Error<FreezeTransactionError>> {
let FreezeTransactionParams {
tx_id,
x_end_user_wallet_id,
idempotency_key,
} = params;
let local_var_configuration = &self.configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!(
"{}/transactions/{txId}/freeze",
local_var_configuration.base_path,
txId = crate::apis::urlencode(tx_id)
);
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder
.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(local_var_param_value) = x_end_user_wallet_id {
local_var_req_builder = local_var_req_builder
.header("X-End-User-Wallet-Id", local_var_param_value.to_string());
}
if let Some(local_var_param_value) = idempotency_key {
local_var_req_builder =
local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
}
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
let local_var_status = local_var_resp.status();
let local_var_content_type = local_var_resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let local_var_content_type = super::ContentType::from(local_var_content_type);
let local_var_content = local_var_resp.text().await?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
match local_var_content_type {
ContentType::Json => {
crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
}
ContentType::Text => {
return Err(Error::from(serde_json::Error::custom(
"Received `text/plain` content type response that cannot be converted to \
`models::FreezeTransactionResponse`",
)));
}
ContentType::Unsupported(local_var_unknown_type) => {
return Err(Error::from(serde_json::Error::custom(format!(
"Received `{local_var_unknown_type}` content type response that cannot be \
converted to `models::FreezeTransactionResponse`"
))));
}
}
} else {
let local_var_entity: Option<FreezeTransactionError> =
serde_json::from_str(&local_var_content).ok();
let local_var_error = ResponseContent {
status: local_var_status,
content: local_var_content,
entity: local_var_entity,
};
Err(Error::ResponseError(local_var_error))
}
}
/// Get a specific transaction data by Fireblocks Transaction ID
/// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
/// Editor, Viewer.
async fn get_transaction(
&self,
params: GetTransactionParams,
) -> Result<models::TransactionResponse, Error<GetTransactionError>> {
let GetTransactionParams { tx_id } = params;
let local_var_configuration = &self.configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!(
"{}/transactions/{txId}",
local_var_configuration.base_path,
txId = crate::apis::urlencode(tx_id)
);
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder
.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
let local_var_status = local_var_resp.status();
let local_var_content_type = local_var_resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let local_var_content_type = super::ContentType::from(local_var_content_type);
let local_var_content = local_var_resp.text().await?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
match local_var_content_type {
ContentType::Json => {
crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
}
ContentType::Text => {
return Err(Error::from(serde_json::Error::custom(
"Received `text/plain` content type response that cannot be converted to \
`models::TransactionResponse`",
)));
}
ContentType::Unsupported(local_var_unknown_type) => {
return Err(Error::from(serde_json::Error::custom(format!(
"Received `{local_var_unknown_type}` content type response that cannot be \
converted to `models::TransactionResponse`"
))));
}
}
} else {
let local_var_entity: Option<GetTransactionError> =
serde_json::from_str(&local_var_content).ok();
let local_var_error = ResponseContent {
status: local_var_status,
content: local_var_content,
entity: local_var_entity,
};
Err(Error::ResponseError(local_var_error))
}
}
/// Returns transaction by external transaction ID. </br>Endpoint
/// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
async fn get_transaction_by_external_id(
&self,
params: GetTransactionByExternalIdParams,
) -> Result<models::TransactionResponse, Error<GetTransactionByExternalIdError>> {
let GetTransactionByExternalIdParams { external_tx_id } = params;
let local_var_configuration = &self.configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!(
"{}/transactions/external_tx_id/{externalTxId}",
local_var_configuration.base_path,
externalTxId = crate::apis::urlencode(external_tx_id)
);
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder
.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
let local_var_status = local_var_resp.status();
let local_var_content_type = local_var_resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let local_var_content_type = super::ContentType::from(local_var_content_type);
let local_var_content = local_var_resp.text().await?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
match local_var_content_type {
ContentType::Json => {
crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
}
ContentType::Text => {
return Err(Error::from(serde_json::Error::custom(
"Received `text/plain` content type response that cannot be converted to \
`models::TransactionResponse`",
)));
}
ContentType::Unsupported(local_var_unknown_type) => {
return Err(Error::from(serde_json::Error::custom(format!(
"Received `{local_var_unknown_type}` content type response that cannot be \
converted to `models::TransactionResponse`"
))));
}
}
} else {
let local_var_entity: Option<GetTransactionByExternalIdError> =
serde_json::from_str(&local_var_content).ok();
let local_var_error = ResponseContent {
status: local_var_status,
content: local_var_content,
entity: local_var_entity,
};
Err(Error::ResponseError(local_var_error))
}
}
/// Get the transaction history for your workspace. **Endpoint
/// Permissions:** Admin, Non-Signing Admin, Signer, Approver, Editor,
/// Viewer.
async fn get_transactions(
&self,
params: GetTransactionsParams,
) -> Result<Vec<models::TransactionResponse>, Error<GetTransactionsError>> {
let GetTransactionsParams {
before,
after,
status,
order_by,
sort,
limit,
source_type,
source_id,
dest_type,
dest_id,
assets,
tx_hash,
source_wallet_id,
dest_wallet_id,
} = params;
let local_var_configuration = &self.configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/transactions", local_var_configuration.base_path);
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref param_value) = before {
local_var_req_builder =
local_var_req_builder.query(&[("before", ¶m_value.to_string())]);
}
if let Some(ref param_value) = after {
local_var_req_builder =
local_var_req_builder.query(&[("after", ¶m_value.to_string())]);
}
if let Some(ref param_value) = status {
local_var_req_builder =
local_var_req_builder.query(&[("status", ¶m_value.to_string())]);
}
if let Some(ref param_value) = order_by {
local_var_req_builder =
local_var_req_builder.query(&[("orderBy", ¶m_value.to_string())]);
}
if let Some(ref param_value) = sort {
local_var_req_builder =
local_var_req_builder.query(&[("sort", ¶m_value.to_string())]);
}
if let Some(ref param_value) = limit {
local_var_req_builder =
local_var_req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref param_value) = source_type {
local_var_req_builder =
local_var_req_builder.query(&[("sourceType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = source_id {
local_var_req_builder =
local_var_req_builder.query(&[("sourceId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = dest_type {
local_var_req_builder =
local_var_req_builder.query(&[("destType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = dest_id {
local_var_req_builder =
local_var_req_builder.query(&[("destId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = assets {
local_var_req_builder =
local_var_req_builder.query(&[("assets", ¶m_value.to_string())]);
}
if let Some(ref param_value) = tx_hash {
local_var_req_builder =
local_var_req_builder.query(&[("txHash", ¶m_value.to_string())]);
}
if let Some(ref param_value) = source_wallet_id {
local_var_req_builder =
local_var_req_builder.query(&[("sourceWalletId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = dest_wallet_id {
local_var_req_builder =
local_var_req_builder.query(&[("destWalletId", ¶m_value.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder
.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
let local_var_status = local_var_resp.status();
let local_var_content_type = local_var_resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let local_var_content_type = super::ContentType::from(local_var_content_type);
let local_var_content = local_var_resp.text().await?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
match local_var_content_type {
ContentType::Json => {
crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
}
ContentType::Text => {
return Err(Error::from(serde_json::Error::custom(
"Received `text/plain` content type response that cannot be converted to \
`Vec<models::TransactionResponse>`",
)));
}
ContentType::Unsupported(local_var_unknown_type) => {
return Err(Error::from(serde_json::Error::custom(format!(
"Received `{local_var_unknown_type}` content type response that cannot be \
converted to `Vec<models::TransactionResponse>`"
))));
}
}
} else {
let local_var_entity: Option<GetTransactionsError> =
serde_json::from_str(&local_var_content).ok();
let local_var_error = ResponseContent {
status: local_var_status,
content: local_var_content,
entity: local_var_entity,
};
Err(Error::ResponseError(local_var_error))
}
}
/// Overrides the required number of confirmations for transaction
/// completion by transaction hash. </br>Endpoint Permission: Admin,
/// Non-Signing Admin, Signer, Approver, Editor.
async fn set_confirmation_threshold_by_transaction_hash(
&self,
params: SetConfirmationThresholdByTransactionHashParams,
) -> Result<
models::SetConfirmationsThresholdResponse,
Error<SetConfirmationThresholdByTransactionHashError>,
> {
let SetConfirmationThresholdByTransactionHashParams {
tx_hash,
idempotency_key,
set_confirmations_threshold_request,
} = params;
let local_var_configuration = &self.configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!(
"{}/txHash/{txHash}/set_confirmation_threshold",
local_var_configuration.base_path,
txHash = crate::apis::urlencode(tx_hash)
);
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder
.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(local_var_param_value) = idempotency_key {
local_var_req_builder =
local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
}
local_var_req_builder = local_var_req_builder.json(&set_confirmations_threshold_request);
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
let local_var_status = local_var_resp.status();
let local_var_content_type = local_var_resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let local_var_content_type = super::ContentType::from(local_var_content_type);
let local_var_content = local_var_resp.text().await?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
match local_var_content_type {
ContentType::Json => {
crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
}
ContentType::Text => {
return Err(Error::from(serde_json::Error::custom(
"Received `text/plain` content type response that cannot be converted to \
`models::SetConfirmationsThresholdResponse`",
)));
}
ContentType::Unsupported(local_var_unknown_type) => {
return Err(Error::from(serde_json::Error::custom(format!(
"Received `{local_var_unknown_type}` content type response that cannot be \
converted to `models::SetConfirmationsThresholdResponse`"
))));
}
}
} else {
let local_var_entity: Option<SetConfirmationThresholdByTransactionHashError> =
serde_json::from_str(&local_var_content).ok();
let local_var_error = ResponseContent {
status: local_var_status,
content: local_var_content,
entity: local_var_entity,
};
Err(Error::ResponseError(local_var_error))
}
}
/// Overrides the required number of confirmations for transaction
/// completion Fireblocks Transaction ID. </br>Endpoint Permission: Admin,
/// Non-Signing Admin, Signer, Approver, Editor.
async fn set_transaction_confirmation_threshold(
&self,
params: SetTransactionConfirmationThresholdParams,
) -> Result<
models::SetConfirmationsThresholdResponse,
Error<SetTransactionConfirmationThresholdError>,
> {
let SetTransactionConfirmationThresholdParams {
tx_id,
idempotency_key,
set_confirmations_threshold_request,
} = params;
let local_var_configuration = &self.configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!(
"{}/transactions/{txId}/set_confirmation_threshold",
local_var_configuration.base_path,
txId = crate::apis::urlencode(tx_id)
);
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder
.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(local_var_param_value) = idempotency_key {
local_var_req_builder =
local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
}
local_var_req_builder = local_var_req_builder.json(&set_confirmations_threshold_request);
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
let local_var_status = local_var_resp.status();
let local_var_content_type = local_var_resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let local_var_content_type = super::ContentType::from(local_var_content_type);
let local_var_content = local_var_resp.text().await?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
match local_var_content_type {
ContentType::Json => {
crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
}
ContentType::Text => {
return Err(Error::from(serde_json::Error::custom(
"Received `text/plain` content type response that cannot be converted to \
`models::SetConfirmationsThresholdResponse`",
)));
}
ContentType::Unsupported(local_var_unknown_type) => {
return Err(Error::from(serde_json::Error::custom(format!(
"Received `{local_var_unknown_type}` content type response that cannot be \
converted to `models::SetConfirmationsThresholdResponse`"
))));
}
}
} else {
let local_var_entity: Option<SetTransactionConfirmationThresholdError> =
serde_json::from_str(&local_var_content).ok();
let local_var_error = ResponseContent {
status: local_var_status,
content: local_var_content,
entity: local_var_entity,
};
Err(Error::ResponseError(local_var_error))
}
}
/// Unfreezes a transaction by Fireblocks Transaction ID and makes the
/// transaction available again. </br>Endpoint Permission: Admin,
/// Non-Signing Admin.
async fn unfreeze_transaction(
&self,
params: UnfreezeTransactionParams,
) -> Result<models::UnfreezeTransactionResponse, Error<UnfreezeTransactionError>> {
let UnfreezeTransactionParams {
tx_id,
x_end_user_wallet_id,
idempotency_key,
} = params;
let local_var_configuration = &self.configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!(
"{}/transactions/{txId}/unfreeze",
local_var_configuration.base_path,
txId = crate::apis::urlencode(tx_id)
);
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder
.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(local_var_param_value) = x_end_user_wallet_id {
local_var_req_builder = local_var_req_builder
.header("X-End-User-Wallet-Id", local_var_param_value.to_string());
}
if let Some(local_var_param_value) = idempotency_key {
local_var_req_builder =
local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
}
let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
let local_var_status = local_var_resp.status();
let local_var_content_type = local_var_resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let local_var_content_type = super::ContentType::from(local_var_content_type);
let local_var_content = local_var_resp.text().await?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
match local_var_content_type {
ContentType::Json => {
crate::deserialize_wrapper(&local_var_content).map_err(Error::from)
}
ContentType::Text => {
return Err(Error::from(serde_json::Error::custom(
"Received `text/plain` content type response that cannot be converted to \
`models::UnfreezeTransactionResponse`",
)));
}
ContentType::Unsupported(local_var_unknown_type) => {
return Err(Error::from(serde_json::Error::custom(format!(
"Received `{local_var_unknown_type}` content type response that cannot be \
converted to `models::UnfreezeTransactionResponse`"
))));
}
}
} else {
let local_var_entity: Option<UnfreezeTransactionError> =
serde_json::from_str(&local_var_content).ok();
let local_var_error = ResponseContent {
status: local_var_status,
content: local_var_content,
entity: local_var_entity,
};
Err(Error::ResponseError(local_var_error))
}
}
}
/// struct for typed errors of method [`TransactionsApi::cancel_transaction`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CancelTransactionError {
DefaultResponse(models::ErrorSchema),
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`TransactionsApi::create_transaction`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateTransactionError {
DefaultResponse(models::ErrorSchema),
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`TransactionsApi::drop_transaction`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DropTransactionError {
DefaultResponse(models::ErrorSchema),
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method
/// [`TransactionsApi::estimate_transaction_fee`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum EstimateTransactionFeeError {
DefaultResponse(models::ErrorSchema),
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`TransactionsApi::freeze_transaction`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum FreezeTransactionError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`TransactionsApi::get_transaction`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetTransactionError {
Status400(models::ErrorSchema),
DefaultResponse(models::ErrorSchema),
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method
/// [`TransactionsApi::get_transaction_by_external_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetTransactionByExternalIdError {
DefaultResponse(models::ErrorSchema),
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`TransactionsApi::get_transactions`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetTransactionsError {
DefaultResponse(models::ErrorSchema),
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method
/// [`TransactionsApi::set_confirmation_threshold_by_transaction_hash`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum SetConfirmationThresholdByTransactionHashError {
DefaultResponse(models::ErrorSchema),
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method
/// [`TransactionsApi::set_transaction_confirmation_threshold`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum SetTransactionConfirmationThresholdError {
DefaultResponse(models::ErrorSchema),
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`TransactionsApi::unfreeze_transaction`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UnfreezeTransactionError {
UnknownValue(serde_json::Value),
}