diff --git a/.github/workflows/create-pr.yml b/.github/workflows/create-pr.yml index 2c0a0625..86ab898a 100644 --- a/.github/workflows/create-pr.yml +++ b/.github/workflows/create-pr.yml @@ -20,6 +20,6 @@ jobs: --body "This PR was automatically generated." \ --base master \ --head ${{ github.ref }} \ - --reviewer asafs932,sharonasw,YoavBZ + --reviewer asafs932,YoavBZ env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 6d7982bd..41125cf0 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -301,8 +301,6 @@ docs/EstimatedNetworkFeeResponse.md docs/EstimatedTransactionFeeResponse.md docs/ExchangeAccount.md docs/ExchangeAccountsApi.md -docs/ExchangeAccountsPaged.md -docs/ExchangeAccountsPagedPaging.md docs/ExchangeAsset.md docs/ExchangeSettlementTransactionsResponse.md docs/ExchangeTradingAccount.md @@ -330,6 +328,7 @@ docs/FeeBreakdownOneOf.md docs/FeeBreakdownOneOf1.md docs/FeeInfo.md docs/FeeLevel.md +docs/FeePayerInfo.md docs/FetchAbiRequestDto.md docs/FiatAccount.md docs/FiatAccountType.md @@ -362,6 +361,8 @@ docs/GetNFTsResponse.md docs/GetOrdersResponse.md docs/GetOtaStatusResponse.md docs/GetOwnershipTokensResponse.md +docs/GetPagedExchangeAccountsResponse.md +docs/GetPagedExchangeAccountsResponsePaging.md docs/GetSigningKeyResponseDto.md docs/GetTransactionOperation.md docs/GetValidationKeyResponseDto.md @@ -1153,8 +1154,6 @@ fireblocks/models/estimated_network_fee_response.py fireblocks/models/estimated_transaction_fee_response.py fireblocks/models/evm_token_create_params_dto.py fireblocks/models/exchange_account.py -fireblocks/models/exchange_accounts_paged.py -fireblocks/models/exchange_accounts_paged_paging.py fireblocks/models/exchange_asset.py fireblocks/models/exchange_settlement_transactions_response.py fireblocks/models/exchange_trading_account.py @@ -1181,6 +1180,7 @@ fireblocks/models/fee_breakdown_one_of.py fireblocks/models/fee_breakdown_one_of1.py fireblocks/models/fee_info.py fireblocks/models/fee_level.py +fireblocks/models/fee_payer_info.py fireblocks/models/fetch_abi_request_dto.py fireblocks/models/fiat_account.py fireblocks/models/fiat_account_type.py @@ -1211,6 +1211,8 @@ fireblocks/models/get_nfts_response.py fireblocks/models/get_orders_response.py fireblocks/models/get_ota_status_response.py fireblocks/models/get_ownership_tokens_response.py +fireblocks/models/get_paged_exchange_accounts_response.py +fireblocks/models/get_paged_exchange_accounts_response_paging.py fireblocks/models/get_signing_key_response_dto.py fireblocks/models/get_transaction_operation.py fireblocks/models/get_validation_key_response_dto.py @@ -1956,8 +1958,6 @@ test/test_estimated_transaction_fee_response.py test/test_evm_token_create_params_dto.py test/test_exchange_account.py test/test_exchange_accounts_api.py -test/test_exchange_accounts_paged.py -test/test_exchange_accounts_paged_paging.py test/test_exchange_asset.py test/test_exchange_settlement_transactions_response.py test/test_exchange_trading_account.py @@ -1985,6 +1985,7 @@ test/test_fee_breakdown_one_of.py test/test_fee_breakdown_one_of1.py test/test_fee_info.py test/test_fee_level.py +test/test_fee_payer_info.py test/test_fetch_abi_request_dto.py test/test_fiat_account.py test/test_fiat_account_type.py @@ -2017,6 +2018,8 @@ test/test_get_nfts_response.py test/test_get_orders_response.py test/test_get_ota_status_response.py test/test_get_ownership_tokens_response.py +test/test_get_paged_exchange_accounts_response.py +test/test_get_paged_exchange_accounts_response_paging.py test/test_get_signing_key_response_dto.py test/test_get_transaction_operation.py test/test_get_validation_key_response_dto.py diff --git a/README.md b/README.md index 8717034a..69c19e60 100644 --- a/README.md +++ b/README.md @@ -838,8 +838,6 @@ Class | Method | HTTP request | Description - [EstimatedNetworkFeeResponse](docs/EstimatedNetworkFeeResponse.md) - [EstimatedTransactionFeeResponse](docs/EstimatedTransactionFeeResponse.md) - [ExchangeAccount](docs/ExchangeAccount.md) - - [ExchangeAccountsPaged](docs/ExchangeAccountsPaged.md) - - [ExchangeAccountsPagedPaging](docs/ExchangeAccountsPagedPaging.md) - [ExchangeAsset](docs/ExchangeAsset.md) - [ExchangeSettlementTransactionsResponse](docs/ExchangeSettlementTransactionsResponse.md) - [ExchangeTradingAccount](docs/ExchangeTradingAccount.md) @@ -866,6 +864,7 @@ Class | Method | HTTP request | Description - [FeeBreakdownOneOf1](docs/FeeBreakdownOneOf1.md) - [FeeInfo](docs/FeeInfo.md) - [FeeLevel](docs/FeeLevel.md) + - [FeePayerInfo](docs/FeePayerInfo.md) - [FetchAbiRequestDto](docs/FetchAbiRequestDto.md) - [FiatAccount](docs/FiatAccount.md) - [FiatAccountType](docs/FiatAccountType.md) @@ -896,6 +895,8 @@ Class | Method | HTTP request | Description - [GetOrdersResponse](docs/GetOrdersResponse.md) - [GetOtaStatusResponse](docs/GetOtaStatusResponse.md) - [GetOwnershipTokensResponse](docs/GetOwnershipTokensResponse.md) + - [GetPagedExchangeAccountsResponse](docs/GetPagedExchangeAccountsResponse.md) + - [GetPagedExchangeAccountsResponsePaging](docs/GetPagedExchangeAccountsResponsePaging.md) - [GetSigningKeyResponseDto](docs/GetSigningKeyResponseDto.md) - [GetTransactionOperation](docs/GetTransactionOperation.md) - [GetValidationKeyResponseDto](docs/GetValidationKeyResponseDto.md) diff --git a/docs/ComplianceScreeningResult.md b/docs/ComplianceScreeningResult.md index 929cc617..20e602be 100644 --- a/docs/ComplianceScreeningResult.md +++ b/docs/ComplianceScreeningResult.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**provider** | **str** | | [optional] +**provider** | **str** | Screening provider | [optional] **payload** | **object** | The payload of the screening result. The payload is a JSON object that contains the screening result. The payload is different for each screening provider. | [optional] -**bypass_reason** | **str** | | [optional] +**bypass_reason** | **str** | Reason AML screening was bypassed | [optional] **screening_status** | **str** | | [optional] **timestamp** | **float** | | [optional] diff --git a/docs/ExchangeAccountsApi.md b/docs/ExchangeAccountsApi.md index 454bd186..a3cf91fe 100644 --- a/docs/ExchangeAccountsApi.md +++ b/docs/ExchangeAccountsApi.md @@ -390,7 +390,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_paged_exchange_accounts** -> List[ExchangeAccountsPaged] get_paged_exchange_accounts(limit, before=before, after=after) +> GetPagedExchangeAccountsResponse get_paged_exchange_accounts(limit, before=before, after=after) Pagination list exchange accounts @@ -400,7 +400,7 @@ Returns a page include exchange accounts. ```python -from fireblocks.models.exchange_accounts_paged import ExchangeAccountsPaged +from fireblocks.models.get_paged_exchange_accounts_response import GetPagedExchangeAccountsResponse from fireblocks.client import Fireblocks from fireblocks.client_configuration import ClientConfiguration from fireblocks.exceptions import ApiException @@ -447,7 +447,7 @@ Name | Type | Description | Notes ### Return type -[**List[ExchangeAccountsPaged]**](ExchangeAccountsPaged.md) +[**GetPagedExchangeAccountsResponse**](GetPagedExchangeAccountsResponse.md) ### Authorization diff --git a/docs/ExchangeAccountsPaged.md b/docs/ExchangeAccountsPaged.md deleted file mode 100644 index 38410bd6..00000000 --- a/docs/ExchangeAccountsPaged.md +++ /dev/null @@ -1,32 +0,0 @@ -# ExchangeAccountsPaged - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**exchange_account** | [**List[ExchangeAccount]**](ExchangeAccount.md) | | [optional] -**paging** | [**ExchangeAccountsPagedPaging**](ExchangeAccountsPagedPaging.md) | | [optional] -**prev_url** | **str** | | [optional] -**next_url** | **str** | | [optional] - -## Example - -```python -from fireblocks.models.exchange_accounts_paged import ExchangeAccountsPaged - -# TODO update the JSON string below -json = "{}" -# create an instance of ExchangeAccountsPaged from a JSON string -exchange_accounts_paged_instance = ExchangeAccountsPaged.from_json(json) -# print the JSON string representation of the object -print(ExchangeAccountsPaged.to_json()) - -# convert the object into a dict -exchange_accounts_paged_dict = exchange_accounts_paged_instance.to_dict() -# create an instance of ExchangeAccountsPaged from a dict -exchange_accounts_paged_from_dict = ExchangeAccountsPaged.from_dict(exchange_accounts_paged_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ExchangeAccountsPagedPaging.md b/docs/ExchangeAccountsPagedPaging.md deleted file mode 100644 index 698a479a..00000000 --- a/docs/ExchangeAccountsPagedPaging.md +++ /dev/null @@ -1,30 +0,0 @@ -# ExchangeAccountsPagedPaging - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**after** | **str** | Query value to the after page | [optional] -**before** | **str** | Query value to the before page | [optional] - -## Example - -```python -from fireblocks.models.exchange_accounts_paged_paging import ExchangeAccountsPagedPaging - -# TODO update the JSON string below -json = "{}" -# create an instance of ExchangeAccountsPagedPaging from a JSON string -exchange_accounts_paged_paging_instance = ExchangeAccountsPagedPaging.from_json(json) -# print the JSON string representation of the object -print(ExchangeAccountsPagedPaging.to_json()) - -# convert the object into a dict -exchange_accounts_paged_paging_dict = exchange_accounts_paged_paging_instance.to_dict() -# create an instance of ExchangeAccountsPagedPaging from a dict -exchange_accounts_paged_paging_from_dict = ExchangeAccountsPagedPaging.from_dict(exchange_accounts_paged_paging_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ExternalWalletAsset.md b/docs/ExternalWalletAsset.md index 1b17143b..a8b16093 100644 --- a/docs/ExternalWalletAsset.md +++ b/docs/ExternalWalletAsset.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes **id** | **str** | | [optional] **status** | [**ConfigChangeRequestStatus**](ConfigChangeRequestStatus.md) | | [optional] **address** | **str** | | [optional] -**balance** | **str** | | [optional] -**locked_amount** | **str** | | [optional] +**balance** | **float** | | [optional] +**locked_amount** | **float** | | [optional] **tag** | **str** | | [optional] **activation_time** | **str** | | [optional] **additional_info** | [**List[WalletAssetAdditionalInfo]**](WalletAssetAdditionalInfo.md) | | [optional] diff --git a/docs/FeeInfo.md b/docs/FeeInfo.md index cdad9b10..c4dd92d2 100644 --- a/docs/FeeInfo.md +++ b/docs/FeeInfo.md @@ -9,6 +9,8 @@ Name | Type | Description | Notes **network_fee** | **str** | The fee paid to the network | [optional] **service_fee** | **str** | The total fee deducted by the exchange from the actual requested amount (serviceFee = amount - netAmount) | [optional] **gas_price** | **str** | | [optional] +**l1network_fee** | **str** | Layer 1 network fee for Layer 2 blockchain transactions | [optional] +**l2network_fee** | **str** | Layer 2 network fee (gas price component for Layer 2 transactions) | [optional] **paid_by_relay** | **bool** | Wether the fee was paid by the relay or not | [optional] **relay_type** | **str** | Wether the relay is the same tenant (LOCAL) or another tenant (THIRD_PARTY) | [optional] **relay_id** | **str** | The vault account ID of the relay | [optional] diff --git a/docs/FeePayerInfo.md b/docs/FeePayerInfo.md new file mode 100644 index 00000000..d3ce7bf7 --- /dev/null +++ b/docs/FeePayerInfo.md @@ -0,0 +1,29 @@ +# FeePayerInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fee_payer_account_id** | **str** | The account ID of the fee payer | [optional] + +## Example + +```python +from fireblocks.models.fee_payer_info import FeePayerInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of FeePayerInfo from a JSON string +fee_payer_info_instance = FeePayerInfo.from_json(json) +# print the JSON string representation of the object +print(FeePayerInfo.to_json()) + +# convert the object into a dict +fee_payer_info_dict = fee_payer_info_instance.to_dict() +# create an instance of FeePayerInfo from a dict +fee_payer_info_from_dict = FeePayerInfo.from_dict(fee_payer_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetPagedExchangeAccountsResponse.md b/docs/GetPagedExchangeAccountsResponse.md new file mode 100644 index 00000000..e18843c8 --- /dev/null +++ b/docs/GetPagedExchangeAccountsResponse.md @@ -0,0 +1,32 @@ +# GetPagedExchangeAccountsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exchanges** | [**List[ExchangeAccount]**](ExchangeAccount.md) | | +**paging** | [**GetPagedExchangeAccountsResponsePaging**](GetPagedExchangeAccountsResponsePaging.md) | | [optional] +**prev_url** | **str** | | [optional] +**next_url** | **str** | | [optional] + +## Example + +```python +from fireblocks.models.get_paged_exchange_accounts_response import GetPagedExchangeAccountsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetPagedExchangeAccountsResponse from a JSON string +get_paged_exchange_accounts_response_instance = GetPagedExchangeAccountsResponse.from_json(json) +# print the JSON string representation of the object +print(GetPagedExchangeAccountsResponse.to_json()) + +# convert the object into a dict +get_paged_exchange_accounts_response_dict = get_paged_exchange_accounts_response_instance.to_dict() +# create an instance of GetPagedExchangeAccountsResponse from a dict +get_paged_exchange_accounts_response_from_dict = GetPagedExchangeAccountsResponse.from_dict(get_paged_exchange_accounts_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetPagedExchangeAccountsResponsePaging.md b/docs/GetPagedExchangeAccountsResponsePaging.md new file mode 100644 index 00000000..6fd47e38 --- /dev/null +++ b/docs/GetPagedExchangeAccountsResponsePaging.md @@ -0,0 +1,30 @@ +# GetPagedExchangeAccountsResponsePaging + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**after** | **str** | Query value to the after page | [optional] +**before** | **str** | Query value to the before page | [optional] + +## Example + +```python +from fireblocks.models.get_paged_exchange_accounts_response_paging import GetPagedExchangeAccountsResponsePaging + +# TODO update the JSON string below +json = "{}" +# create an instance of GetPagedExchangeAccountsResponsePaging from a JSON string +get_paged_exchange_accounts_response_paging_instance = GetPagedExchangeAccountsResponsePaging.from_json(json) +# print the JSON string representation of the object +print(GetPagedExchangeAccountsResponsePaging.to_json()) + +# convert the object into a dict +get_paged_exchange_accounts_response_paging_dict = get_paged_exchange_accounts_response_paging_instance.to_dict() +# create an instance of GetPagedExchangeAccountsResponsePaging from a dict +get_paged_exchange_accounts_response_paging_from_dict = GetPagedExchangeAccountsResponsePaging.from_dict(get_paged_exchange_accounts_response_paging_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkRecord.md b/docs/NetworkRecord.md index 88135c8f..f0225056 100644 --- a/docs/NetworkRecord.md +++ b/docs/NetworkRecord.md @@ -14,9 +14,7 @@ Name | Type | Description | Notes **is_dropped** | **bool** | | [optional] **type** | **str** | | [optional] **destination_address** | **str** | | [optional] -**source_address** | **str** | | [optional] **amount_usd** | **str** | | [optional] -**index** | **float** | | [optional] **reward_info** | [**RewardInfo**](RewardInfo.md) | | [optional] ## Example diff --git a/docs/SmartTransferApi.md b/docs/SmartTransferApi.md index 39dc3dec..1b7f3b89 100644 --- a/docs/SmartTransferApi.md +++ b/docs/SmartTransferApi.md @@ -1037,7 +1037,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **search_tickets** -> SmartTransferTicketFilteredResponse search_tickets(q=q, statuses=statuses, network_id=network_id, created_by_me=created_by_me, expires_after=expires_after, expires_before=expires_before, type=type, external_ref_id=external_ref_id, after=after, limit=limit) +> SmartTransferTicketFilteredResponse search_tickets(q=q, statuses=statuses, network_id=network_id, created_by_me=created_by_me, expires_after=expires_after, expires_before=expires_before, type=type, external_ref_id=external_ref_id, after=after, limit=limit, sort_by=sort_by, order=order) Find Ticket @@ -1078,10 +1078,12 @@ with Fireblocks(configuration) as fireblocks: external_ref_id = 'external_ref_id_example' # str | External ref. ID that workspace can use to identify ticket outside of Fireblocks system. (optional) after = 'after_example' # str | ID of the record after which to fetch $limit records (optional) limit = 3.4 # float | Number of records to fetch. By default, it is 100 (optional) + sort_by = createdAt # str | Sort by field (optional) (default to createdAt) + order = DESC # str | ASC / DESC ordering (default DESC) (optional) (default to DESC) try: # Find Ticket - api_response = fireblocks.smart_transfer.search_tickets(q=q, statuses=statuses, network_id=network_id, created_by_me=created_by_me, expires_after=expires_after, expires_before=expires_before, type=type, external_ref_id=external_ref_id, after=after, limit=limit).result() + api_response = fireblocks.smart_transfer.search_tickets(q=q, statuses=statuses, network_id=network_id, created_by_me=created_by_me, expires_after=expires_after, expires_before=expires_before, type=type, external_ref_id=external_ref_id, after=after, limit=limit, sort_by=sort_by, order=order).result() print("The response of SmartTransferApi->search_tickets:\n") pprint(api_response) except Exception as e: @@ -1105,6 +1107,8 @@ Name | Type | Description | Notes **external_ref_id** | **str**| External ref. ID that workspace can use to identify ticket outside of Fireblocks system. | [optional] **after** | **str**| ID of the record after which to fetch $limit records | [optional] **limit** | **float**| Number of records to fetch. By default, it is 100 | [optional] + **sort_by** | **str**| Sort by field | [optional] [default to createdAt] + **order** | **str**| ASC / DESC ordering (default DESC) | [optional] [default to DESC] ### Return type diff --git a/docs/TransactionResponse.md b/docs/TransactionResponse.md index f2595b03..9fb5da5a 100644 --- a/docs/TransactionResponse.md +++ b/docs/TransactionResponse.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **operation** | [**GetTransactionOperation**](GetTransactionOperation.md) | | [optional] **note** | **str** | Custom note, not sent to the blockchain, that describes the transaction at your Fireblocks workspace. | [optional] **asset_id** | **str** | The ID of the asset to transfer, for `TRANSFER`, `MINT`, `BURN`, `ENABLE_ASSET`,`STAKE` ,`UNSTAKE` or `WITHDRAW` operations. [See the list of supported assets and their IDs on Fireblocks.](https://developers.fireblocks.com/reference/get_supported-assets) | [optional] +**asset_type** | **str** | Type classification of the asset | [optional] **source** | [**SourceTransferPeerPathResponse**](SourceTransferPeerPathResponse.md) | | [optional] **source_address** | **str** | For account based assets only, the source address of the transaction. **Note:** If the status is `CONFIRMING`, `COMPLETED`, or has been `CONFIRMING`; then moved forward to `FAILED` or `REJECTED`, then this parameter will contain the source address. In any other case, this parameter will be empty. | [optional] **tag** | **str** | Source address tag for XRP, used as memo for EOS/XLM, or Bank Transfer Description for the fiat provider BLINC (by BCB Group). | [optional] @@ -37,12 +38,18 @@ Name | Type | Description | Notes **customer_ref_id** | **str** | The ID for AML providers to associate the owner of funds with transactions. | [optional] **aml_screening_result** | [**AmlScreeningResult**](AmlScreeningResult.md) | | [optional] **compliance_results** | [**ComplianceResults**](ComplianceResults.md) | | [optional] +**not_broadcast_by_fireblocks** | **bool** | Indicates the transaction was not broadcast by Fireblocks | [optional] +**dapp_url** | **str** | DApp URL for Web3 transactions | [optional] +**gas_limit** | **str** | Gas limit for EVM-based blockchain transactions | [optional] +**blockchain_index** | **str** | Blockchain-specific index or identifier for the transaction | [optional] +**paid_rent** | **str** | Solana rent payment amount | [optional] **extra_parameters** | **object** | Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set the [input selection structure.](https://developers.fireblocks.com/reference/transaction-objects#inputsselection) The inputs can be retrieved from the [Retrieve Unspent Inputs endpoint.](https://developers.fireblocks.com/reference/get_vault-accounts-vaultaccountid-assetid-unspent-inputs) For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. For **exchange compliance (e.g., Binance) and Travel Rule purposes**, include the key `piiData` containing a **custom JSON structure** with Personally Identifiable Information (PII) relevant to the transaction. This data must be fully **encrypted by the sender** before being submitted to the Fireblocks API. The recommended encryption method is **hybrid encryption** using AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange’s public key. [development libraries](https://developers.fireblocks.com/docs/a-developers-guide-to-constructing-encrypted-pii-messages-for-binance-via-fireblocks) | [optional] **signed_messages** | [**List[SignedMessage]**](SignedMessage.md) | | [optional] **num_of_confirmations** | **float** | The number of confirmations of the transaction. The number will increase until the transaction will be considered completed according to the confirmation policy. | [optional] **block_info** | [**BlockInfo**](BlockInfo.md) | | [optional] **index** | **float** | For UTXO based assets this is the vOut, for Ethereum based, this is the index of the event of the contract call. **Note:** This field is not returned if a transaction uses the `destinations` object with more than one value. | [optional] **reward_info** | [**RewardInfo**](RewardInfo.md) | | [optional] +**fee_payer_info** | [**FeePayerInfo**](FeePayerInfo.md) | | [optional] **system_messages** | [**SystemMessageInfo**](SystemMessageInfo.md) | | [optional] **address_type** | **str** | | [optional] **requested_amount** | **float** | The amount requested by the user. Deprecated - please use the `amountInfo` field for accuracy. | [optional] @@ -53,6 +60,9 @@ Name | Type | Description | Notes **fee** | **float** | Deprecated - please use the `feeInfo` field for accuracy. | [optional] **network_fee** | **float** | The fee paid to the network. Deprecated - please use the `feeInfo` field for accuracy. | [optional] **error_description** | **str** | The transaction's revert reason. This field will be returned when `subStatus` = 'SMART_CONTRACT_EXECUTION_FAILED'. | [optional] +**replaced_tx_hash** | **str** | if the transaction is a replace by fee (RBF) transaction, this is the hash of the transsaction that was replaced | [optional] +**nonce** | **str** | blockchain nonce for the transaction | [optional] +**blockchain_info** | **object** | A JSON used to store additional data that is blockchain-specific. | [optional] ## Example diff --git a/docs/TransactionResponseDestination.md b/docs/TransactionResponseDestination.md index a82f8ace..72b4f924 100644 --- a/docs/TransactionResponseDestination.md +++ b/docs/TransactionResponseDestination.md @@ -5,8 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**destination_address** | **object** | Address where the asset was transferred. | [optional] -**destination_address_description** | **object** | Description of the address. | [optional] **amount** | **str** | The amount to be sent to this destination. | [optional] **amount_usd** | **str** | The USD value of the requested amount. | [optional] **aml_screening_result** | [**AmlScreeningResult**](AmlScreeningResult.md) | | [optional] diff --git a/docs/TransferPeerPathType.md b/docs/TransferPeerPathType.md index a1690612..70c457c1 100644 --- a/docs/TransferPeerPathType.md +++ b/docs/TransferPeerPathType.md @@ -31,6 +31,8 @@ * `MULTI_DESTINATION` (value: `'MULTI_DESTINATION'`) +* `OEC_PARTNER` (value: `'OEC_PARTNER'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/fireblocks/__init__.py b/fireblocks/__init__.py index bb88cf96..ba12e366 100644 --- a/fireblocks/__init__.py +++ b/fireblocks/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "12.1.0" +__version__ = "0.0.0" # import apis into sdk package from fireblocks.api.api_user_api import ApiUserApi @@ -526,8 +526,6 @@ EstimatedTransactionFeeResponse, ) from fireblocks.models.exchange_account import ExchangeAccount -from fireblocks.models.exchange_accounts_paged import ExchangeAccountsPaged -from fireblocks.models.exchange_accounts_paged_paging import ExchangeAccountsPagedPaging from fireblocks.models.exchange_asset import ExchangeAsset from fireblocks.models.exchange_settlement_transactions_response import ( ExchangeSettlementTransactionsResponse, @@ -562,6 +560,7 @@ from fireblocks.models.fee_breakdown_one_of1 import FeeBreakdownOneOf1 from fireblocks.models.fee_info import FeeInfo from fireblocks.models.fee_level import FeeLevel +from fireblocks.models.fee_payer_info import FeePayerInfo from fireblocks.models.fetch_abi_request_dto import FetchAbiRequestDto from fireblocks.models.fiat_account import FiatAccount from fireblocks.models.fiat_account_type import FiatAccountType @@ -608,6 +607,12 @@ from fireblocks.models.get_orders_response import GetOrdersResponse from fireblocks.models.get_ota_status_response import GetOtaStatusResponse from fireblocks.models.get_ownership_tokens_response import GetOwnershipTokensResponse +from fireblocks.models.get_paged_exchange_accounts_response import ( + GetPagedExchangeAccountsResponse, +) +from fireblocks.models.get_paged_exchange_accounts_response_paging import ( + GetPagedExchangeAccountsResponsePaging, +) from fireblocks.models.get_signing_key_response_dto import GetSigningKeyResponseDto from fireblocks.models.get_transaction_operation import GetTransactionOperation from fireblocks.models.get_validation_key_response_dto import ( diff --git a/fireblocks/api/exchange_accounts_api.py b/fireblocks/api/exchange_accounts_api.py index 4a6ef252..2547a427 100644 --- a/fireblocks/api/exchange_accounts_api.py +++ b/fireblocks/api/exchange_accounts_api.py @@ -19,7 +19,7 @@ from typing_extensions import Annotated from pydantic import Field, StrictStr -from typing import List, Optional, Union +from typing import Optional, Union from typing_extensions import Annotated from fireblocks.models.add_exchange_account_request import AddExchangeAccountRequest from fireblocks.models.add_exchange_account_response import AddExchangeAccountResponse @@ -27,9 +27,9 @@ from fireblocks.models.convert_assets_response import ConvertAssetsResponse from fireblocks.models.create_internal_transfer_request import CreateInternalTransferRequest from fireblocks.models.exchange_account import ExchangeAccount -from fireblocks.models.exchange_accounts_paged import ExchangeAccountsPaged from fireblocks.models.exchange_asset import ExchangeAsset from fireblocks.models.get_exchange_accounts_credentials_public_key_response import GetExchangeAccountsCredentialsPublicKeyResponse +from fireblocks.models.get_paged_exchange_accounts_response import GetPagedExchangeAccountsResponse from fireblocks.models.internal_transfer_response import InternalTransferResponse from fireblocks.api_client import ApiClient, RequestSerialized @@ -760,7 +760,7 @@ def get_paged_exchange_accounts( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[List[ExchangeAccountsPaged]]]: + ) -> Future[ApiResponse[GetPagedExchangeAccountsResponse]]: """Pagination list exchange accounts Returns a page include exchange accounts. @@ -805,7 +805,7 @@ def get_paged_exchange_accounts( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ExchangeAccountsPaged]", + '200': "GetPagedExchangeAccountsResponse", 'default': "ErrorSchema", } diff --git a/fireblocks/api/smart_transfer_api.py b/fireblocks/api/smart_transfer_api.py index 67c1b008..59b4970f 100644 --- a/fireblocks/api/smart_transfer_api.py +++ b/fireblocks/api/smart_transfer_api.py @@ -1959,6 +1959,8 @@ def search_tickets( external_ref_id: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True, max_length=64)]], Field(description="External ref. ID that workspace can use to identify ticket outside of Fireblocks system.")] = None, after: Annotated[Optional[StrictStr], Field(description="ID of the record after which to fetch $limit records")] = None, limit: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Number of records to fetch. By default, it is 100")] = None, + sort_by: Annotated[Optional[StrictStr], Field(description="Sort by field")] = None, + order: Annotated[Optional[StrictStr], Field(description="ASC / DESC ordering (default DESC)")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1996,6 +1998,10 @@ def search_tickets( :type after: str :param limit: Number of records to fetch. By default, it is 100 :type limit: float + :param sort_by: Sort by field + :type sort_by: str + :param order: ASC / DESC ordering (default DESC) + :type order: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2030,6 +2036,8 @@ def search_tickets( external_ref_id=external_ref_id, after=after, limit=limit, + sort_by=sort_by, + order=order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2059,6 +2067,8 @@ def _search_tickets_serialize( external_ref_id, after, limit, + sort_by, + order, _request_auth, _content_type, _headers, @@ -2140,6 +2150,14 @@ def _search_tickets_serialize( _query_params.append(('limit', limit)) + if sort_by is not None: + + _query_params.append(('sortBy', sort_by)) + + if order is not None: + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter diff --git a/fireblocks/configuration.py b/fireblocks/configuration.py index 1faa173a..c8b5be4f 100644 --- a/fireblocks/configuration.py +++ b/fireblocks/configuration.py @@ -552,7 +552,7 @@ def to_debug_report(self) -> str: "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.6.2\n" - "SDK Package Version: 12.1.0".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 0.0.0".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self) -> List[HostSetting]: diff --git a/fireblocks/models/__init__.py b/fireblocks/models/__init__.py index e4792b38..0755d063 100644 --- a/fireblocks/models/__init__.py +++ b/fireblocks/models/__init__.py @@ -299,8 +299,6 @@ from fireblocks.models.estimated_network_fee_response import EstimatedNetworkFeeResponse from fireblocks.models.estimated_transaction_fee_response import EstimatedTransactionFeeResponse from fireblocks.models.exchange_account import ExchangeAccount -from fireblocks.models.exchange_accounts_paged import ExchangeAccountsPaged -from fireblocks.models.exchange_accounts_paged_paging import ExchangeAccountsPagedPaging from fireblocks.models.exchange_asset import ExchangeAsset from fireblocks.models.exchange_settlement_transactions_response import ExchangeSettlementTransactionsResponse from fireblocks.models.exchange_trading_account import ExchangeTradingAccount @@ -327,6 +325,7 @@ from fireblocks.models.fee_breakdown_one_of1 import FeeBreakdownOneOf1 from fireblocks.models.fee_info import FeeInfo from fireblocks.models.fee_level import FeeLevel +from fireblocks.models.fee_payer_info import FeePayerInfo from fireblocks.models.fetch_abi_request_dto import FetchAbiRequestDto from fireblocks.models.fiat_account import FiatAccount from fireblocks.models.fiat_account_type import FiatAccountType @@ -357,6 +356,8 @@ from fireblocks.models.get_orders_response import GetOrdersResponse from fireblocks.models.get_ota_status_response import GetOtaStatusResponse from fireblocks.models.get_ownership_tokens_response import GetOwnershipTokensResponse +from fireblocks.models.get_paged_exchange_accounts_response import GetPagedExchangeAccountsResponse +from fireblocks.models.get_paged_exchange_accounts_response_paging import GetPagedExchangeAccountsResponsePaging from fireblocks.models.get_signing_key_response_dto import GetSigningKeyResponseDto from fireblocks.models.get_transaction_operation import GetTransactionOperation from fireblocks.models.get_validation_key_response_dto import GetValidationKeyResponseDto diff --git a/fireblocks/models/compliance_screening_result.py b/fireblocks/models/compliance_screening_result.py index 5b85cc4a..d944a444 100644 --- a/fireblocks/models/compliance_screening_result.py +++ b/fireblocks/models/compliance_screening_result.py @@ -27,13 +27,33 @@ class ComplianceScreeningResult(BaseModel): """ ComplianceScreeningResult """ # noqa: E501 - provider: Optional[StrictStr] = None + provider: Optional[StrictStr] = Field(default=None, description="Screening provider") payload: Optional[Dict[str, Any]] = Field(default=None, description="The payload of the screening result. The payload is a JSON object that contains the screening result. The payload is different for each screening provider. ") - bypass_reason: Optional[StrictStr] = Field(default=None, alias="bypassReason") + bypass_reason: Optional[StrictStr] = Field(default=None, description="Reason AML screening was bypassed", alias="bypassReason") screening_status: Optional[StrictStr] = Field(default=None, alias="screeningStatus") timestamp: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["provider", "payload", "bypassReason", "screeningStatus", "timestamp"] + @field_validator('provider') + def provider_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CHAINALYSIS', 'ELLIPTIC', 'CHAINALYSIS_V2', 'ELLIPTIC_HOLISTIC', 'NONE']): + raise ValueError("must be one of enum values ('CHAINALYSIS', 'ELLIPTIC', 'CHAINALYSIS_V2', 'ELLIPTIC_HOLISTIC', 'NONE')") + return value + + @field_validator('bypass_reason') + def bypass_reason_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['MANUAL', 'UNSUPPORTED_ASSET', 'BYPASSED_FAILURE', 'UNSUPPORTED_ROUTE', 'PASSED_BY_POLICY', 'TIMED_OUT', 'BAD_CREDENTIALS', 'CONFIGURATION_ERROR', 'DROPPED_BY_BLOCKCHAIN', 'PROCESS_DISMISSED']): + raise ValueError("must be one of enum values ('MANUAL', 'UNSUPPORTED_ASSET', 'BYPASSED_FAILURE', 'UNSUPPORTED_ROUTE', 'PASSED_BY_POLICY', 'TIMED_OUT', 'BAD_CREDENTIALS', 'CONFIGURATION_ERROR', 'DROPPED_BY_BLOCKCHAIN', 'PROCESS_DISMISSED')") + return value + @field_validator('screening_status') def screening_status_validate_enum(cls, value): """Validates the enum""" diff --git a/fireblocks/models/external_wallet_asset.py b/fireblocks/models/external_wallet_asset.py index 0a075bc4..b2f4f5b5 100644 --- a/fireblocks/models/external_wallet_asset.py +++ b/fireblocks/models/external_wallet_asset.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union from fireblocks.models.config_change_request_status import ConfigChangeRequestStatus from fireblocks.models.wallet_asset_additional_info import WalletAssetAdditionalInfo from typing import Optional, Set @@ -32,8 +32,8 @@ class ExternalWalletAsset(BaseModel): id: Optional[StrictStr] = None status: Optional[ConfigChangeRequestStatus] = None address: Optional[StrictStr] = None - balance: Optional[StrictStr] = None - locked_amount: Optional[StrictStr] = Field(default=None, alias="lockedAmount") + balance: Optional[Union[StrictFloat, StrictInt]] = None + locked_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="lockedAmount") tag: Optional[StrictStr] = None activation_time: Optional[StrictStr] = Field(default=None, alias="activationTime") additional_info: Optional[List[WalletAssetAdditionalInfo]] = Field(default=None, alias="additionalInfo") diff --git a/fireblocks/models/fee_info.py b/fireblocks/models/fee_info.py index ed14fc55..2dce5f9c 100644 --- a/fireblocks/models/fee_info.py +++ b/fireblocks/models/fee_info.py @@ -30,12 +30,14 @@ class FeeInfo(BaseModel): network_fee: Optional[StrictStr] = Field(default=None, description="The fee paid to the network", alias="networkFee") service_fee: Optional[StrictStr] = Field(default=None, description="The total fee deducted by the exchange from the actual requested amount (serviceFee = amount - netAmount)", alias="serviceFee") gas_price: Optional[StrictStr] = Field(default=None, alias="gasPrice") + l1network_fee: Optional[StrictStr] = Field(default=None, description="Layer 1 network fee for Layer 2 blockchain transactions", alias="L1networkFee") + l2network_fee: Optional[StrictStr] = Field(default=None, description="Layer 2 network fee (gas price component for Layer 2 transactions)", alias="L2networkFee") paid_by_relay: Optional[StrictBool] = Field(default=None, description="Wether the fee was paid by the relay or not", alias="paidByRelay") relay_type: Optional[StrictStr] = Field(default=None, description="Wether the relay is the same tenant (LOCAL) or another tenant (THIRD_PARTY)", alias="relayType") relay_id: Optional[StrictStr] = Field(default=None, description="The vault account ID of the relay", alias="relayId") relay_name: Optional[StrictStr] = Field(default=None, description="The name of the tenant, only for THIRD_PARTY relays", alias="relayName") fee_usd: Optional[StrictStr] = Field(default=None, description="The USD value of the fee", alias="feeUSD") - __properties: ClassVar[List[str]] = ["networkFee", "serviceFee", "gasPrice", "paidByRelay", "relayType", "relayId", "relayName", "feeUSD"] + __properties: ClassVar[List[str]] = ["networkFee", "serviceFee", "gasPrice", "L1networkFee", "L2networkFee", "paidByRelay", "relayType", "relayId", "relayName", "feeUSD"] @field_validator('relay_type') def relay_type_validate_enum(cls, value): @@ -101,6 +103,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "networkFee": obj.get("networkFee"), "serviceFee": obj.get("serviceFee"), "gasPrice": obj.get("gasPrice"), + "L1networkFee": obj.get("L1networkFee"), + "L2networkFee": obj.get("L2networkFee"), "paidByRelay": obj.get("paidByRelay"), "relayType": obj.get("relayType"), "relayId": obj.get("relayId"), diff --git a/fireblocks/models/fee_payer_info.py b/fireblocks/models/fee_payer_info.py new file mode 100644 index 00000000..d053940a --- /dev/null +++ b/fireblocks/models/fee_payer_info.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeePayerInfo(BaseModel): + """ + FeePayerInfo + """ # noqa: E501 + fee_payer_account_id: Optional[StrictStr] = Field(default=None, description="The account ID of the fee payer", alias="feePayerAccountId") + __properties: ClassVar[List[str]] = ["feePayerAccountId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeePayerInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeePayerInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "feePayerAccountId": obj.get("feePayerAccountId") + }) + return _obj + + diff --git a/fireblocks/models/exchange_accounts_paged.py b/fireblocks/models/get_paged_exchange_accounts_response.py similarity index 71% rename from fireblocks/models/exchange_accounts_paged.py rename to fireblocks/models/get_paged_exchange_accounts_response.py index b41c417e..0d7860e5 100644 --- a/fireblocks/models/exchange_accounts_paged.py +++ b/fireblocks/models/get_paged_exchange_accounts_response.py @@ -21,19 +21,19 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from fireblocks.models.exchange_account import ExchangeAccount -from fireblocks.models.exchange_accounts_paged_paging import ExchangeAccountsPagedPaging +from fireblocks.models.get_paged_exchange_accounts_response_paging import GetPagedExchangeAccountsResponsePaging from typing import Optional, Set from typing_extensions import Self -class ExchangeAccountsPaged(BaseModel): +class GetPagedExchangeAccountsResponse(BaseModel): """ - ExchangeAccountsPaged + GetPagedExchangeAccountsResponse """ # noqa: E501 - exchange_account: Optional[List[ExchangeAccount]] = Field(default=None, alias="ExchangeAccount") - paging: Optional[ExchangeAccountsPagedPaging] = None + exchanges: List[ExchangeAccount] + paging: Optional[GetPagedExchangeAccountsResponsePaging] = None prev_url: Optional[StrictStr] = Field(default=None, alias="prevUrl") next_url: Optional[StrictStr] = Field(default=None, alias="nextUrl") - __properties: ClassVar[List[str]] = ["ExchangeAccount", "paging", "prevUrl", "nextUrl"] + __properties: ClassVar[List[str]] = ["exchanges", "paging", "prevUrl", "nextUrl"] model_config = ConfigDict( populate_by_name=True, @@ -53,7 +53,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ExchangeAccountsPaged from a JSON string""" + """Create an instance of GetPagedExchangeAccountsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,13 +74,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in exchange_account (list) + # override the default output from pydantic by calling `to_dict()` of each item in exchanges (list) _items = [] - if self.exchange_account: - for _item_exchange_account in self.exchange_account: - if _item_exchange_account: - _items.append(_item_exchange_account.to_dict()) - _dict['ExchangeAccount'] = _items + if self.exchanges: + for _item_exchanges in self.exchanges: + if _item_exchanges: + _items.append(_item_exchanges.to_dict()) + _dict['exchanges'] = _items # override the default output from pydantic by calling `to_dict()` of paging if self.paging: _dict['paging'] = self.paging.to_dict() @@ -88,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ExchangeAccountsPaged from a dict""" + """Create an instance of GetPagedExchangeAccountsResponse from a dict""" if obj is None: return None @@ -96,8 +96,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "ExchangeAccount": [ExchangeAccount.from_dict(_item) for _item in obj["ExchangeAccount"]] if obj.get("ExchangeAccount") is not None else None, - "paging": ExchangeAccountsPagedPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None, + "exchanges": [ExchangeAccount.from_dict(_item) for _item in obj["exchanges"]] if obj.get("exchanges") is not None else None, + "paging": GetPagedExchangeAccountsResponsePaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None, "prevUrl": obj.get("prevUrl"), "nextUrl": obj.get("nextUrl") }) diff --git a/fireblocks/models/exchange_accounts_paged_paging.py b/fireblocks/models/get_paged_exchange_accounts_response_paging.py similarity index 90% rename from fireblocks/models/exchange_accounts_paged_paging.py rename to fireblocks/models/get_paged_exchange_accounts_response_paging.py index 70c9c668..114047ad 100644 --- a/fireblocks/models/exchange_accounts_paged_paging.py +++ b/fireblocks/models/get_paged_exchange_accounts_response_paging.py @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class ExchangeAccountsPagedPaging(BaseModel): +class GetPagedExchangeAccountsResponsePaging(BaseModel): """ - ExchangeAccountsPagedPaging + GetPagedExchangeAccountsResponsePaging """ # noqa: E501 after: Optional[StrictStr] = Field(default=None, description="Query value to the after page") before: Optional[StrictStr] = Field(default=None, description="Query value to the before page") @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ExchangeAccountsPagedPaging from a JSON string""" + """Create an instance of GetPagedExchangeAccountsResponsePaging from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ExchangeAccountsPagedPaging from a dict""" + """Create an instance of GetPagedExchangeAccountsResponsePaging from a dict""" if obj is None: return None diff --git a/fireblocks/models/network_record.py b/fireblocks/models/network_record.py index d5e5fc8f..66c86078 100644 --- a/fireblocks/models/network_record.py +++ b/fireblocks/models/network_record.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from fireblocks.models.destination_transfer_peer_path_response import DestinationTransferPeerPathResponse from fireblocks.models.reward_info import RewardInfo from fireblocks.models.source_transfer_peer_path_response import SourceTransferPeerPathResponse @@ -39,11 +39,9 @@ class NetworkRecord(BaseModel): is_dropped: Optional[StrictBool] = Field(default=None, alias="isDropped") type: Optional[StrictStr] = None destination_address: Optional[StrictStr] = Field(default=None, alias="destinationAddress") - source_address: Optional[StrictStr] = Field(default=None, alias="sourceAddress") amount_usd: Optional[StrictStr] = Field(default=None, alias="amountUSD") - index: Optional[Union[StrictFloat, StrictInt]] = None reward_info: Optional[RewardInfo] = Field(default=None, alias="rewardInfo") - __properties: ClassVar[List[str]] = ["source", "destination", "txHash", "networkFee", "assetId", "netAmount", "isDropped", "type", "destinationAddress", "sourceAddress", "amountUSD", "index", "rewardInfo"] + __properties: ClassVar[List[str]] = ["source", "destination", "txHash", "networkFee", "assetId", "netAmount", "isDropped", "type", "destinationAddress", "amountUSD", "rewardInfo"] model_config = ConfigDict( populate_by_name=True, @@ -114,9 +112,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isDropped": obj.get("isDropped"), "type": obj.get("type"), "destinationAddress": obj.get("destinationAddress"), - "sourceAddress": obj.get("sourceAddress"), "amountUSD": obj.get("amountUSD"), - "index": obj.get("index"), "rewardInfo": RewardInfo.from_dict(obj["rewardInfo"]) if obj.get("rewardInfo") is not None else None }) return _obj diff --git a/fireblocks/models/transaction_response.py b/fireblocks/models/transaction_response.py index 2142470c..9ce194a3 100644 --- a/fireblocks/models/transaction_response.py +++ b/fireblocks/models/transaction_response.py @@ -27,6 +27,7 @@ from fireblocks.models.compliance_results import ComplianceResults from fireblocks.models.destination_transfer_peer_path_response import DestinationTransferPeerPathResponse from fireblocks.models.fee_info import FeeInfo +from fireblocks.models.fee_payer_info import FeePayerInfo from fireblocks.models.get_transaction_operation import GetTransactionOperation from fireblocks.models.network_record import NetworkRecord from fireblocks.models.reward_info import RewardInfo @@ -50,6 +51,7 @@ class TransactionResponse(BaseModel): operation: Optional[GetTransactionOperation] = None note: Optional[StrictStr] = Field(default=None, description="Custom note, not sent to the blockchain, that describes the transaction at your Fireblocks workspace.") asset_id: Optional[StrictStr] = Field(default=None, description="The ID of the asset to transfer, for `TRANSFER`, `MINT`, `BURN`, `ENABLE_ASSET`,`STAKE` ,`UNSTAKE` or `WITHDRAW` operations. [See the list of supported assets and their IDs on Fireblocks.](https://developers.fireblocks.com/reference/get_supported-assets)", alias="assetId") + asset_type: Optional[StrictStr] = Field(default=None, description="Type classification of the asset", alias="assetType") source: Optional[SourceTransferPeerPathResponse] = None source_address: Optional[StrictStr] = Field(default=None, description="For account based assets only, the source address of the transaction. **Note:** If the status is `CONFIRMING`, `COMPLETED`, or has been `CONFIRMING`; then moved forward to `FAILED` or `REJECTED`, then this parameter will contain the source address. In any other case, this parameter will be empty.", alias="sourceAddress") tag: Optional[StrictStr] = Field(default=None, description="Source address tag for XRP, used as memo for EOS/XLM, or Bank Transfer Description for the fiat provider BLINC (by BCB Group).") @@ -74,12 +76,18 @@ class TransactionResponse(BaseModel): customer_ref_id: Optional[StrictStr] = Field(default=None, description="The ID for AML providers to associate the owner of funds with transactions.", alias="customerRefId") aml_screening_result: Optional[AmlScreeningResult] = Field(default=None, alias="amlScreeningResult") compliance_results: Optional[ComplianceResults] = Field(default=None, alias="complianceResults") + not_broadcast_by_fireblocks: Optional[StrictBool] = Field(default=None, description="Indicates the transaction was not broadcast by Fireblocks", alias="notBroadcastByFireblocks") + dapp_url: Optional[StrictStr] = Field(default=None, description="DApp URL for Web3 transactions", alias="dappUrl") + gas_limit: Optional[StrictStr] = Field(default=None, description="Gas limit for EVM-based blockchain transactions", alias="gasLimit") + blockchain_index: Optional[StrictStr] = Field(default=None, description="Blockchain-specific index or identifier for the transaction", alias="blockchainIndex") + paid_rent: Optional[StrictStr] = Field(default=None, description="Solana rent payment amount", alias="paidRent") extra_parameters: Optional[Dict[str, Any]] = Field(default=None, description="Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set the [input selection structure.](https://developers.fireblocks.com/reference/transaction-objects#inputsselection) The inputs can be retrieved from the [Retrieve Unspent Inputs endpoint.](https://developers.fireblocks.com/reference/get_vault-accounts-vaultaccountid-assetid-unspent-inputs) For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. For **exchange compliance (e.g., Binance) and Travel Rule purposes**, include the key `piiData` containing a **custom JSON structure** with Personally Identifiable Information (PII) relevant to the transaction. This data must be fully **encrypted by the sender** before being submitted to the Fireblocks API. The recommended encryption method is **hybrid encryption** using AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange’s public key. [development libraries](https://developers.fireblocks.com/docs/a-developers-guide-to-constructing-encrypted-pii-messages-for-binance-via-fireblocks) ", alias="extraParameters") signed_messages: Optional[List[SignedMessage]] = Field(default=None, alias="signedMessages") num_of_confirmations: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of confirmations of the transaction. The number will increase until the transaction will be considered completed according to the confirmation policy.", alias="numOfConfirmations") block_info: Optional[BlockInfo] = Field(default=None, alias="blockInfo") index: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="For UTXO based assets this is the vOut, for Ethereum based, this is the index of the event of the contract call. **Note:** This field is not returned if a transaction uses the `destinations` object with more than one value.") reward_info: Optional[RewardInfo] = Field(default=None, alias="rewardInfo") + fee_payer_info: Optional[FeePayerInfo] = Field(default=None, alias="feePayerInfo") system_messages: Optional[SystemMessageInfo] = Field(default=None, alias="systemMessages") address_type: Optional[StrictStr] = Field(default=None, alias="addressType") requested_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The amount requested by the user. Deprecated - please use the `amountInfo` field for accuracy.", alias="requestedAmount") @@ -90,7 +98,10 @@ class TransactionResponse(BaseModel): fee: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Deprecated - please use the `feeInfo` field for accuracy.") network_fee: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The fee paid to the network. Deprecated - please use the `feeInfo` field for accuracy.", alias="networkFee") error_description: Optional[StrictStr] = Field(default=None, description="The transaction's revert reason. This field will be returned when `subStatus` = 'SMART_CONTRACT_EXECUTION_FAILED'.", alias="errorDescription") - __properties: ClassVar[List[str]] = ["id", "externalTxId", "status", "subStatus", "txHash", "operation", "note", "assetId", "source", "sourceAddress", "tag", "destination", "destinations", "destinationAddress", "destinationAddressDescription", "destinationTag", "contractCallDecodedData", "amountInfo", "treatAsGrossAmount", "feeInfo", "feeCurrency", "networkRecords", "createdAt", "lastUpdated", "createdBy", "signedBy", "rejectedBy", "authorizationInfo", "exchangeTxId", "customerRefId", "amlScreeningResult", "complianceResults", "extraParameters", "signedMessages", "numOfConfirmations", "blockInfo", "index", "rewardInfo", "systemMessages", "addressType", "requestedAmount", "amount", "netAmount", "amountUSD", "serviceFee", "fee", "networkFee", "errorDescription"] + replaced_tx_hash: Optional[StrictStr] = Field(default=None, description="if the transaction is a replace by fee (RBF) transaction, this is the hash of the transsaction that was replaced", alias="replacedTxHash") + nonce: Optional[StrictStr] = Field(default=None, description="blockchain nonce for the transaction") + blockchain_info: Optional[Dict[str, Any]] = Field(default=None, description="A JSON used to store additional data that is blockchain-specific.", alias="blockchainInfo") + __properties: ClassVar[List[str]] = ["id", "externalTxId", "status", "subStatus", "txHash", "operation", "note", "assetId", "assetType", "source", "sourceAddress", "tag", "destination", "destinations", "destinationAddress", "destinationAddressDescription", "destinationTag", "contractCallDecodedData", "amountInfo", "treatAsGrossAmount", "feeInfo", "feeCurrency", "networkRecords", "createdAt", "lastUpdated", "createdBy", "signedBy", "rejectedBy", "authorizationInfo", "exchangeTxId", "customerRefId", "amlScreeningResult", "complianceResults", "notBroadcastByFireblocks", "dappUrl", "gasLimit", "blockchainIndex", "paidRent", "extraParameters", "signedMessages", "numOfConfirmations", "blockInfo", "index", "rewardInfo", "feePayerInfo", "systemMessages", "addressType", "requestedAmount", "amount", "netAmount", "amountUSD", "serviceFee", "fee", "networkFee", "errorDescription", "replacedTxHash", "nonce", "blockchainInfo"] @field_validator('address_type') def address_type_validate_enum(cls, value): @@ -192,6 +203,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of reward_info if self.reward_info: _dict['rewardInfo'] = self.reward_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of fee_payer_info + if self.fee_payer_info: + _dict['feePayerInfo'] = self.fee_payer_info.to_dict() # override the default output from pydantic by calling `to_dict()` of system_messages if self.system_messages: _dict['systemMessages'] = self.system_messages.to_dict() @@ -220,6 +234,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "operation": obj.get("operation"), "note": obj.get("note"), "assetId": obj.get("assetId"), + "assetType": obj.get("assetType"), "source": SourceTransferPeerPathResponse.from_dict(obj["source"]) if obj.get("source") is not None else None, "sourceAddress": obj.get("sourceAddress"), "tag": obj.get("tag"), @@ -244,12 +259,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "customerRefId": obj.get("customerRefId"), "amlScreeningResult": AmlScreeningResult.from_dict(obj["amlScreeningResult"]) if obj.get("amlScreeningResult") is not None else None, "complianceResults": ComplianceResults.from_dict(obj["complianceResults"]) if obj.get("complianceResults") is not None else None, + "notBroadcastByFireblocks": obj.get("notBroadcastByFireblocks"), + "dappUrl": obj.get("dappUrl"), + "gasLimit": obj.get("gasLimit"), + "blockchainIndex": obj.get("blockchainIndex"), + "paidRent": obj.get("paidRent"), "extraParameters": obj.get("extraParameters"), "signedMessages": [SignedMessage.from_dict(_item) for _item in obj["signedMessages"]] if obj.get("signedMessages") is not None else None, "numOfConfirmations": obj.get("numOfConfirmations"), "blockInfo": BlockInfo.from_dict(obj["blockInfo"]) if obj.get("blockInfo") is not None else None, "index": obj.get("index"), "rewardInfo": RewardInfo.from_dict(obj["rewardInfo"]) if obj.get("rewardInfo") is not None else None, + "feePayerInfo": FeePayerInfo.from_dict(obj["feePayerInfo"]) if obj.get("feePayerInfo") is not None else None, "systemMessages": SystemMessageInfo.from_dict(obj["systemMessages"]) if obj.get("systemMessages") is not None else None, "addressType": obj.get("addressType"), "requestedAmount": obj.get("requestedAmount"), @@ -259,7 +280,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "serviceFee": obj.get("serviceFee"), "fee": obj.get("fee"), "networkFee": obj.get("networkFee"), - "errorDescription": obj.get("errorDescription") + "errorDescription": obj.get("errorDescription"), + "replacedTxHash": obj.get("replacedTxHash"), + "nonce": obj.get("nonce"), + "blockchainInfo": obj.get("blockchainInfo") }) return _obj diff --git a/fireblocks/models/transaction_response_destination.py b/fireblocks/models/transaction_response_destination.py index 32ffd2f6..a1060106 100644 --- a/fireblocks/models/transaction_response_destination.py +++ b/fireblocks/models/transaction_response_destination.py @@ -30,14 +30,12 @@ class TransactionResponseDestination(BaseModel): """ TransactionResponseDestination """ # noqa: E501 - destination_address: Optional[Any] = Field(default=None, description="Address where the asset was transferred.", alias="destinationAddress") - destination_address_description: Optional[Any] = Field(default=None, description="Description of the address.", alias="destinationAddressDescription") amount: Optional[StrictStr] = Field(default=None, description="The amount to be sent to this destination.") amount_usd: Optional[StrictStr] = Field(default=None, description="The USD value of the requested amount.", alias="amountUSD") aml_screening_result: Optional[AmlScreeningResult] = Field(default=None, alias="amlScreeningResult") destination: Optional[DestinationTransferPeerPathResponse] = None authorization_info: Optional[AuthorizationInfo] = Field(default=None, alias="authorizationInfo") - __properties: ClassVar[List[str]] = ["destinationAddress", "destinationAddressDescription", "amount", "amountUSD", "amlScreeningResult", "destination", "authorizationInfo"] + __properties: ClassVar[List[str]] = ["amount", "amountUSD", "amlScreeningResult", "destination", "authorizationInfo"] model_config = ConfigDict( populate_by_name=True, @@ -87,16 +85,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of authorization_info if self.authorization_info: _dict['authorizationInfo'] = self.authorization_info.to_dict() - # set to None if destination_address (nullable) is None - # and model_fields_set contains the field - if self.destination_address is None and "destination_address" in self.model_fields_set: - _dict['destinationAddress'] = None - - # set to None if destination_address_description (nullable) is None - # and model_fields_set contains the field - if self.destination_address_description is None and "destination_address_description" in self.model_fields_set: - _dict['destinationAddressDescription'] = None - return _dict @classmethod @@ -109,8 +97,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "destinationAddress": obj.get("destinationAddress"), - "destinationAddressDescription": obj.get("destinationAddressDescription"), "amount": obj.get("amount"), "amountUSD": obj.get("amountUSD"), "amlScreeningResult": AmlScreeningResult.from_dict(obj["amlScreeningResult"]) if obj.get("amlScreeningResult") is not None else None, diff --git a/fireblocks/models/transfer_peer_path_type.py b/fireblocks/models/transfer_peer_path_type.py index c6cb0cbb..fa3c8ed4 100644 --- a/fireblocks/models/transfer_peer_path_type.py +++ b/fireblocks/models/transfer_peer_path_type.py @@ -41,6 +41,7 @@ class TransferPeerPathType(str, Enum): END_USER_WALLET = 'END_USER_WALLET' PROGRAM_CALL = 'PROGRAM_CALL' MULTI_DESTINATION = 'MULTI_DESTINATION' + OEC_PARTNER = 'OEC_PARTNER' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/pyproject.toml b/pyproject.toml index 10826c90..05cad60c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fireblocks" -version = "12.1.0" +version = "0.0.0" description = "Fireblocks API" authors = ["Fireblocks "] license = "MIT License" diff --git a/setup.py b/setup.py index cf77c007..79def177 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "fireblocks" -VERSION = "12.1.0" +VERSION = "0.0.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 2.1.0, < 3.0.0", diff --git a/test/test_compliance_results.py b/test/test_compliance_results.py index 21d4e5b4..5aebba11 100644 --- a/test/test_compliance_results.py +++ b/test/test_compliance_results.py @@ -38,22 +38,22 @@ def make_instance(self, include_optional) -> ComplianceResults: if include_optional: return ComplianceResults( aml = fireblocks.models.compliance_screening_result.ComplianceScreeningResult( - provider = '', + provider = 'CHAINALYSIS', payload = fireblocks.models.payload.payload(), - bypass_reason = '', + bypass_reason = 'MANUAL', screening_status = 'COMPLETED', timestamp = 1.337, ), tr = fireblocks.models.compliance_screening_result.ComplianceScreeningResult( - provider = '', + provider = 'CHAINALYSIS', payload = fireblocks.models.payload.payload(), - bypass_reason = '', + bypass_reason = 'MANUAL', screening_status = 'COMPLETED', timestamp = 1.337, ), aml_list = [ fireblocks.models.compliance_screening_result.ComplianceScreeningResult( - provider = '', + provider = 'CHAINALYSIS', payload = fireblocks.models.payload.payload(), - bypass_reason = '', + bypass_reason = 'MANUAL', screening_status = 'COMPLETED', timestamp = 1.337, ) ], diff --git a/test/test_compliance_screening_result.py b/test/test_compliance_screening_result.py index b8500f15..4b387956 100644 --- a/test/test_compliance_screening_result.py +++ b/test/test_compliance_screening_result.py @@ -37,9 +37,9 @@ def make_instance(self, include_optional) -> ComplianceScreeningResult: model = ComplianceScreeningResult() if include_optional: return ComplianceScreeningResult( - provider = '', + provider = 'CHAINALYSIS', payload = None, - bypass_reason = '', + bypass_reason = 'MANUAL', screening_status = 'COMPLETED', timestamp = 1.337 ) diff --git a/test/test_external_wallet_asset.py b/test/test_external_wallet_asset.py index 370c3e3a..fed816fd 100644 --- a/test/test_external_wallet_asset.py +++ b/test/test_external_wallet_asset.py @@ -40,8 +40,8 @@ def make_instance(self, include_optional) -> ExternalWalletAsset: id = '', status = 'WAITING_FOR_APPROVAL', address = '', - balance = '', - locked_amount = '', + balance = 1.337, + locked_amount = 1.337, tag = '', activation_time = '', additional_info = [ diff --git a/test/test_fee_info.py b/test/test_fee_info.py index b8023db7..b4e2d3d8 100644 --- a/test/test_fee_info.py +++ b/test/test_fee_info.py @@ -40,6 +40,8 @@ def make_instance(self, include_optional) -> FeeInfo: network_fee = '', service_fee = '', gas_price = '', + l1network_fee = '0.003955', + l2network_fee = '0.0005', paid_by_relay = True, relay_type = 'LOCAL', relay_id = '1', diff --git a/test/test_exchange_accounts_paged_paging.py b/test/test_fee_payer_info.py similarity index 55% rename from test/test_exchange_accounts_paged_paging.py rename to test/test_fee_payer_info.py index e88abeb2..de117735 100644 --- a/test/test_exchange_accounts_paged_paging.py +++ b/test/test_fee_payer_info.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.exchange_accounts_paged_paging import ExchangeAccountsPagedPaging +from fireblocks.models.fee_payer_info import FeePayerInfo -class TestExchangeAccountsPagedPaging(unittest.TestCase): - """ExchangeAccountsPagedPaging unit test stubs""" +class TestFeePayerInfo(unittest.TestCase): + """FeePayerInfo unit test stubs""" def setUp(self): pass @@ -27,26 +27,25 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ExchangeAccountsPagedPaging: - """Test ExchangeAccountsPagedPaging + def make_instance(self, include_optional) -> FeePayerInfo: + """Test FeePayerInfo include_optional is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `ExchangeAccountsPagedPaging` + # uncomment below to create an instance of `FeePayerInfo` """ - model = ExchangeAccountsPagedPaging() + model = FeePayerInfo() if include_optional: - return ExchangeAccountsPagedPaging( - after = '', - before = '' + return FeePayerInfo( + fee_payer_account_id = '123' ) else: - return ExchangeAccountsPagedPaging( + return FeePayerInfo( ) """ - def testExchangeAccountsPagedPaging(self): - """Test ExchangeAccountsPagedPaging""" + def testFeePayerInfo(self): + """Test FeePayerInfo""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_exchange_accounts_paged.py b/test/test_get_paged_exchange_accounts_response.py similarity index 51% rename from test/test_exchange_accounts_paged.py rename to test/test_get_paged_exchange_accounts_response.py index e60ebc3e..ce10e291 100644 --- a/test/test_exchange_accounts_paged.py +++ b/test/test_get_paged_exchange_accounts_response.py @@ -15,11 +15,13 @@ import unittest -from fireblocks.models.exchange_accounts_paged import ExchangeAccountsPaged +from fireblocks.models.get_paged_exchange_accounts_response import ( + GetPagedExchangeAccountsResponse, +) -class TestExchangeAccountsPaged(unittest.TestCase): - """ExchangeAccountsPaged unit test stubs""" +class TestGetPagedExchangeAccountsResponse(unittest.TestCase): + """GetPagedExchangeAccountsResponse unit test stubs""" def setUp(self): pass @@ -27,17 +29,17 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ExchangeAccountsPaged: - """Test ExchangeAccountsPaged + def make_instance(self, include_optional) -> GetPagedExchangeAccountsResponse: + """Test GetPagedExchangeAccountsResponse include_optional is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `ExchangeAccountsPaged` + # uncomment below to create an instance of `GetPagedExchangeAccountsResponse` """ - model = ExchangeAccountsPaged() + model = GetPagedExchangeAccountsResponse() if include_optional: - return ExchangeAccountsPaged( - exchange_account = [ + return GetPagedExchangeAccountsResponse( + exchanges = [ fireblocks.models.exchange_account.ExchangeAccount( id = '', type = 'INDEPENDENT_RESERVE', @@ -64,19 +66,46 @@ def make_instance(self, include_optional) -> ExchangeAccountsPaged: is_subaccount = True, main_account_id = '', ) ], - paging = fireblocks.models.exchange_accounts_paged_paging.ExchangeAccountsPaged_paging( + paging = fireblocks.models.get_paged_exchange_accounts_response_paging.GetPagedExchangeAccountsResponse_paging( after = '', before = '', ), prev_url = '', next_url = '' ) else: - return ExchangeAccountsPaged( + return GetPagedExchangeAccountsResponse( + exchanges = [ + fireblocks.models.exchange_account.ExchangeAccount( + id = '', + type = 'INDEPENDENT_RESERVE', + name = '', + status = '', + assets = [ + fireblocks.models.exchange_asset.ExchangeAsset( + id = '', + balance = '', + locked_amount = '', + total = '', + available = '', + credit = '', + asset_id = '2306088f-97ed-4293-8d28-8ab627f272d7', + provider_symbol = 'BTC', + asset_symbol = 'BTC', + asset_legacy_id = 'BTC', ) + ], + success = True, + trading_accounts = [ + fireblocks.models.exchange_trading_account.ExchangeTradingAccount( + name = '', ) + ], + is_subaccount = True, + main_account_id = '', ) + ], ) """ - def testExchangeAccountsPaged(self): - """Test ExchangeAccountsPaged""" + def testGetPagedExchangeAccountsResponse(self): + """Test GetPagedExchangeAccountsResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_get_paged_exchange_accounts_response_paging.py b/test/test_get_paged_exchange_accounts_response_paging.py new file mode 100644 index 00000000..d336be70 --- /dev/null +++ b/test/test_get_paged_exchange_accounts_response_paging.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" +Fireblocks API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.6.2 +Contact: support@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.get_paged_exchange_accounts_response_paging import ( + GetPagedExchangeAccountsResponsePaging, +) + + +class TestGetPagedExchangeAccountsResponsePaging(unittest.TestCase): + """GetPagedExchangeAccountsResponsePaging unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetPagedExchangeAccountsResponsePaging: + """Test GetPagedExchangeAccountsResponsePaging + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `GetPagedExchangeAccountsResponsePaging` + """ + model = GetPagedExchangeAccountsResponsePaging() + if include_optional: + return GetPagedExchangeAccountsResponsePaging( + after = '', + before = '' + ) + else: + return GetPagedExchangeAccountsResponsePaging( + ) + """ + + def testGetPagedExchangeAccountsResponsePaging(self): + """Test GetPagedExchangeAccountsResponsePaging""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_network_record.py b/test/test_network_record.py index 2d24a31c..f02e0fd3 100644 --- a/test/test_network_record.py +++ b/test/test_network_record.py @@ -58,9 +58,7 @@ def make_instance(self, include_optional) -> NetworkRecord: is_dropped = True, type = '', destination_address = '', - source_address = '', amount_usd = '', - index = 1.337, reward_info = fireblocks.models.reward_info.RewardInfo( src_rewards = '', dest_rewards = '', ) diff --git a/test/test_transaction_response.py b/test/test_transaction_response.py index 16f763f2..844d0f81 100644 --- a/test/test_transaction_response.py +++ b/test/test_transaction_response.py @@ -45,6 +45,7 @@ def make_instance(self, include_optional) -> TransactionResponse: operation = 'TRANSFER', note = '', asset_id = '', + asset_type = 'ERC20', source = fireblocks.models.source_transfer_peer_path_response.SourceTransferPeerPathResponse( type = 'VAULT_ACCOUNT', sub_type = '', @@ -63,8 +64,6 @@ def make_instance(self, include_optional) -> TransactionResponse: trading_account = '', ), destinations = [ fireblocks.models.transaction_response_destination.TransactionResponseDestination( - destination_address = null, - destination_address_description = null, amount = '', amount_usd = '', aml_screening_result = fireblocks.models.aml_screening_result.AmlScreeningResult( @@ -106,6 +105,8 @@ def make_instance(self, include_optional) -> TransactionResponse: network_fee = '', service_fee = '', gas_price = '', + l1network_fee = '0.003955', + l2network_fee = '0.0005', paid_by_relay = True, relay_type = 'LOCAL', relay_id = '1', @@ -135,9 +136,7 @@ def make_instance(self, include_optional) -> TransactionResponse: is_dropped = True, type = '', destination_address = '', - source_address = '', amount_usd = '', - index = 1.337, reward_info = fireblocks.models.reward_info.RewardInfo( src_rewards = '', dest_rewards = '', ), ) @@ -166,15 +165,15 @@ def make_instance(self, include_optional) -> TransactionResponse: payload = fireblocks.models.payload.payload(), ), compliance_results = fireblocks.models.compliance_results.ComplianceResults( aml = fireblocks.models.compliance_screening_result.ComplianceScreeningResult( - provider = '', + provider = 'CHAINALYSIS', payload = fireblocks.models.payload.payload(), - bypass_reason = '', + bypass_reason = 'MANUAL', screening_status = 'COMPLETED', timestamp = 1.337, ), tr = fireblocks.models.compliance_screening_result.ComplianceScreeningResult( - provider = '', + provider = 'CHAINALYSIS', payload = fireblocks.models.payload.payload(), - bypass_reason = '', + bypass_reason = 'MANUAL', screening_status = 'COMPLETED', timestamp = 1.337, ), aml_list = [ @@ -185,6 +184,11 @@ def make_instance(self, include_optional) -> TransactionResponse: provider = '', success = True, timestamp = 1.337, ), ), + not_broadcast_by_fireblocks = False, + dapp_url = 'https://app.uniswap.org', + gas_limit = '21000', + blockchain_index = '1.1.1', + paid_rent = '0.00203928', extra_parameters = None, signed_messages = [ fireblocks.models.signed_message.SignedMessage( @@ -208,6 +212,8 @@ def make_instance(self, include_optional) -> TransactionResponse: reward_info = fireblocks.models.reward_info.RewardInfo( src_rewards = '', dest_rewards = '', ), + fee_payer_info = fireblocks.models.fee_payer_info.FeePayerInfo( + fee_payer_account_id = '123', ), system_messages = fireblocks.models.system_message_info.SystemMessageInfo( type = 'WARN', message = 'Slow transaction processing. Outgoing transactions might be stuck.', ), @@ -219,7 +225,10 @@ def make_instance(self, include_optional) -> TransactionResponse: service_fee = 1.337, fee = 1.337, network_fee = 1.337, - error_description = '' + error_description = '', + replaced_tx_hash = '', + nonce = '11228', + blockchain_info = {"evmTransferType":"NATIVE"} ) else: return TransactionResponse( diff --git a/test/test_transaction_response_destination.py b/test/test_transaction_response_destination.py index 992c9547..ebbb4953 100644 --- a/test/test_transaction_response_destination.py +++ b/test/test_transaction_response_destination.py @@ -39,8 +39,6 @@ def make_instance(self, include_optional) -> TransactionResponseDestination: model = TransactionResponseDestination() if include_optional: return TransactionResponseDestination( - destination_address = None, - destination_address_description = None, amount = '', amount_usd = '', aml_screening_result = fireblocks.models.aml_screening_result.AmlScreeningResult(