From 2dafb56202ce525a82cc2c6c3e7b47b8068aa576 Mon Sep 17 00:00:00 2001 From: fireblocks_dx_team Date: Thu, 5 Dec 2024 13:48:08 +0000 Subject: [PATCH] Generated SDK #1430 --- .openapi-generator/FILES | 15 +- README.md | 6 +- docs/AbiFunction.md | 2 +- docs/ComplianceApi.md | 12 +- docs/ContractDeployRequest.md | 3 + docs/ContractDoc.md | 2 +- docs/ContractTemplateDto.md | 2 +- docs/ContractUploadRequest.md | 2 +- docs/CreateTokenRequestDto.md | 3 + docs/DeployedContractsApi.md | 8 +- docs/ExecuteActionRequest.md | 1 + docs/NetworkConnectionsApi.md | 83 +++++++++ docs/RelatedRequestDto.md | 2 +- docs/RelatedRequestStatusType.md | 12 -- docs/ScreeningUpdateConfigurations.md | 30 +++ docs/ScreeningUpdateConfigurationsRequest.md | 30 --- docs/SearchNetworkIdsResponse.md | 30 +++ docs/SmartTransferApi.md | 9 +- docs/SmartTransferFundDvpTicket.md | 31 ++++ docs/SmartTransferTicket.md | 2 + docs/SmartTransferTicketTerm.md | 1 + docs/UnstakeRequestDto.md | 1 + docs/WriteCallFunctionDto.md | 2 + fireblocks/__init__.py | 9 +- fireblocks/api/compliance_api.py | 26 ++- fireblocks/api/deployed_contracts_api.py | 14 +- fireblocks/api/network_connections_api.py | 171 +++++++++++++++++- fireblocks/api/smart_transfer_api.py | 21 +++ fireblocks/configuration.py | 2 +- fireblocks/models/__init__.py | 5 +- fireblocks/models/abi_function.py | 2 +- fireblocks/models/contract_deploy_request.py | 22 ++- fireblocks/models/contract_doc.py | 6 +- fireblocks/models/contract_template_dto.py | 13 +- fireblocks/models/contract_upload_request.py | 13 +- fireblocks/models/create_token_request_dto.py | 22 ++- fireblocks/models/related_request_dto.py | 12 +- .../models/related_request_status_type.py | 68 ------- ....py => screening_update_configurations.py} | 8 +- .../models/search_network_ids_response.py | 98 ++++++++++ .../models/smart_transfer_fund_dvp_ticket.py | 102 +++++++++++ fireblocks/models/smart_transfer_ticket.py | 16 +- .../models/smart_transfer_ticket_term.py | 4 +- fireblocks/models/unstake_request_dto.py | 6 +- fireblocks/models/write_call_function_dto.py | 10 +- pyproject.toml | 2 +- setup.py | 2 +- test/test_abi_function.py | 14 -- test/test_contract_deploy_request.py | 5 +- test/test_contract_doc.py | 4 +- test/test_contract_template_dto.py | 10 +- test/test_contract_upload_request.py | 10 +- test/test_create_token_request_dto.py | 5 +- test/test_execute_action_request.py | 3 +- test/test_network_connections_api.py | 7 + test/test_related_request_status_type.py | 36 ---- ...> test_screening_update_configurations.py} | 24 +-- test/test_search_network_ids_response.py | 63 +++++++ test/test_smart_transfer_fund_dvp_ticket.py | 56 ++++++ test/test_smart_transfer_ticket.py | 2 + ...smart_transfer_ticket_filtered_response.py | 4 + test/test_smart_transfer_ticket_response.py | 2 + test/test_smart_transfer_ticket_term.py | 1 + ...est_smart_transfer_ticket_term_response.py | 1 + test/test_unstake_request_dto.py | 3 +- test/test_write_call_function_dto.py | 4 +- 66 files changed, 915 insertions(+), 282 deletions(-) delete mode 100644 docs/RelatedRequestStatusType.md create mode 100644 docs/ScreeningUpdateConfigurations.md delete mode 100644 docs/ScreeningUpdateConfigurationsRequest.md create mode 100644 docs/SearchNetworkIdsResponse.md create mode 100644 docs/SmartTransferFundDvpTicket.md delete mode 100644 fireblocks/models/related_request_status_type.py rename fireblocks/models/{screening_update_configurations_request.py => screening_update_configurations.py} (91%) create mode 100644 fireblocks/models/search_network_ids_response.py create mode 100644 fireblocks/models/smart_transfer_fund_dvp_ticket.py delete mode 100644 test/test_related_request_status_type.py rename test/{test_screening_update_configurations_request.py => test_screening_update_configurations.py} (63%) create mode 100644 test/test_search_network_ids_response.py create mode 100644 test/test_smart_transfer_fund_dvp_ticket.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index fa9b680e..a52fefff 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -312,7 +312,6 @@ docs/ReadCallFunctionDto.md docs/RedeemFundsToLinkedDDAResponse.md docs/RegisterNewAssetRequest.md docs/RelatedRequestDto.md -docs/RelatedRequestStatusType.md docs/RelatedTransactionDto.md docs/RemoveCollateralRequestBody.md docs/RenameCosigner.md @@ -332,10 +331,11 @@ docs/ScreeningOperationFailure.md docs/ScreeningOperationType.md docs/ScreeningPolicyResponse.md docs/ScreeningProviderRulesConfigurationResponse.md -docs/ScreeningUpdateConfigurationsRequest.md +docs/ScreeningUpdateConfigurations.md docs/ScreeningValidationFailure.md docs/ScreeningVerdict.md docs/ScreeningVerdictMatchedRule.md +docs/SearchNetworkIdsResponse.md docs/SessionDTO.md docs/SessionMetadata.md docs/SetAdminQuorumThresholdRequest.md @@ -367,6 +367,7 @@ docs/SmartTransferCoinStatistic.md docs/SmartTransferCreateTicket.md docs/SmartTransferCreateTicketTerm.md docs/SmartTransferForbiddenResponse.md +docs/SmartTransferFundDvpTicket.md docs/SmartTransferFundTerm.md docs/SmartTransferManuallyFundTerm.md docs/SmartTransferNotFoundResponse.md @@ -837,7 +838,6 @@ fireblocks/models/read_call_function_dto.py fireblocks/models/redeem_funds_to_linked_dda_response.py fireblocks/models/register_new_asset_request.py fireblocks/models/related_request_dto.py -fireblocks/models/related_request_status_type.py fireblocks/models/related_transaction_dto.py fireblocks/models/remove_collateral_request_body.py fireblocks/models/rename_cosigner.py @@ -856,10 +856,11 @@ fireblocks/models/screening_operation_failure.py fireblocks/models/screening_operation_type.py fireblocks/models/screening_policy_response.py fireblocks/models/screening_provider_rules_configuration_response.py -fireblocks/models/screening_update_configurations_request.py +fireblocks/models/screening_update_configurations.py fireblocks/models/screening_validation_failure.py fireblocks/models/screening_verdict.py fireblocks/models/screening_verdict_matched_rule.py +fireblocks/models/search_network_ids_response.py fireblocks/models/session_dto.py fireblocks/models/session_metadata.py fireblocks/models/set_admin_quorum_threshold_request.py @@ -890,6 +891,7 @@ fireblocks/models/smart_transfer_coin_statistic.py fireblocks/models/smart_transfer_create_ticket.py fireblocks/models/smart_transfer_create_ticket_term.py fireblocks/models/smart_transfer_forbidden_response.py +fireblocks/models/smart_transfer_fund_dvp_ticket.py fireblocks/models/smart_transfer_fund_term.py fireblocks/models/smart_transfer_manually_fund_term.py fireblocks/models/smart_transfer_not_found_response.py @@ -1347,7 +1349,6 @@ test/test_read_call_function_dto.py test/test_redeem_funds_to_linked_dda_response.py test/test_register_new_asset_request.py test/test_related_request_dto.py -test/test_related_request_status_type.py test/test_related_transaction_dto.py test/test_remove_collateral_request_body.py test/test_rename_cosigner.py @@ -1367,10 +1368,11 @@ test/test_screening_operation_failure.py test/test_screening_operation_type.py test/test_screening_policy_response.py test/test_screening_provider_rules_configuration_response.py -test/test_screening_update_configurations_request.py +test/test_screening_update_configurations.py test/test_screening_validation_failure.py test/test_screening_verdict.py test/test_screening_verdict_matched_rule.py +test/test_search_network_ids_response.py test/test_session_dto.py test/test_session_metadata.py test/test_set_admin_quorum_threshold_request.py @@ -1402,6 +1404,7 @@ test/test_smart_transfer_coin_statistic.py test/test_smart_transfer_create_ticket.py test/test_smart_transfer_create_ticket_term.py test/test_smart_transfer_forbidden_response.py +test/test_smart_transfer_fund_dvp_ticket.py test/test_smart_transfer_fund_term.py test/test_smart_transfer_manually_fund_term.py test/test_smart_transfer_not_found_response.py diff --git a/README.md b/README.md index 0909c8a2..6552a5ec 100644 --- a/README.md +++ b/README.md @@ -342,6 +342,7 @@ Class | Method | HTTP request | Description *NetworkConnectionsApi* | [**get_network_id**](docs/NetworkConnectionsApi.md#get_network_id) | **GET** /network_ids/{networkId} | Returns specific network ID. *NetworkConnectionsApi* | [**get_network_ids**](docs/NetworkConnectionsApi.md#get_network_ids) | **GET** /network_ids | Returns all network IDs, both local IDs and discoverable remote IDs *NetworkConnectionsApi* | [**get_routing_policy_asset_groups**](docs/NetworkConnectionsApi.md#get_routing_policy_asset_groups) | **GET** /network_ids/routing_policy_asset_groups | Returns all enabled routing policy asset groups +*NetworkConnectionsApi* | [**search_network_ids**](docs/NetworkConnectionsApi.md#search_network_ids) | **GET** /network_ids/search | Search network IDs, both local IDs and discoverable remote IDs *NetworkConnectionsApi* | [**set_network_id_discoverability**](docs/NetworkConnectionsApi.md#set_network_id_discoverability) | **PATCH** /network_ids/{networkId}/set_discoverability | Update network ID's discoverability. *NetworkConnectionsApi* | [**set_network_id_name**](docs/NetworkConnectionsApi.md#set_network_id_name) | **PATCH** /network_ids/{networkId}/set_name | Update network ID's name. *NetworkConnectionsApi* | [**set_network_id_routing_policy**](docs/NetworkConnectionsApi.md#set_network_id_routing_policy) | **PATCH** /network_ids/{networkId}/set_routing_policy | Update network id routing policy. @@ -751,7 +752,6 @@ Class | Method | HTTP request | Description - [RedeemFundsToLinkedDDAResponse](docs/RedeemFundsToLinkedDDAResponse.md) - [RegisterNewAssetRequest](docs/RegisterNewAssetRequest.md) - [RelatedRequestDto](docs/RelatedRequestDto.md) - - [RelatedRequestStatusType](docs/RelatedRequestStatusType.md) - [RelatedTransactionDto](docs/RelatedTransactionDto.md) - [RemoveCollateralRequestBody](docs/RemoveCollateralRequestBody.md) - [RenameCosigner](docs/RenameCosigner.md) @@ -770,10 +770,11 @@ Class | Method | HTTP request | Description - [ScreeningOperationType](docs/ScreeningOperationType.md) - [ScreeningPolicyResponse](docs/ScreeningPolicyResponse.md) - [ScreeningProviderRulesConfigurationResponse](docs/ScreeningProviderRulesConfigurationResponse.md) - - [ScreeningUpdateConfigurationsRequest](docs/ScreeningUpdateConfigurationsRequest.md) + - [ScreeningUpdateConfigurations](docs/ScreeningUpdateConfigurations.md) - [ScreeningValidationFailure](docs/ScreeningValidationFailure.md) - [ScreeningVerdict](docs/ScreeningVerdict.md) - [ScreeningVerdictMatchedRule](docs/ScreeningVerdictMatchedRule.md) + - [SearchNetworkIdsResponse](docs/SearchNetworkIdsResponse.md) - [SessionDTO](docs/SessionDTO.md) - [SessionMetadata](docs/SessionMetadata.md) - [SetAdminQuorumThresholdRequest](docs/SetAdminQuorumThresholdRequest.md) @@ -804,6 +805,7 @@ Class | Method | HTTP request | Description - [SmartTransferCreateTicket](docs/SmartTransferCreateTicket.md) - [SmartTransferCreateTicketTerm](docs/SmartTransferCreateTicketTerm.md) - [SmartTransferForbiddenResponse](docs/SmartTransferForbiddenResponse.md) + - [SmartTransferFundDvpTicket](docs/SmartTransferFundDvpTicket.md) - [SmartTransferFundTerm](docs/SmartTransferFundTerm.md) - [SmartTransferManuallyFundTerm](docs/SmartTransferManuallyFundTerm.md) - [SmartTransferNotFoundResponse](docs/SmartTransferNotFoundResponse.md) diff --git a/docs/AbiFunction.md b/docs/AbiFunction.md index 82f618e6..9ad1b191 100644 --- a/docs/AbiFunction.md +++ b/docs/AbiFunction.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **name** | **str** | The name of the contract function as it appears in the ABI | [optional] **state_mutability** | **str** | The state mutability of the contract function as it appears in the ABI | [optional] **type** | **str** | The type of the function | -**inputs** | [**List[Parameter]**](Parameter.md) | The parameters that this function/constructor posses | +**inputs** | [**List[Parameter]**](Parameter.md) | The parameters that this function/constructor posses | [optional] **outputs** | [**List[Parameter]**](Parameter.md) | The parameters that this 'read' function returns | [optional] **description** | **str** | The documentation of this function (if has any) | [optional] diff --git a/docs/ComplianceApi.md b/docs/ComplianceApi.md index c5cd7243..369341af 100644 --- a/docs/ComplianceApi.md +++ b/docs/ComplianceApi.md @@ -363,7 +363,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) # **update_screening_configuration** -> ScreeningUpdateConfigurationsRequest update_screening_configuration(idempotency_key=idempotency_key) +> ScreeningUpdateConfigurations update_screening_configuration(screening_update_configurations, idempotency_key=idempotency_key) Tenant - Screening Configuration @@ -373,7 +373,7 @@ Update tenant screening configuration. ```python -from fireblocks.models.screening_update_configurations_request import ScreeningUpdateConfigurationsRequest +from fireblocks.models.screening_update_configurations import ScreeningUpdateConfigurations from fireblocks.client import Fireblocks from fireblocks.client_configuration import ClientConfiguration from fireblocks.exceptions import ApiException @@ -394,11 +394,12 @@ configuration = ClientConfiguration( # Enter a context with an instance of the API client with Fireblocks(configuration) as fireblocks: + screening_update_configurations = fireblocks.ScreeningUpdateConfigurations() # ScreeningUpdateConfigurations | idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) try: # Tenant - Screening Configuration - api_response = fireblocks.compliance.update_screening_configuration(idempotency_key=idempotency_key).result() + api_response = fireblocks.compliance.update_screening_configuration(screening_update_configurations, idempotency_key=idempotency_key).result() print("The response of ComplianceApi->update_screening_configuration:\n") pprint(api_response) except Exception as e: @@ -412,11 +413,12 @@ with Fireblocks(configuration) as fireblocks: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **screening_update_configurations** | [**ScreeningUpdateConfigurations**](ScreeningUpdateConfigurations.md)| | **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] ### Return type -[**ScreeningUpdateConfigurationsRequest**](ScreeningUpdateConfigurationsRequest.md) +[**ScreeningUpdateConfigurations**](ScreeningUpdateConfigurations.md) ### Authorization @@ -424,7 +426,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details diff --git a/docs/ContractDeployRequest.md b/docs/ContractDeployRequest.md index 5c0c28d6..402abde7 100644 --- a/docs/ContractDeployRequest.md +++ b/docs/ContractDeployRequest.md @@ -8,6 +8,9 @@ Name | Type | Description | Notes **asset_id** | **str** | The base asset identifier of the blockchain you want to deploy to | **vault_account_id** | **str** | The vault account id you wish to deploy from | **constructor_parameters** | [**List[ParameterWithValue]**](ParameterWithValue.md) | The constructor parameters of this contract | [optional] +**use_gasless** | **bool** | Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 standard. When set to true, the transaction will be relayed by a designated relayer. The workspace must be configured to use Fireblocks gasless relay. | [optional] +**fee** | **str** | Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field | [optional] +**fee_level** | **str** | Fee level for the write function transaction. interchangeable with the 'fee' field | [optional] ## Example diff --git a/docs/ContractDoc.md b/docs/ContractDoc.md index 663d68d6..45153f1d 100644 --- a/docs/ContractDoc.md +++ b/docs/ContractDoc.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **events** | **str** | A description of the contract`s events | [optional] **kind** | **str** | Is it devdoc or userdoc | **methods** | [**Dict[str, FunctionDoc]**](FunctionDoc.md) | The description of the contract functions | -**version** | **str** | The version of the contract | +**version** | **float** | The version of the contract | ## Example diff --git a/docs/ContractTemplateDto.md b/docs/ContractTemplateDto.md index 06910928..0e68dfcf 100644 --- a/docs/ContractTemplateDto.md +++ b/docs/ContractTemplateDto.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **name** | **str** | The name of the contract template | **description** | **str** | A short description of the contract template | **long_description** | **str** | A full description of the contract template. May contain to break the lines | [optional] -**abi** | **List[List[AbiFunction]]** | | +**abi** | [**List[AbiFunction]**](AbiFunction.md) | The abi of the contract template. Necessary for displaying and for after deployment encoding | **attributes** | [**ContractAttributes**](ContractAttributes.md) | The attributes related to this contract template. It will be displayed in the tokenization page | [optional] **docs** | [**ContractDoc**](ContractDoc.md) | A `natspec` compliant documentation json. Can be retrieved from the output json after compilation | [optional] **owner** | **str** | The workspace id of the owner of this contract template. If it's a private contract, only this workspace will be allowed to deploy it | [optional] diff --git a/docs/ContractUploadRequest.md b/docs/ContractUploadRequest.md index 96cdfd10..449fdd2c 100644 --- a/docs/ContractUploadRequest.md +++ b/docs/ContractUploadRequest.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **sourcecode** | **str** | The source code of the contract. Optional. | [optional] **type** | **str** | The type of the contract template | [optional] **docs** | [**ContractDoc**](ContractDoc.md) | A `natspec` compliant documentation json. Can be retrieved from the output json after compilation | [optional] -**abi** | **List[List[AbiFunction]]** | | +**abi** | [**List[AbiFunction]**](AbiFunction.md) | The abi of the contract template. Necessary for displaying and for after deployment encoding | **attributes** | [**ContractAttributes**](ContractAttributes.md) | The attributes related to this contract template. It will be displayed in the tokenization page | [optional] ## Example diff --git a/docs/CreateTokenRequestDto.md b/docs/CreateTokenRequestDto.md index c9f01492..be2c1eef 100644 --- a/docs/CreateTokenRequestDto.md +++ b/docs/CreateTokenRequestDto.md @@ -10,6 +10,9 @@ Name | Type | Description | Notes **vault_account_id** | **str** | The id of the vault account that initiated the request to issue the token | **create_params** | [**CreateTokenRequestDtoCreateParams**](CreateTokenRequestDtoCreateParams.md) | | **display_name** | **str** | | [optional] +**use_gasless** | **bool** | Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 standard. When set to true, the transaction will be relayed by a designated relayer. The workspace must be configured to use Fireblocks gasless relay. | [optional] +**fee** | **str** | Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field | [optional] +**fee_level** | **str** | Fee level for the write function transaction. interchangeable with the 'fee' field | [optional] ## Example diff --git a/docs/DeployedContractsApi.md b/docs/DeployedContractsApi.md index 7def71d3..16a22a58 100644 --- a/docs/DeployedContractsApi.md +++ b/docs/DeployedContractsApi.md @@ -318,7 +318,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_deployed_contracts** -> DeployedContractsPaginatedResponse get_deployed_contracts(page_cursor=page_cursor, page_size=page_size, contract_address=contract_address, base_asset_id=base_asset_id, template_id=template_id) +> DeployedContractsPaginatedResponse get_deployed_contracts(page_cursor=page_cursor, page_size=page_size, contract_address=contract_address, base_asset_id=base_asset_id, contract_template_id=contract_template_id) List deployed contracts data @@ -353,11 +353,11 @@ with Fireblocks(configuration) as fireblocks: page_size = 10 # float | Number of items per page, requesting more then max will return max items (optional) contract_address = '0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66' # str | The contract's onchain address (optional) base_asset_id = 'base_asset_id_example' # str | (optional) - template_id = 'template_id_example' # str | (optional) + contract_template_id = 'contract_template_id_example' # str | (optional) try: # List deployed contracts data - api_response = fireblocks.deployed_contracts.get_deployed_contracts(page_cursor=page_cursor, page_size=page_size, contract_address=contract_address, base_asset_id=base_asset_id, template_id=template_id).result() + api_response = fireblocks.deployed_contracts.get_deployed_contracts(page_cursor=page_cursor, page_size=page_size, contract_address=contract_address, base_asset_id=base_asset_id, contract_template_id=contract_template_id).result() print("The response of DeployedContractsApi->get_deployed_contracts:\n") pprint(api_response) except Exception as e: @@ -375,7 +375,7 @@ Name | Type | Description | Notes **page_size** | **float**| Number of items per page, requesting more then max will return max items | [optional] **contract_address** | **str**| The contract's onchain address | [optional] **base_asset_id** | **str**| | [optional] - **template_id** | **str**| | [optional] + **contract_template_id** | **str**| | [optional] ### Return type diff --git a/docs/ExecuteActionRequest.md b/docs/ExecuteActionRequest.md index 3170ffaf..fd0e3387 100644 --- a/docs/ExecuteActionRequest.md +++ b/docs/ExecuteActionRequest.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **fee** | **str** | Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required. | [optional] **fee_level** | **str** | Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required. | [optional] **id** | **str** | id of position to withdraw | +**amount** | **str** | The number of tokens to unstake. This optional field is applicable only for liquid staking and allows for a partial unstake of the position. If not provided, the entire position will be unstaked by default. | [optional] ## Example diff --git a/docs/NetworkConnectionsApi.md b/docs/NetworkConnectionsApi.md index 72ae178a..0a5cfccb 100644 --- a/docs/NetworkConnectionsApi.md +++ b/docs/NetworkConnectionsApi.md @@ -14,6 +14,7 @@ Method | HTTP request | Description [**get_network_id**](NetworkConnectionsApi.md#get_network_id) | **GET** /network_ids/{networkId} | Returns specific network ID. [**get_network_ids**](NetworkConnectionsApi.md#get_network_ids) | **GET** /network_ids | Returns all network IDs, both local IDs and discoverable remote IDs [**get_routing_policy_asset_groups**](NetworkConnectionsApi.md#get_routing_policy_asset_groups) | **GET** /network_ids/routing_policy_asset_groups | Returns all enabled routing policy asset groups +[**search_network_ids**](NetworkConnectionsApi.md#search_network_ids) | **GET** /network_ids/search | Search network IDs, both local IDs and discoverable remote IDs [**set_network_id_discoverability**](NetworkConnectionsApi.md#set_network_id_discoverability) | **PATCH** /network_ids/{networkId}/set_discoverability | Update network ID's discoverability. [**set_network_id_name**](NetworkConnectionsApi.md#set_network_id_name) | **PATCH** /network_ids/{networkId}/set_name | Update network ID's name. [**set_network_id_routing_policy**](NetworkConnectionsApi.md#set_network_id_routing_policy) | **PATCH** /network_ids/{networkId}/set_routing_policy | Update network id routing policy. @@ -755,6 +756,88 @@ 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_network_ids** +> SearchNetworkIdsResponse search_network_ids(search=search, exclude_self=exclude_self, exclude_connected=exclude_connected, page_cursor=page_cursor, page_size=page_size) + +Search network IDs, both local IDs and discoverable remote IDs + +Retrieves a list of all local and discoverable remote network IDs. Can be filtered. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). + +### Example + + +```python +from fireblocks.models.search_network_ids_response import SearchNetworkIdsResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + search = 'search_example' # str | Search string - displayName networkId. Optional (optional) + exclude_self = True # bool | Exclude your networkIds. Optional, default false (optional) + exclude_connected = True # bool | Exclude connected networkIds. Optional, default false (optional) + page_cursor = 'page_cursor_example' # str | ID of the record after which to fetch $limit records (optional) + page_size = 50 # float | Number of records to fetch. By default, it is 50 (optional) (default to 50) + + try: + # Search network IDs, both local IDs and discoverable remote IDs + api_response = fireblocks.network_connections.search_network_ids(search=search, exclude_self=exclude_self, exclude_connected=exclude_connected, page_cursor=page_cursor, page_size=page_size).result() + print("The response of NetworkConnectionsApi->search_network_ids:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetworkConnectionsApi->search_network_ids: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **str**| Search string - displayName networkId. Optional | [optional] + **exclude_self** | **bool**| Exclude your networkIds. Optional, default false | [optional] + **exclude_connected** | **bool**| Exclude connected networkIds. Optional, default false | [optional] + **page_cursor** | **str**| ID of the record after which to fetch $limit records | [optional] + **page_size** | **float**| Number of records to fetch. By default, it is 50 | [optional] [default to 50] + +### Return type + +[**SearchNetworkIdsResponse**](SearchNetworkIdsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A list of network IDs | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[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) + # **set_network_id_discoverability** > SetNetworkIdResponse set_network_id_discoverability(network_id, set_network_id_discoverability_request) diff --git a/docs/RelatedRequestDto.md b/docs/RelatedRequestDto.md index 2bde55b9..6b6e97ac 100644 --- a/docs/RelatedRequestDto.md +++ b/docs/RelatedRequestDto.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | [**RelatedRequestStatusType**](RelatedRequestStatusType.md) | | +**status** | **str** | The status of the request | **in_progress** | **bool** | Indicates whether there is an ongoing action for this position related to this request | **amount** | **str** | Amount of tokens to Unstake | **tx_id** | **str** | The transaction ID of the ongoing request | [optional] diff --git a/docs/RelatedRequestStatusType.md b/docs/RelatedRequestStatusType.md deleted file mode 100644 index d0930420..00000000 --- a/docs/RelatedRequestStatusType.md +++ /dev/null @@ -1,12 +0,0 @@ -# RelatedRequestStatusType - -The status of the request - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[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/ScreeningUpdateConfigurations.md b/docs/ScreeningUpdateConfigurations.md new file mode 100644 index 00000000..8feed264 --- /dev/null +++ b/docs/ScreeningUpdateConfigurations.md @@ -0,0 +1,30 @@ +# ScreeningUpdateConfigurations + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**disable_bypass** | **bool** | Flag to enable or disable bypass screening on tenant configuration. | [optional] +**disable_unfreeze** | **bool** | Flag to enable or disable unfreeze of transaction frozen by policy rule on tenant configuration. | [optional] + +## Example + +```python +from fireblocks.models.screening_update_configurations import ScreeningUpdateConfigurations + +# TODO update the JSON string below +json = "{}" +# create an instance of ScreeningUpdateConfigurations from a JSON string +screening_update_configurations_instance = ScreeningUpdateConfigurations.from_json(json) +# print the JSON string representation of the object +print(ScreeningUpdateConfigurations.to_json()) + +# convert the object into a dict +screening_update_configurations_dict = screening_update_configurations_instance.to_dict() +# create an instance of ScreeningUpdateConfigurations from a dict +screening_update_configurations_from_dict = ScreeningUpdateConfigurations.from_dict(screening_update_configurations_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/ScreeningUpdateConfigurationsRequest.md b/docs/ScreeningUpdateConfigurationsRequest.md deleted file mode 100644 index 066412e9..00000000 --- a/docs/ScreeningUpdateConfigurationsRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# ScreeningUpdateConfigurationsRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**disable_bypass** | **bool** | Flag to enable or disable bypass screening on tenant configuration. | [optional] -**disable_unfreeze** | **bool** | Flag to enable or disable unfreeze of transaction frozen by policy rule on tenant configuration. | [optional] - -## Example - -```python -from fireblocks.models.screening_update_configurations_request import ScreeningUpdateConfigurationsRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ScreeningUpdateConfigurationsRequest from a JSON string -screening_update_configurations_request_instance = ScreeningUpdateConfigurationsRequest.from_json(json) -# print the JSON string representation of the object -print(ScreeningUpdateConfigurationsRequest.to_json()) - -# convert the object into a dict -screening_update_configurations_request_dict = screening_update_configurations_request_instance.to_dict() -# create an instance of ScreeningUpdateConfigurationsRequest from a dict -screening_update_configurations_request_from_dict = ScreeningUpdateConfigurationsRequest.from_dict(screening_update_configurations_request_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/SearchNetworkIdsResponse.md b/docs/SearchNetworkIdsResponse.md new file mode 100644 index 00000000..d2e7a3c3 --- /dev/null +++ b/docs/SearchNetworkIdsResponse.md @@ -0,0 +1,30 @@ +# SearchNetworkIdsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[NetworkIdResponse]**](NetworkIdResponse.md) | | [optional] +**next** | **str** | | [optional] + +## Example + +```python +from fireblocks.models.search_network_ids_response import SearchNetworkIdsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchNetworkIdsResponse from a JSON string +search_network_ids_response_instance = SearchNetworkIdsResponse.from_json(json) +# print the JSON string representation of the object +print(SearchNetworkIdsResponse.to_json()) + +# convert the object into a dict +search_network_ids_response_dict = search_network_ids_response_instance.to_dict() +# create an instance of SearchNetworkIdsResponse from a dict +search_network_ids_response_from_dict = SearchNetworkIdsResponse.from_dict(search_network_ids_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/SmartTransferApi.md b/docs/SmartTransferApi.md index cff77498..39dc3dec 100644 --- a/docs/SmartTransferApi.md +++ b/docs/SmartTransferApi.md @@ -575,7 +575,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) # **fund_dvp_ticket** -> SmartTransferTicketResponse fund_dvp_ticket(ticket_id, idempotency_key=idempotency_key) +> SmartTransferTicketResponse fund_dvp_ticket(ticket_id, smart_transfer_fund_dvp_ticket, idempotency_key=idempotency_key) Fund dvp ticket @@ -585,6 +585,7 @@ Create or fulfill dvp ticket order ```python +from fireblocks.models.smart_transfer_fund_dvp_ticket import SmartTransferFundDvpTicket from fireblocks.models.smart_transfer_ticket_response import SmartTransferTicketResponse from fireblocks.client import Fireblocks from fireblocks.client_configuration import ClientConfiguration @@ -607,11 +608,12 @@ configuration = ClientConfiguration( # Enter a context with an instance of the API client with Fireblocks(configuration) as fireblocks: ticket_id = 'ticket_id_example' # str | + smart_transfer_fund_dvp_ticket = fireblocks.SmartTransferFundDvpTicket() # SmartTransferFundDvpTicket | idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) try: # Fund dvp ticket - api_response = fireblocks.smart_transfer.fund_dvp_ticket(ticket_id, idempotency_key=idempotency_key).result() + api_response = fireblocks.smart_transfer.fund_dvp_ticket(ticket_id, smart_transfer_fund_dvp_ticket, idempotency_key=idempotency_key).result() print("The response of SmartTransferApi->fund_dvp_ticket:\n") pprint(api_response) except Exception as e: @@ -626,6 +628,7 @@ with Fireblocks(configuration) as fireblocks: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ticket_id** | **str**| | + **smart_transfer_fund_dvp_ticket** | [**SmartTransferFundDvpTicket**](SmartTransferFundDvpTicket.md)| | **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] ### Return type @@ -638,7 +641,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details diff --git a/docs/SmartTransferFundDvpTicket.md b/docs/SmartTransferFundDvpTicket.md new file mode 100644 index 00000000..7853a683 --- /dev/null +++ b/docs/SmartTransferFundDvpTicket.md @@ -0,0 +1,31 @@ +# SmartTransferFundDvpTicket + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fee** | **str** | Transaction fee | [optional] +**fee_level** | **str** | Transaction fee level. | [optional] +**note** | **str** | Transaction note | [optional] + +## Example + +```python +from fireblocks.models.smart_transfer_fund_dvp_ticket import SmartTransferFundDvpTicket + +# TODO update the JSON string below +json = "{}" +# create an instance of SmartTransferFundDvpTicket from a JSON string +smart_transfer_fund_dvp_ticket_instance = SmartTransferFundDvpTicket.from_json(json) +# print the JSON string representation of the object +print(SmartTransferFundDvpTicket.to_json()) + +# convert the object into a dict +smart_transfer_fund_dvp_ticket_dict = smart_transfer_fund_dvp_ticket_instance.to_dict() +# create an instance of SmartTransferFundDvpTicket from a dict +smart_transfer_fund_dvp_ticket_from_dict = SmartTransferFundDvpTicket.from_dict(smart_transfer_fund_dvp_ticket_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/SmartTransferTicket.md b/docs/SmartTransferTicket.md index 668c1539..4c7e8284 100644 --- a/docs/SmartTransferTicket.md +++ b/docs/SmartTransferTicket.md @@ -10,6 +10,8 @@ Name | Type | Description | Notes **type** | **str** | Kind of Smart Transfer. Can be either `ASYNC` or `DVP` | **direction** | **str** | Direction of Smart Transfer. | [optional] **status** | **str** | Current status of Smart Transfer ticket | +**dvp_execution_status** | **str** | Current status of DVP execution | [optional] +**order_created_by_network_id** | **str** | ID of network profile that created order | [optional] **terms** | [**List[SmartTransferTicketTerm]**](SmartTransferTicketTerm.md) | Ticket terms (legs) | [optional] **expires_in** | **float** | Number of hours for expiration.This data is valid only it ticket not in DRAFT state and it will be used to calculate expiresAt value | [optional] **expires_at** | **datetime** | Date and time at which the ticket will expire if no funding is performed. | [optional] diff --git a/docs/SmartTransferTicketTerm.md b/docs/SmartTransferTicketTerm.md index 98fb86e4..263bd76a 100644 --- a/docs/SmartTransferTicketTerm.md +++ b/docs/SmartTransferTicketTerm.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **ticket_id** | **str** | Unique id of Smart Transfer ticket | **asset** | **str** | Asset name | **amount** | **str** | Amount | +**dvp_src_dst_vault_id** | **str** | Identifier of the source and destination vault for DVP execution | [optional] **amount_usd** | **str** | Amount USD | [optional] **from_network_id** | **str** | Identifier of the origination Network Profile | **from_network_id_name** | **str** | Source network name | diff --git a/docs/UnstakeRequestDto.md b/docs/UnstakeRequestDto.md index c79801ef..37250d34 100644 --- a/docs/UnstakeRequestDto.md +++ b/docs/UnstakeRequestDto.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **fee** | **str** | Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required. | [optional] **fee_level** | **str** | Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required. | [optional] **tx_note** | **str** | The note to associate with the transactions. | [optional] +**amount** | **str** | The number of tokens to unstake. This optional field is applicable only for liquid staking and allows for a partial unstake of the position. If not provided, the entire position will be unstaked by default. | [optional] ## Example diff --git a/docs/WriteCallFunctionDto.md b/docs/WriteCallFunctionDto.md index 3a2eda52..02150a6c 100644 --- a/docs/WriteCallFunctionDto.md +++ b/docs/WriteCallFunctionDto.md @@ -11,6 +11,8 @@ Name | Type | Description | Notes **fee_level** | **str** | Fee level for the write function transaction. interchangeable with the 'fee' field | [optional] **fee** | **str** | Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field | [optional] **note** | **str** | Custom note, not sent to the blockchain, that describes the transaction at your Fireblocks workspace | [optional] +**use_gasless** | **bool** | Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 standard. When set to true, the transaction will be relayed by a designated relayer. The workspace must be configured to use Fireblocks gasless relay. | [optional] +**external_id** | **str** | External id that can be used to identify the transaction in your system. The unique identifier of the transaction outside of Fireblocks with max length of 255 characters | [optional] ## Example diff --git a/fireblocks/__init__.py b/fireblocks/__init__.py index f1d864fc..7daad2e1 100644 --- a/fireblocks/__init__.py +++ b/fireblocks/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "4.0.0" +__version__ = "0.0.0" # import apis into sdk package from fireblocks.api.api_user_api import ApiUserApi @@ -510,7 +510,6 @@ ) from fireblocks.models.register_new_asset_request import RegisterNewAssetRequest from fireblocks.models.related_request_dto import RelatedRequestDto -from fireblocks.models.related_request_status_type import RelatedRequestStatusType from fireblocks.models.related_transaction_dto import RelatedTransactionDto from fireblocks.models.remove_collateral_request_body import RemoveCollateralRequestBody from fireblocks.models.rename_cosigner import RenameCosigner @@ -539,12 +538,13 @@ from fireblocks.models.screening_provider_rules_configuration_response import ( ScreeningProviderRulesConfigurationResponse, ) -from fireblocks.models.screening_update_configurations_request import ( - ScreeningUpdateConfigurationsRequest, +from fireblocks.models.screening_update_configurations import ( + ScreeningUpdateConfigurations, ) from fireblocks.models.screening_validation_failure import ScreeningValidationFailure from fireblocks.models.screening_verdict import ScreeningVerdict from fireblocks.models.screening_verdict_matched_rule import ScreeningVerdictMatchedRule +from fireblocks.models.search_network_ids_response import SearchNetworkIdsResponse from fireblocks.models.session_dto import SessionDTO from fireblocks.models.session_metadata import SessionMetadata from fireblocks.models.set_admin_quorum_threshold_request import ( @@ -595,6 +595,7 @@ from fireblocks.models.smart_transfer_forbidden_response import ( SmartTransferForbiddenResponse, ) +from fireblocks.models.smart_transfer_fund_dvp_ticket import SmartTransferFundDvpTicket from fireblocks.models.smart_transfer_fund_term import SmartTransferFundTerm from fireblocks.models.smart_transfer_manually_fund_term import ( SmartTransferManuallyFundTerm, diff --git a/fireblocks/api/compliance_api.py b/fireblocks/api/compliance_api.py index a89b427e..6d0d27d7 100644 --- a/fireblocks/api/compliance_api.py +++ b/fireblocks/api/compliance_api.py @@ -24,7 +24,7 @@ from fireblocks.models.screening_configurations_request import ScreeningConfigurationsRequest from fireblocks.models.screening_policy_response import ScreeningPolicyResponse from fireblocks.models.screening_provider_rules_configuration_response import ScreeningProviderRulesConfigurationResponse -from fireblocks.models.screening_update_configurations_request import ScreeningUpdateConfigurationsRequest +from fireblocks.models.screening_update_configurations import ScreeningUpdateConfigurations from fireblocks.api_client import ApiClient, RequestSerialized from fireblocks.api_response import ApiResponse @@ -640,6 +640,7 @@ def _update_aml_screening_configuration_serialize( @validate_call def update_screening_configuration( self, + screening_update_configurations: ScreeningUpdateConfigurations, idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, _request_timeout: Union[ None, @@ -653,11 +654,13 @@ def update_screening_configuration( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[ScreeningUpdateConfigurationsRequest]]: + ) -> Future[ApiResponse[ScreeningUpdateConfigurations]]: """Tenant - Screening Configuration Update tenant screening configuration. + :param screening_update_configurations: (required) + :type screening_update_configurations: ScreeningUpdateConfigurations :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. :type idempotency_key: str :param _request_timeout: timeout setting for this request. If one @@ -684,6 +687,7 @@ def update_screening_configuration( _param = self._update_screening_configuration_serialize( + screening_update_configurations=screening_update_configurations, idempotency_key=idempotency_key, _request_auth=_request_auth, _content_type=_content_type, @@ -692,7 +696,7 @@ def update_screening_configuration( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ScreeningUpdateConfigurationsRequest", + '200': "ScreeningUpdateConfigurations", } return self.api_client.call_api( @@ -703,6 +707,7 @@ def update_screening_configuration( def _update_screening_configuration_serialize( self, + screening_update_configurations, idempotency_key, _request_auth, _content_type, @@ -729,6 +734,8 @@ def _update_screening_configuration_serialize( _header_params['Idempotency-Key'] = idempotency_key # process the form parameters # process the body parameter + if screening_update_configurations is not None: + _body_params = screening_update_configurations # set the HTTP header `Accept` @@ -738,6 +745,19 @@ def _update_screening_configuration_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ diff --git a/fireblocks/api/deployed_contracts_api.py b/fireblocks/api/deployed_contracts_api.py index c0e3c5de..ebbdd17e 100644 --- a/fireblocks/api/deployed_contracts_api.py +++ b/fireblocks/api/deployed_contracts_api.py @@ -605,7 +605,7 @@ def get_deployed_contracts( page_size: Annotated[Optional[Union[Annotated[float, Field(le=100, strict=True, ge=1)], Annotated[int, Field(le=100, strict=True, ge=1)]]], Field(description="Number of items per page, requesting more then max will return max items")] = None, contract_address: Annotated[Optional[StrictStr], Field(description="The contract's onchain address")] = None, base_asset_id: Optional[StrictStr] = None, - template_id: Optional[StrictStr] = None, + contract_template_id: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -631,8 +631,8 @@ def get_deployed_contracts( :type contract_address: str :param base_asset_id: :type base_asset_id: str - :param template_id: - :type template_id: str + :param contract_template_id: + :type contract_template_id: 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 @@ -661,7 +661,7 @@ def get_deployed_contracts( page_size=page_size, contract_address=contract_address, base_asset_id=base_asset_id, - template_id=template_id, + contract_template_id=contract_template_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -685,7 +685,7 @@ def _get_deployed_contracts_serialize( page_size, contract_address, base_asset_id, - template_id, + contract_template_id, _request_auth, _content_type, _headers, @@ -722,9 +722,9 @@ def _get_deployed_contracts_serialize( _query_params.append(('baseAssetId', base_asset_id)) - if template_id is not None: + if contract_template_id is not None: - _query_params.append(('templateId', template_id)) + _query_params.append(('contractTemplateId', contract_template_id)) # process the header parameters # process the form parameters diff --git a/fireblocks/api/network_connections_api.py b/fireblocks/api/network_connections_api.py index 7b4bfa81..acd06701 100644 --- a/fireblocks/api/network_connections_api.py +++ b/fireblocks/api/network_connections_api.py @@ -18,8 +18,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr -from typing import List, Optional +from pydantic import Field, StrictBool, StrictStr +from typing import List, Optional, Union from typing_extensions import Annotated from fireblocks.models.create_network_id_request import CreateNetworkIdRequest from fireblocks.models.delete_network_connection_response import DeleteNetworkConnectionResponse @@ -27,6 +27,7 @@ from fireblocks.models.network_connection import NetworkConnection from fireblocks.models.network_connection_response import NetworkConnectionResponse from fireblocks.models.network_id_response import NetworkIdResponse +from fireblocks.models.search_network_ids_response import SearchNetworkIdsResponse from fireblocks.models.set_network_id_discoverability_request import SetNetworkIdDiscoverabilityRequest from fireblocks.models.set_network_id_name_request import SetNetworkIdNameRequest from fireblocks.models.set_network_id_response import SetNetworkIdResponse @@ -1116,7 +1117,7 @@ def get_network_ids( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Future[ApiResponse[List[NetworkIdResponse]]]: - """Returns all network IDs, both local IDs and discoverable remote IDs + """(Deprecated) Returns all network IDs, both local IDs and discoverable remote IDs Retrieves a list of all local and discoverable remote network IDs. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). @@ -1141,6 +1142,7 @@ def get_network_ids( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /network_ids is deprecated.", DeprecationWarning) _param = self._get_network_ids_serialize( @@ -1336,6 +1338,169 @@ def _get_routing_policy_asset_groups_serialize( + @validate_call + def search_network_ids( + self, + search: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="Search string - displayName networkId. Optional")] = None, + exclude_self: Annotated[Optional[StrictBool], Field(description="Exclude your networkIds. Optional, default false")] = None, + exclude_connected: Annotated[Optional[StrictBool], Field(description="Exclude connected networkIds. Optional, default false")] = None, + page_cursor: Annotated[Optional[StrictStr], Field(description="ID of the record after which to fetch $limit records")] = None, + page_size: Annotated[Optional[Union[Annotated[float, Field(le=50, strict=True, ge=1)], Annotated[int, Field(le=50, strict=True, ge=1)]]], Field(description="Number of records to fetch. By default, it is 50")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[SearchNetworkIdsResponse]]: + """Search network IDs, both local IDs and discoverable remote IDs + + Retrieves a list of all local and discoverable remote network IDs. Can be filtered. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). + + :param search: Search string - displayName networkId. Optional + :type search: str + :param exclude_self: Exclude your networkIds. Optional, default false + :type exclude_self: bool + :param exclude_connected: Exclude connected networkIds. Optional, default false + :type exclude_connected: bool + :param page_cursor: ID of the record after which to fetch $limit records + :type page_cursor: str + :param page_size: Number of records to fetch. By default, it is 50 + :type page_size: float + :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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._search_network_ids_serialize( + search=search, + exclude_self=exclude_self, + exclude_connected=exclude_connected, + page_cursor=page_cursor, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SearchNetworkIdsResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _search_network_ids_serialize( + self, + search, + exclude_self, + exclude_connected, + page_cursor, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if search is not None: + + _query_params.append(('search', search)) + + if exclude_self is not None: + + _query_params.append(('excludeSelf', exclude_self)) + + if exclude_connected is not None: + + _query_params.append(('excludeConnected', exclude_connected)) + + if page_cursor is not None: + + _query_params.append(('pageCursor', page_cursor)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/network_ids/search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def set_network_id_discoverability( self, diff --git a/fireblocks/api/smart_transfer_api.py b/fireblocks/api/smart_transfer_api.py index 1cb7a3dc..11af73c7 100644 --- a/fireblocks/api/smart_transfer_api.py +++ b/fireblocks/api/smart_transfer_api.py @@ -25,6 +25,7 @@ from fireblocks.models.smart_transfer_approve_term import SmartTransferApproveTerm from fireblocks.models.smart_transfer_create_ticket import SmartTransferCreateTicket from fireblocks.models.smart_transfer_create_ticket_term import SmartTransferCreateTicketTerm +from fireblocks.models.smart_transfer_fund_dvp_ticket import SmartTransferFundDvpTicket from fireblocks.models.smart_transfer_fund_term import SmartTransferFundTerm from fireblocks.models.smart_transfer_manually_fund_term import SmartTransferManuallyFundTerm from fireblocks.models.smart_transfer_set_ticket_expiration import SmartTransferSetTicketExpiration @@ -1056,6 +1057,7 @@ def _fulfill_ticket_serialize( def fund_dvp_ticket( self, ticket_id: StrictStr, + smart_transfer_fund_dvp_ticket: SmartTransferFundDvpTicket, idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, _request_timeout: Union[ None, @@ -1076,6 +1078,8 @@ def fund_dvp_ticket( :param ticket_id: (required) :type ticket_id: str + :param smart_transfer_fund_dvp_ticket: (required) + :type smart_transfer_fund_dvp_ticket: SmartTransferFundDvpTicket :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. :type idempotency_key: str :param _request_timeout: timeout setting for this request. If one @@ -1104,6 +1108,7 @@ def fund_dvp_ticket( _param = self._fund_dvp_ticket_serialize( ticket_id=ticket_id, + smart_transfer_fund_dvp_ticket=smart_transfer_fund_dvp_ticket, idempotency_key=idempotency_key, _request_auth=_request_auth, _content_type=_content_type, @@ -1127,6 +1132,7 @@ def fund_dvp_ticket( def _fund_dvp_ticket_serialize( self, ticket_id, + smart_transfer_fund_dvp_ticket, idempotency_key, _request_auth, _content_type, @@ -1155,6 +1161,8 @@ def _fund_dvp_ticket_serialize( _header_params['Idempotency-Key'] = idempotency_key # process the form parameters # process the body parameter + if smart_transfer_fund_dvp_ticket is not None: + _body_params = smart_transfer_fund_dvp_ticket # set the HTTP header `Accept` @@ -1164,6 +1172,19 @@ def _fund_dvp_ticket_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ diff --git a/fireblocks/configuration.py b/fireblocks/configuration.py index 0bfc36f5..03f60c7b 100644 --- a/fireblocks/configuration.py +++ b/fireblocks/configuration.py @@ -424,7 +424,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.6.2\n" - "SDK Package Version: 4.0.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): diff --git a/fireblocks/models/__init__.py b/fireblocks/models/__init__.py index 40a77879..0867268c 100644 --- a/fireblocks/models/__init__.py +++ b/fireblocks/models/__init__.py @@ -300,7 +300,6 @@ from fireblocks.models.redeem_funds_to_linked_dda_response import RedeemFundsToLinkedDDAResponse from fireblocks.models.register_new_asset_request import RegisterNewAssetRequest from fireblocks.models.related_request_dto import RelatedRequestDto -from fireblocks.models.related_request_status_type import RelatedRequestStatusType from fireblocks.models.related_transaction_dto import RelatedTransactionDto from fireblocks.models.remove_collateral_request_body import RemoveCollateralRequestBody from fireblocks.models.rename_cosigner import RenameCosigner @@ -319,10 +318,11 @@ from fireblocks.models.screening_operation_type import ScreeningOperationType from fireblocks.models.screening_policy_response import ScreeningPolicyResponse from fireblocks.models.screening_provider_rules_configuration_response import ScreeningProviderRulesConfigurationResponse -from fireblocks.models.screening_update_configurations_request import ScreeningUpdateConfigurationsRequest +from fireblocks.models.screening_update_configurations import ScreeningUpdateConfigurations from fireblocks.models.screening_validation_failure import ScreeningValidationFailure from fireblocks.models.screening_verdict import ScreeningVerdict from fireblocks.models.screening_verdict_matched_rule import ScreeningVerdictMatchedRule +from fireblocks.models.search_network_ids_response import SearchNetworkIdsResponse from fireblocks.models.session_dto import SessionDTO from fireblocks.models.session_metadata import SessionMetadata from fireblocks.models.set_admin_quorum_threshold_request import SetAdminQuorumThresholdRequest @@ -353,6 +353,7 @@ from fireblocks.models.smart_transfer_create_ticket import SmartTransferCreateTicket from fireblocks.models.smart_transfer_create_ticket_term import SmartTransferCreateTicketTerm from fireblocks.models.smart_transfer_forbidden_response import SmartTransferForbiddenResponse +from fireblocks.models.smart_transfer_fund_dvp_ticket import SmartTransferFundDvpTicket from fireblocks.models.smart_transfer_fund_term import SmartTransferFundTerm from fireblocks.models.smart_transfer_manually_fund_term import SmartTransferManuallyFundTerm from fireblocks.models.smart_transfer_not_found_response import SmartTransferNotFoundResponse diff --git a/fireblocks/models/abi_function.py b/fireblocks/models/abi_function.py index b087b04b..e1582d35 100644 --- a/fireblocks/models/abi_function.py +++ b/fireblocks/models/abi_function.py @@ -31,7 +31,7 @@ class AbiFunction(BaseModel): name: Optional[StrictStr] = Field(default=None, description="The name of the contract function as it appears in the ABI") state_mutability: Optional[StrictStr] = Field(default=None, description="The state mutability of the contract function as it appears in the ABI", alias="stateMutability") type: StrictStr = Field(description="The type of the function") - inputs: List[Parameter] = Field(description="The parameters that this function/constructor posses") + inputs: Optional[List[Parameter]] = Field(default=None, description="The parameters that this function/constructor posses") outputs: Optional[List[Parameter]] = Field(default=None, description="The parameters that this 'read' function returns") description: Optional[StrictStr] = Field(default=None, description="The documentation of this function (if has any)") __properties: ClassVar[List[str]] = ["name", "stateMutability", "type", "inputs", "outputs", "description"] diff --git a/fireblocks/models/contract_deploy_request.py b/fireblocks/models/contract_deploy_request.py index 4911a39e..ebf668b6 100644 --- a/fireblocks/models/contract_deploy_request.py +++ b/fireblocks/models/contract_deploy_request.py @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from fireblocks.models.parameter_with_value import ParameterWithValue from typing import Optional, Set @@ -31,7 +31,20 @@ class ContractDeployRequest(BaseModel): asset_id: StrictStr = Field(description="The base asset identifier of the blockchain you want to deploy to", alias="assetId") vault_account_id: StrictStr = Field(description="The vault account id you wish to deploy from", alias="vaultAccountId") constructor_parameters: Optional[List[ParameterWithValue]] = Field(default=None, description="The constructor parameters of this contract", alias="constructorParameters") - __properties: ClassVar[List[str]] = ["assetId", "vaultAccountId", "constructorParameters"] + use_gasless: Optional[StrictBool] = Field(default=None, description="Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 standard. When set to true, the transaction will be relayed by a designated relayer. The workspace must be configured to use Fireblocks gasless relay.", alias="useGasless") + fee: Optional[StrictStr] = Field(default=None, description="Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field") + fee_level: Optional[StrictStr] = Field(default=None, description="Fee level for the write function transaction. interchangeable with the 'fee' field", alias="feeLevel") + __properties: ClassVar[List[str]] = ["assetId", "vaultAccountId", "constructorParameters", "useGasless", "fee", "feeLevel"] + + @field_validator('fee_level') + def fee_level_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['LOW', 'MEDIUM', 'HIGH']): + raise ValueError("must be one of enum values ('LOW', 'MEDIUM', 'HIGH')") + return value model_config = ConfigDict( populate_by_name=True, @@ -93,7 +106,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "assetId": obj.get("assetId"), "vaultAccountId": obj.get("vaultAccountId"), - "constructorParameters": [ParameterWithValue.from_dict(_item) for _item in obj["constructorParameters"]] if obj.get("constructorParameters") is not None else None + "constructorParameters": [ParameterWithValue.from_dict(_item) for _item in obj["constructorParameters"]] if obj.get("constructorParameters") is not None else None, + "useGasless": obj.get("useGasless"), + "fee": obj.get("fee"), + "feeLevel": obj.get("feeLevel") }) return _obj diff --git a/fireblocks/models/contract_doc.py b/fireblocks/models/contract_doc.py index c029b2ec..ecd694f7 100644 --- a/fireblocks/models/contract_doc.py +++ b/fireblocks/models/contract_doc.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.function_doc import FunctionDoc from typing import Optional, Set from typing_extensions import Self @@ -32,7 +32,7 @@ class ContractDoc(BaseModel): events: Optional[StrictStr] = Field(default=None, description="A description of the contract`s events") kind: StrictStr = Field(description="Is it devdoc or userdoc") methods: Dict[str, FunctionDoc] = Field(description="The description of the contract functions") - version: StrictStr = Field(description="The version of the contract") + version: Union[StrictFloat, StrictInt] = Field(description="The version of the contract") __properties: ClassVar[List[str]] = ["details", "events", "kind", "methods", "version"] model_config = ConfigDict( diff --git a/fireblocks/models/contract_template_dto.py b/fireblocks/models/contract_template_dto.py index d07e9145..f1e46607 100644 --- a/fireblocks/models/contract_template_dto.py +++ b/fireblocks/models/contract_template_dto.py @@ -35,7 +35,7 @@ class ContractTemplateDto(BaseModel): name: StrictStr = Field(description="The name of the contract template") description: StrictStr = Field(description="A short description of the contract template") long_description: Optional[StrictStr] = Field(default=None, description="A full description of the contract template. May contain to break the lines", alias="longDescription") - abi: List[List[AbiFunction]] + abi: List[AbiFunction] = Field(description="The abi of the contract template. Necessary for displaying and for after deployment encoding") attributes: Optional[ContractAttributes] = Field(default=None, description="The attributes related to this contract template. It will be displayed in the tokenization page") docs: Optional[ContractDoc] = Field(default=None, description="A `natspec` compliant documentation json. Can be retrieved from the output json after compilation") owner: Optional[StrictStr] = Field(default=None, description="The workspace id of the owner of this contract template. If it's a private contract, only this workspace will be allowed to deploy it") @@ -103,14 +103,12 @@ 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 abi (list of list) + # override the default output from pydantic by calling `to_dict()` of each item in abi (list) _items = [] if self.abi: for _item in self.abi: if _item: - _items.append( - [_inner_item.to_dict() for _inner_item in _item if _inner_item is not None] - ) + _items.append(_item.to_dict()) _dict['abi'] = _items # override the default output from pydantic by calling `to_dict()` of attributes if self.attributes: @@ -137,10 +135,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "description": obj.get("description"), "longDescription": obj.get("longDescription"), - "abi": [ - [AbiFunction.from_dict(_inner_item) for _inner_item in _item] - for _item in obj["abi"] - ] if obj.get("abi") is not None else None, + "abi": [AbiFunction.from_dict(_item) for _item in obj["abi"]] if obj.get("abi") is not None else None, "attributes": ContractAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, "docs": ContractDoc.from_dict(obj["docs"]) if obj.get("docs") is not None else None, "owner": obj.get("owner"), diff --git a/fireblocks/models/contract_upload_request.py b/fireblocks/models/contract_upload_request.py index 9935e55e..33adb5c9 100644 --- a/fireblocks/models/contract_upload_request.py +++ b/fireblocks/models/contract_upload_request.py @@ -37,7 +37,7 @@ class ContractUploadRequest(BaseModel): sourcecode: Optional[StrictStr] = Field(default=None, description="The source code of the contract. Optional.") type: Optional[StrictStr] = Field(default=None, description="The type of the contract template") docs: Optional[ContractDoc] = Field(default=None, description="A `natspec` compliant documentation json. Can be retrieved from the output json after compilation") - abi: List[List[AbiFunction]] + abi: List[AbiFunction] = Field(description="The abi of the contract template. Necessary for displaying and for after deployment encoding") attributes: Optional[ContractAttributes] = Field(default=None, description="The attributes related to this contract template. It will be displayed in the tokenization page") __properties: ClassVar[List[str]] = ["name", "description", "longDescription", "bytecode", "sourcecode", "type", "docs", "abi", "attributes"] @@ -93,14 +93,12 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of docs if self.docs: _dict['docs'] = self.docs.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in abi (list of list) + # override the default output from pydantic by calling `to_dict()` of each item in abi (list) _items = [] if self.abi: for _item in self.abi: if _item: - _items.append( - [_inner_item.to_dict() for _inner_item in _item if _inner_item is not None] - ) + _items.append(_item.to_dict()) _dict['abi'] = _items # override the default output from pydantic by calling `to_dict()` of attributes if self.attributes: @@ -124,10 +122,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sourcecode": obj.get("sourcecode"), "type": obj.get("type"), "docs": ContractDoc.from_dict(obj["docs"]) if obj.get("docs") is not None else None, - "abi": [ - [AbiFunction.from_dict(_inner_item) for _inner_item in _item] - for _item in obj["abi"] - ] if obj.get("abi") is not None else None, + "abi": [AbiFunction.from_dict(_item) for _item in obj["abi"]] if obj.get("abi") is not None else None, "attributes": ContractAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None }) return _obj diff --git a/fireblocks/models/create_token_request_dto.py b/fireblocks/models/create_token_request_dto.py index c1af60ba..f38f75b1 100644 --- a/fireblocks/models/create_token_request_dto.py +++ b/fireblocks/models/create_token_request_dto.py @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from fireblocks.models.create_token_request_dto_create_params import CreateTokenRequestDtoCreateParams from typing import Optional, Set @@ -33,7 +33,20 @@ class CreateTokenRequestDto(BaseModel): vault_account_id: StrictStr = Field(description="The id of the vault account that initiated the request to issue the token", alias="vaultAccountId") create_params: CreateTokenRequestDtoCreateParams = Field(alias="createParams") display_name: Optional[StrictStr] = Field(default=None, alias="displayName") - __properties: ClassVar[List[str]] = ["blockchainId", "assetId", "vaultAccountId", "createParams", "displayName"] + use_gasless: Optional[StrictBool] = Field(default=None, description="Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 standard. When set to true, the transaction will be relayed by a designated relayer. The workspace must be configured to use Fireblocks gasless relay.", alias="useGasless") + fee: Optional[StrictStr] = Field(default=None, description="Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field") + fee_level: Optional[StrictStr] = Field(default=None, description="Fee level for the write function transaction. interchangeable with the 'fee' field", alias="feeLevel") + __properties: ClassVar[List[str]] = ["blockchainId", "assetId", "vaultAccountId", "createParams", "displayName", "useGasless", "fee", "feeLevel"] + + @field_validator('fee_level') + def fee_level_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['LOW', 'MEDIUM', 'HIGH']): + raise ValueError("must be one of enum values ('LOW', 'MEDIUM', 'HIGH')") + return value model_config = ConfigDict( populate_by_name=True, @@ -93,7 +106,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "assetId": obj.get("assetId"), "vaultAccountId": obj.get("vaultAccountId"), "createParams": CreateTokenRequestDtoCreateParams.from_dict(obj["createParams"]) if obj.get("createParams") is not None else None, - "displayName": obj.get("displayName") + "displayName": obj.get("displayName"), + "useGasless": obj.get("useGasless"), + "fee": obj.get("fee"), + "feeLevel": obj.get("feeLevel") }) return _obj diff --git a/fireblocks/models/related_request_dto.py b/fireblocks/models/related_request_dto.py index 686d85b7..3aa54961 100644 --- a/fireblocks/models/related_request_dto.py +++ b/fireblocks/models/related_request_dto.py @@ -18,9 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from fireblocks.models.related_request_status_type import RelatedRequestStatusType from typing import Optional, Set from typing_extensions import Self @@ -28,12 +27,19 @@ class RelatedRequestDto(BaseModel): """ RelatedRequestDto """ # noqa: E501 - status: RelatedRequestStatusType + status: StrictStr = Field(description="The status of the request") in_progress: StrictBool = Field(description="Indicates whether there is an ongoing action for this position related to this request", alias="inProgress") amount: StrictStr = Field(description="Amount of tokens to Unstake") tx_id: Optional[StrictStr] = Field(default=None, description="The transaction ID of the ongoing request", alias="txId") __properties: ClassVar[List[str]] = ["status", "inProgress", "amount", "txId"] + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['deactivating']): + raise ValueError("must be one of enum values ('deactivating')") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, diff --git a/fireblocks/models/related_request_status_type.py b/fireblocks/models/related_request_status_type.py deleted file mode 100644 index 9598686a..00000000 --- a/fireblocks/models/related_request_status_type.py +++ /dev/null @@ -1,68 +0,0 @@ -# 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 json -from enum import Enum -from typing_extensions import Self - - -class RelatedRequestStatusType(str, Enum): - """ - The status of the request - """ - - """ - allowed enum values - """ - ERROR = 'error' - CREATED = 'created' - CANCELED = 'canceled' - ACTIVATE_REQUESTED = 'activate_requested' - APPROVE_INPROGRESS = 'approve_inprogress' - APPROVE_INPROGRESS_SIGNED = 'approve_inprogress_signed' - ACTIVATE_INPROGRESS = 'activate_inprogress' - ACTIVATE_INPROGRESS_SIGNED = 'activate_inprogress_signed' - ACTIVATE_INPROGRESS_CONFIRMED = 'activate_inprogress_confirmed' - ACTIVATE_DONE = 'activate_done' - DEACTIVATE_REQUESTED = 'deactivate_requested' - DEACTIVATE_INPROGRESS = 'deactivate_inprogress' - DEACTIVATE_INPROGRESS_SIGNED = 'deactivate_inprogress_signed' - DEACTIVATE_INPROGRESS_CONFIRMED = 'deactivate_inprogress_confirmed' - DEACTIVATE_DONE = 'deactivate_done' - WITHDRAW_INPROGRESS = 'withdraw_inprogress' - WITHDRAW_REQUESTED = 'withdraw_requested' - WITHDRAW_INPROGRESS_CONFIRMED = 'withdraw_inprogress_confirmed' - WITHDRAW_DONE = 'withdraw_done' - CLAIM_REWARDS_REQUESTED = 'claim_rewards_requested' - CLAIM_REWARDS_INPROGRESS = 'claim_rewards_inprogress' - CLAIM_REWARDS_DONE = 'claim_rewards_done' - PENDING = 'pending' - PENDING_QUEUED = 'pending_queued' - ACTIVE_OFFLINE = 'active_offline' - ACTIVE_ONLINE = 'active_online' - EXITING_ONLINE = 'exiting_online' - EXITED = 'exited' - ACTIVE = 'active' - INACTIVE = 'inactive' - ACTIVATING = 'activating' - DEACTIVATING = 'deactivating' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of RelatedRequestStatusType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/fireblocks/models/screening_update_configurations_request.py b/fireblocks/models/screening_update_configurations.py similarity index 91% rename from fireblocks/models/screening_update_configurations_request.py rename to fireblocks/models/screening_update_configurations.py index 5c9e56c3..926b38f6 100644 --- a/fireblocks/models/screening_update_configurations_request.py +++ b/fireblocks/models/screening_update_configurations.py @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class ScreeningUpdateConfigurationsRequest(BaseModel): +class ScreeningUpdateConfigurations(BaseModel): """ - ScreeningUpdateConfigurationsRequest + ScreeningUpdateConfigurations """ # noqa: E501 disable_bypass: Optional[StrictBool] = Field(default=None, description="Flag to enable or disable bypass screening on tenant configuration.", alias="disableBypass") disable_unfreeze: Optional[StrictBool] = Field(default=None, description="Flag to enable or disable unfreeze of transaction frozen by policy rule on tenant configuration.", alias="disableUnfreeze") @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ScreeningUpdateConfigurationsRequest from a JSON string""" + """Create an instance of ScreeningUpdateConfigurations 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 ScreeningUpdateConfigurationsRequest from a dict""" + """Create an instance of ScreeningUpdateConfigurations from a dict""" if obj is None: return None diff --git a/fireblocks/models/search_network_ids_response.py b/fireblocks/models/search_network_ids_response.py new file mode 100644 index 00000000..f29a5e78 --- /dev/null +++ b/fireblocks/models/search_network_ids_response.py @@ -0,0 +1,98 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.network_id_response import NetworkIdResponse +from typing import Optional, Set +from typing_extensions import Self + +class SearchNetworkIdsResponse(BaseModel): + """ + SearchNetworkIdsResponse + """ # noqa: E501 + data: Optional[List[NetworkIdResponse]] = None + next: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["data", "next"] + + 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 SearchNetworkIdsResponse 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, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchNetworkIdsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [NetworkIdResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "next": obj.get("next") + }) + return _obj + + diff --git a/fireblocks/models/smart_transfer_fund_dvp_ticket.py b/fireblocks/models/smart_transfer_fund_dvp_ticket.py new file mode 100644 index 00000000..4c0610cb --- /dev/null +++ b/fireblocks/models/smart_transfer_fund_dvp_ticket.py @@ -0,0 +1,102 @@ +# 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SmartTransferFundDvpTicket(BaseModel): + """ + SmartTransferFundDvpTicket + """ # noqa: E501 + fee: Optional[StrictStr] = Field(default=None, description="Transaction fee") + fee_level: Optional[StrictStr] = Field(default=None, description="Transaction fee level.", alias="feeLevel") + note: Optional[StrictStr] = Field(default=None, description="Transaction note") + __properties: ClassVar[List[str]] = ["fee", "feeLevel", "note"] + + @field_validator('fee_level') + def fee_level_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['LOW', 'MEDIUM', 'HIGH']): + raise ValueError("must be one of enum values ('LOW', 'MEDIUM', 'HIGH')") + return value + + 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 SmartTransferFundDvpTicket 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 SmartTransferFundDvpTicket from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fee": obj.get("fee"), + "feeLevel": obj.get("feeLevel"), + "note": obj.get("note") + }) + return _obj + + diff --git a/fireblocks/models/smart_transfer_ticket.py b/fireblocks/models/smart_transfer_ticket.py index c48fc274..ced79181 100644 --- a/fireblocks/models/smart_transfer_ticket.py +++ b/fireblocks/models/smart_transfer_ticket.py @@ -33,6 +33,8 @@ class SmartTransferTicket(BaseModel): type: StrictStr = Field(description="Kind of Smart Transfer. Can be either `ASYNC` or `DVP`") direction: Optional[StrictStr] = Field(default=None, description="Direction of Smart Transfer.") status: StrictStr = Field(description="Current status of Smart Transfer ticket") + dvp_execution_status: Optional[StrictStr] = Field(default=None, description="Current status of DVP execution", alias="dvpExecutionStatus") + order_created_by_network_id: Optional[StrictStr] = Field(default=None, description="ID of network profile that created order", alias="orderCreatedByNetworkId") terms: Optional[List[Optional[SmartTransferTicketTerm]]] = Field(default=None, description="Ticket terms (legs)") expires_in: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of hours for expiration.This data is valid only it ticket not in DRAFT state and it will be used to calculate expiresAt value", alias="expiresIn") expires_at: Optional[datetime] = Field(default=None, description="Date and time at which the ticket will expire if no funding is performed.", alias="expiresAt") @@ -49,7 +51,7 @@ class SmartTransferTicket(BaseModel): updated_at: datetime = Field(description="Date and time of last ticket update.", alias="updatedAt") canceled_by_me: Optional[StrictBool] = Field(default=None, alias="canceledByMe") created_by_me: Optional[StrictBool] = Field(default=None, alias="createdByMe") - __properties: ClassVar[List[str]] = ["id", "type", "direction", "status", "terms", "expiresIn", "expiresAt", "submittedAt", "expiredAt", "canceledAt", "fulfilledAt", "externalRefId", "note", "createdByNetworkId", "createdByNetworkIdName", "canceledByNetworkIdName", "createdAt", "updatedAt", "canceledByMe", "createdByMe"] + __properties: ClassVar[List[str]] = ["id", "type", "direction", "status", "dvpExecutionStatus", "orderCreatedByNetworkId", "terms", "expiresIn", "expiresAt", "submittedAt", "expiredAt", "canceledAt", "fulfilledAt", "externalRefId", "note", "createdByNetworkId", "createdByNetworkIdName", "canceledByNetworkIdName", "createdAt", "updatedAt", "canceledByMe", "createdByMe"] @field_validator('type') def type_validate_enum(cls, value): @@ -75,6 +77,16 @@ def status_validate_enum(cls, value): raise ValueError("must be one of enum values ('DRAFT', 'PENDING_APPROVAL', 'OPEN', 'IN_SETTLEMENT', 'FULFILLED', 'EXPIRED', 'CANCELED')") return value + @field_validator('dvp_execution_status') + def dvp_execution_status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['STARTED', 'CREATING_ORDER', 'ORDER_CREATED', 'FULFILLING', 'FULFILLING_ORDER_FAILED', 'CREATING_ORDER_FAILED', 'FULFILLED']): + raise ValueError("must be one of enum values ('STARTED', 'CREATING_ORDER', 'ORDER_CREATED', 'FULFILLING', 'FULFILLING_ORDER_FAILED', 'CREATING_ORDER_FAILED', 'FULFILLED')") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -137,6 +149,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "direction": obj.get("direction"), "status": obj.get("status"), + "dvpExecutionStatus": obj.get("dvpExecutionStatus"), + "orderCreatedByNetworkId": obj.get("orderCreatedByNetworkId"), "terms": [SmartTransferTicketTerm.from_dict(_item) for _item in obj["terms"]] if obj.get("terms") is not None else None, "expiresIn": obj.get("expiresIn"), "expiresAt": obj.get("expiresAt"), diff --git a/fireblocks/models/smart_transfer_ticket_term.py b/fireblocks/models/smart_transfer_ticket_term.py index 6406ab21..817a51c4 100644 --- a/fireblocks/models/smart_transfer_ticket_term.py +++ b/fireblocks/models/smart_transfer_ticket_term.py @@ -32,6 +32,7 @@ class SmartTransferTicketTerm(BaseModel): ticket_id: StrictStr = Field(description="Unique id of Smart Transfer ticket", alias="ticketId") asset: StrictStr = Field(description="Asset name") amount: StrictStr = Field(description="Amount") + dvp_src_dst_vault_id: Optional[StrictStr] = Field(default=None, description="Identifier of the source and destination vault for DVP execution", alias="dvpSrcDstVaultId") amount_usd: Optional[StrictStr] = Field(default=None, description="Amount USD", alias="amountUsd") from_network_id: StrictStr = Field(description="Identifier of the origination Network Profile", alias="fromNetworkId") from_network_id_name: StrictStr = Field(description="Source network name", alias="fromNetworkIdName") @@ -43,7 +44,7 @@ class SmartTransferTicketTerm(BaseModel): status: StrictStr = Field(description="Ticket term status") created_at: datetime = Field(description="Date and time when the term is created.", alias="createdAt") updated_at: datetime = Field(description="Date and time of last term update.", alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "ticketId", "asset", "amount", "amountUsd", "fromNetworkId", "fromNetworkIdName", "toNetworkId", "toNetworkIdName", "txHash", "fbTxId", "txStatus", "status", "createdAt", "updatedAt"] + __properties: ClassVar[List[str]] = ["id", "ticketId", "asset", "amount", "dvpSrcDstVaultId", "amountUsd", "fromNetworkId", "fromNetworkIdName", "toNetworkId", "toNetworkIdName", "txHash", "fbTxId", "txStatus", "status", "createdAt", "updatedAt"] @field_validator('tx_status') def tx_status_validate_enum(cls, value): @@ -132,6 +133,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "ticketId": obj.get("ticketId"), "asset": obj.get("asset"), "amount": obj.get("amount"), + "dvpSrcDstVaultId": obj.get("dvpSrcDstVaultId"), "amountUsd": obj.get("amountUsd"), "fromNetworkId": obj.get("fromNetworkId"), "fromNetworkIdName": obj.get("fromNetworkIdName"), diff --git a/fireblocks/models/unstake_request_dto.py b/fireblocks/models/unstake_request_dto.py index 8b147ff4..b18beb11 100644 --- a/fireblocks/models/unstake_request_dto.py +++ b/fireblocks/models/unstake_request_dto.py @@ -31,7 +31,8 @@ class UnstakeRequestDto(BaseModel): fee: Optional[StrictStr] = Field(default=None, description="Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required.") fee_level: Optional[StrictStr] = Field(default=None, description="Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required.", alias="feeLevel") tx_note: Optional[StrictStr] = Field(default=None, description="The note to associate with the transactions.", alias="txNote") - __properties: ClassVar[List[str]] = ["id", "fee", "feeLevel", "txNote"] + amount: Optional[StrictStr] = Field(default=None, description="The number of tokens to unstake. This optional field is applicable only for liquid staking and allows for a partial unstake of the position. If not provided, the entire position will be unstaked by default.") + __properties: ClassVar[List[str]] = ["id", "fee", "feeLevel", "txNote", "amount"] model_config = ConfigDict( populate_by_name=True, @@ -87,7 +88,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "fee": obj.get("fee"), "feeLevel": obj.get("feeLevel"), - "txNote": obj.get("txNote") + "txNote": obj.get("txNote"), + "amount": obj.get("amount") }) return _obj diff --git a/fireblocks/models/write_call_function_dto.py b/fireblocks/models/write_call_function_dto.py index c4c86309..bd963815 100644 --- a/fireblocks/models/write_call_function_dto.py +++ b/fireblocks/models/write_call_function_dto.py @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from fireblocks.models.write_abi_function import WriteAbiFunction from typing import Optional, Set @@ -34,7 +34,9 @@ class WriteCallFunctionDto(BaseModel): fee_level: Optional[StrictStr] = Field(default=None, description="Fee level for the write function transaction. interchangeable with the 'fee' field", alias="feeLevel") fee: Optional[StrictStr] = Field(default=None, description="Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field") note: Optional[StrictStr] = Field(default=None, description="Custom note, not sent to the blockchain, that describes the transaction at your Fireblocks workspace") - __properties: ClassVar[List[str]] = ["vaultAccountId", "abiFunction", "amount", "feeLevel", "fee", "note"] + use_gasless: Optional[StrictBool] = Field(default=None, description="Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 standard. When set to true, the transaction will be relayed by a designated relayer. The workspace must be configured to use Fireblocks gasless relay.", alias="useGasless") + external_id: Optional[StrictStr] = Field(default=None, description="External id that can be used to identify the transaction in your system. The unique identifier of the transaction outside of Fireblocks with max length of 255 characters", alias="externalId") + __properties: ClassVar[List[str]] = ["vaultAccountId", "abiFunction", "amount", "feeLevel", "fee", "note", "useGasless", "externalId"] @field_validator('fee_level') def fee_level_validate_enum(cls, value): @@ -105,7 +107,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "amount": obj.get("amount"), "feeLevel": obj.get("feeLevel"), "fee": obj.get("fee"), - "note": obj.get("note") + "note": obj.get("note"), + "useGasless": obj.get("useGasless"), + "externalId": obj.get("externalId") }) return _obj diff --git a/pyproject.toml b/pyproject.toml index 17454308..176ccaff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fireblocks" -version = "4.0.0" +version = "0.0.0" description = "Fireblocks API" authors = ["Fireblocks "] license = "MIT License" diff --git a/setup.py b/setup.py index 97fb9b11..f0a9f52b 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "fireblocks" -VERSION = "4.0.0" +VERSION = "0.0.0" PYTHON_REQUIRES = ">=3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", diff --git a/test/test_abi_function.py b/test/test_abi_function.py index cb5a8685..199d3709 100644 --- a/test/test_abi_function.py +++ b/test/test_abi_function.py @@ -73,20 +73,6 @@ def make_instance(self, include_optional) -> AbiFunction: else: return AbiFunction( type = 'constructor', - inputs = [ - fireblocks.models.parameter.Parameter( - name = '_name', - description = 'The name of the token', - internal_type = 'string', - type = 'string', - components = [ - fireblocks.models.parameter.Parameter( - name = '_name', - description = 'The name of the token', - internal_type = 'string', - type = 'string', ) - ], ) - ], ) """ diff --git a/test/test_contract_deploy_request.py b/test/test_contract_deploy_request.py index be24b729..dee2a522 100644 --- a/test/test_contract_deploy_request.py +++ b/test/test_contract_deploy_request.py @@ -39,7 +39,10 @@ def make_instance(self, include_optional) -> ContractDeployRequest: return ContractDeployRequest( asset_id = 'ETH_TEST5', vault_account_id = '0', - constructor_parameters = [{"internalType":"string","name":"name_","type":"string","value":"TokenName"},{"internalType":"string","name":"symbol_","type":"string","value":"TokenSymbol"}] + constructor_parameters = [{"internalType":"string","name":"name_","type":"string","value":"TokenName"},{"internalType":"string","name":"symbol_","type":"string","value":"TokenSymbol"}], + use_gasless = False, + fee = '2000', + fee_level = 'MEDIUM' ) else: return ContractDeployRequest( diff --git a/test/test_contract_doc.py b/test/test_contract_doc.py index 51f29571..bef4b6fc 100644 --- a/test/test_contract_doc.py +++ b/test/test_contract_doc.py @@ -41,13 +41,13 @@ def make_instance(self, include_optional) -> ContractDoc: events = 'Upgraded(address): {"details": "Emitted when the implementation is upgraded."}', kind = 'dev', methods = {"constructor":{"details":"Initializes the contract"}}, - version = '1' + version = 1 ) else: return ContractDoc( kind = 'dev', methods = {"constructor":{"details":"Initializes the contract"}}, - version = '1', + version = 1, ) """ diff --git a/test/test_contract_template_dto.py b/test/test_contract_template_dto.py index 0e31d42f..88fdd7be 100644 --- a/test/test_contract_template_dto.py +++ b/test/test_contract_template_dto.py @@ -45,9 +45,7 @@ def make_instance(self, include_optional) -> ContractTemplateDto: - mint - burn ', - abi = [ - [{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"}] - ], + abi = [{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"}], attributes = fireblocks.models.contract_attributes.ContractAttributes( use_cases = [ '' @@ -64,7 +62,7 @@ def make_instance(self, include_optional) -> ContractTemplateDto: events = 'Upgraded(address): {"details": "Emitted when the implementation is upgraded."}', kind = 'dev', methods = {"constructor":{"details":"Initializes the contract"}}, - version = '1', ), + version = 1, ), owner = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850d', vendor = fireblocks.models.vendor_dto.VendorDto( id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b4453', @@ -80,9 +78,7 @@ def make_instance(self, include_optional) -> ContractTemplateDto: id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850d', name = 'My Contract', description = 'an ERC20 implementation', - abi = [ - [{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"}] - ], + abi = [{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"}], is_public = True, initialization_phase = 'ON_DEPLOYMENT', ) diff --git a/test/test_contract_upload_request.py b/test/test_contract_upload_request.py index c4db588c..9d7e7827 100644 --- a/test/test_contract_upload_request.py +++ b/test/test_contract_upload_request.py @@ -52,10 +52,8 @@ def make_instance(self, include_optional) -> ContractUploadRequest: events = 'Upgraded(address): {"details": "Emitted when the implementation is upgraded."}', kind = 'dev', methods = {"constructor":{"details":"Initializes the contract"}}, - version = '1', ), - abi = [ - [{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"}] - ], + version = 1, ), + abi = [{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"}], attributes = fireblocks.models.contract_attributes.ContractAttributes( use_cases = [ '' @@ -73,9 +71,7 @@ def make_instance(self, include_optional) -> ContractUploadRequest: name = 'My Contract', description = 'an ERC20 implementation', bytecode = '', - abi = [ - [{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"}] - ], + abi = [{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"}], ) """ diff --git a/test/test_create_token_request_dto.py b/test/test_create_token_request_dto.py index c57d5613..c1388f85 100644 --- a/test/test_create_token_request_dto.py +++ b/test/test_create_token_request_dto.py @@ -41,7 +41,10 @@ def make_instance(self, include_optional) -> CreateTokenRequestDto: asset_id = 'ETH_TEST5', vault_account_id = '0', create_params = None, - display_name = '' + display_name = '', + use_gasless = False, + fee = '2000', + fee_level = 'MEDIUM' ) else: return CreateTokenRequestDto( diff --git a/test/test_execute_action_request.py b/test/test_execute_action_request.py index 4fe477af..1fb74e6c 100644 --- a/test/test_execute_action_request.py +++ b/test/test_execute_action_request.py @@ -43,7 +43,8 @@ def make_instance(self, include_optional) -> ExecuteActionRequest: tx_note = 'withdraw request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d #ETH', fee = '7', fee_level = 'MEDIUM', - id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850f' + id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850f', + amount = '75' ) else: return ExecuteActionRequest( diff --git a/test/test_network_connections_api.py b/test/test_network_connections_api.py index 4aa63d92..4d82d8f4 100644 --- a/test/test_network_connections_api.py +++ b/test/test_network_connections_api.py @@ -97,6 +97,13 @@ def test_get_routing_policy_asset_groups(self) -> None: """ pass + def test_search_network_ids(self) -> None: + """Test case for search_network_ids + + Search network IDs, both local IDs and discoverable remote IDs + """ + pass + def test_set_network_id_discoverability(self) -> None: """Test case for set_network_id_discoverability diff --git a/test/test_related_request_status_type.py b/test/test_related_request_status_type.py deleted file mode 100644 index b355da88..00000000 --- a/test/test_related_request_status_type.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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.related_request_status_type import RelatedRequestStatusType - - -class TestRelatedRequestStatusType(unittest.TestCase): - """RelatedRequestStatusType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRelatedRequestStatusType(self): - """Test RelatedRequestStatusType""" - # inst = RelatedRequestStatusType() - - -if __name__ == "__main__": - unittest.main() diff --git a/test/test_screening_update_configurations_request.py b/test/test_screening_update_configurations.py similarity index 63% rename from test/test_screening_update_configurations_request.py rename to test/test_screening_update_configurations.py index 91db83e6..310bf139 100644 --- a/test/test_screening_update_configurations_request.py +++ b/test/test_screening_update_configurations.py @@ -15,13 +15,13 @@ import unittest -from fireblocks.models.screening_update_configurations_request import ( - ScreeningUpdateConfigurationsRequest, +from fireblocks.models.screening_update_configurations import ( + ScreeningUpdateConfigurations, ) -class TestScreeningUpdateConfigurationsRequest(unittest.TestCase): - """ScreeningUpdateConfigurationsRequest unit test stubs""" +class TestScreeningUpdateConfigurations(unittest.TestCase): + """ScreeningUpdateConfigurations unit test stubs""" def setUp(self): pass @@ -29,26 +29,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ScreeningUpdateConfigurationsRequest: - """Test ScreeningUpdateConfigurationsRequest + def make_instance(self, include_optional) -> ScreeningUpdateConfigurations: + """Test ScreeningUpdateConfigurations include_option 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 `ScreeningUpdateConfigurationsRequest` + # uncomment below to create an instance of `ScreeningUpdateConfigurations` """ - model = ScreeningUpdateConfigurationsRequest() + model = ScreeningUpdateConfigurations() if include_optional: - return ScreeningUpdateConfigurationsRequest( + return ScreeningUpdateConfigurations( disable_bypass = True, disable_unfreeze = True ) else: - return ScreeningUpdateConfigurationsRequest( + return ScreeningUpdateConfigurations( ) """ - def testScreeningUpdateConfigurationsRequest(self): - """Test ScreeningUpdateConfigurationsRequest""" + def testScreeningUpdateConfigurations(self): + """Test ScreeningUpdateConfigurations""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_search_network_ids_response.py b/test/test_search_network_ids_response.py new file mode 100644 index 00000000..047daf02 --- /dev/null +++ b/test/test_search_network_ids_response.py @@ -0,0 +1,63 @@ +# 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.search_network_ids_response import SearchNetworkIdsResponse + + +class TestSearchNetworkIdsResponse(unittest.TestCase): + """SearchNetworkIdsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchNetworkIdsResponse: + """Test SearchNetworkIdsResponse + include_option 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 `SearchNetworkIdsResponse` + """ + model = SearchNetworkIdsResponse() + if include_optional: + return SearchNetworkIdsResponse( + data = [ + fireblocks.models.network_id_response.NetworkIdResponse( + routing_policy = { + 'key' : null + }, + is_discoverable = True, + id = '', + name = '', ) + ], + next = '' + ) + else: + return SearchNetworkIdsResponse( + ) + """ + + def testSearchNetworkIdsResponse(self): + """Test SearchNetworkIdsResponse""" + # 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_smart_transfer_fund_dvp_ticket.py b/test/test_smart_transfer_fund_dvp_ticket.py new file mode 100644 index 00000000..f6bb2f2b --- /dev/null +++ b/test/test_smart_transfer_fund_dvp_ticket.py @@ -0,0 +1,56 @@ +# 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.smart_transfer_fund_dvp_ticket import SmartTransferFundDvpTicket + + +class TestSmartTransferFundDvpTicket(unittest.TestCase): + """SmartTransferFundDvpTicket unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SmartTransferFundDvpTicket: + """Test SmartTransferFundDvpTicket + include_option 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 `SmartTransferFundDvpTicket` + """ + model = SmartTransferFundDvpTicket() + if include_optional: + return SmartTransferFundDvpTicket( + fee = '0.001', + fee_level = 'MEDIUM', + note = 'Transaction note' + ) + else: + return SmartTransferFundDvpTicket( + ) + """ + + def testSmartTransferFundDvpTicket(self): + """Test SmartTransferFundDvpTicket""" + # 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_smart_transfer_ticket.py b/test/test_smart_transfer_ticket.py index 0bf11256..774dfeac 100644 --- a/test/test_smart_transfer_ticket.py +++ b/test/test_smart_transfer_ticket.py @@ -41,6 +41,8 @@ def make_instance(self, include_optional) -> SmartTransferTicket: type = 'ASYNC', direction = 'EXCHANGE', status = 'DRAFT', + dvp_execution_status = 'STARTED', + order_created_by_network_id = '3eaa94c5-128b-4835-bb08-3111bb6564c7', terms = [{"id":"84601ee2-b10f-4aa8-be9c-dba259a3533a","ticketId":"118320d2-761f-46c7-96cf-65e71a370b36","amount":"10.00","asset":"ETH","fromNetworkId":"947c6115-1f5f-4fb4-9fd6-a1f9dee14670","toNetworkId":"5d009697-c29b-48e0-aff8-1f4305d19dc2","status":"CREATED"},{"id":"84601ee2-b10f-4aa8-be9c-dba259a3533a","ticketId":"118320d2-761f-46c7-96cf-65e71a370b36","amount":"10.00","asset":"ETH","fromNetworkId":"947c6115-1f5f-4fb4-9fd6-a1f9dee14670","fromNetworkIdName":"Source network profile 1","toNetworkId":"5d009697-c29b-48e0-aff8-1f4305d19dc2","toNetworkIdName":"Destination network profile 1","status":"FUNDING","connectionId":"14817440-d5c8-4dbd-a754-ad415683610c","fbTxId":"79075e8c-1fd9-4c97-9575-3bd9229e5c0d","createdAt":"2023-03-01T11:23:00.000Z","updatedAt":"2023-03-01T11:23:00.000Z"},{"id":"84601ee2-b10f-4aa8-be9c-dba259a3533a","ticketId":"118320d2-761f-46c7-96cf-65e71a370b36","amount":"10.00","asset":"ETH","fromNetworkId":"947c6115-1f5f-4fb4-9fd6-a1f9dee14670","fromNetworkIdName":"Source network profile 2","toNetworkId":"5d009697-c29b-48e0-aff8-1f4305d19dc2","toNetworkIdName":"Destination network profile 2","status":"FUNDED","connectionId":"14817440-d5c8-4dbd-a754-ad415683610c","fbTxId":"79075e8c-1fd9-4c97-9575-3bd9229e5c0d","txHash":"0xb5c8bd9430b6cc87a0e2fe110ece6bf527fa4f170a4bc8cd032f768fc5219838","createdAt":"2023-03-01T11:23:00.000Z","updatedAt":"2023-03-01T11:23:00.000Z"}], expires_in = 13, expires_at = '2023-03-01T11:23Z', diff --git a/test/test_smart_transfer_ticket_filtered_response.py b/test/test_smart_transfer_ticket_filtered_response.py index a87f315c..e162a528 100644 --- a/test/test_smart_transfer_ticket_filtered_response.py +++ b/test/test_smart_transfer_ticket_filtered_response.py @@ -47,6 +47,8 @@ def make_instance(self, include_optional) -> SmartTransferTicketFilteredResponse type = 'ASYNC', direction = 'EXCHANGE', status = 'DRAFT', + dvp_execution_status = 'STARTED', + order_created_by_network_id = '3eaa94c5-128b-4835-bb08-3111bb6564c7', terms = [{"id":"84601ee2-b10f-4aa8-be9c-dba259a3533a","ticketId":"118320d2-761f-46c7-96cf-65e71a370b36","amount":"10.00","asset":"ETH","fromNetworkId":"947c6115-1f5f-4fb4-9fd6-a1f9dee14670","toNetworkId":"5d009697-c29b-48e0-aff8-1f4305d19dc2","status":"CREATED"},{"id":"84601ee2-b10f-4aa8-be9c-dba259a3533a","ticketId":"118320d2-761f-46c7-96cf-65e71a370b36","amount":"10.00","asset":"ETH","fromNetworkId":"947c6115-1f5f-4fb4-9fd6-a1f9dee14670","fromNetworkIdName":"Source network profile 1","toNetworkId":"5d009697-c29b-48e0-aff8-1f4305d19dc2","toNetworkIdName":"Destination network profile 1","status":"FUNDING","connectionId":"14817440-d5c8-4dbd-a754-ad415683610c","fbTxId":"79075e8c-1fd9-4c97-9575-3bd9229e5c0d","createdAt":"2023-03-01T11:23:00.000Z","updatedAt":"2023-03-01T11:23:00.000Z"},{"id":"84601ee2-b10f-4aa8-be9c-dba259a3533a","ticketId":"118320d2-761f-46c7-96cf-65e71a370b36","amount":"10.00","asset":"ETH","fromNetworkId":"947c6115-1f5f-4fb4-9fd6-a1f9dee14670","fromNetworkIdName":"Source network profile 2","toNetworkId":"5d009697-c29b-48e0-aff8-1f4305d19dc2","toNetworkIdName":"Destination network profile 2","status":"FUNDED","connectionId":"14817440-d5c8-4dbd-a754-ad415683610c","fbTxId":"79075e8c-1fd9-4c97-9575-3bd9229e5c0d","txHash":"0xb5c8bd9430b6cc87a0e2fe110ece6bf527fa4f170a4bc8cd032f768fc5219838","createdAt":"2023-03-01T11:23:00.000Z","updatedAt":"2023-03-01T11:23:00.000Z"}], expires_in = 13, expires_at = '2023-03-01T11:23Z', @@ -75,6 +77,8 @@ def make_instance(self, include_optional) -> SmartTransferTicketFilteredResponse type = 'ASYNC', direction = 'EXCHANGE', status = 'DRAFT', + dvp_execution_status = 'STARTED', + order_created_by_network_id = '3eaa94c5-128b-4835-bb08-3111bb6564c7', terms = [{"id":"84601ee2-b10f-4aa8-be9c-dba259a3533a","ticketId":"118320d2-761f-46c7-96cf-65e71a370b36","amount":"10.00","asset":"ETH","fromNetworkId":"947c6115-1f5f-4fb4-9fd6-a1f9dee14670","toNetworkId":"5d009697-c29b-48e0-aff8-1f4305d19dc2","status":"CREATED"},{"id":"84601ee2-b10f-4aa8-be9c-dba259a3533a","ticketId":"118320d2-761f-46c7-96cf-65e71a370b36","amount":"10.00","asset":"ETH","fromNetworkId":"947c6115-1f5f-4fb4-9fd6-a1f9dee14670","fromNetworkIdName":"Source network profile 1","toNetworkId":"5d009697-c29b-48e0-aff8-1f4305d19dc2","toNetworkIdName":"Destination network profile 1","status":"FUNDING","connectionId":"14817440-d5c8-4dbd-a754-ad415683610c","fbTxId":"79075e8c-1fd9-4c97-9575-3bd9229e5c0d","createdAt":"2023-03-01T11:23:00.000Z","updatedAt":"2023-03-01T11:23:00.000Z"},{"id":"84601ee2-b10f-4aa8-be9c-dba259a3533a","ticketId":"118320d2-761f-46c7-96cf-65e71a370b36","amount":"10.00","asset":"ETH","fromNetworkId":"947c6115-1f5f-4fb4-9fd6-a1f9dee14670","fromNetworkIdName":"Source network profile 2","toNetworkId":"5d009697-c29b-48e0-aff8-1f4305d19dc2","toNetworkIdName":"Destination network profile 2","status":"FUNDED","connectionId":"14817440-d5c8-4dbd-a754-ad415683610c","fbTxId":"79075e8c-1fd9-4c97-9575-3bd9229e5c0d","txHash":"0xb5c8bd9430b6cc87a0e2fe110ece6bf527fa4f170a4bc8cd032f768fc5219838","createdAt":"2023-03-01T11:23:00.000Z","updatedAt":"2023-03-01T11:23:00.000Z"}], expires_in = 13, expires_at = '2023-03-01T11:23Z', diff --git a/test/test_smart_transfer_ticket_response.py b/test/test_smart_transfer_ticket_response.py index d84941aa..5997d811 100644 --- a/test/test_smart_transfer_ticket_response.py +++ b/test/test_smart_transfer_ticket_response.py @@ -43,6 +43,8 @@ def make_instance(self, include_optional) -> SmartTransferTicketResponse: type = 'ASYNC', direction = 'EXCHANGE', status = 'DRAFT', + dvp_execution_status = 'STARTED', + order_created_by_network_id = '3eaa94c5-128b-4835-bb08-3111bb6564c7', terms = [{"id":"84601ee2-b10f-4aa8-be9c-dba259a3533a","ticketId":"118320d2-761f-46c7-96cf-65e71a370b36","amount":"10.00","asset":"ETH","fromNetworkId":"947c6115-1f5f-4fb4-9fd6-a1f9dee14670","toNetworkId":"5d009697-c29b-48e0-aff8-1f4305d19dc2","status":"CREATED"},{"id":"84601ee2-b10f-4aa8-be9c-dba259a3533a","ticketId":"118320d2-761f-46c7-96cf-65e71a370b36","amount":"10.00","asset":"ETH","fromNetworkId":"947c6115-1f5f-4fb4-9fd6-a1f9dee14670","fromNetworkIdName":"Source network profile 1","toNetworkId":"5d009697-c29b-48e0-aff8-1f4305d19dc2","toNetworkIdName":"Destination network profile 1","status":"FUNDING","connectionId":"14817440-d5c8-4dbd-a754-ad415683610c","fbTxId":"79075e8c-1fd9-4c97-9575-3bd9229e5c0d","createdAt":"2023-03-01T11:23:00.000Z","updatedAt":"2023-03-01T11:23:00.000Z"},{"id":"84601ee2-b10f-4aa8-be9c-dba259a3533a","ticketId":"118320d2-761f-46c7-96cf-65e71a370b36","amount":"10.00","asset":"ETH","fromNetworkId":"947c6115-1f5f-4fb4-9fd6-a1f9dee14670","fromNetworkIdName":"Source network profile 2","toNetworkId":"5d009697-c29b-48e0-aff8-1f4305d19dc2","toNetworkIdName":"Destination network profile 2","status":"FUNDED","connectionId":"14817440-d5c8-4dbd-a754-ad415683610c","fbTxId":"79075e8c-1fd9-4c97-9575-3bd9229e5c0d","txHash":"0xb5c8bd9430b6cc87a0e2fe110ece6bf527fa4f170a4bc8cd032f768fc5219838","createdAt":"2023-03-01T11:23:00.000Z","updatedAt":"2023-03-01T11:23:00.000Z"}], expires_in = 13, expires_at = '2023-03-01T11:23Z', diff --git a/test/test_smart_transfer_ticket_term.py b/test/test_smart_transfer_ticket_term.py index b86799e7..00597216 100644 --- a/test/test_smart_transfer_ticket_term.py +++ b/test/test_smart_transfer_ticket_term.py @@ -41,6 +41,7 @@ def make_instance(self, include_optional) -> SmartTransferTicketTerm: ticket_id = '900f04c3-83bc-428d-b681-aef682059637', asset = 'BTC', amount = '133.789161216184', + dvp_src_dst_vault_id = '1', amount_usd = '1333.789161216184', from_network_id = '947c6115-1f5f-4fb4-9fd6-a1f9dee14670', from_network_id_name = 'Source network profile name', diff --git a/test/test_smart_transfer_ticket_term_response.py b/test/test_smart_transfer_ticket_term_response.py index ec1751ec..aac3fbbd 100644 --- a/test/test_smart_transfer_ticket_term_response.py +++ b/test/test_smart_transfer_ticket_term_response.py @@ -45,6 +45,7 @@ def make_instance(self, include_optional) -> SmartTransferTicketTermResponse: ticket_id = '900f04c3-83bc-428d-b681-aef682059637', asset = 'BTC', amount = '133.789161216184', + dvp_src_dst_vault_id = '1', amount_usd = '1333.789161216184', from_network_id = '947c6115-1f5f-4fb4-9fd6-a1f9dee14670', from_network_id_name = 'Source network profile name', diff --git a/test/test_unstake_request_dto.py b/test/test_unstake_request_dto.py index 83a2370f..8b53dd28 100644 --- a/test/test_unstake_request_dto.py +++ b/test/test_unstake_request_dto.py @@ -40,7 +40,8 @@ def make_instance(self, include_optional) -> UnstakeRequestDto: id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850e', fee = '7', fee_level = 'MEDIUM', - tx_note = 'unstake request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d #ETH' + tx_note = 'unstake request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d #ETH', + amount = '75' ) else: return UnstakeRequestDto( diff --git a/test/test_write_call_function_dto.py b/test/test_write_call_function_dto.py index b5d6aa22..bea87ad8 100644 --- a/test/test_write_call_function_dto.py +++ b/test/test_write_call_function_dto.py @@ -69,7 +69,9 @@ def make_instance(self, include_optional) -> WriteCallFunctionDto: amount = '12.345', fee_level = 'MEDIUM', fee = '2000', - note = '' + note = '', + use_gasless = False, + external_id = '0192e4f5-924e-7bb9-8e5b-c748270feb38' ) else: return WriteCallFunctionDto(