From f446d7bc8153da408a2624446dbb7ff6ffe7ed09 Mon Sep 17 00:00:00 2001 From: "bpayne@fireblocks.com" Date: Thu, 22 Aug 2024 14:53:01 +0300 Subject: [PATCH] to_dict --- fireblocks_sdk/api_types.py | 6 ++++++ fireblocks_sdk/sdk.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fireblocks_sdk/api_types.py b/fireblocks_sdk/api_types.py index 6e1593f..da98bab 100644 --- a/fireblocks_sdk/api_types.py +++ b/fireblocks_sdk/api_types.py @@ -246,6 +246,12 @@ def to_dict(self): for rescan_tx in self.rescan_txs: self.txs_to_validate.append(rescan_tx.to_dict()) +class RescanTxResponse: + def __init__(self, tx_hashes, base_asset, network_protocol): + self.txHashes = tx_hashes + self.baseAsset = base_asset + self.networkProtocol = network_protocol + class PagedVaultAccountsRequestFilters: """ Optional filters to apply for request diff --git a/fireblocks_sdk/sdk.py b/fireblocks_sdk/sdk.py index 0704fdb..df41d35 100644 --- a/fireblocks_sdk/sdk.py +++ b/fireblocks_sdk/sdk.py @@ -42,6 +42,7 @@ TokenOwnershipSpamUpdatePayload, RescanTx, RescanTxRequest, + RescanTxResponse, ) from .tokenization_api_types import \ CreateTokenRequest, \ @@ -2110,7 +2111,7 @@ def get_max_bip44_index_used(self, vault_account_id, asset_id): return self._get_request(url) - def rescan_transactions(self, rescan_txs: List[RescanTx]): + def rescan_transactions(self, rescan_txs: List[RescanTx]) -> list[RescanTxResponse]: """initiate rescan for given transactions Args: rescan_txs: (Array of RescanTx): the transaction asset_id and hash for rescan