fireblocks_sdk/apis/
vaults_api.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    super::{configuration, Error},
11    crate::{
12        apis::{ContentType, ResponseContent},
13        models,
14    },
15    async_trait::async_trait,
16    reqwest,
17    serde::{de::Error as _, Deserialize, Serialize},
18    std::sync::Arc,
19};
20
21#[async_trait]
22pub trait VaultsApi: Send + Sync {
23    /// POST /vault/accounts/{vaultAccountId}/{assetId}/activate
24    ///
25    /// Initiates activation for a wallet in a vault account.  Activation is
26    /// required for tokens that need an on-chain transaction for creation (XLM
27    /// tokens, SOL tokens etc). </br>Endpoint Permission: Admin, Non-Signing
28    /// Admin, Signer, Approver, Editor.
29    async fn activate_asset_for_vault_account(
30        &self,
31        params: ActivateAssetForVaultAccountParams,
32    ) -> Result<models::CreateVaultAssetResponse, Error<ActivateAssetForVaultAccountError>>;
33
34    /// POST /vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}/
35    /// create_legacy
36    ///
37    /// Converts an existing segwit address to the legacy format. </br>Endpoint
38    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
39    async fn create_legacy_address(
40        &self,
41        params: CreateLegacyAddressParams,
42    ) -> Result<models::CreateAddressResponse, Error<CreateLegacyAddressError>>;
43
44    /// POST /vault/accounts/addresses/bulk
45    ///
46    /// Create multiple deposit address by running an async job. </br> **Note**:
47    /// - We limit accounts to 10k per operation. - The target Vault Account
48    /// should already have the asset wallet created, or the deposit addresses
49    /// will fail. - This endpoint should be used for UTXO blockchains. - This
50    /// endpoint is currently in Early Availability. Please contact CSM to get
51    /// access to this endpoint.   Endpoint Permission: Admin, Non-Signing
52    /// Admin, Signer, Approver, Editor.
53    async fn create_multiple_deposit_addresses(
54        &self,
55        params: CreateMultipleDepositAddressesParams,
56    ) -> Result<models::JobCreated, Error<CreateMultipleDepositAddressesError>>;
57
58    /// POST /vault/accounts
59    ///
60    /// Creates a new vault account with the requested name. **Note: ** Vault account names should consist of ASCII characters only. Learn more about Fireblocks Vault Accounts in the following [guide](https://developers.fireblocks.com/reference/create-vault-account). </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
61    async fn create_vault_account(
62        &self,
63        params: CreateVaultAccountParams,
64    ) -> Result<models::VaultAccount, Error<CreateVaultAccountError>>;
65
66    /// POST /vault/accounts/{vaultAccountId}/{assetId}
67    ///
68    /// Creates a wallet for a specific asset in a vault account. Learn more about Fireblocks Vault Wallets in the following [guide](https://developers.fireblocks.com/reference/create-vault-wallet). </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
69    async fn create_vault_account_asset(
70        &self,
71        params: CreateVaultAccountAssetParams,
72    ) -> Result<models::CreateVaultAssetResponse, Error<CreateVaultAccountAssetError>>;
73
74    /// POST /vault/accounts/{vaultAccountId}/{assetId}/addresses
75    ///
76    /// Creates a new deposit address for an asset of a vault account. Should be
77    /// used for UTXO or Tag/Memo based assets ONLY.  Requests with account
78    /// based assets will fail.  </br>Endpoint Permission: Admin, Non-Signing
79    /// Admin.
80    async fn create_vault_account_asset_address(
81        &self,
82        params: CreateVaultAccountAssetAddressParams,
83    ) -> Result<models::CreateAddressResponse, Error<CreateVaultAccountAssetAddressError>>;
84
85    /// GET /vault/asset_wallets
86    ///
87    /// Get all vault wallets of the vault accounts in your workspace.  A vault
88    /// wallet is an asset in a vault account.   This method allows fast
89    /// traversal of all account balances. </br>Endpoint Permission: Admin,
90    /// Non-Signing Admin, Signer, Approver, Editor, Viewer.
91    async fn get_asset_wallets(
92        &self,
93        params: GetAssetWalletsParams,
94    ) -> Result<models::PaginatedAssetWalletResponse, Error<GetAssetWalletsError>>;
95
96    /// GET /vault/accounts/addresses/bulk/{jobId}
97    ///
98    /// Returns the status of the bulk creation of new deposit addresses job,
99    /// and the result or error. **Note**: - The target Vault Account should
100    /// already have the asset wallet created, or the deposit addresses will
101    /// fail. - This endpoint is currently in Early Availability. Please contact
102    /// CSM to get access to this endpoint. Endpoint Permission: Admin,
103    /// Non-Signing Admin, Signer, Approver, Editor.
104    async fn get_create_multiple_deposit_addresses_job_status(
105        &self,
106        params: GetCreateMultipleDepositAddressesJobStatusParams,
107    ) -> Result<
108        models::CreateMultipleDepositAddressesJobStatus,
109        Error<GetCreateMultipleDepositAddressesJobStatusError>,
110    >;
111
112    /// GET /vault/accounts/{vaultAccountId}/{assetId}/max_spendable_amount
113    ///
114    /// Get the maximum amount of a particular asset that can be spent in a
115    /// single transaction from a specified vault account (UTXO assets only).
116    /// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
117    /// Editor, Viewer.
118    async fn get_max_spendable_amount(
119        &self,
120        params: GetMaxSpendableAmountParams,
121    ) -> Result<models::GetMaxSpendableAmountResponse, Error<GetMaxSpendableAmountError>>;
122
123    /// GET /vault/accounts_paged
124    ///
125    /// Gets all vault accounts in your workspace. This endpoint returns a
126    /// limited amount of results with a quick response time. </br>Endpoint
127    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
128    async fn get_paged_vault_accounts(
129        &self,
130        params: GetPagedVaultAccountsParams,
131    ) -> Result<models::VaultAccountsPagedResponse, Error<GetPagedVaultAccountsError>>;
132
133    /// GET /vault/public_key_info
134    ///
135    /// Gets the public key information based on derivation path and signing
136    /// algorithm. </br>Endpoint Permission: Admin, Non-Signing Admin.
137    async fn get_public_key_info(
138        &self,
139        params: GetPublicKeyInfoParams,
140    ) -> Result<models::PublicKeyInformation, Error<GetPublicKeyInfoError>>;
141
142    /// GET /vault/accounts/{vaultAccountId}/{assetId}/{change}/{addressIndex}/
143    /// public_key_info
144    ///
145    /// Get the public key information for a specific asset in a vault account.
146    /// </br>Endpoint Permission: Admin, Non-Signing Admin.
147    async fn get_public_key_info_for_address(
148        &self,
149        params: GetPublicKeyInfoForAddressParams,
150    ) -> Result<models::PublicKeyInformation, Error<GetPublicKeyInfoForAddressError>>;
151
152    /// GET /vault/accounts/{vaultAccountId}/{assetId}/unspent_inputs
153    ///
154    /// Returns unspent inputs information of an UTXO asset in a vault account.
155    /// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
156    /// Editor, Viewer.
157    async fn get_unspent_inputs(
158        &self,
159        params: GetUnspentInputsParams,
160    ) -> Result<Vec<models::UnspentInputsResponse>, Error<GetUnspentInputsError>>;
161
162    /// GET /vault/accounts/{vaultAccountId}
163    ///
164    /// Get a vault account by its unique ID. </br>Endpoint Permission: Admin,
165    /// Non-Signing Admin, Signer, Approver, Editor, Viewer.
166    async fn get_vault_account(
167        &self,
168        params: GetVaultAccountParams,
169    ) -> Result<models::VaultAccount, Error<GetVaultAccountError>>;
170
171    /// GET /vault/accounts/{vaultAccountId}/{assetId}
172    ///
173    /// Returns a specific vault wallet balance information for a specific
174    /// asset.  </br>Endpoint Permission: Admin, Non-Signing Admin, Signer,
175    /// Approver, Editor,   Viewer.
176    async fn get_vault_account_asset(
177        &self,
178        params: GetVaultAccountAssetParams,
179    ) -> Result<models::VaultAsset, Error<GetVaultAccountAssetError>>;
180
181    /// GET /vault/accounts/{vaultAccountId}/{assetId}/addresses
182    ///
183    /// DEPRECATED!  - If your application logic or scripts rely on the
184    /// deprecated endpoint, you should update to account for
185    /// GET/V1/vault/accounts/{vaultAccountId}/{assetId}/addresses_paginated
186    /// before Mar 31,2024. - All workspaces created after Mar 31,2024. will
187    /// have it disabled. If it is disabled for your workspace and you attempt
188    /// to use it, you will receive the following error message: \"This endpoint
189    /// is unavailable. - Please use the GET
190    /// /v1/vault/accounts/{vaultAccountId}/{assetId}/addresses_paginated
191    /// endpoint to return all the wallet addresses associated with the
192    /// specified vault account and asset in a paginated list.  </br>Endpoint
193    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
194    async fn get_vault_account_asset_addresses(
195        &self,
196        params: GetVaultAccountAssetAddressesParams,
197    ) -> Result<Vec<models::VaultWalletAddress>, Error<GetVaultAccountAssetAddressesError>>;
198
199    /// GET /vault/accounts/{vaultAccountId}/{assetId}/addresses_paginated
200    ///
201    /// Returns a paginated response of the addresses for a given vault account
202    /// and asset. </br>Endpoint Permission: Admin, Non-Signing Admin, Signer,
203    /// Approver, Editor, Viewer.
204    async fn get_vault_account_asset_addresses_paginated(
205        &self,
206        params: GetVaultAccountAssetAddressesPaginatedParams,
207    ) -> Result<models::PaginatedAddressResponse, Error<GetVaultAccountAssetAddressesPaginatedError>>;
208
209    /// GET /vault/assets
210    ///
211    /// Gets the assets amount summary for all accounts or filtered accounts.
212    /// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
213    /// Editor, Viewer.
214    async fn get_vault_assets(
215        &self,
216        params: GetVaultAssetsParams,
217    ) -> Result<Vec<models::VaultAsset>, Error<GetVaultAssetsError>>;
218
219    /// GET /vault/assets/{assetId}
220    ///
221    /// Get the total balance of an asset across all the vault accounts.
222    /// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
223    /// Editor, Viewer.
224    async fn get_vault_balance_by_asset(
225        &self,
226        params: GetVaultBalanceByAssetParams,
227    ) -> Result<models::VaultAsset, Error<GetVaultBalanceByAssetError>>;
228
229    /// POST /vault/accounts/{vaultAccountId}/hide
230    ///
231    /// Hides the requested vault account from the web console view. This operation is required when creating thousands of vault accounts to serve your end-users. Used for preventing the web console to be swamped with too much vault accounts. Learn more in the following [guide](https://developers.fireblocks.com/docs/create-direct-custody-wallets#hiding-vault-accounts). NOTE: Hiding the vault account from the web console will also hide all the related transactions to/from this vault. </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
232    async fn hide_vault_account(
233        &self,
234        params: HideVaultAccountParams,
235    ) -> Result<models::VaultActionStatus, Error<HideVaultAccountError>>;
236
237    /// POST /vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}/
238    /// set_customer_ref_id
239    ///
240    /// Sets an AML/KYT customer reference ID for a specific address.
241    /// </br>Endpoint Permission: Admin, Non-Signing Admin.
242    async fn set_customer_ref_id_for_address(
243        &self,
244        params: SetCustomerRefIdForAddressParams,
245    ) -> Result<models::VaultActionStatus, Error<SetCustomerRefIdForAddressError>>;
246
247    /// POST /vault/accounts/{vaultAccountId}/set_auto_fuel
248    ///
249    /// Toggles the auto fueling property of the vault account to enabled or disabled. Vault Accounts with 'autoFuel=true' are monitored and auto fueled by the Fireblocks Gas Station. Learn more about the Fireblocks Gas Station in the following [guide](https://developers.fireblocks.com/docs/work-with-gas-station). </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
250    async fn set_vault_account_auto_fuel(
251        &self,
252        params: SetVaultAccountAutoFuelParams,
253    ) -> Result<models::VaultActionStatus, Error<SetVaultAccountAutoFuelError>>;
254
255    /// POST /vault/accounts/{vaultAccountId}/set_customer_ref_id
256    ///
257    /// Assigns an AML/KYT customer reference ID for the vault account. Learn more about Fireblocks AML management in the following [guide](https://developers.fireblocks.com/docs/define-aml-policies). </br>Endpoint Permission: Admin, Non-Signing Admin.
258    async fn set_vault_account_customer_ref_id(
259        &self,
260        params: SetVaultAccountCustomerRefIdParams,
261    ) -> Result<models::VaultActionStatus, Error<SetVaultAccountCustomerRefIdError>>;
262
263    /// POST /vault/accounts/{vaultAccountId}/unhide
264    ///
265    /// Makes a hidden vault account visible in web console view. </br>Endpoint
266    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
267    async fn unhide_vault_account(
268        &self,
269        params: UnhideVaultAccountParams,
270    ) -> Result<models::VaultActionStatus, Error<UnhideVaultAccountError>>;
271
272    /// PUT /vault/accounts/{vaultAccountId}
273    ///
274    /// Renames the requested vault account. </br>Endpoint Permission: Admin,
275    /// Non-Signing Admin, Signer, Approver.
276    async fn update_vault_account(
277        &self,
278        params: UpdateVaultAccountParams,
279    ) -> Result<models::RenameVaultAccountResponse, Error<UpdateVaultAccountError>>;
280
281    /// PUT /vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}
282    ///
283    /// Updates the description of an existing address of an asset in a vault
284    /// account. </br>Endpoint Permission: Admin, Non-Signing Admin, Signer,
285    /// Approver, Editor.
286    async fn update_vault_account_asset_address(
287        &self,
288        params: UpdateVaultAccountAssetAddressParams,
289    ) -> Result<models::VaultActionStatus, Error<UpdateVaultAccountAssetAddressError>>;
290
291    /// POST /vault/accounts/{vaultAccountId}/{assetId}/balance
292    ///
293    /// Updates the balance of a specific asset in a vault account.  This API
294    /// endpoint is subject to a strict rate limit. Should be used by clients in
295    /// very specific scenarios.  </br>Endpoint Permission: Admin, Non-Signing
296    /// Admin, Signer, Approver, Editor.
297    async fn update_vault_account_asset_balance(
298        &self,
299        params: UpdateVaultAccountAssetBalanceParams,
300    ) -> Result<models::VaultAsset, Error<UpdateVaultAccountAssetBalanceError>>;
301}
302
303pub struct VaultsApiClient {
304    configuration: Arc<configuration::Configuration>,
305}
306
307impl VaultsApiClient {
308    pub fn new(configuration: Arc<configuration::Configuration>) -> Self {
309        Self { configuration }
310    }
311}
312
313/// struct for passing parameters to the method
314/// [`activate_asset_for_vault_account`]
315#[derive(Clone, Debug)]
316#[cfg_attr(feature = "bon", derive(::bon::Builder))]
317pub struct ActivateAssetForVaultAccountParams {
318    /// The ID of the vault account
319    pub vault_account_id: String,
320    /// The ID of the asset
321    pub asset_id: String,
322    /// A unique identifier for the request. If the request is sent multiple
323    /// times with the same idempotency key, the server will return the same
324    /// response as the first request. The idempotency key is valid for 24
325    /// hours.
326    pub idempotency_key: Option<String>,
327}
328
329/// struct for passing parameters to the method [`create_legacy_address`]
330#[derive(Clone, Debug)]
331#[cfg_attr(feature = "bon", derive(::bon::Builder))]
332pub struct CreateLegacyAddressParams {
333    /// The ID of the vault account
334    pub vault_account_id: String,
335    /// The ID of the asset
336    pub asset_id: String,
337    /// The segwit address to translate
338    pub address_id: String,
339    /// A unique identifier for the request. If the request is sent multiple
340    /// times with the same idempotency key, the server will return the same
341    /// response as the first request. The idempotency key is valid for 24
342    /// hours.
343    pub idempotency_key: Option<String>,
344}
345
346/// struct for passing parameters to the method
347/// [`create_multiple_deposit_addresses`]
348#[derive(Clone, Debug)]
349#[cfg_attr(feature = "bon", derive(::bon::Builder))]
350pub struct CreateMultipleDepositAddressesParams {
351    pub create_multiple_deposit_addresses_request: models::CreateMultipleDepositAddressesRequest,
352    /// A unique identifier for the request. If the request is sent multiple
353    /// times with the same idempotency key, the server will return the same
354    /// response as the first request. The idempotency key is valid for 24
355    /// hours.
356    pub idempotency_key: Option<String>,
357}
358
359/// struct for passing parameters to the method [`create_vault_account`]
360#[derive(Clone, Debug)]
361#[cfg_attr(feature = "bon", derive(::bon::Builder))]
362pub struct CreateVaultAccountParams {
363    pub create_vault_account_request: models::CreateVaultAccountRequest,
364    /// A unique identifier for the request. If the request is sent multiple
365    /// times with the same idempotency key, the server will return the same
366    /// response as the first request. The idempotency key is valid for 24
367    /// hours.
368    pub idempotency_key: Option<String>,
369}
370
371/// struct for passing parameters to the method [`create_vault_account_asset`]
372#[derive(Clone, Debug)]
373#[cfg_attr(feature = "bon", derive(::bon::Builder))]
374pub struct CreateVaultAccountAssetParams {
375    /// The ID of the vault account to return, or 'default' for the default
376    /// vault account
377    pub vault_account_id: String,
378    /// The ID of the asset
379    pub asset_id: String,
380    /// A unique identifier for the request. If the request is sent multiple
381    /// times with the same idempotency key, the server will return the same
382    /// response as the first request. The idempotency key is valid for 24
383    /// hours.
384    pub idempotency_key: Option<String>,
385    pub create_assets_request: Option<models::CreateAssetsRequest>,
386}
387
388/// struct for passing parameters to the method
389/// [`create_vault_account_asset_address`]
390#[derive(Clone, Debug)]
391#[cfg_attr(feature = "bon", derive(::bon::Builder))]
392pub struct CreateVaultAccountAssetAddressParams {
393    /// The ID of the vault account to return
394    pub vault_account_id: String,
395    /// The ID of the asset
396    pub asset_id: String,
397    /// A unique identifier for the request. If the request is sent multiple
398    /// times with the same idempotency key, the server will return the same
399    /// response as the first request. The idempotency key is valid for 24
400    /// hours.
401    pub idempotency_key: Option<String>,
402    pub create_address_request: Option<models::CreateAddressRequest>,
403}
404
405/// struct for passing parameters to the method [`get_asset_wallets`]
406#[derive(Clone, Debug)]
407#[cfg_attr(feature = "bon", derive(::bon::Builder))]
408pub struct GetAssetWalletsParams {
409    /// When specified, only vault wallets with total balance greater than this
410    /// amount are returned.
411    pub total_amount_larger_than: Option<f64>,
412    /// When specified, only vault wallets with the specified ID are returned.
413    pub asset_id: Option<String>,
414    pub order_by: Option<String>,
415    /// Fetches the next paginated response before this element.  This element
416    /// is a cursor and is returned at the response of the previous page.
417    pub before: Option<String>,
418    /// Fetches the next paginated response after this element. This element is
419    /// a cursor and is returned at the response of the previous page.
420    pub after: Option<String>,
421    /// The maximum number of vault wallets in a single response.   The default
422    /// is 200 and the maximum is 1000.
423    pub limit: Option<f64>,
424}
425
426/// struct for passing parameters to the method
427/// [`get_create_multiple_deposit_addresses_job_status`]
428#[derive(Clone, Debug)]
429#[cfg_attr(feature = "bon", derive(::bon::Builder))]
430pub struct GetCreateMultipleDepositAddressesJobStatusParams {
431    /// The ID of the job to create addresses
432    pub job_id: String,
433}
434
435/// struct for passing parameters to the method [`get_max_spendable_amount`]
436#[derive(Clone, Debug)]
437#[cfg_attr(feature = "bon", derive(::bon::Builder))]
438pub struct GetMaxSpendableAmountParams {
439    /// The ID of the vault account, or 'default' for the default vault account
440    pub vault_account_id: String,
441    /// The ID of the asset
442    pub asset_id: String,
443    /// False by default. The maximum number of inputs depends if the
444    /// transaction will be signed by an automated co-signer server or on a
445    /// mobile device.
446    pub manual_signging: Option<bool>,
447}
448
449/// struct for passing parameters to the method [`get_paged_vault_accounts`]
450#[derive(Clone, Debug)]
451#[cfg_attr(feature = "bon", derive(::bon::Builder))]
452pub struct GetPagedVaultAccountsParams {
453    pub name_prefix: Option<String>,
454    pub name_suffix: Option<String>,
455    /// Specifying minAmountThreshold will filter accounts with balances greater
456    /// than this value, otherwise, it will return all accounts. The amount set
457    /// in this parameter is the native asset amount and not its USD value.
458    pub min_amount_threshold: Option<f64>,
459    pub asset_id: Option<String>,
460    pub order_by: Option<String>,
461    pub before: Option<String>,
462    pub after: Option<String>,
463    pub limit: Option<f64>,
464}
465
466/// struct for passing parameters to the method [`get_public_key_info`]
467#[derive(Clone, Debug)]
468#[cfg_attr(feature = "bon", derive(::bon::Builder))]
469pub struct GetPublicKeyInfoParams {
470    /// An array of integers representing the full BIP44 derivation path of the
471    /// requested public key.  The first element must always be 44.
472    pub derivation_path: Vec<i32>,
473    pub algorithm: String,
474    pub compressed: Option<bool>,
475}
476
477/// struct for passing parameters to the method
478/// [`get_public_key_info_for_address`]
479#[derive(Clone, Debug)]
480#[cfg_attr(feature = "bon", derive(::bon::Builder))]
481pub struct GetPublicKeyInfoForAddressParams {
482    pub vault_account_id: String,
483    pub asset_id: String,
484    /// BIP44 derivation path - change value
485    pub change: f64,
486    /// BIP44 derivation path - index value
487    pub address_index: f64,
488    /// Compressed/Uncompressed public key format
489    pub compressed: Option<bool>,
490}
491
492/// struct for passing parameters to the method [`get_unspent_inputs`]
493#[derive(Clone, Debug)]
494#[cfg_attr(feature = "bon", derive(::bon::Builder))]
495pub struct GetUnspentInputsParams {
496    /// The ID of the vault account
497    pub vault_account_id: String,
498    /// The ID of the asset
499    pub asset_id: String,
500}
501
502/// struct for passing parameters to the method [`get_vault_account`]
503#[derive(Clone, Debug)]
504#[cfg_attr(feature = "bon", derive(::bon::Builder))]
505pub struct GetVaultAccountParams {
506    /// The ID of the vault account
507    pub vault_account_id: String,
508}
509
510/// struct for passing parameters to the method [`get_vault_account_asset`]
511#[derive(Clone, Debug)]
512#[cfg_attr(feature = "bon", derive(::bon::Builder))]
513pub struct GetVaultAccountAssetParams {
514    /// The ID of the vault account
515    pub vault_account_id: String,
516    /// The ID of the asset
517    pub asset_id: String,
518}
519
520/// struct for passing parameters to the method
521/// [`get_vault_account_asset_addresses`]
522#[derive(Clone, Debug)]
523#[cfg_attr(feature = "bon", derive(::bon::Builder))]
524pub struct GetVaultAccountAssetAddressesParams {
525    /// The ID of the vault account to return
526    pub vault_account_id: String,
527    /// The ID of the asset
528    pub asset_id: String,
529}
530
531/// struct for passing parameters to the method
532/// [`get_vault_account_asset_addresses_paginated`]
533#[derive(Clone, Debug)]
534#[cfg_attr(feature = "bon", derive(::bon::Builder))]
535pub struct GetVaultAccountAssetAddressesPaginatedParams {
536    /// The ID of the vault account to return
537    pub vault_account_id: String,
538    /// The ID of the asset
539    pub asset_id: String,
540    /// Limit the number of results per page
541    pub limit: Option<f64>,
542    /// Cursor string for the previous page
543    pub before: Option<String>,
544    /// Cursor string for the next page
545    pub after: Option<String>,
546}
547
548/// struct for passing parameters to the method [`get_vault_assets`]
549#[derive(Clone, Debug)]
550#[cfg_attr(feature = "bon", derive(::bon::Builder))]
551pub struct GetVaultAssetsParams {
552    pub account_name_prefix: Option<String>,
553    pub account_name_suffix: Option<String>,
554}
555
556/// struct for passing parameters to the method [`get_vault_balance_by_asset`]
557#[derive(Clone, Debug)]
558#[cfg_attr(feature = "bon", derive(::bon::Builder))]
559pub struct GetVaultBalanceByAssetParams {
560    pub asset_id: String,
561}
562
563/// struct for passing parameters to the method [`hide_vault_account`]
564#[derive(Clone, Debug)]
565#[cfg_attr(feature = "bon", derive(::bon::Builder))]
566pub struct HideVaultAccountParams {
567    /// The vault account to hide
568    pub vault_account_id: String,
569    /// A unique identifier for the request. If the request is sent multiple
570    /// times with the same idempotency key, the server will return the same
571    /// response as the first request. The idempotency key is valid for 24
572    /// hours.
573    pub idempotency_key: Option<String>,
574}
575
576/// struct for passing parameters to the method
577/// [`set_customer_ref_id_for_address`]
578#[derive(Clone, Debug)]
579#[cfg_attr(feature = "bon", derive(::bon::Builder))]
580pub struct SetCustomerRefIdForAddressParams {
581    /// The ID of the vault account
582    pub vault_account_id: String,
583    /// The ID of the asset
584    pub asset_id: String,
585    /// The address for which to add a description. For XRP, use
586    /// <address>:<tag>, for all other assets, use only the address
587    pub address_id: String,
588    pub set_customer_ref_id_for_address_request: models::SetCustomerRefIdForAddressRequest,
589    /// A unique identifier for the request. If the request is sent multiple
590    /// times with the same idempotency key, the server will return the same
591    /// response as the first request. The idempotency key is valid for 24
592    /// hours.
593    pub idempotency_key: Option<String>,
594}
595
596/// struct for passing parameters to the method [`set_vault_account_auto_fuel`]
597#[derive(Clone, Debug)]
598#[cfg_attr(feature = "bon", derive(::bon::Builder))]
599pub struct SetVaultAccountAutoFuelParams {
600    /// The vault account ID
601    pub vault_account_id: String,
602    pub set_auto_fuel_request: models::SetAutoFuelRequest,
603    /// A unique identifier for the request. If the request is sent multiple
604    /// times with the same idempotency key, the server will return the same
605    /// response as the first request. The idempotency key is valid for 24
606    /// hours.
607    pub idempotency_key: Option<String>,
608}
609
610/// struct for passing parameters to the method
611/// [`set_vault_account_customer_ref_id`]
612#[derive(Clone, Debug)]
613#[cfg_attr(feature = "bon", derive(::bon::Builder))]
614pub struct SetVaultAccountCustomerRefIdParams {
615    /// The vault account ID
616    pub vault_account_id: String,
617    pub set_customer_ref_id_request: models::SetCustomerRefIdRequest,
618    /// A unique identifier for the request. If the request is sent multiple
619    /// times with the same idempotency key, the server will return the same
620    /// response as the first request. The idempotency key is valid for 24
621    /// hours.
622    pub idempotency_key: Option<String>,
623}
624
625/// struct for passing parameters to the method [`unhide_vault_account`]
626#[derive(Clone, Debug)]
627#[cfg_attr(feature = "bon", derive(::bon::Builder))]
628pub struct UnhideVaultAccountParams {
629    /// The vault account to unhide
630    pub vault_account_id: String,
631    /// A unique identifier for the request. If the request is sent multiple
632    /// times with the same idempotency key, the server will return the same
633    /// response as the first request. The idempotency key is valid for 24
634    /// hours.
635    pub idempotency_key: Option<String>,
636}
637
638/// struct for passing parameters to the method [`update_vault_account`]
639#[derive(Clone, Debug)]
640#[cfg_attr(feature = "bon", derive(::bon::Builder))]
641pub struct UpdateVaultAccountParams {
642    /// The ID of the vault account
643    pub vault_account_id: String,
644    pub update_vault_account_request: models::UpdateVaultAccountRequest,
645    /// A unique identifier for the request. If the request is sent multiple
646    /// times with the same idempotency key, the server will return the same
647    /// response as the first request. The idempotency key is valid for 24
648    /// hours.
649    pub idempotency_key: Option<String>,
650}
651
652/// struct for passing parameters to the method
653/// [`update_vault_account_asset_address`]
654#[derive(Clone, Debug)]
655#[cfg_attr(feature = "bon", derive(::bon::Builder))]
656pub struct UpdateVaultAccountAssetAddressParams {
657    /// The ID of the vault account
658    pub vault_account_id: String,
659    /// The ID of the asset
660    pub asset_id: String,
661    /// The address for which to add a description. For XRP, use
662    /// <address>:<tag>, for all other assets, use only the address
663    pub address_id: String,
664    /// A unique identifier for the request. If the request is sent multiple
665    /// times with the same idempotency key, the server will return the same
666    /// response as the first request. The idempotency key is valid for 24
667    /// hours.
668    pub idempotency_key: Option<String>,
669    pub update_vault_account_asset_address_request:
670        Option<models::UpdateVaultAccountAssetAddressRequest>,
671}
672
673/// struct for passing parameters to the method
674/// [`update_vault_account_asset_balance`]
675#[derive(Clone, Debug)]
676#[cfg_attr(feature = "bon", derive(::bon::Builder))]
677pub struct UpdateVaultAccountAssetBalanceParams {
678    /// The ID of the vault account to return
679    pub vault_account_id: String,
680    /// The ID of the asset
681    pub asset_id: String,
682    /// A unique identifier for the request. If the request is sent multiple
683    /// times with the same idempotency key, the server will return the same
684    /// response as the first request. The idempotency key is valid for 24
685    /// hours.
686    pub idempotency_key: Option<String>,
687}
688
689#[async_trait]
690impl VaultsApi for VaultsApiClient {
691    /// Initiates activation for a wallet in a vault account.  Activation is
692    /// required for tokens that need an on-chain transaction for creation (XLM
693    /// tokens, SOL tokens etc). </br>Endpoint Permission: Admin, Non-Signing
694    /// Admin, Signer, Approver, Editor.
695    async fn activate_asset_for_vault_account(
696        &self,
697        params: ActivateAssetForVaultAccountParams,
698    ) -> Result<models::CreateVaultAssetResponse, Error<ActivateAssetForVaultAccountError>> {
699        let ActivateAssetForVaultAccountParams {
700            vault_account_id,
701            asset_id,
702            idempotency_key,
703        } = params;
704
705        let local_var_configuration = &self.configuration;
706
707        let local_var_client = &local_var_configuration.client;
708
709        let local_var_uri_str = format!(
710            "{}/vault/accounts/{vaultAccountId}/{assetId}/activate",
711            local_var_configuration.base_path,
712            vaultAccountId = crate::apis::urlencode(vault_account_id),
713            assetId = crate::apis::urlencode(asset_id)
714        );
715        let mut local_var_req_builder =
716            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
717
718        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
719            local_var_req_builder = local_var_req_builder
720                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
721        }
722        if let Some(local_var_param_value) = idempotency_key {
723            local_var_req_builder =
724                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
725        }
726
727        let local_var_req = local_var_req_builder.build()?;
728        let local_var_resp = local_var_client.execute(local_var_req).await?;
729
730        let local_var_status = local_var_resp.status();
731        let local_var_content_type = local_var_resp
732            .headers()
733            .get("content-type")
734            .and_then(|v| v.to_str().ok())
735            .unwrap_or("application/octet-stream");
736        let local_var_content_type = super::ContentType::from(local_var_content_type);
737        let local_var_content = local_var_resp.text().await?;
738
739        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
740            match local_var_content_type {
741                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
742                ContentType::Text => {
743                    return Err(Error::from(serde_json::Error::custom(
744                        "Received `text/plain` content type response that cannot be converted to \
745                         `models::CreateVaultAssetResponse`",
746                    )))
747                }
748                ContentType::Unsupported(local_var_unknown_type) => {
749                    return Err(Error::from(serde_json::Error::custom(format!(
750                        "Received `{local_var_unknown_type}` content type response that cannot be \
751                         converted to `models::CreateVaultAssetResponse`"
752                    ))))
753                }
754            }
755        } else {
756            let local_var_entity: Option<ActivateAssetForVaultAccountError> =
757                serde_json::from_str(&local_var_content).ok();
758            let local_var_error = ResponseContent {
759                status: local_var_status,
760                content: local_var_content,
761                entity: local_var_entity,
762            };
763            Err(Error::ResponseError(local_var_error))
764        }
765    }
766
767    /// Converts an existing segwit address to the legacy format. </br>Endpoint
768    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
769    async fn create_legacy_address(
770        &self,
771        params: CreateLegacyAddressParams,
772    ) -> Result<models::CreateAddressResponse, Error<CreateLegacyAddressError>> {
773        let CreateLegacyAddressParams {
774            vault_account_id,
775            asset_id,
776            address_id,
777            idempotency_key,
778        } = params;
779
780        let local_var_configuration = &self.configuration;
781
782        let local_var_client = &local_var_configuration.client;
783
784        let local_var_uri_str = format!(
785            "{}/vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}/create_legacy",
786            local_var_configuration.base_path,
787            vaultAccountId = crate::apis::urlencode(vault_account_id),
788            assetId = crate::apis::urlencode(asset_id),
789            addressId = crate::apis::urlencode(address_id)
790        );
791        let mut local_var_req_builder =
792            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
793
794        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
795            local_var_req_builder = local_var_req_builder
796                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
797        }
798        if let Some(local_var_param_value) = idempotency_key {
799            local_var_req_builder =
800                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
801        }
802
803        let local_var_req = local_var_req_builder.build()?;
804        let local_var_resp = local_var_client.execute(local_var_req).await?;
805
806        let local_var_status = local_var_resp.status();
807        let local_var_content_type = local_var_resp
808            .headers()
809            .get("content-type")
810            .and_then(|v| v.to_str().ok())
811            .unwrap_or("application/octet-stream");
812        let local_var_content_type = super::ContentType::from(local_var_content_type);
813        let local_var_content = local_var_resp.text().await?;
814
815        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
816            match local_var_content_type {
817                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
818                ContentType::Text => {
819                    return Err(Error::from(serde_json::Error::custom(
820                        "Received `text/plain` content type response that cannot be converted to \
821                         `models::CreateAddressResponse`",
822                    )))
823                }
824                ContentType::Unsupported(local_var_unknown_type) => {
825                    return Err(Error::from(serde_json::Error::custom(format!(
826                        "Received `{local_var_unknown_type}` content type response that cannot be \
827                         converted to `models::CreateAddressResponse`"
828                    ))))
829                }
830            }
831        } else {
832            let local_var_entity: Option<CreateLegacyAddressError> =
833                serde_json::from_str(&local_var_content).ok();
834            let local_var_error = ResponseContent {
835                status: local_var_status,
836                content: local_var_content,
837                entity: local_var_entity,
838            };
839            Err(Error::ResponseError(local_var_error))
840        }
841    }
842
843    /// Create multiple deposit address by running an async job. </br> **Note**:
844    /// - We limit accounts to 10k per operation. - The target Vault Account
845    /// should already have the asset wallet created, or the deposit addresses
846    /// will fail. - This endpoint should be used for UTXO blockchains. - This
847    /// endpoint is currently in Early Availability. Please contact CSM to get
848    /// access to this endpoint.   Endpoint Permission: Admin, Non-Signing
849    /// Admin, Signer, Approver, Editor.
850    async fn create_multiple_deposit_addresses(
851        &self,
852        params: CreateMultipleDepositAddressesParams,
853    ) -> Result<models::JobCreated, Error<CreateMultipleDepositAddressesError>> {
854        let CreateMultipleDepositAddressesParams {
855            create_multiple_deposit_addresses_request,
856            idempotency_key,
857        } = params;
858
859        let local_var_configuration = &self.configuration;
860
861        let local_var_client = &local_var_configuration.client;
862
863        let local_var_uri_str = format!(
864            "{}/vault/accounts/addresses/bulk",
865            local_var_configuration.base_path
866        );
867        let mut local_var_req_builder =
868            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
869
870        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
871            local_var_req_builder = local_var_req_builder
872                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
873        }
874        if let Some(local_var_param_value) = idempotency_key {
875            local_var_req_builder =
876                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
877        }
878        local_var_req_builder =
879            local_var_req_builder.json(&create_multiple_deposit_addresses_request);
880
881        let local_var_req = local_var_req_builder.build()?;
882        let local_var_resp = local_var_client.execute(local_var_req).await?;
883
884        let local_var_status = local_var_resp.status();
885        let local_var_content_type = local_var_resp
886            .headers()
887            .get("content-type")
888            .and_then(|v| v.to_str().ok())
889            .unwrap_or("application/octet-stream");
890        let local_var_content_type = super::ContentType::from(local_var_content_type);
891        let local_var_content = local_var_resp.text().await?;
892
893        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
894            match local_var_content_type {
895                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
896                ContentType::Text => {
897                    return Err(Error::from(serde_json::Error::custom(
898                        "Received `text/plain` content type response that cannot be converted to \
899                         `models::JobCreated`",
900                    )))
901                }
902                ContentType::Unsupported(local_var_unknown_type) => {
903                    return Err(Error::from(serde_json::Error::custom(format!(
904                        "Received `{local_var_unknown_type}` content type response that cannot be \
905                         converted to `models::JobCreated`"
906                    ))))
907                }
908            }
909        } else {
910            let local_var_entity: Option<CreateMultipleDepositAddressesError> =
911                serde_json::from_str(&local_var_content).ok();
912            let local_var_error = ResponseContent {
913                status: local_var_status,
914                content: local_var_content,
915                entity: local_var_entity,
916            };
917            Err(Error::ResponseError(local_var_error))
918        }
919    }
920
921    /// Creates a new vault account with the requested name. **Note: ** Vault account names should consist of ASCII characters only. Learn more about Fireblocks Vault Accounts in the following [guide](https://developers.fireblocks.com/reference/create-vault-account). </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
922    async fn create_vault_account(
923        &self,
924        params: CreateVaultAccountParams,
925    ) -> Result<models::VaultAccount, Error<CreateVaultAccountError>> {
926        let CreateVaultAccountParams {
927            create_vault_account_request,
928            idempotency_key,
929        } = params;
930
931        let local_var_configuration = &self.configuration;
932
933        let local_var_client = &local_var_configuration.client;
934
935        let local_var_uri_str = format!("{}/vault/accounts", local_var_configuration.base_path);
936        let mut local_var_req_builder =
937            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
938
939        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
940            local_var_req_builder = local_var_req_builder
941                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
942        }
943        if let Some(local_var_param_value) = idempotency_key {
944            local_var_req_builder =
945                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
946        }
947        local_var_req_builder = local_var_req_builder.json(&create_vault_account_request);
948
949        let local_var_req = local_var_req_builder.build()?;
950        let local_var_resp = local_var_client.execute(local_var_req).await?;
951
952        let local_var_status = local_var_resp.status();
953        let local_var_content_type = local_var_resp
954            .headers()
955            .get("content-type")
956            .and_then(|v| v.to_str().ok())
957            .unwrap_or("application/octet-stream");
958        let local_var_content_type = super::ContentType::from(local_var_content_type);
959        let local_var_content = local_var_resp.text().await?;
960
961        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
962            match local_var_content_type {
963                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
964                ContentType::Text => {
965                    return Err(Error::from(serde_json::Error::custom(
966                        "Received `text/plain` content type response that cannot be converted to \
967                         `models::VaultAccount`",
968                    )))
969                }
970                ContentType::Unsupported(local_var_unknown_type) => {
971                    return Err(Error::from(serde_json::Error::custom(format!(
972                        "Received `{local_var_unknown_type}` content type response that cannot be \
973                         converted to `models::VaultAccount`"
974                    ))))
975                }
976            }
977        } else {
978            let local_var_entity: Option<CreateVaultAccountError> =
979                serde_json::from_str(&local_var_content).ok();
980            let local_var_error = ResponseContent {
981                status: local_var_status,
982                content: local_var_content,
983                entity: local_var_entity,
984            };
985            Err(Error::ResponseError(local_var_error))
986        }
987    }
988
989    /// Creates a wallet for a specific asset in a vault account. Learn more about Fireblocks Vault Wallets in the following [guide](https://developers.fireblocks.com/reference/create-vault-wallet). </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
990    async fn create_vault_account_asset(
991        &self,
992        params: CreateVaultAccountAssetParams,
993    ) -> Result<models::CreateVaultAssetResponse, Error<CreateVaultAccountAssetError>> {
994        let CreateVaultAccountAssetParams {
995            vault_account_id,
996            asset_id,
997            idempotency_key,
998            create_assets_request,
999        } = params;
1000
1001        let local_var_configuration = &self.configuration;
1002
1003        let local_var_client = &local_var_configuration.client;
1004
1005        let local_var_uri_str = format!(
1006            "{}/vault/accounts/{vaultAccountId}/{assetId}",
1007            local_var_configuration.base_path,
1008            vaultAccountId = crate::apis::urlencode(vault_account_id),
1009            assetId = crate::apis::urlencode(asset_id)
1010        );
1011        let mut local_var_req_builder =
1012            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1013
1014        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1015            local_var_req_builder = local_var_req_builder
1016                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1017        }
1018        if let Some(local_var_param_value) = idempotency_key {
1019            local_var_req_builder =
1020                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
1021        }
1022        local_var_req_builder = local_var_req_builder.json(&create_assets_request);
1023
1024        let local_var_req = local_var_req_builder.build()?;
1025        let local_var_resp = local_var_client.execute(local_var_req).await?;
1026
1027        let local_var_status = local_var_resp.status();
1028        let local_var_content_type = local_var_resp
1029            .headers()
1030            .get("content-type")
1031            .and_then(|v| v.to_str().ok())
1032            .unwrap_or("application/octet-stream");
1033        let local_var_content_type = super::ContentType::from(local_var_content_type);
1034        let local_var_content = local_var_resp.text().await?;
1035
1036        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1037            match local_var_content_type {
1038                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1039                ContentType::Text => {
1040                    return Err(Error::from(serde_json::Error::custom(
1041                        "Received `text/plain` content type response that cannot be converted to \
1042                         `models::CreateVaultAssetResponse`",
1043                    )))
1044                }
1045                ContentType::Unsupported(local_var_unknown_type) => {
1046                    return Err(Error::from(serde_json::Error::custom(format!(
1047                        "Received `{local_var_unknown_type}` content type response that cannot be \
1048                         converted to `models::CreateVaultAssetResponse`"
1049                    ))))
1050                }
1051            }
1052        } else {
1053            let local_var_entity: Option<CreateVaultAccountAssetError> =
1054                serde_json::from_str(&local_var_content).ok();
1055            let local_var_error = ResponseContent {
1056                status: local_var_status,
1057                content: local_var_content,
1058                entity: local_var_entity,
1059            };
1060            Err(Error::ResponseError(local_var_error))
1061        }
1062    }
1063
1064    /// Creates a new deposit address for an asset of a vault account. Should be
1065    /// used for UTXO or Tag/Memo based assets ONLY.  Requests with account
1066    /// based assets will fail.  </br>Endpoint Permission: Admin, Non-Signing
1067    /// Admin.
1068    async fn create_vault_account_asset_address(
1069        &self,
1070        params: CreateVaultAccountAssetAddressParams,
1071    ) -> Result<models::CreateAddressResponse, Error<CreateVaultAccountAssetAddressError>> {
1072        let CreateVaultAccountAssetAddressParams {
1073            vault_account_id,
1074            asset_id,
1075            idempotency_key,
1076            create_address_request,
1077        } = params;
1078
1079        let local_var_configuration = &self.configuration;
1080
1081        let local_var_client = &local_var_configuration.client;
1082
1083        let local_var_uri_str = format!(
1084            "{}/vault/accounts/{vaultAccountId}/{assetId}/addresses",
1085            local_var_configuration.base_path,
1086            vaultAccountId = crate::apis::urlencode(vault_account_id),
1087            assetId = crate::apis::urlencode(asset_id)
1088        );
1089        let mut local_var_req_builder =
1090            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1091
1092        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1093            local_var_req_builder = local_var_req_builder
1094                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1095        }
1096        if let Some(local_var_param_value) = idempotency_key {
1097            local_var_req_builder =
1098                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
1099        }
1100        local_var_req_builder = local_var_req_builder.json(&create_address_request);
1101
1102        let local_var_req = local_var_req_builder.build()?;
1103        let local_var_resp = local_var_client.execute(local_var_req).await?;
1104
1105        let local_var_status = local_var_resp.status();
1106        let local_var_content_type = local_var_resp
1107            .headers()
1108            .get("content-type")
1109            .and_then(|v| v.to_str().ok())
1110            .unwrap_or("application/octet-stream");
1111        let local_var_content_type = super::ContentType::from(local_var_content_type);
1112        let local_var_content = local_var_resp.text().await?;
1113
1114        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1115            match local_var_content_type {
1116                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1117                ContentType::Text => {
1118                    return Err(Error::from(serde_json::Error::custom(
1119                        "Received `text/plain` content type response that cannot be converted to \
1120                         `models::CreateAddressResponse`",
1121                    )))
1122                }
1123                ContentType::Unsupported(local_var_unknown_type) => {
1124                    return Err(Error::from(serde_json::Error::custom(format!(
1125                        "Received `{local_var_unknown_type}` content type response that cannot be \
1126                         converted to `models::CreateAddressResponse`"
1127                    ))))
1128                }
1129            }
1130        } else {
1131            let local_var_entity: Option<CreateVaultAccountAssetAddressError> =
1132                serde_json::from_str(&local_var_content).ok();
1133            let local_var_error = ResponseContent {
1134                status: local_var_status,
1135                content: local_var_content,
1136                entity: local_var_entity,
1137            };
1138            Err(Error::ResponseError(local_var_error))
1139        }
1140    }
1141
1142    /// Get all vault wallets of the vault accounts in your workspace.  A vault
1143    /// wallet is an asset in a vault account.   This method allows fast
1144    /// traversal of all account balances. </br>Endpoint Permission: Admin,
1145    /// Non-Signing Admin, Signer, Approver, Editor, Viewer.
1146    async fn get_asset_wallets(
1147        &self,
1148        params: GetAssetWalletsParams,
1149    ) -> Result<models::PaginatedAssetWalletResponse, Error<GetAssetWalletsError>> {
1150        let GetAssetWalletsParams {
1151            total_amount_larger_than,
1152            asset_id,
1153            order_by,
1154            before,
1155            after,
1156            limit,
1157        } = params;
1158
1159        let local_var_configuration = &self.configuration;
1160
1161        let local_var_client = &local_var_configuration.client;
1162
1163        let local_var_uri_str =
1164            format!("{}/vault/asset_wallets", local_var_configuration.base_path);
1165        let mut local_var_req_builder =
1166            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1167
1168        if let Some(ref local_var_str) = total_amount_larger_than {
1169            local_var_req_builder = local_var_req_builder
1170                .query(&[("totalAmountLargerThan", &local_var_str.to_string())]);
1171        }
1172        if let Some(ref local_var_str) = asset_id {
1173            local_var_req_builder =
1174                local_var_req_builder.query(&[("assetId", &local_var_str.to_string())]);
1175        }
1176        if let Some(ref local_var_str) = order_by {
1177            local_var_req_builder =
1178                local_var_req_builder.query(&[("orderBy", &local_var_str.to_string())]);
1179        }
1180        if let Some(ref local_var_str) = before {
1181            local_var_req_builder =
1182                local_var_req_builder.query(&[("before", &local_var_str.to_string())]);
1183        }
1184        if let Some(ref local_var_str) = after {
1185            local_var_req_builder =
1186                local_var_req_builder.query(&[("after", &local_var_str.to_string())]);
1187        }
1188        if let Some(ref local_var_str) = limit {
1189            local_var_req_builder =
1190                local_var_req_builder.query(&[("limit", &local_var_str.to_string())]);
1191        }
1192        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1193            local_var_req_builder = local_var_req_builder
1194                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1195        }
1196
1197        let local_var_req = local_var_req_builder.build()?;
1198        let local_var_resp = local_var_client.execute(local_var_req).await?;
1199
1200        let local_var_status = local_var_resp.status();
1201        let local_var_content_type = local_var_resp
1202            .headers()
1203            .get("content-type")
1204            .and_then(|v| v.to_str().ok())
1205            .unwrap_or("application/octet-stream");
1206        let local_var_content_type = super::ContentType::from(local_var_content_type);
1207        let local_var_content = local_var_resp.text().await?;
1208
1209        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1210            match local_var_content_type {
1211                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1212                ContentType::Text => {
1213                    return Err(Error::from(serde_json::Error::custom(
1214                        "Received `text/plain` content type response that cannot be converted to \
1215                         `models::PaginatedAssetWalletResponse`",
1216                    )))
1217                }
1218                ContentType::Unsupported(local_var_unknown_type) => {
1219                    return Err(Error::from(serde_json::Error::custom(format!(
1220                        "Received `{local_var_unknown_type}` content type response that cannot be \
1221                         converted to `models::PaginatedAssetWalletResponse`"
1222                    ))))
1223                }
1224            }
1225        } else {
1226            let local_var_entity: Option<GetAssetWalletsError> =
1227                serde_json::from_str(&local_var_content).ok();
1228            let local_var_error = ResponseContent {
1229                status: local_var_status,
1230                content: local_var_content,
1231                entity: local_var_entity,
1232            };
1233            Err(Error::ResponseError(local_var_error))
1234        }
1235    }
1236
1237    /// Returns the status of the bulk creation of new deposit addresses job,
1238    /// and the result or error. **Note**: - The target Vault Account should
1239    /// already have the asset wallet created, or the deposit addresses will
1240    /// fail. - This endpoint is currently in Early Availability. Please contact
1241    /// CSM to get access to this endpoint. Endpoint Permission: Admin,
1242    /// Non-Signing Admin, Signer, Approver, Editor.
1243    async fn get_create_multiple_deposit_addresses_job_status(
1244        &self,
1245        params: GetCreateMultipleDepositAddressesJobStatusParams,
1246    ) -> Result<
1247        models::CreateMultipleDepositAddressesJobStatus,
1248        Error<GetCreateMultipleDepositAddressesJobStatusError>,
1249    > {
1250        let GetCreateMultipleDepositAddressesJobStatusParams { job_id } = params;
1251
1252        let local_var_configuration = &self.configuration;
1253
1254        let local_var_client = &local_var_configuration.client;
1255
1256        let local_var_uri_str = format!(
1257            "{}/vault/accounts/addresses/bulk/{jobId}",
1258            local_var_configuration.base_path,
1259            jobId = crate::apis::urlencode(job_id)
1260        );
1261        let mut local_var_req_builder =
1262            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1263
1264        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1265            local_var_req_builder = local_var_req_builder
1266                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1267        }
1268
1269        let local_var_req = local_var_req_builder.build()?;
1270        let local_var_resp = local_var_client.execute(local_var_req).await?;
1271
1272        let local_var_status = local_var_resp.status();
1273        let local_var_content_type = local_var_resp
1274            .headers()
1275            .get("content-type")
1276            .and_then(|v| v.to_str().ok())
1277            .unwrap_or("application/octet-stream");
1278        let local_var_content_type = super::ContentType::from(local_var_content_type);
1279        let local_var_content = local_var_resp.text().await?;
1280
1281        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1282            match local_var_content_type {
1283                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1284                ContentType::Text => {
1285                    return Err(Error::from(serde_json::Error::custom(
1286                        "Received `text/plain` content type response that cannot be converted to \
1287                         `models::CreateMultipleDepositAddressesJobStatus`",
1288                    )))
1289                }
1290                ContentType::Unsupported(local_var_unknown_type) => {
1291                    return Err(Error::from(serde_json::Error::custom(format!(
1292                        "Received `{local_var_unknown_type}` content type response that cannot be \
1293                         converted to `models::CreateMultipleDepositAddressesJobStatus`"
1294                    ))))
1295                }
1296            }
1297        } else {
1298            let local_var_entity: Option<GetCreateMultipleDepositAddressesJobStatusError> =
1299                serde_json::from_str(&local_var_content).ok();
1300            let local_var_error = ResponseContent {
1301                status: local_var_status,
1302                content: local_var_content,
1303                entity: local_var_entity,
1304            };
1305            Err(Error::ResponseError(local_var_error))
1306        }
1307    }
1308
1309    /// Get the maximum amount of a particular asset that can be spent in a
1310    /// single transaction from a specified vault account (UTXO assets only).
1311    /// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
1312    /// Editor, Viewer.
1313    async fn get_max_spendable_amount(
1314        &self,
1315        params: GetMaxSpendableAmountParams,
1316    ) -> Result<models::GetMaxSpendableAmountResponse, Error<GetMaxSpendableAmountError>> {
1317        let GetMaxSpendableAmountParams {
1318            vault_account_id,
1319            asset_id,
1320            manual_signging,
1321        } = params;
1322
1323        let local_var_configuration = &self.configuration;
1324
1325        let local_var_client = &local_var_configuration.client;
1326
1327        let local_var_uri_str = format!(
1328            "{}/vault/accounts/{vaultAccountId}/{assetId}/max_spendable_amount",
1329            local_var_configuration.base_path,
1330            vaultAccountId = crate::apis::urlencode(vault_account_id),
1331            assetId = crate::apis::urlencode(asset_id)
1332        );
1333        let mut local_var_req_builder =
1334            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1335
1336        if let Some(ref local_var_str) = manual_signging {
1337            local_var_req_builder =
1338                local_var_req_builder.query(&[("manualSignging", &local_var_str.to_string())]);
1339        }
1340        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1341            local_var_req_builder = local_var_req_builder
1342                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1343        }
1344
1345        let local_var_req = local_var_req_builder.build()?;
1346        let local_var_resp = local_var_client.execute(local_var_req).await?;
1347
1348        let local_var_status = local_var_resp.status();
1349        let local_var_content_type = local_var_resp
1350            .headers()
1351            .get("content-type")
1352            .and_then(|v| v.to_str().ok())
1353            .unwrap_or("application/octet-stream");
1354        let local_var_content_type = super::ContentType::from(local_var_content_type);
1355        let local_var_content = local_var_resp.text().await?;
1356
1357        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1358            match local_var_content_type {
1359                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1360                ContentType::Text => {
1361                    return Err(Error::from(serde_json::Error::custom(
1362                        "Received `text/plain` content type response that cannot be converted to \
1363                         `models::GetMaxSpendableAmountResponse`",
1364                    )))
1365                }
1366                ContentType::Unsupported(local_var_unknown_type) => {
1367                    return Err(Error::from(serde_json::Error::custom(format!(
1368                        "Received `{local_var_unknown_type}` content type response that cannot be \
1369                         converted to `models::GetMaxSpendableAmountResponse`"
1370                    ))))
1371                }
1372            }
1373        } else {
1374            let local_var_entity: Option<GetMaxSpendableAmountError> =
1375                serde_json::from_str(&local_var_content).ok();
1376            let local_var_error = ResponseContent {
1377                status: local_var_status,
1378                content: local_var_content,
1379                entity: local_var_entity,
1380            };
1381            Err(Error::ResponseError(local_var_error))
1382        }
1383    }
1384
1385    /// Gets all vault accounts in your workspace. This endpoint returns a
1386    /// limited amount of results with a quick response time. </br>Endpoint
1387    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
1388    async fn get_paged_vault_accounts(
1389        &self,
1390        params: GetPagedVaultAccountsParams,
1391    ) -> Result<models::VaultAccountsPagedResponse, Error<GetPagedVaultAccountsError>> {
1392        let GetPagedVaultAccountsParams {
1393            name_prefix,
1394            name_suffix,
1395            min_amount_threshold,
1396            asset_id,
1397            order_by,
1398            before,
1399            after,
1400            limit,
1401        } = params;
1402
1403        let local_var_configuration = &self.configuration;
1404
1405        let local_var_client = &local_var_configuration.client;
1406
1407        let local_var_uri_str =
1408            format!("{}/vault/accounts_paged", local_var_configuration.base_path);
1409        let mut local_var_req_builder =
1410            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1411
1412        if let Some(ref local_var_str) = name_prefix {
1413            local_var_req_builder =
1414                local_var_req_builder.query(&[("namePrefix", &local_var_str.to_string())]);
1415        }
1416        if let Some(ref local_var_str) = name_suffix {
1417            local_var_req_builder =
1418                local_var_req_builder.query(&[("nameSuffix", &local_var_str.to_string())]);
1419        }
1420        if let Some(ref local_var_str) = min_amount_threshold {
1421            local_var_req_builder =
1422                local_var_req_builder.query(&[("minAmountThreshold", &local_var_str.to_string())]);
1423        }
1424        if let Some(ref local_var_str) = asset_id {
1425            local_var_req_builder =
1426                local_var_req_builder.query(&[("assetId", &local_var_str.to_string())]);
1427        }
1428        if let Some(ref local_var_str) = order_by {
1429            local_var_req_builder =
1430                local_var_req_builder.query(&[("orderBy", &local_var_str.to_string())]);
1431        }
1432        if let Some(ref local_var_str) = before {
1433            local_var_req_builder =
1434                local_var_req_builder.query(&[("before", &local_var_str.to_string())]);
1435        }
1436        if let Some(ref local_var_str) = after {
1437            local_var_req_builder =
1438                local_var_req_builder.query(&[("after", &local_var_str.to_string())]);
1439        }
1440        if let Some(ref local_var_str) = limit {
1441            local_var_req_builder =
1442                local_var_req_builder.query(&[("limit", &local_var_str.to_string())]);
1443        }
1444        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1445            local_var_req_builder = local_var_req_builder
1446                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1447        }
1448
1449        let local_var_req = local_var_req_builder.build()?;
1450        let local_var_resp = local_var_client.execute(local_var_req).await?;
1451
1452        let local_var_status = local_var_resp.status();
1453        let local_var_content_type = local_var_resp
1454            .headers()
1455            .get("content-type")
1456            .and_then(|v| v.to_str().ok())
1457            .unwrap_or("application/octet-stream");
1458        let local_var_content_type = super::ContentType::from(local_var_content_type);
1459        let local_var_content = local_var_resp.text().await?;
1460
1461        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1462            match local_var_content_type {
1463                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1464                ContentType::Text => {
1465                    return Err(Error::from(serde_json::Error::custom(
1466                        "Received `text/plain` content type response that cannot be converted to \
1467                         `models::VaultAccountsPagedResponse`",
1468                    )))
1469                }
1470                ContentType::Unsupported(local_var_unknown_type) => {
1471                    return Err(Error::from(serde_json::Error::custom(format!(
1472                        "Received `{local_var_unknown_type}` content type response that cannot be \
1473                         converted to `models::VaultAccountsPagedResponse`"
1474                    ))))
1475                }
1476            }
1477        } else {
1478            let local_var_entity: Option<GetPagedVaultAccountsError> =
1479                serde_json::from_str(&local_var_content).ok();
1480            let local_var_error = ResponseContent {
1481                status: local_var_status,
1482                content: local_var_content,
1483                entity: local_var_entity,
1484            };
1485            Err(Error::ResponseError(local_var_error))
1486        }
1487    }
1488
1489    /// Gets the public key information based on derivation path and signing
1490    /// algorithm. </br>Endpoint Permission: Admin, Non-Signing Admin.
1491    async fn get_public_key_info(
1492        &self,
1493        params: GetPublicKeyInfoParams,
1494    ) -> Result<models::PublicKeyInformation, Error<GetPublicKeyInfoError>> {
1495        let GetPublicKeyInfoParams {
1496            derivation_path,
1497            algorithm,
1498            compressed,
1499        } = params;
1500
1501        let local_var_configuration = &self.configuration;
1502
1503        let local_var_client = &local_var_configuration.client;
1504
1505        let local_var_uri_str = format!(
1506            "{}/vault/public_key_info",
1507            local_var_configuration.base_path
1508        );
1509        let mut local_var_req_builder =
1510            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1511
1512        local_var_req_builder = match "multi" {
1513            "multi" => local_var_req_builder.query(
1514                &derivation_path
1515                    .into_iter()
1516                    .map(|p| ("derivationPath".to_owned(), p.to_string()))
1517                    .collect::<Vec<(std::string::String, std::string::String)>>(),
1518            ),
1519            _ => local_var_req_builder.query(&[(
1520                "derivationPath",
1521                &derivation_path
1522                    .into_iter()
1523                    .map(|p| p.to_string())
1524                    .collect::<Vec<String>>()
1525                    .join(",")
1526                    .to_string(),
1527            )]),
1528        };
1529        local_var_req_builder =
1530            local_var_req_builder.query(&[("algorithm", &algorithm.to_string())]);
1531        if let Some(ref local_var_str) = compressed {
1532            local_var_req_builder =
1533                local_var_req_builder.query(&[("compressed", &local_var_str.to_string())]);
1534        }
1535        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1536            local_var_req_builder = local_var_req_builder
1537                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1538        }
1539
1540        let local_var_req = local_var_req_builder.build()?;
1541        let local_var_resp = local_var_client.execute(local_var_req).await?;
1542
1543        let local_var_status = local_var_resp.status();
1544        let local_var_content_type = local_var_resp
1545            .headers()
1546            .get("content-type")
1547            .and_then(|v| v.to_str().ok())
1548            .unwrap_or("application/octet-stream");
1549        let local_var_content_type = super::ContentType::from(local_var_content_type);
1550        let local_var_content = local_var_resp.text().await?;
1551
1552        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1553            match local_var_content_type {
1554                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1555                ContentType::Text => {
1556                    return Err(Error::from(serde_json::Error::custom(
1557                        "Received `text/plain` content type response that cannot be converted to \
1558                         `models::PublicKeyInformation`",
1559                    )))
1560                }
1561                ContentType::Unsupported(local_var_unknown_type) => {
1562                    return Err(Error::from(serde_json::Error::custom(format!(
1563                        "Received `{local_var_unknown_type}` content type response that cannot be \
1564                         converted to `models::PublicKeyInformation`"
1565                    ))))
1566                }
1567            }
1568        } else {
1569            let local_var_entity: Option<GetPublicKeyInfoError> =
1570                serde_json::from_str(&local_var_content).ok();
1571            let local_var_error = ResponseContent {
1572                status: local_var_status,
1573                content: local_var_content,
1574                entity: local_var_entity,
1575            };
1576            Err(Error::ResponseError(local_var_error))
1577        }
1578    }
1579
1580    /// Get the public key information for a specific asset in a vault account.
1581    /// </br>Endpoint Permission: Admin, Non-Signing Admin.
1582    async fn get_public_key_info_for_address(
1583        &self,
1584        params: GetPublicKeyInfoForAddressParams,
1585    ) -> Result<models::PublicKeyInformation, Error<GetPublicKeyInfoForAddressError>> {
1586        let GetPublicKeyInfoForAddressParams {
1587            vault_account_id,
1588            asset_id,
1589            change,
1590            address_index,
1591            compressed,
1592        } = params;
1593
1594        let local_var_configuration = &self.configuration;
1595
1596        let local_var_client = &local_var_configuration.client;
1597
1598        let local_var_uri_str = format!(
1599            "{}/vault/accounts/{vaultAccountId}/{assetId}/{change}/{addressIndex}/public_key_info",
1600            local_var_configuration.base_path,
1601            vaultAccountId = crate::apis::urlencode(vault_account_id),
1602            assetId = crate::apis::urlencode(asset_id),
1603            change = change,
1604            addressIndex = address_index
1605        );
1606        let mut local_var_req_builder =
1607            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1608
1609        if let Some(ref local_var_str) = compressed {
1610            local_var_req_builder =
1611                local_var_req_builder.query(&[("compressed", &local_var_str.to_string())]);
1612        }
1613        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1614            local_var_req_builder = local_var_req_builder
1615                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1616        }
1617
1618        let local_var_req = local_var_req_builder.build()?;
1619        let local_var_resp = local_var_client.execute(local_var_req).await?;
1620
1621        let local_var_status = local_var_resp.status();
1622        let local_var_content_type = local_var_resp
1623            .headers()
1624            .get("content-type")
1625            .and_then(|v| v.to_str().ok())
1626            .unwrap_or("application/octet-stream");
1627        let local_var_content_type = super::ContentType::from(local_var_content_type);
1628        let local_var_content = local_var_resp.text().await?;
1629
1630        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1631            match local_var_content_type {
1632                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1633                ContentType::Text => {
1634                    return Err(Error::from(serde_json::Error::custom(
1635                        "Received `text/plain` content type response that cannot be converted to \
1636                         `models::PublicKeyInformation`",
1637                    )))
1638                }
1639                ContentType::Unsupported(local_var_unknown_type) => {
1640                    return Err(Error::from(serde_json::Error::custom(format!(
1641                        "Received `{local_var_unknown_type}` content type response that cannot be \
1642                         converted to `models::PublicKeyInformation`"
1643                    ))))
1644                }
1645            }
1646        } else {
1647            let local_var_entity: Option<GetPublicKeyInfoForAddressError> =
1648                serde_json::from_str(&local_var_content).ok();
1649            let local_var_error = ResponseContent {
1650                status: local_var_status,
1651                content: local_var_content,
1652                entity: local_var_entity,
1653            };
1654            Err(Error::ResponseError(local_var_error))
1655        }
1656    }
1657
1658    /// Returns unspent inputs information of an UTXO asset in a vault account.
1659    /// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
1660    /// Editor, Viewer.
1661    async fn get_unspent_inputs(
1662        &self,
1663        params: GetUnspentInputsParams,
1664    ) -> Result<Vec<models::UnspentInputsResponse>, Error<GetUnspentInputsError>> {
1665        let GetUnspentInputsParams {
1666            vault_account_id,
1667            asset_id,
1668        } = params;
1669
1670        let local_var_configuration = &self.configuration;
1671
1672        let local_var_client = &local_var_configuration.client;
1673
1674        let local_var_uri_str = format!(
1675            "{}/vault/accounts/{vaultAccountId}/{assetId}/unspent_inputs",
1676            local_var_configuration.base_path,
1677            vaultAccountId = crate::apis::urlencode(vault_account_id),
1678            assetId = crate::apis::urlencode(asset_id)
1679        );
1680        let mut local_var_req_builder =
1681            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1682
1683        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1684            local_var_req_builder = local_var_req_builder
1685                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1686        }
1687
1688        let local_var_req = local_var_req_builder.build()?;
1689        let local_var_resp = local_var_client.execute(local_var_req).await?;
1690
1691        let local_var_status = local_var_resp.status();
1692        let local_var_content_type = local_var_resp
1693            .headers()
1694            .get("content-type")
1695            .and_then(|v| v.to_str().ok())
1696            .unwrap_or("application/octet-stream");
1697        let local_var_content_type = super::ContentType::from(local_var_content_type);
1698        let local_var_content = local_var_resp.text().await?;
1699
1700        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1701            match local_var_content_type {
1702                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1703                ContentType::Text => {
1704                    return Err(Error::from(serde_json::Error::custom(
1705                        "Received `text/plain` content type response that cannot be converted to \
1706                         `Vec&lt;models::UnspentInputsResponse&gt;`",
1707                    )))
1708                }
1709                ContentType::Unsupported(local_var_unknown_type) => {
1710                    return Err(Error::from(serde_json::Error::custom(format!(
1711                        "Received `{local_var_unknown_type}` content type response that cannot be \
1712                         converted to `Vec&lt;models::UnspentInputsResponse&gt;`"
1713                    ))))
1714                }
1715            }
1716        } else {
1717            let local_var_entity: Option<GetUnspentInputsError> =
1718                serde_json::from_str(&local_var_content).ok();
1719            let local_var_error = ResponseContent {
1720                status: local_var_status,
1721                content: local_var_content,
1722                entity: local_var_entity,
1723            };
1724            Err(Error::ResponseError(local_var_error))
1725        }
1726    }
1727
1728    /// Get a vault account by its unique ID. </br>Endpoint Permission: Admin,
1729    /// Non-Signing Admin, Signer, Approver, Editor, Viewer.
1730    async fn get_vault_account(
1731        &self,
1732        params: GetVaultAccountParams,
1733    ) -> Result<models::VaultAccount, Error<GetVaultAccountError>> {
1734        let GetVaultAccountParams { vault_account_id } = params;
1735
1736        let local_var_configuration = &self.configuration;
1737
1738        let local_var_client = &local_var_configuration.client;
1739
1740        let local_var_uri_str = format!(
1741            "{}/vault/accounts/{vaultAccountId}",
1742            local_var_configuration.base_path,
1743            vaultAccountId = crate::apis::urlencode(vault_account_id)
1744        );
1745        let mut local_var_req_builder =
1746            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1747
1748        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1749            local_var_req_builder = local_var_req_builder
1750                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1751        }
1752
1753        let local_var_req = local_var_req_builder.build()?;
1754        let local_var_resp = local_var_client.execute(local_var_req).await?;
1755
1756        let local_var_status = local_var_resp.status();
1757        let local_var_content_type = local_var_resp
1758            .headers()
1759            .get("content-type")
1760            .and_then(|v| v.to_str().ok())
1761            .unwrap_or("application/octet-stream");
1762        let local_var_content_type = super::ContentType::from(local_var_content_type);
1763        let local_var_content = local_var_resp.text().await?;
1764
1765        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1766            match local_var_content_type {
1767                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1768                ContentType::Text => {
1769                    return Err(Error::from(serde_json::Error::custom(
1770                        "Received `text/plain` content type response that cannot be converted to \
1771                         `models::VaultAccount`",
1772                    )))
1773                }
1774                ContentType::Unsupported(local_var_unknown_type) => {
1775                    return Err(Error::from(serde_json::Error::custom(format!(
1776                        "Received `{local_var_unknown_type}` content type response that cannot be \
1777                         converted to `models::VaultAccount`"
1778                    ))))
1779                }
1780            }
1781        } else {
1782            let local_var_entity: Option<GetVaultAccountError> =
1783                serde_json::from_str(&local_var_content).ok();
1784            let local_var_error = ResponseContent {
1785                status: local_var_status,
1786                content: local_var_content,
1787                entity: local_var_entity,
1788            };
1789            Err(Error::ResponseError(local_var_error))
1790        }
1791    }
1792
1793    /// Returns a specific vault wallet balance information for a specific
1794    /// asset.  </br>Endpoint Permission: Admin, Non-Signing Admin, Signer,
1795    /// Approver, Editor,   Viewer.
1796    async fn get_vault_account_asset(
1797        &self,
1798        params: GetVaultAccountAssetParams,
1799    ) -> Result<models::VaultAsset, Error<GetVaultAccountAssetError>> {
1800        let GetVaultAccountAssetParams {
1801            vault_account_id,
1802            asset_id,
1803        } = params;
1804
1805        let local_var_configuration = &self.configuration;
1806
1807        let local_var_client = &local_var_configuration.client;
1808
1809        let local_var_uri_str = format!(
1810            "{}/vault/accounts/{vaultAccountId}/{assetId}",
1811            local_var_configuration.base_path,
1812            vaultAccountId = crate::apis::urlencode(vault_account_id),
1813            assetId = crate::apis::urlencode(asset_id)
1814        );
1815        let mut local_var_req_builder =
1816            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1817
1818        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1819            local_var_req_builder = local_var_req_builder
1820                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1821        }
1822
1823        let local_var_req = local_var_req_builder.build()?;
1824        let local_var_resp = local_var_client.execute(local_var_req).await?;
1825
1826        let local_var_status = local_var_resp.status();
1827        let local_var_content_type = local_var_resp
1828            .headers()
1829            .get("content-type")
1830            .and_then(|v| v.to_str().ok())
1831            .unwrap_or("application/octet-stream");
1832        let local_var_content_type = super::ContentType::from(local_var_content_type);
1833        let local_var_content = local_var_resp.text().await?;
1834
1835        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1836            match local_var_content_type {
1837                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1838                ContentType::Text => {
1839                    return Err(Error::from(serde_json::Error::custom(
1840                        "Received `text/plain` content type response that cannot be converted to \
1841                         `models::VaultAsset`",
1842                    )))
1843                }
1844                ContentType::Unsupported(local_var_unknown_type) => {
1845                    return Err(Error::from(serde_json::Error::custom(format!(
1846                        "Received `{local_var_unknown_type}` content type response that cannot be \
1847                         converted to `models::VaultAsset`"
1848                    ))))
1849                }
1850            }
1851        } else {
1852            let local_var_entity: Option<GetVaultAccountAssetError> =
1853                serde_json::from_str(&local_var_content).ok();
1854            let local_var_error = ResponseContent {
1855                status: local_var_status,
1856                content: local_var_content,
1857                entity: local_var_entity,
1858            };
1859            Err(Error::ResponseError(local_var_error))
1860        }
1861    }
1862
1863    /// DEPRECATED!  - If your application logic or scripts rely on the
1864    /// deprecated endpoint, you should update to account for
1865    /// GET/V1/vault/accounts/{vaultAccountId}/{assetId}/addresses_paginated
1866    /// before Mar 31,2024. - All workspaces created after Mar 31,2024. will
1867    /// have it disabled. If it is disabled for your workspace and you attempt
1868    /// to use it, you will receive the following error message: \"This endpoint
1869    /// is unavailable. - Please use the GET
1870    /// /v1/vault/accounts/{vaultAccountId}/{assetId}/addresses_paginated
1871    /// endpoint to return all the wallet addresses associated with the
1872    /// specified vault account and asset in a paginated list.  </br>Endpoint
1873    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
1874    async fn get_vault_account_asset_addresses(
1875        &self,
1876        params: GetVaultAccountAssetAddressesParams,
1877    ) -> Result<Vec<models::VaultWalletAddress>, Error<GetVaultAccountAssetAddressesError>> {
1878        let GetVaultAccountAssetAddressesParams {
1879            vault_account_id,
1880            asset_id,
1881        } = params;
1882
1883        let local_var_configuration = &self.configuration;
1884
1885        let local_var_client = &local_var_configuration.client;
1886
1887        let local_var_uri_str = format!(
1888            "{}/vault/accounts/{vaultAccountId}/{assetId}/addresses",
1889            local_var_configuration.base_path,
1890            vaultAccountId = crate::apis::urlencode(vault_account_id),
1891            assetId = crate::apis::urlencode(asset_id)
1892        );
1893        let mut local_var_req_builder =
1894            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1895
1896        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1897            local_var_req_builder = local_var_req_builder
1898                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1899        }
1900
1901        let local_var_req = local_var_req_builder.build()?;
1902        let local_var_resp = local_var_client.execute(local_var_req).await?;
1903
1904        let local_var_status = local_var_resp.status();
1905        let local_var_content_type = local_var_resp
1906            .headers()
1907            .get("content-type")
1908            .and_then(|v| v.to_str().ok())
1909            .unwrap_or("application/octet-stream");
1910        let local_var_content_type = super::ContentType::from(local_var_content_type);
1911        let local_var_content = local_var_resp.text().await?;
1912
1913        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1914            match local_var_content_type {
1915                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1916                ContentType::Text => {
1917                    return Err(Error::from(serde_json::Error::custom(
1918                        "Received `text/plain` content type response that cannot be converted to \
1919                         `Vec&lt;models::VaultWalletAddress&gt;`",
1920                    )))
1921                }
1922                ContentType::Unsupported(local_var_unknown_type) => {
1923                    return Err(Error::from(serde_json::Error::custom(format!(
1924                        "Received `{local_var_unknown_type}` content type response that cannot be \
1925                         converted to `Vec&lt;models::VaultWalletAddress&gt;`"
1926                    ))))
1927                }
1928            }
1929        } else {
1930            let local_var_entity: Option<GetVaultAccountAssetAddressesError> =
1931                serde_json::from_str(&local_var_content).ok();
1932            let local_var_error = ResponseContent {
1933                status: local_var_status,
1934                content: local_var_content,
1935                entity: local_var_entity,
1936            };
1937            Err(Error::ResponseError(local_var_error))
1938        }
1939    }
1940
1941    /// Returns a paginated response of the addresses for a given vault account
1942    /// and asset. </br>Endpoint Permission: Admin, Non-Signing Admin, Signer,
1943    /// Approver, Editor, Viewer.
1944    async fn get_vault_account_asset_addresses_paginated(
1945        &self,
1946        params: GetVaultAccountAssetAddressesPaginatedParams,
1947    ) -> Result<models::PaginatedAddressResponse, Error<GetVaultAccountAssetAddressesPaginatedError>>
1948    {
1949        let GetVaultAccountAssetAddressesPaginatedParams {
1950            vault_account_id,
1951            asset_id,
1952            limit,
1953            before,
1954            after,
1955        } = params;
1956
1957        let local_var_configuration = &self.configuration;
1958
1959        let local_var_client = &local_var_configuration.client;
1960
1961        let local_var_uri_str = format!(
1962            "{}/vault/accounts/{vaultAccountId}/{assetId}/addresses_paginated",
1963            local_var_configuration.base_path,
1964            vaultAccountId = crate::apis::urlencode(vault_account_id),
1965            assetId = crate::apis::urlencode(asset_id)
1966        );
1967        let mut local_var_req_builder =
1968            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1969
1970        if let Some(ref local_var_str) = limit {
1971            local_var_req_builder =
1972                local_var_req_builder.query(&[("limit", &local_var_str.to_string())]);
1973        }
1974        if let Some(ref local_var_str) = before {
1975            local_var_req_builder =
1976                local_var_req_builder.query(&[("before", &local_var_str.to_string())]);
1977        }
1978        if let Some(ref local_var_str) = after {
1979            local_var_req_builder =
1980                local_var_req_builder.query(&[("after", &local_var_str.to_string())]);
1981        }
1982        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1983            local_var_req_builder = local_var_req_builder
1984                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1985        }
1986
1987        let local_var_req = local_var_req_builder.build()?;
1988        let local_var_resp = local_var_client.execute(local_var_req).await?;
1989
1990        let local_var_status = local_var_resp.status();
1991        let local_var_content_type = local_var_resp
1992            .headers()
1993            .get("content-type")
1994            .and_then(|v| v.to_str().ok())
1995            .unwrap_or("application/octet-stream");
1996        let local_var_content_type = super::ContentType::from(local_var_content_type);
1997        let local_var_content = local_var_resp.text().await?;
1998
1999        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2000            match local_var_content_type {
2001                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
2002                ContentType::Text => {
2003                    return Err(Error::from(serde_json::Error::custom(
2004                        "Received `text/plain` content type response that cannot be converted to \
2005                         `models::PaginatedAddressResponse`",
2006                    )))
2007                }
2008                ContentType::Unsupported(local_var_unknown_type) => {
2009                    return Err(Error::from(serde_json::Error::custom(format!(
2010                        "Received `{local_var_unknown_type}` content type response that cannot be \
2011                         converted to `models::PaginatedAddressResponse`"
2012                    ))))
2013                }
2014            }
2015        } else {
2016            let local_var_entity: Option<GetVaultAccountAssetAddressesPaginatedError> =
2017                serde_json::from_str(&local_var_content).ok();
2018            let local_var_error = ResponseContent {
2019                status: local_var_status,
2020                content: local_var_content,
2021                entity: local_var_entity,
2022            };
2023            Err(Error::ResponseError(local_var_error))
2024        }
2025    }
2026
2027    /// Gets the assets amount summary for all accounts or filtered accounts.
2028    /// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
2029    /// Editor, Viewer.
2030    async fn get_vault_assets(
2031        &self,
2032        params: GetVaultAssetsParams,
2033    ) -> Result<Vec<models::VaultAsset>, Error<GetVaultAssetsError>> {
2034        let GetVaultAssetsParams {
2035            account_name_prefix,
2036            account_name_suffix,
2037        } = params;
2038
2039        let local_var_configuration = &self.configuration;
2040
2041        let local_var_client = &local_var_configuration.client;
2042
2043        let local_var_uri_str = format!("{}/vault/assets", local_var_configuration.base_path);
2044        let mut local_var_req_builder =
2045            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2046
2047        if let Some(ref local_var_str) = account_name_prefix {
2048            local_var_req_builder =
2049                local_var_req_builder.query(&[("accountNamePrefix", &local_var_str.to_string())]);
2050        }
2051        if let Some(ref local_var_str) = account_name_suffix {
2052            local_var_req_builder =
2053                local_var_req_builder.query(&[("accountNameSuffix", &local_var_str.to_string())]);
2054        }
2055        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2056            local_var_req_builder = local_var_req_builder
2057                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2058        }
2059
2060        let local_var_req = local_var_req_builder.build()?;
2061        let local_var_resp = local_var_client.execute(local_var_req).await?;
2062
2063        let local_var_status = local_var_resp.status();
2064        let local_var_content_type = local_var_resp
2065            .headers()
2066            .get("content-type")
2067            .and_then(|v| v.to_str().ok())
2068            .unwrap_or("application/octet-stream");
2069        let local_var_content_type = super::ContentType::from(local_var_content_type);
2070        let local_var_content = local_var_resp.text().await?;
2071
2072        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2073            match local_var_content_type {
2074                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
2075                ContentType::Text => {
2076                    return Err(Error::from(serde_json::Error::custom(
2077                        "Received `text/plain` content type response that cannot be converted to \
2078                         `Vec&lt;models::VaultAsset&gt;`",
2079                    )))
2080                }
2081                ContentType::Unsupported(local_var_unknown_type) => {
2082                    return Err(Error::from(serde_json::Error::custom(format!(
2083                        "Received `{local_var_unknown_type}` content type response that cannot be \
2084                         converted to `Vec&lt;models::VaultAsset&gt;`"
2085                    ))))
2086                }
2087            }
2088        } else {
2089            let local_var_entity: Option<GetVaultAssetsError> =
2090                serde_json::from_str(&local_var_content).ok();
2091            let local_var_error = ResponseContent {
2092                status: local_var_status,
2093                content: local_var_content,
2094                entity: local_var_entity,
2095            };
2096            Err(Error::ResponseError(local_var_error))
2097        }
2098    }
2099
2100    /// Get the total balance of an asset across all the vault accounts.
2101    /// </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver,
2102    /// Editor, Viewer.
2103    async fn get_vault_balance_by_asset(
2104        &self,
2105        params: GetVaultBalanceByAssetParams,
2106    ) -> Result<models::VaultAsset, Error<GetVaultBalanceByAssetError>> {
2107        let GetVaultBalanceByAssetParams { asset_id } = params;
2108
2109        let local_var_configuration = &self.configuration;
2110
2111        let local_var_client = &local_var_configuration.client;
2112
2113        let local_var_uri_str = format!(
2114            "{}/vault/assets/{assetId}",
2115            local_var_configuration.base_path,
2116            assetId = crate::apis::urlencode(asset_id)
2117        );
2118        let mut local_var_req_builder =
2119            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2120
2121        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2122            local_var_req_builder = local_var_req_builder
2123                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2124        }
2125
2126        let local_var_req = local_var_req_builder.build()?;
2127        let local_var_resp = local_var_client.execute(local_var_req).await?;
2128
2129        let local_var_status = local_var_resp.status();
2130        let local_var_content_type = local_var_resp
2131            .headers()
2132            .get("content-type")
2133            .and_then(|v| v.to_str().ok())
2134            .unwrap_or("application/octet-stream");
2135        let local_var_content_type = super::ContentType::from(local_var_content_type);
2136        let local_var_content = local_var_resp.text().await?;
2137
2138        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2139            match local_var_content_type {
2140                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
2141                ContentType::Text => {
2142                    return Err(Error::from(serde_json::Error::custom(
2143                        "Received `text/plain` content type response that cannot be converted to \
2144                         `models::VaultAsset`",
2145                    )))
2146                }
2147                ContentType::Unsupported(local_var_unknown_type) => {
2148                    return Err(Error::from(serde_json::Error::custom(format!(
2149                        "Received `{local_var_unknown_type}` content type response that cannot be \
2150                         converted to `models::VaultAsset`"
2151                    ))))
2152                }
2153            }
2154        } else {
2155            let local_var_entity: Option<GetVaultBalanceByAssetError> =
2156                serde_json::from_str(&local_var_content).ok();
2157            let local_var_error = ResponseContent {
2158                status: local_var_status,
2159                content: local_var_content,
2160                entity: local_var_entity,
2161            };
2162            Err(Error::ResponseError(local_var_error))
2163        }
2164    }
2165
2166    /// Hides the requested vault account from the web console view. This operation is required when creating thousands of vault accounts to serve your end-users. Used for preventing the web console to be swamped with too much vault accounts. Learn more in the following [guide](https://developers.fireblocks.com/docs/create-direct-custody-wallets#hiding-vault-accounts). NOTE: Hiding the vault account from the web console will also hide all the related transactions to/from this vault. </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
2167    async fn hide_vault_account(
2168        &self,
2169        params: HideVaultAccountParams,
2170    ) -> Result<models::VaultActionStatus, Error<HideVaultAccountError>> {
2171        let HideVaultAccountParams {
2172            vault_account_id,
2173            idempotency_key,
2174        } = params;
2175
2176        let local_var_configuration = &self.configuration;
2177
2178        let local_var_client = &local_var_configuration.client;
2179
2180        let local_var_uri_str = format!(
2181            "{}/vault/accounts/{vaultAccountId}/hide",
2182            local_var_configuration.base_path,
2183            vaultAccountId = crate::apis::urlencode(vault_account_id)
2184        );
2185        let mut local_var_req_builder =
2186            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2187
2188        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2189            local_var_req_builder = local_var_req_builder
2190                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2191        }
2192        if let Some(local_var_param_value) = idempotency_key {
2193            local_var_req_builder =
2194                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
2195        }
2196
2197        let local_var_req = local_var_req_builder.build()?;
2198        let local_var_resp = local_var_client.execute(local_var_req).await?;
2199
2200        let local_var_status = local_var_resp.status();
2201        let local_var_content_type = local_var_resp
2202            .headers()
2203            .get("content-type")
2204            .and_then(|v| v.to_str().ok())
2205            .unwrap_or("application/octet-stream");
2206        let local_var_content_type = super::ContentType::from(local_var_content_type);
2207        let local_var_content = local_var_resp.text().await?;
2208
2209        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2210            match local_var_content_type {
2211                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
2212                ContentType::Text => {
2213                    return Err(Error::from(serde_json::Error::custom(
2214                        "Received `text/plain` content type response that cannot be converted to \
2215                         `models::VaultActionStatus`",
2216                    )))
2217                }
2218                ContentType::Unsupported(local_var_unknown_type) => {
2219                    return Err(Error::from(serde_json::Error::custom(format!(
2220                        "Received `{local_var_unknown_type}` content type response that cannot be \
2221                         converted to `models::VaultActionStatus`"
2222                    ))))
2223                }
2224            }
2225        } else {
2226            let local_var_entity: Option<HideVaultAccountError> =
2227                serde_json::from_str(&local_var_content).ok();
2228            let local_var_error = ResponseContent {
2229                status: local_var_status,
2230                content: local_var_content,
2231                entity: local_var_entity,
2232            };
2233            Err(Error::ResponseError(local_var_error))
2234        }
2235    }
2236
2237    /// Sets an AML/KYT customer reference ID for a specific address.
2238    /// </br>Endpoint Permission: Admin, Non-Signing Admin.
2239    async fn set_customer_ref_id_for_address(
2240        &self,
2241        params: SetCustomerRefIdForAddressParams,
2242    ) -> Result<models::VaultActionStatus, Error<SetCustomerRefIdForAddressError>> {
2243        let SetCustomerRefIdForAddressParams {
2244            vault_account_id,
2245            asset_id,
2246            address_id,
2247            set_customer_ref_id_for_address_request,
2248            idempotency_key,
2249        } = params;
2250
2251        let local_var_configuration = &self.configuration;
2252
2253        let local_var_client = &local_var_configuration.client;
2254
2255        let local_var_uri_str = format!(
2256            "{}/vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}/\
2257             set_customer_ref_id",
2258            local_var_configuration.base_path,
2259            vaultAccountId = crate::apis::urlencode(vault_account_id),
2260            assetId = crate::apis::urlencode(asset_id),
2261            addressId = crate::apis::urlencode(address_id)
2262        );
2263        let mut local_var_req_builder =
2264            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2265
2266        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2267            local_var_req_builder = local_var_req_builder
2268                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2269        }
2270        if let Some(local_var_param_value) = idempotency_key {
2271            local_var_req_builder =
2272                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
2273        }
2274        local_var_req_builder =
2275            local_var_req_builder.json(&set_customer_ref_id_for_address_request);
2276
2277        let local_var_req = local_var_req_builder.build()?;
2278        let local_var_resp = local_var_client.execute(local_var_req).await?;
2279
2280        let local_var_status = local_var_resp.status();
2281        let local_var_content_type = local_var_resp
2282            .headers()
2283            .get("content-type")
2284            .and_then(|v| v.to_str().ok())
2285            .unwrap_or("application/octet-stream");
2286        let local_var_content_type = super::ContentType::from(local_var_content_type);
2287        let local_var_content = local_var_resp.text().await?;
2288
2289        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2290            match local_var_content_type {
2291                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
2292                ContentType::Text => {
2293                    return Err(Error::from(serde_json::Error::custom(
2294                        "Received `text/plain` content type response that cannot be converted to \
2295                         `models::VaultActionStatus`",
2296                    )))
2297                }
2298                ContentType::Unsupported(local_var_unknown_type) => {
2299                    return Err(Error::from(serde_json::Error::custom(format!(
2300                        "Received `{local_var_unknown_type}` content type response that cannot be \
2301                         converted to `models::VaultActionStatus`"
2302                    ))))
2303                }
2304            }
2305        } else {
2306            let local_var_entity: Option<SetCustomerRefIdForAddressError> =
2307                serde_json::from_str(&local_var_content).ok();
2308            let local_var_error = ResponseContent {
2309                status: local_var_status,
2310                content: local_var_content,
2311                entity: local_var_entity,
2312            };
2313            Err(Error::ResponseError(local_var_error))
2314        }
2315    }
2316
2317    /// Toggles the auto fueling property of the vault account to enabled or disabled. Vault Accounts with 'autoFuel=true' are monitored and auto fueled by the Fireblocks Gas Station. Learn more about the Fireblocks Gas Station in the following [guide](https://developers.fireblocks.com/docs/work-with-gas-station). </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
2318    async fn set_vault_account_auto_fuel(
2319        &self,
2320        params: SetVaultAccountAutoFuelParams,
2321    ) -> Result<models::VaultActionStatus, Error<SetVaultAccountAutoFuelError>> {
2322        let SetVaultAccountAutoFuelParams {
2323            vault_account_id,
2324            set_auto_fuel_request,
2325            idempotency_key,
2326        } = params;
2327
2328        let local_var_configuration = &self.configuration;
2329
2330        let local_var_client = &local_var_configuration.client;
2331
2332        let local_var_uri_str = format!(
2333            "{}/vault/accounts/{vaultAccountId}/set_auto_fuel",
2334            local_var_configuration.base_path,
2335            vaultAccountId = crate::apis::urlencode(vault_account_id)
2336        );
2337        let mut local_var_req_builder =
2338            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2339
2340        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2341            local_var_req_builder = local_var_req_builder
2342                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2343        }
2344        if let Some(local_var_param_value) = idempotency_key {
2345            local_var_req_builder =
2346                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
2347        }
2348        local_var_req_builder = local_var_req_builder.json(&set_auto_fuel_request);
2349
2350        let local_var_req = local_var_req_builder.build()?;
2351        let local_var_resp = local_var_client.execute(local_var_req).await?;
2352
2353        let local_var_status = local_var_resp.status();
2354        let local_var_content_type = local_var_resp
2355            .headers()
2356            .get("content-type")
2357            .and_then(|v| v.to_str().ok())
2358            .unwrap_or("application/octet-stream");
2359        let local_var_content_type = super::ContentType::from(local_var_content_type);
2360        let local_var_content = local_var_resp.text().await?;
2361
2362        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2363            match local_var_content_type {
2364                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
2365                ContentType::Text => {
2366                    return Err(Error::from(serde_json::Error::custom(
2367                        "Received `text/plain` content type response that cannot be converted to \
2368                         `models::VaultActionStatus`",
2369                    )))
2370                }
2371                ContentType::Unsupported(local_var_unknown_type) => {
2372                    return Err(Error::from(serde_json::Error::custom(format!(
2373                        "Received `{local_var_unknown_type}` content type response that cannot be \
2374                         converted to `models::VaultActionStatus`"
2375                    ))))
2376                }
2377            }
2378        } else {
2379            let local_var_entity: Option<SetVaultAccountAutoFuelError> =
2380                serde_json::from_str(&local_var_content).ok();
2381            let local_var_error = ResponseContent {
2382                status: local_var_status,
2383                content: local_var_content,
2384                entity: local_var_entity,
2385            };
2386            Err(Error::ResponseError(local_var_error))
2387        }
2388    }
2389
2390    /// Assigns an AML/KYT customer reference ID for the vault account. Learn more about Fireblocks AML management in the following [guide](https://developers.fireblocks.com/docs/define-aml-policies). </br>Endpoint Permission: Admin, Non-Signing Admin.
2391    async fn set_vault_account_customer_ref_id(
2392        &self,
2393        params: SetVaultAccountCustomerRefIdParams,
2394    ) -> Result<models::VaultActionStatus, Error<SetVaultAccountCustomerRefIdError>> {
2395        let SetVaultAccountCustomerRefIdParams {
2396            vault_account_id,
2397            set_customer_ref_id_request,
2398            idempotency_key,
2399        } = params;
2400
2401        let local_var_configuration = &self.configuration;
2402
2403        let local_var_client = &local_var_configuration.client;
2404
2405        let local_var_uri_str = format!(
2406            "{}/vault/accounts/{vaultAccountId}/set_customer_ref_id",
2407            local_var_configuration.base_path,
2408            vaultAccountId = crate::apis::urlencode(vault_account_id)
2409        );
2410        let mut local_var_req_builder =
2411            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2412
2413        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2414            local_var_req_builder = local_var_req_builder
2415                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2416        }
2417        if let Some(local_var_param_value) = idempotency_key {
2418            local_var_req_builder =
2419                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
2420        }
2421        local_var_req_builder = local_var_req_builder.json(&set_customer_ref_id_request);
2422
2423        let local_var_req = local_var_req_builder.build()?;
2424        let local_var_resp = local_var_client.execute(local_var_req).await?;
2425
2426        let local_var_status = local_var_resp.status();
2427        let local_var_content_type = local_var_resp
2428            .headers()
2429            .get("content-type")
2430            .and_then(|v| v.to_str().ok())
2431            .unwrap_or("application/octet-stream");
2432        let local_var_content_type = super::ContentType::from(local_var_content_type);
2433        let local_var_content = local_var_resp.text().await?;
2434
2435        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2436            match local_var_content_type {
2437                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
2438                ContentType::Text => {
2439                    return Err(Error::from(serde_json::Error::custom(
2440                        "Received `text/plain` content type response that cannot be converted to \
2441                         `models::VaultActionStatus`",
2442                    )))
2443                }
2444                ContentType::Unsupported(local_var_unknown_type) => {
2445                    return Err(Error::from(serde_json::Error::custom(format!(
2446                        "Received `{local_var_unknown_type}` content type response that cannot be \
2447                         converted to `models::VaultActionStatus`"
2448                    ))))
2449                }
2450            }
2451        } else {
2452            let local_var_entity: Option<SetVaultAccountCustomerRefIdError> =
2453                serde_json::from_str(&local_var_content).ok();
2454            let local_var_error = ResponseContent {
2455                status: local_var_status,
2456                content: local_var_content,
2457                entity: local_var_entity,
2458            };
2459            Err(Error::ResponseError(local_var_error))
2460        }
2461    }
2462
2463    /// Makes a hidden vault account visible in web console view. </br>Endpoint
2464    /// Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
2465    async fn unhide_vault_account(
2466        &self,
2467        params: UnhideVaultAccountParams,
2468    ) -> Result<models::VaultActionStatus, Error<UnhideVaultAccountError>> {
2469        let UnhideVaultAccountParams {
2470            vault_account_id,
2471            idempotency_key,
2472        } = params;
2473
2474        let local_var_configuration = &self.configuration;
2475
2476        let local_var_client = &local_var_configuration.client;
2477
2478        let local_var_uri_str = format!(
2479            "{}/vault/accounts/{vaultAccountId}/unhide",
2480            local_var_configuration.base_path,
2481            vaultAccountId = crate::apis::urlencode(vault_account_id)
2482        );
2483        let mut local_var_req_builder =
2484            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2485
2486        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2487            local_var_req_builder = local_var_req_builder
2488                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2489        }
2490        if let Some(local_var_param_value) = idempotency_key {
2491            local_var_req_builder =
2492                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
2493        }
2494
2495        let local_var_req = local_var_req_builder.build()?;
2496        let local_var_resp = local_var_client.execute(local_var_req).await?;
2497
2498        let local_var_status = local_var_resp.status();
2499        let local_var_content_type = local_var_resp
2500            .headers()
2501            .get("content-type")
2502            .and_then(|v| v.to_str().ok())
2503            .unwrap_or("application/octet-stream");
2504        let local_var_content_type = super::ContentType::from(local_var_content_type);
2505        let local_var_content = local_var_resp.text().await?;
2506
2507        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2508            match local_var_content_type {
2509                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
2510                ContentType::Text => {
2511                    return Err(Error::from(serde_json::Error::custom(
2512                        "Received `text/plain` content type response that cannot be converted to \
2513                         `models::VaultActionStatus`",
2514                    )))
2515                }
2516                ContentType::Unsupported(local_var_unknown_type) => {
2517                    return Err(Error::from(serde_json::Error::custom(format!(
2518                        "Received `{local_var_unknown_type}` content type response that cannot be \
2519                         converted to `models::VaultActionStatus`"
2520                    ))))
2521                }
2522            }
2523        } else {
2524            let local_var_entity: Option<UnhideVaultAccountError> =
2525                serde_json::from_str(&local_var_content).ok();
2526            let local_var_error = ResponseContent {
2527                status: local_var_status,
2528                content: local_var_content,
2529                entity: local_var_entity,
2530            };
2531            Err(Error::ResponseError(local_var_error))
2532        }
2533    }
2534
2535    /// Renames the requested vault account. </br>Endpoint Permission: Admin,
2536    /// Non-Signing Admin, Signer, Approver.
2537    async fn update_vault_account(
2538        &self,
2539        params: UpdateVaultAccountParams,
2540    ) -> Result<models::RenameVaultAccountResponse, Error<UpdateVaultAccountError>> {
2541        let UpdateVaultAccountParams {
2542            vault_account_id,
2543            update_vault_account_request,
2544            idempotency_key,
2545        } = params;
2546
2547        let local_var_configuration = &self.configuration;
2548
2549        let local_var_client = &local_var_configuration.client;
2550
2551        let local_var_uri_str = format!(
2552            "{}/vault/accounts/{vaultAccountId}",
2553            local_var_configuration.base_path,
2554            vaultAccountId = crate::apis::urlencode(vault_account_id)
2555        );
2556        let mut local_var_req_builder =
2557            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
2558
2559        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2560            local_var_req_builder = local_var_req_builder
2561                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2562        }
2563        if let Some(local_var_param_value) = idempotency_key {
2564            local_var_req_builder =
2565                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
2566        }
2567        local_var_req_builder = local_var_req_builder.json(&update_vault_account_request);
2568
2569        let local_var_req = local_var_req_builder.build()?;
2570        let local_var_resp = local_var_client.execute(local_var_req).await?;
2571
2572        let local_var_status = local_var_resp.status();
2573        let local_var_content_type = local_var_resp
2574            .headers()
2575            .get("content-type")
2576            .and_then(|v| v.to_str().ok())
2577            .unwrap_or("application/octet-stream");
2578        let local_var_content_type = super::ContentType::from(local_var_content_type);
2579        let local_var_content = local_var_resp.text().await?;
2580
2581        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2582            match local_var_content_type {
2583                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
2584                ContentType::Text => {
2585                    return Err(Error::from(serde_json::Error::custom(
2586                        "Received `text/plain` content type response that cannot be converted to \
2587                         `models::RenameVaultAccountResponse`",
2588                    )))
2589                }
2590                ContentType::Unsupported(local_var_unknown_type) => {
2591                    return Err(Error::from(serde_json::Error::custom(format!(
2592                        "Received `{local_var_unknown_type}` content type response that cannot be \
2593                         converted to `models::RenameVaultAccountResponse`"
2594                    ))))
2595                }
2596            }
2597        } else {
2598            let local_var_entity: Option<UpdateVaultAccountError> =
2599                serde_json::from_str(&local_var_content).ok();
2600            let local_var_error = ResponseContent {
2601                status: local_var_status,
2602                content: local_var_content,
2603                entity: local_var_entity,
2604            };
2605            Err(Error::ResponseError(local_var_error))
2606        }
2607    }
2608
2609    /// Updates the description of an existing address of an asset in a vault
2610    /// account. </br>Endpoint Permission: Admin, Non-Signing Admin, Signer,
2611    /// Approver, Editor.
2612    async fn update_vault_account_asset_address(
2613        &self,
2614        params: UpdateVaultAccountAssetAddressParams,
2615    ) -> Result<models::VaultActionStatus, Error<UpdateVaultAccountAssetAddressError>> {
2616        let UpdateVaultAccountAssetAddressParams {
2617            vault_account_id,
2618            asset_id,
2619            address_id,
2620            idempotency_key,
2621            update_vault_account_asset_address_request,
2622        } = params;
2623
2624        let local_var_configuration = &self.configuration;
2625
2626        let local_var_client = &local_var_configuration.client;
2627
2628        let local_var_uri_str = format!(
2629            "{}/vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}",
2630            local_var_configuration.base_path,
2631            vaultAccountId = crate::apis::urlencode(vault_account_id),
2632            assetId = crate::apis::urlencode(asset_id),
2633            addressId = crate::apis::urlencode(address_id)
2634        );
2635        let mut local_var_req_builder =
2636            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
2637
2638        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2639            local_var_req_builder = local_var_req_builder
2640                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2641        }
2642        if let Some(local_var_param_value) = idempotency_key {
2643            local_var_req_builder =
2644                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
2645        }
2646        local_var_req_builder =
2647            local_var_req_builder.json(&update_vault_account_asset_address_request);
2648
2649        let local_var_req = local_var_req_builder.build()?;
2650        let local_var_resp = local_var_client.execute(local_var_req).await?;
2651
2652        let local_var_status = local_var_resp.status();
2653        let local_var_content_type = local_var_resp
2654            .headers()
2655            .get("content-type")
2656            .and_then(|v| v.to_str().ok())
2657            .unwrap_or("application/octet-stream");
2658        let local_var_content_type = super::ContentType::from(local_var_content_type);
2659        let local_var_content = local_var_resp.text().await?;
2660
2661        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2662            match local_var_content_type {
2663                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
2664                ContentType::Text => {
2665                    return Err(Error::from(serde_json::Error::custom(
2666                        "Received `text/plain` content type response that cannot be converted to \
2667                         `models::VaultActionStatus`",
2668                    )))
2669                }
2670                ContentType::Unsupported(local_var_unknown_type) => {
2671                    return Err(Error::from(serde_json::Error::custom(format!(
2672                        "Received `{local_var_unknown_type}` content type response that cannot be \
2673                         converted to `models::VaultActionStatus`"
2674                    ))))
2675                }
2676            }
2677        } else {
2678            let local_var_entity: Option<UpdateVaultAccountAssetAddressError> =
2679                serde_json::from_str(&local_var_content).ok();
2680            let local_var_error = ResponseContent {
2681                status: local_var_status,
2682                content: local_var_content,
2683                entity: local_var_entity,
2684            };
2685            Err(Error::ResponseError(local_var_error))
2686        }
2687    }
2688
2689    /// Updates the balance of a specific asset in a vault account.  This API
2690    /// endpoint is subject to a strict rate limit. Should be used by clients in
2691    /// very specific scenarios.  </br>Endpoint Permission: Admin, Non-Signing
2692    /// Admin, Signer, Approver, Editor.
2693    async fn update_vault_account_asset_balance(
2694        &self,
2695        params: UpdateVaultAccountAssetBalanceParams,
2696    ) -> Result<models::VaultAsset, Error<UpdateVaultAccountAssetBalanceError>> {
2697        let UpdateVaultAccountAssetBalanceParams {
2698            vault_account_id,
2699            asset_id,
2700            idempotency_key,
2701        } = params;
2702
2703        let local_var_configuration = &self.configuration;
2704
2705        let local_var_client = &local_var_configuration.client;
2706
2707        let local_var_uri_str = format!(
2708            "{}/vault/accounts/{vaultAccountId}/{assetId}/balance",
2709            local_var_configuration.base_path,
2710            vaultAccountId = crate::apis::urlencode(vault_account_id),
2711            assetId = crate::apis::urlencode(asset_id)
2712        );
2713        let mut local_var_req_builder =
2714            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2715
2716        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2717            local_var_req_builder = local_var_req_builder
2718                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2719        }
2720        if let Some(local_var_param_value) = idempotency_key {
2721            local_var_req_builder =
2722                local_var_req_builder.header("Idempotency-Key", local_var_param_value.to_string());
2723        }
2724
2725        let local_var_req = local_var_req_builder.build()?;
2726        let local_var_resp = local_var_client.execute(local_var_req).await?;
2727
2728        let local_var_status = local_var_resp.status();
2729        let local_var_content_type = local_var_resp
2730            .headers()
2731            .get("content-type")
2732            .and_then(|v| v.to_str().ok())
2733            .unwrap_or("application/octet-stream");
2734        let local_var_content_type = super::ContentType::from(local_var_content_type);
2735        let local_var_content = local_var_resp.text().await?;
2736
2737        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2738            match local_var_content_type {
2739                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
2740                ContentType::Text => {
2741                    return Err(Error::from(serde_json::Error::custom(
2742                        "Received `text/plain` content type response that cannot be converted to \
2743                         `models::VaultAsset`",
2744                    )))
2745                }
2746                ContentType::Unsupported(local_var_unknown_type) => {
2747                    return Err(Error::from(serde_json::Error::custom(format!(
2748                        "Received `{local_var_unknown_type}` content type response that cannot be \
2749                         converted to `models::VaultAsset`"
2750                    ))))
2751                }
2752            }
2753        } else {
2754            let local_var_entity: Option<UpdateVaultAccountAssetBalanceError> =
2755                serde_json::from_str(&local_var_content).ok();
2756            let local_var_error = ResponseContent {
2757                status: local_var_status,
2758                content: local_var_content,
2759                entity: local_var_entity,
2760            };
2761            Err(Error::ResponseError(local_var_error))
2762        }
2763    }
2764}
2765
2766/// struct for typed errors of method [`activate_asset_for_vault_account`]
2767#[derive(Debug, Clone, Serialize, Deserialize)]
2768#[serde(untagged)]
2769pub enum ActivateAssetForVaultAccountError {
2770    DefaultResponse(models::ErrorSchema),
2771    UnknownValue(serde_json::Value),
2772}
2773
2774/// struct for typed errors of method [`create_legacy_address`]
2775#[derive(Debug, Clone, Serialize, Deserialize)]
2776#[serde(untagged)]
2777pub enum CreateLegacyAddressError {
2778    DefaultResponse(models::ErrorSchema),
2779    UnknownValue(serde_json::Value),
2780}
2781
2782/// struct for typed errors of method [`create_multiple_deposit_addresses`]
2783#[derive(Debug, Clone, Serialize, Deserialize)]
2784#[serde(untagged)]
2785pub enum CreateMultipleDepositAddressesError {
2786    DefaultResponse(models::ErrorSchema),
2787    UnknownValue(serde_json::Value),
2788}
2789
2790/// struct for typed errors of method [`create_vault_account`]
2791#[derive(Debug, Clone, Serialize, Deserialize)]
2792#[serde(untagged)]
2793pub enum CreateVaultAccountError {
2794    DefaultResponse(models::ErrorSchema),
2795    UnknownValue(serde_json::Value),
2796}
2797
2798/// struct for typed errors of method [`create_vault_account_asset`]
2799#[derive(Debug, Clone, Serialize, Deserialize)]
2800#[serde(untagged)]
2801pub enum CreateVaultAccountAssetError {
2802    DefaultResponse(models::ErrorSchema),
2803    UnknownValue(serde_json::Value),
2804}
2805
2806/// struct for typed errors of method [`create_vault_account_asset_address`]
2807#[derive(Debug, Clone, Serialize, Deserialize)]
2808#[serde(untagged)]
2809pub enum CreateVaultAccountAssetAddressError {
2810    DefaultResponse(models::ErrorSchema),
2811    UnknownValue(serde_json::Value),
2812}
2813
2814/// struct for typed errors of method [`get_asset_wallets`]
2815#[derive(Debug, Clone, Serialize, Deserialize)]
2816#[serde(untagged)]
2817pub enum GetAssetWalletsError {
2818    UnknownValue(serde_json::Value),
2819}
2820
2821/// struct for typed errors of method
2822/// [`get_create_multiple_deposit_addresses_job_status`]
2823#[derive(Debug, Clone, Serialize, Deserialize)]
2824#[serde(untagged)]
2825pub enum GetCreateMultipleDepositAddressesJobStatusError {
2826    DefaultResponse(models::ErrorSchema),
2827    UnknownValue(serde_json::Value),
2828}
2829
2830/// struct for typed errors of method [`get_max_spendable_amount`]
2831#[derive(Debug, Clone, Serialize, Deserialize)]
2832#[serde(untagged)]
2833pub enum GetMaxSpendableAmountError {
2834    DefaultResponse(models::ErrorSchema),
2835    UnknownValue(serde_json::Value),
2836}
2837
2838/// struct for typed errors of method [`get_paged_vault_accounts`]
2839#[derive(Debug, Clone, Serialize, Deserialize)]
2840#[serde(untagged)]
2841pub enum GetPagedVaultAccountsError {
2842    UnknownValue(serde_json::Value),
2843}
2844
2845/// struct for typed errors of method [`get_public_key_info`]
2846#[derive(Debug, Clone, Serialize, Deserialize)]
2847#[serde(untagged)]
2848pub enum GetPublicKeyInfoError {
2849    DefaultResponse(models::ErrorSchema),
2850    UnknownValue(serde_json::Value),
2851}
2852
2853/// struct for typed errors of method [`get_public_key_info_for_address`]
2854#[derive(Debug, Clone, Serialize, Deserialize)]
2855#[serde(untagged)]
2856pub enum GetPublicKeyInfoForAddressError {
2857    DefaultResponse(models::ErrorSchema),
2858    UnknownValue(serde_json::Value),
2859}
2860
2861/// struct for typed errors of method [`get_unspent_inputs`]
2862#[derive(Debug, Clone, Serialize, Deserialize)]
2863#[serde(untagged)]
2864pub enum GetUnspentInputsError {
2865    DefaultResponse(models::ErrorSchema),
2866    UnknownValue(serde_json::Value),
2867}
2868
2869/// struct for typed errors of method [`get_vault_account`]
2870#[derive(Debug, Clone, Serialize, Deserialize)]
2871#[serde(untagged)]
2872pub enum GetVaultAccountError {
2873    DefaultResponse(models::ErrorSchema),
2874    UnknownValue(serde_json::Value),
2875}
2876
2877/// struct for typed errors of method [`get_vault_account_asset`]
2878#[derive(Debug, Clone, Serialize, Deserialize)]
2879#[serde(untagged)]
2880pub enum GetVaultAccountAssetError {
2881    DefaultResponse(models::ErrorSchema),
2882    UnknownValue(serde_json::Value),
2883}
2884
2885/// struct for typed errors of method [`get_vault_account_asset_addresses`]
2886#[derive(Debug, Clone, Serialize, Deserialize)]
2887#[serde(untagged)]
2888pub enum GetVaultAccountAssetAddressesError {
2889    DefaultResponse(models::ErrorSchema),
2890    UnknownValue(serde_json::Value),
2891}
2892
2893/// struct for typed errors of method
2894/// [`get_vault_account_asset_addresses_paginated`]
2895#[derive(Debug, Clone, Serialize, Deserialize)]
2896#[serde(untagged)]
2897pub enum GetVaultAccountAssetAddressesPaginatedError {
2898    DefaultResponse(models::ErrorSchema),
2899    UnknownValue(serde_json::Value),
2900}
2901
2902/// struct for typed errors of method [`get_vault_assets`]
2903#[derive(Debug, Clone, Serialize, Deserialize)]
2904#[serde(untagged)]
2905pub enum GetVaultAssetsError {
2906    DefaultResponse(models::ErrorSchema),
2907    UnknownValue(serde_json::Value),
2908}
2909
2910/// struct for typed errors of method [`get_vault_balance_by_asset`]
2911#[derive(Debug, Clone, Serialize, Deserialize)]
2912#[serde(untagged)]
2913pub enum GetVaultBalanceByAssetError {
2914    DefaultResponse(models::ErrorSchema),
2915    UnknownValue(serde_json::Value),
2916}
2917
2918/// struct for typed errors of method [`hide_vault_account`]
2919#[derive(Debug, Clone, Serialize, Deserialize)]
2920#[serde(untagged)]
2921pub enum HideVaultAccountError {
2922    DefaultResponse(models::ErrorSchema),
2923    UnknownValue(serde_json::Value),
2924}
2925
2926/// struct for typed errors of method [`set_customer_ref_id_for_address`]
2927#[derive(Debug, Clone, Serialize, Deserialize)]
2928#[serde(untagged)]
2929pub enum SetCustomerRefIdForAddressError {
2930    DefaultResponse(models::ErrorSchema),
2931    UnknownValue(serde_json::Value),
2932}
2933
2934/// struct for typed errors of method [`set_vault_account_auto_fuel`]
2935#[derive(Debug, Clone, Serialize, Deserialize)]
2936#[serde(untagged)]
2937pub enum SetVaultAccountAutoFuelError {
2938    DefaultResponse(models::ErrorSchema),
2939    UnknownValue(serde_json::Value),
2940}
2941
2942/// struct for typed errors of method [`set_vault_account_customer_ref_id`]
2943#[derive(Debug, Clone, Serialize, Deserialize)]
2944#[serde(untagged)]
2945pub enum SetVaultAccountCustomerRefIdError {
2946    DefaultResponse(models::ErrorSchema),
2947    UnknownValue(serde_json::Value),
2948}
2949
2950/// struct for typed errors of method [`unhide_vault_account`]
2951#[derive(Debug, Clone, Serialize, Deserialize)]
2952#[serde(untagged)]
2953pub enum UnhideVaultAccountError {
2954    DefaultResponse(models::ErrorSchema),
2955    UnknownValue(serde_json::Value),
2956}
2957
2958/// struct for typed errors of method [`update_vault_account`]
2959#[derive(Debug, Clone, Serialize, Deserialize)]
2960#[serde(untagged)]
2961pub enum UpdateVaultAccountError {
2962    DefaultResponse(models::ErrorSchema),
2963    UnknownValue(serde_json::Value),
2964}
2965
2966/// struct for typed errors of method [`update_vault_account_asset_address`]
2967#[derive(Debug, Clone, Serialize, Deserialize)]
2968#[serde(untagged)]
2969pub enum UpdateVaultAccountAssetAddressError {
2970    DefaultResponse(models::ErrorSchema),
2971    UnknownValue(serde_json::Value),
2972}
2973
2974/// struct for typed errors of method [`update_vault_account_asset_balance`]
2975#[derive(Debug, Clone, Serialize, Deserialize)]
2976#[serde(untagged)]
2977pub enum UpdateVaultAccountAssetBalanceError {
2978    DefaultResponse(models::ErrorSchema),
2979    UnknownValue(serde_json::Value),
2980}