diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 67e773c..fa9b680 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -311,6 +311,8 @@ docs/ReadAbiFunction.md docs/ReadCallFunctionDto.md docs/RedeemFundsToLinkedDDAResponse.md docs/RegisterNewAssetRequest.md +docs/RelatedRequestDto.md +docs/RelatedRequestStatusType.md docs/RelatedTransactionDto.md docs/RemoveCollateralRequestBody.md docs/RenameCosigner.md @@ -359,7 +361,9 @@ docs/SignedMessage.md docs/SignedMessageSignature.md docs/SigningKeyDto.md docs/SmartTransferApi.md +docs/SmartTransferApproveTerm.md docs/SmartTransferBadRequestResponse.md +docs/SmartTransferCoinStatistic.md docs/SmartTransferCreateTicket.md docs/SmartTransferCreateTicketTerm.md docs/SmartTransferForbiddenResponse.md @@ -369,6 +373,9 @@ docs/SmartTransferNotFoundResponse.md docs/SmartTransferSetTicketExpiration.md docs/SmartTransferSetTicketExternalId.md docs/SmartTransferSetUserGroups.md +docs/SmartTransferStatistic.md +docs/SmartTransferStatisticInflow.md +docs/SmartTransferStatisticOutflow.md docs/SmartTransferSubmitTicket.md docs/SmartTransferTicket.md docs/SmartTransferTicketFilteredResponse.md @@ -451,6 +458,7 @@ docs/TravelRuleVASP.md docs/TravelRuleValidateFullTransactionRequest.md docs/TravelRuleValidateTransactionRequest.md docs/TravelRuleValidateTransactionResponse.md +docs/TravelRuleVaspForVault.md docs/UnfreezeTransactionResponse.md docs/UnmanagedWallet.md docs/UnspentInput.md @@ -828,6 +836,8 @@ fireblocks/models/read_abi_function.py 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 @@ -874,7 +884,9 @@ fireblocks/models/settlement_response.py fireblocks/models/signed_message.py fireblocks/models/signed_message_signature.py fireblocks/models/signing_key_dto.py +fireblocks/models/smart_transfer_approve_term.py fireblocks/models/smart_transfer_bad_request_response.py +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 @@ -884,6 +896,9 @@ fireblocks/models/smart_transfer_not_found_response.py fireblocks/models/smart_transfer_set_ticket_expiration.py fireblocks/models/smart_transfer_set_ticket_external_id.py fireblocks/models/smart_transfer_set_user_groups.py +fireblocks/models/smart_transfer_statistic.py +fireblocks/models/smart_transfer_statistic_inflow.py +fireblocks/models/smart_transfer_statistic_outflow.py fireblocks/models/smart_transfer_submit_ticket.py fireblocks/models/smart_transfer_ticket.py fireblocks/models/smart_transfer_ticket_filtered_response.py @@ -962,6 +977,7 @@ fireblocks/models/travel_rule_validate_full_transaction_request.py fireblocks/models/travel_rule_validate_transaction_request.py fireblocks/models/travel_rule_validate_transaction_response.py fireblocks/models/travel_rule_vasp.py +fireblocks/models/travel_rule_vasp_for_vault.py fireblocks/models/unfreeze_transaction_response.py fireblocks/models/unmanaged_wallet.py fireblocks/models/unspent_input.py @@ -1330,6 +1346,8 @@ test/test_read_abi_function.py 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 @@ -1378,7 +1396,9 @@ test/test_signed_message.py test/test_signed_message_signature.py test/test_signing_key_dto.py test/test_smart_transfer_api.py +test/test_smart_transfer_approve_term.py test/test_smart_transfer_bad_request_response.py +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 @@ -1388,6 +1408,9 @@ test/test_smart_transfer_not_found_response.py test/test_smart_transfer_set_ticket_expiration.py test/test_smart_transfer_set_ticket_external_id.py test/test_smart_transfer_set_user_groups.py +test/test_smart_transfer_statistic.py +test/test_smart_transfer_statistic_inflow.py +test/test_smart_transfer_statistic_outflow.py test/test_smart_transfer_submit_ticket.py test/test_smart_transfer_ticket.py test/test_smart_transfer_ticket_filtered_response.py @@ -1470,6 +1493,7 @@ test/test_travel_rule_validate_full_transaction_request.py test/test_travel_rule_validate_transaction_request.py test/test_travel_rule_validate_transaction_response.py test/test_travel_rule_vasp.py +test/test_travel_rule_vasp_for_vault.py test/test_unfreeze_transaction_response.py test/test_unmanaged_wallet.py test/test_unspent_input.py diff --git a/README.md b/README.md index ca48214..0909c8a 100644 --- a/README.md +++ b/README.md @@ -251,9 +251,9 @@ Class | Method | HTTP request | Description *ComplianceScreeningConfigurationApi* | [**get_screening_configuration**](docs/ComplianceScreeningConfigurationApi.md#get_screening_configuration) | **GET** /screening/travel_rule/policy_configuration | Get Travel Rule Screening Policy Configuration *ConsoleUserApi* | [**create_console_user**](docs/ConsoleUserApi.md#create_console_user) | **POST** /management/users | Create console user *ConsoleUserApi* | [**get_console_users**](docs/ConsoleUserApi.md#get_console_users) | **GET** /management/users | Get console users -*ContractInteractionsApi* | [**get_deployed_contract_abi**](docs/ContractInteractionsApi.md#get_deployed_contract_abi) | **GET** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions | Return deployed contract's ABI -*ContractInteractionsApi* | [**read_call_function**](docs/ContractInteractionsApi.md#read_call_function) | **POST** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/read | Call a read function on a deployed contract -*ContractInteractionsApi* | [**write_call_function**](docs/ContractInteractionsApi.md#write_call_function) | **POST** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/write | Call a write function on a deployed contract +*ContractInteractionsApi* | [**get_deployed_contract_abi**](docs/ContractInteractionsApi.md#get_deployed_contract_abi) | **GET** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions | Return deployed contract's ABI +*ContractInteractionsApi* | [**read_call_function**](docs/ContractInteractionsApi.md#read_call_function) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/read | Call a read function on a deployed contract +*ContractInteractionsApi* | [**write_call_function**](docs/ContractInteractionsApi.md#write_call_function) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/write | Call a write function on a deployed contract *ContractTemplatesApi* | [**delete_contract_template_by_id**](docs/ContractTemplatesApi.md#delete_contract_template_by_id) | **DELETE** /tokenization/templates/{contractTemplateId} | Delete a contract template by id *ContractTemplatesApi* | [**deploy_contract**](docs/ContractTemplatesApi.md#deploy_contract) | **POST** /tokenization/templates/{contractTemplateId}/deploy | Deploy contract *ContractTemplatesApi* | [**get_constructor_by_contract_template_id**](docs/ContractTemplatesApi.md#get_constructor_by_contract_template_id) | **GET** /tokenization/templates/{contractTemplateId}/constructor | Return contract template's constructor @@ -362,13 +362,16 @@ Class | Method | HTTP request | Description *PolicyEditorBetaApi* | [**publish_policy_rules**](docs/PolicyEditorBetaApi.md#publish_policy_rules) | **POST** /tap/publish | Send publish request for a set of policy rules *PolicyEditorBetaApi* | [**update_draft**](docs/PolicyEditorBetaApi.md#update_draft) | **PUT** /tap/draft | Update the draft with a new set of rules *ResetDeviceApi* | [**reset_device**](docs/ResetDeviceApi.md#reset_device) | **POST** /management/users/{id}/reset_device | Resets device +*SmartTransferApi* | [**approve_dv_p_ticket_term**](docs/SmartTransferApi.md#approve_dv_p_ticket_term) | **PUT** /smart_transfers/{ticketId}/terms/{termId}/dvp/approve | Define funding source and give approve to contract to transfer asset *SmartTransferApi* | [**cancel_ticket**](docs/SmartTransferApi.md#cancel_ticket) | **PUT** /smart-transfers/{ticketId}/cancel | Cancel Ticket *SmartTransferApi* | [**create_ticket**](docs/SmartTransferApi.md#create_ticket) | **POST** /smart-transfers | Create Ticket *SmartTransferApi* | [**create_ticket_term**](docs/SmartTransferApi.md#create_ticket_term) | **POST** /smart-transfers/{ticketId}/terms | Create leg (term) *SmartTransferApi* | [**find_ticket_by_id**](docs/SmartTransferApi.md#find_ticket_by_id) | **GET** /smart-transfers/{ticketId} | Search Tickets by ID *SmartTransferApi* | [**find_ticket_term_by_id**](docs/SmartTransferApi.md#find_ticket_term_by_id) | **GET** /smart-transfers/{ticketId}/terms/{termId} | Search ticket by leg (term) ID *SmartTransferApi* | [**fulfill_ticket**](docs/SmartTransferApi.md#fulfill_ticket) | **PUT** /smart-transfers/{ticketId}/fulfill | Fund ticket manually +*SmartTransferApi* | [**fund_dvp_ticket**](docs/SmartTransferApi.md#fund_dvp_ticket) | **PUT** /smart_transfers/{ticketId}/dvp/fund | Fund dvp ticket *SmartTransferApi* | [**fund_ticket_term**](docs/SmartTransferApi.md#fund_ticket_term) | **PUT** /smart-transfers/{ticketId}/terms/{termId}/fund | Define funding source +*SmartTransferApi* | [**get_smart_transfer_statistic**](docs/SmartTransferApi.md#get_smart_transfer_statistic) | **GET** /smart_transfers/statistic | Get smart transfers statistic *SmartTransferApi* | [**get_smart_transfer_user_groups**](docs/SmartTransferApi.md#get_smart_transfer_user_groups) | **GET** /smart-transfers/settings/user-groups | Get user group *SmartTransferApi* | [**manually_fund_ticket_term**](docs/SmartTransferApi.md#manually_fund_ticket_term) | **PUT** /smart-transfers/{ticketId}/terms/{termId}/manually-fund | Manually add term transaction *SmartTransferApi* | [**remove_ticket_term**](docs/SmartTransferApi.md#remove_ticket_term) | **DELETE** /smart-transfers/{ticketId}/terms/{termId} | Delete ticket leg (term) @@ -413,8 +416,10 @@ Class | Method | HTTP request | Description *TransactionsApi* | [**set_transaction_confirmation_threshold**](docs/TransactionsApi.md#set_transaction_confirmation_threshold) | **POST** /transactions/{txId}/set_confirmation_threshold | Set confirmation threshold by transaction ID *TransactionsApi* | [**unfreeze_transaction**](docs/TransactionsApi.md#unfreeze_transaction) | **POST** /transactions/{txId}/unfreeze | Unfreeze a transaction *TransactionsApi* | [**validate_address**](docs/TransactionsApi.md#validate_address) | **GET** /transactions/validate_address/{assetId}/{address} | Validate destination address +*TravelRuleBetaApi* | [**get_vasp_for_vault**](docs/TravelRuleBetaApi.md#get_vasp_for_vault) | **GET** /screening/travel_rule/vault/{vaultAccountId}/vasp | Get assigned VASP to vault *TravelRuleBetaApi* | [**get_vaspby_did**](docs/TravelRuleBetaApi.md#get_vaspby_did) | **GET** /screening/travel_rule/vasp/{did} | Get VASP details *TravelRuleBetaApi* | [**get_vasps**](docs/TravelRuleBetaApi.md#get_vasps) | **GET** /screening/travel_rule/vasp | Get All VASPs +*TravelRuleBetaApi* | [**set_vasp_for_vault**](docs/TravelRuleBetaApi.md#set_vasp_for_vault) | **POST** /screening/travel_rule/vault/{vaultAccountId}/vasp | Assign VASP to vault *TravelRuleBetaApi* | [**update_vasp**](docs/TravelRuleBetaApi.md#update_vasp) | **PUT** /screening/travel_rule/vasp/update | Add jsonDidKey to VASP details *TravelRuleBetaApi* | [**validate_full_travel_rule_transaction**](docs/TravelRuleBetaApi.md#validate_full_travel_rule_transaction) | **POST** /screening/travel_rule/transaction/validate/full | Validate Full Travel Rule Transaction *TravelRuleBetaApi* | [**validate_travel_rule_transaction**](docs/TravelRuleBetaApi.md#validate_travel_rule_transaction) | **POST** /screening/travel_rule/transaction/validate | Validate Travel Rule Transaction @@ -745,6 +750,8 @@ Class | Method | HTTP request | Description - [ReadCallFunctionDto](docs/ReadCallFunctionDto.md) - [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) @@ -791,7 +798,9 @@ Class | Method | HTTP request | Description - [SignedMessage](docs/SignedMessage.md) - [SignedMessageSignature](docs/SignedMessageSignature.md) - [SigningKeyDto](docs/SigningKeyDto.md) + - [SmartTransferApproveTerm](docs/SmartTransferApproveTerm.md) - [SmartTransferBadRequestResponse](docs/SmartTransferBadRequestResponse.md) + - [SmartTransferCoinStatistic](docs/SmartTransferCoinStatistic.md) - [SmartTransferCreateTicket](docs/SmartTransferCreateTicket.md) - [SmartTransferCreateTicketTerm](docs/SmartTransferCreateTicketTerm.md) - [SmartTransferForbiddenResponse](docs/SmartTransferForbiddenResponse.md) @@ -801,6 +810,9 @@ Class | Method | HTTP request | Description - [SmartTransferSetTicketExpiration](docs/SmartTransferSetTicketExpiration.md) - [SmartTransferSetTicketExternalId](docs/SmartTransferSetTicketExternalId.md) - [SmartTransferSetUserGroups](docs/SmartTransferSetUserGroups.md) + - [SmartTransferStatistic](docs/SmartTransferStatistic.md) + - [SmartTransferStatisticInflow](docs/SmartTransferStatisticInflow.md) + - [SmartTransferStatisticOutflow](docs/SmartTransferStatisticOutflow.md) - [SmartTransferSubmitTicket](docs/SmartTransferSubmitTicket.md) - [SmartTransferTicket](docs/SmartTransferTicket.md) - [SmartTransferTicketFilteredResponse](docs/SmartTransferTicketFilteredResponse.md) @@ -879,6 +891,7 @@ Class | Method | HTTP request | Description - [TravelRuleValidateFullTransactionRequest](docs/TravelRuleValidateFullTransactionRequest.md) - [TravelRuleValidateTransactionRequest](docs/TravelRuleValidateTransactionRequest.md) - [TravelRuleValidateTransactionResponse](docs/TravelRuleValidateTransactionResponse.md) + - [TravelRuleVaspForVault](docs/TravelRuleVaspForVault.md) - [UnfreezeTransactionResponse](docs/UnfreezeTransactionResponse.md) - [UnmanagedWallet](docs/UnmanagedWallet.md) - [UnspentInput](docs/UnspentInput.md) diff --git a/docs/ContractInteractionsApi.md b/docs/ContractInteractionsApi.md index b5e395f..dc04d60 100644 --- a/docs/ContractInteractionsApi.md +++ b/docs/ContractInteractionsApi.md @@ -4,13 +4,13 @@ All URIs are relative to *https://api.fireblocks.io/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_deployed_contract_abi**](ContractInteractionsApi.md#get_deployed_contract_abi) | **GET** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions | Return deployed contract's ABI -[**read_call_function**](ContractInteractionsApi.md#read_call_function) | **POST** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/read | Call a read function on a deployed contract -[**write_call_function**](ContractInteractionsApi.md#write_call_function) | **POST** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/write | Call a write function on a deployed contract +[**get_deployed_contract_abi**](ContractInteractionsApi.md#get_deployed_contract_abi) | **GET** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions | Return deployed contract's ABI +[**read_call_function**](ContractInteractionsApi.md#read_call_function) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/read | Call a read function on a deployed contract +[**write_call_function**](ContractInteractionsApi.md#write_call_function) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/write | Call a write function on a deployed contract # **get_deployed_contract_abi** -> ContractAbiResponseDto get_deployed_contract_abi(contract_address, asset_id, idempotency_key=idempotency_key) +> ContractAbiResponseDto get_deployed_contract_abi(contract_address, base_asset_id, idempotency_key=idempotency_key) Return deployed contract's ABI @@ -42,12 +42,12 @@ configuration = ClientConfiguration( # Enter a context with an instance of the API client with Fireblocks(configuration) as fireblocks: contract_address = '0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66' # str | The contract's onchain address - asset_id = 'asset_id_example' # str | + base_asset_id = 'base_asset_id_example' # str | 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: # Return deployed contract's ABI - api_response = fireblocks.contract_interactions.get_deployed_contract_abi(contract_address, asset_id, idempotency_key=idempotency_key).result() + api_response = fireblocks.contract_interactions.get_deployed_contract_abi(contract_address, base_asset_id, idempotency_key=idempotency_key).result() print("The response of ContractInteractionsApi->get_deployed_contract_abi:\n") pprint(api_response) except Exception as e: @@ -62,7 +62,7 @@ with Fireblocks(configuration) as fireblocks: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contract_address** | **str**| The contract's onchain address | - **asset_id** | **str**| | + **base_asset_id** | **str**| | **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 @@ -88,7 +88,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) # **read_call_function** -> List[ParameterWithValue] read_call_function(contract_address, asset_id, read_call_function_dto, idempotency_key=idempotency_key) +> List[ParameterWithValue] read_call_function(contract_address, base_asset_id, read_call_function_dto, idempotency_key=idempotency_key) Call a read function on a deployed contract @@ -121,13 +121,13 @@ configuration = ClientConfiguration( # Enter a context with an instance of the API client with Fireblocks(configuration) as fireblocks: contract_address = '0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66' # str | The contract's onchain address - asset_id = 'asset_id_example' # str | + base_asset_id = 'base_asset_id_example' # str | read_call_function_dto = fireblocks.ReadCallFunctionDto() # ReadCallFunctionDto | 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: # Call a read function on a deployed contract - api_response = fireblocks.contract_interactions.read_call_function(contract_address, asset_id, read_call_function_dto, idempotency_key=idempotency_key).result() + api_response = fireblocks.contract_interactions.read_call_function(contract_address, base_asset_id, read_call_function_dto, idempotency_key=idempotency_key).result() print("The response of ContractInteractionsApi->read_call_function:\n") pprint(api_response) except Exception as e: @@ -142,7 +142,7 @@ with Fireblocks(configuration) as fireblocks: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contract_address** | **str**| The contract's onchain address | - **asset_id** | **str**| | + **base_asset_id** | **str**| | **read_call_function_dto** | [**ReadCallFunctionDto**](ReadCallFunctionDto.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] @@ -169,7 +169,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) # **write_call_function** -> WriteCallFunctionResponseDto write_call_function(contract_address, asset_id, write_call_function_dto, idempotency_key=idempotency_key) +> WriteCallFunctionResponseDto write_call_function(contract_address, base_asset_id, write_call_function_dto, idempotency_key=idempotency_key) Call a write function on a deployed contract @@ -202,13 +202,13 @@ configuration = ClientConfiguration( # Enter a context with an instance of the API client with Fireblocks(configuration) as fireblocks: contract_address = '0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66' # str | The contract's onchain address - asset_id = 'asset_id_example' # str | + base_asset_id = 'base_asset_id_example' # str | write_call_function_dto = fireblocks.WriteCallFunctionDto() # WriteCallFunctionDto | 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: # Call a write function on a deployed contract - api_response = fireblocks.contract_interactions.write_call_function(contract_address, asset_id, write_call_function_dto, idempotency_key=idempotency_key).result() + api_response = fireblocks.contract_interactions.write_call_function(contract_address, base_asset_id, write_call_function_dto, idempotency_key=idempotency_key).result() print("The response of ContractInteractionsApi->write_call_function:\n") pprint(api_response) except Exception as e: @@ -223,7 +223,7 @@ with Fireblocks(configuration) as fireblocks: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contract_address** | **str**| The contract's onchain address | - **asset_id** | **str**| | + **base_asset_id** | **str**| | **write_call_function_dto** | [**WriteCallFunctionDto**](WriteCallFunctionDto.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] diff --git a/docs/CreateTokenRequestDtoCreateParams.md b/docs/CreateTokenRequestDtoCreateParams.md index e3f5b78..93f9d9e 100644 --- a/docs/CreateTokenRequestDtoCreateParams.md +++ b/docs/CreateTokenRequestDtoCreateParams.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **contract_id** | **str** | The id of the contract template that will be used to create the token | -**constructor_params** | **List[List[ParameterWithValue]]** | The constructor parameters and values of the contract template | [optional] +**deploy_function_params** | [**List[ParameterWithValue]**](ParameterWithValue.md) | The deploy function parameters and values of the contract template | [optional] **symbol** | **str** | The symbol of the token | **name** | **str** | The name of the token | **issuer_address** | **str** | The address of the issuer of this token. Will be part of the identifier of this token on chain. | diff --git a/docs/DelegationDto.md b/docs/DelegationDto.md index ee171d7..39755ad 100644 --- a/docs/DelegationDto.md +++ b/docs/DelegationDto.md @@ -12,7 +12,8 @@ Name | Type | Description | Notes **chain_descriptor** | **str** | The protocol identifier (e.g. \"ETH\"/ \"SOL\") to use | **amount** | **str** | Amount of tokens to stake, measured in the staked asset unit. | **rewards_amount** | **str** | The amount staked in the position, measured in the staked asset unit. | -**date_created** | **str** | When was the request made (ISO Date). | +**date_created** | **datetime** | When was the request made (ISO Date). | +**date_updated** | **datetime** | When has the position last changed (ISO Date). | [optional] **status** | **str** | The current status. | **related_transactions** | [**List[RelatedTransactionDto]**](RelatedTransactionDto.md) | An array of transaction objects related to this position. Each object includes a 'txId' representing the transaction ID and a 'completed' boolean indicating if the transaction was completed. | **validator_address** | **str** | The destination address of the staking transaction. | @@ -21,6 +22,7 @@ Name | Type | Description | Notes **in_progress** | **bool** | Indicates whether there is an ongoing action for this position (true if ongoing, false if not). | **in_progress_tx_id** | **str** | The transaction ID of the ongoing request | [optional] **blockchain_position_info** | [**SolanaBlockchainDataDto**](SolanaBlockchainDataDto.md) | Additional fields per blockchain - can be empty or missing if not initialized or no additional info exists. The type depends on the chainDescriptor value. For Solana (SOL), stake account address. For Ethereum (ETH), an empty object is returned as no specific data is available. | +**related_requests** | [**List[RelatedRequestDto]**](RelatedRequestDto.md) | An array of partial unstake requests for this position, relevant only for the Lido provider. Each object includes the status of the unstake request, a boolean indicating whether the action is in progress, the amount of tokens to unstake, and the transaction ID of the request. With Lido, a position may have multiple partial unstake requests in different states. This field is optional and not applicable for other providers. | [optional] ## Example diff --git a/docs/DeployedContractsApi.md b/docs/DeployedContractsApi.md index 21ef4c5..7def71d 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, asset_id=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, template_id=template_id) List deployed contracts data @@ -352,12 +352,12 @@ with Fireblocks(configuration) as fireblocks: page_cursor = 'MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA==' # str | Page cursor to get the next page (optional) 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) - asset_id = 'asset_id_example' # str | (optional) + base_asset_id = 'base_asset_id_example' # str | (optional) template_id = '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, asset_id=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, template_id=template_id).result() print("The response of DeployedContractsApi->get_deployed_contracts:\n") pprint(api_response) except Exception as e: @@ -374,7 +374,7 @@ Name | Type | Description | Notes **page_cursor** | **str**| Page cursor to get the next page | [optional] **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] - **asset_id** | **str**| | [optional] + **base_asset_id** | **str**| | [optional] **template_id** | **str**| | [optional] ### Return type diff --git a/docs/EVMTokenCreateParamsDto.md b/docs/EVMTokenCreateParamsDto.md index 9ab9035..cc20993 100644 --- a/docs/EVMTokenCreateParamsDto.md +++ b/docs/EVMTokenCreateParamsDto.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **contract_id** | **str** | The id of the contract template that will be used to create the token | -**constructor_params** | **List[List[ParameterWithValue]]** | The constructor parameters and values of the contract template | [optional] +**deploy_function_params** | [**List[ParameterWithValue]**](ParameterWithValue.md) | The deploy function parameters and values of the contract template | [optional] ## Example diff --git a/docs/LeanAbiFunction.md b/docs/LeanAbiFunction.md index 0ab6c3a..59cb0c2 100644 --- a/docs/LeanAbiFunction.md +++ b/docs/LeanAbiFunction.md @@ -7,6 +7,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | The function name | [optional] **inputs** | [**List[ParameterWithValue]**](ParameterWithValue.md) | The function inputs | +**outputs** | [**List[ParameterWithValue]**](ParameterWithValue.md) | The function outputs | [optional] +**state_mutability** | **str** | The state mutability of the function (e.g., view, pure, nonpayable, payable) | [optional] ## Example diff --git a/docs/RelatedRequestDto.md b/docs/RelatedRequestDto.md new file mode 100644 index 0000000..2bde55b --- /dev/null +++ b/docs/RelatedRequestDto.md @@ -0,0 +1,32 @@ +# RelatedRequestDto + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**RelatedRequestStatusType**](RelatedRequestStatusType.md) | | +**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] + +## Example + +```python +from fireblocks.models.related_request_dto import RelatedRequestDto + +# TODO update the JSON string below +json = "{}" +# create an instance of RelatedRequestDto from a JSON string +related_request_dto_instance = RelatedRequestDto.from_json(json) +# print the JSON string representation of the object +print(RelatedRequestDto.to_json()) + +# convert the object into a dict +related_request_dto_dict = related_request_dto_instance.to_dict() +# create an instance of RelatedRequestDto from a dict +related_request_dto_from_dict = RelatedRequestDto.from_dict(related_request_dto_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/RelatedRequestStatusType.md b/docs/RelatedRequestStatusType.md new file mode 100644 index 0000000..d093042 --- /dev/null +++ b/docs/RelatedRequestStatusType.md @@ -0,0 +1,12 @@ +# 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/SmartTransferApi.md b/docs/SmartTransferApi.md index b8668cd..cff7749 100644 --- a/docs/SmartTransferApi.md +++ b/docs/SmartTransferApi.md @@ -4,13 +4,16 @@ All URIs are relative to *https://api.fireblocks.io/v1* Method | HTTP request | Description ------------- | ------------- | ------------- +[**approve_dv_p_ticket_term**](SmartTransferApi.md#approve_dv_p_ticket_term) | **PUT** /smart_transfers/{ticketId}/terms/{termId}/dvp/approve | Define funding source and give approve to contract to transfer asset [**cancel_ticket**](SmartTransferApi.md#cancel_ticket) | **PUT** /smart-transfers/{ticketId}/cancel | Cancel Ticket [**create_ticket**](SmartTransferApi.md#create_ticket) | **POST** /smart-transfers | Create Ticket [**create_ticket_term**](SmartTransferApi.md#create_ticket_term) | **POST** /smart-transfers/{ticketId}/terms | Create leg (term) [**find_ticket_by_id**](SmartTransferApi.md#find_ticket_by_id) | **GET** /smart-transfers/{ticketId} | Search Tickets by ID [**find_ticket_term_by_id**](SmartTransferApi.md#find_ticket_term_by_id) | **GET** /smart-transfers/{ticketId}/terms/{termId} | Search ticket by leg (term) ID [**fulfill_ticket**](SmartTransferApi.md#fulfill_ticket) | **PUT** /smart-transfers/{ticketId}/fulfill | Fund ticket manually +[**fund_dvp_ticket**](SmartTransferApi.md#fund_dvp_ticket) | **PUT** /smart_transfers/{ticketId}/dvp/fund | Fund dvp ticket [**fund_ticket_term**](SmartTransferApi.md#fund_ticket_term) | **PUT** /smart-transfers/{ticketId}/terms/{termId}/fund | Define funding source +[**get_smart_transfer_statistic**](SmartTransferApi.md#get_smart_transfer_statistic) | **GET** /smart_transfers/statistic | Get smart transfers statistic [**get_smart_transfer_user_groups**](SmartTransferApi.md#get_smart_transfer_user_groups) | **GET** /smart-transfers/settings/user-groups | Get user group [**manually_fund_ticket_term**](SmartTransferApi.md#manually_fund_ticket_term) | **PUT** /smart-transfers/{ticketId}/terms/{termId}/manually-fund | Manually add term transaction [**remove_ticket_term**](SmartTransferApi.md#remove_ticket_term) | **DELETE** /smart-transfers/{ticketId}/terms/{termId} | Delete ticket leg (term) @@ -22,6 +25,89 @@ Method | HTTP request | Description [**update_ticket_term**](SmartTransferApi.md#update_ticket_term) | **PUT** /smart-transfers/{ticketId}/terms/{termId} | Update ticket leg (term) +# **approve_dv_p_ticket_term** +> SmartTransferTicketTermResponse approve_dv_p_ticket_term(ticket_id, term_id, smart_transfer_approve_term, idempotency_key=idempotency_key) + +Define funding source and give approve to contract to transfer asset + +Set funding source for ticket term and creating approving transaction for contract to transfer asset + +### Example + + +```python +from fireblocks.models.smart_transfer_approve_term import SmartTransferApproveTerm +from fireblocks.models.smart_transfer_ticket_term_response import SmartTransferTicketTermResponse +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: + ticket_id = 'ticket_id_example' # str | + term_id = 'term_id_example' # str | + smart_transfer_approve_term = fireblocks.SmartTransferApproveTerm() # SmartTransferApproveTerm | + 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: + # Define funding source and give approve to contract to transfer asset + api_response = fireblocks.smart_transfer.approve_dv_p_ticket_term(ticket_id, term_id, smart_transfer_approve_term, idempotency_key=idempotency_key).result() + print("The response of SmartTransferApi->approve_dv_p_ticket_term:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SmartTransferApi->approve_dv_p_ticket_term: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ticket_id** | **str**| | + **term_id** | **str**| | + **smart_transfer_approve_term** | [**SmartTransferApproveTerm**](SmartTransferApproveTerm.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 + +[**SmartTransferTicketTermResponse**](SmartTransferTicketTermResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Creating approval transaction started | - | +**403** | Unauthorized | - | +**404** | Not found | - | +**422** | Bad Request | - | + +[[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) + # **cancel_ticket** > SmartTransferTicketResponse cancel_ticket(ticket_id, idempotency_key=idempotency_key) @@ -488,6 +574,84 @@ 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) + +Fund dvp ticket + +Create or fulfill dvp ticket order + +### Example + + +```python +from fireblocks.models.smart_transfer_ticket_response import SmartTransferTicketResponse +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: + ticket_id = 'ticket_id_example' # str | + 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() + print("The response of SmartTransferApi->fund_dvp_ticket:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SmartTransferApi->fund_dvp_ticket: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ticket_id** | **str**| | + **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 + +[**SmartTransferTicketResponse**](SmartTransferTicketResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully started creating or fulfilling order on dvp Smart Transfer ticket | - | +**403** | Unauthorized | - | +**404** | Not found | - | +**422** | Bad Request | - | + +[[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_ticket_term** > SmartTransferTicketTermResponse fund_ticket_term(ticket_id, term_id, smart_transfer_fund_term, idempotency_key=idempotency_key) @@ -571,6 +735,77 @@ 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_smart_transfer_statistic** +> SmartTransferStatistic get_smart_transfer_statistic() + +Get smart transfers statistic + +Get smart transfer statistic + +### Example + + +```python +from fireblocks.models.smart_transfer_statistic import SmartTransferStatistic +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: + + try: + # Get smart transfers statistic + api_response = fireblocks.smart_transfer.get_smart_transfer_statistic().result() + print("The response of SmartTransferApi->get_smart_transfer_statistic:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SmartTransferApi->get_smart_transfer_statistic: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**SmartTransferStatistic**](SmartTransferStatistic.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Smart Transfer ticket statistic returned successfully | - | +**403** | Unauthorized | - | +**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) + # **get_smart_transfer_user_groups** > SmartTransferUserGroupsResponse get_smart_transfer_user_groups() @@ -836,7 +1071,7 @@ with Fireblocks(configuration) as fireblocks: created_by_me = True # bool | Filter created tickets by created by self or by others. Optional (optional) expires_after = '2013-10-20T19:20:30+01:00' # datetime | Lower bound of search range. Optional (optional) expires_before = '2013-10-20T19:20:30+01:00' # datetime | Upper bound of search range. Optional (optional) - type = 'type_example' # str | Type of transfer. ASYNC executes transfers as they are funded, ATOMIC executes all terms (legs) as one atomic transfer (optional) + type = 'type_example' # str | Type of transfer. ASYNC executes transfers as they are funded, DVP executes all terms (legs) as one dvp transfer (optional) external_ref_id = 'external_ref_id_example' # str | External ref. ID that workspace can use to identify ticket outside of Fireblocks system. (optional) after = 'after_example' # str | ID of the record after which to fetch $limit records (optional) limit = 3.4 # float | Number of records to fetch. By default, it is 100 (optional) @@ -863,7 +1098,7 @@ Name | Type | Description | Notes **created_by_me** | **bool**| Filter created tickets by created by self or by others. Optional | [optional] **expires_after** | **datetime**| Lower bound of search range. Optional | [optional] **expires_before** | **datetime**| Upper bound of search range. Optional | [optional] - **type** | **str**| Type of transfer. ASYNC executes transfers as they are funded, ATOMIC executes all terms (legs) as one atomic transfer | [optional] + **type** | **str**| Type of transfer. ASYNC executes transfers as they are funded, DVP executes all terms (legs) as one dvp transfer | [optional] **external_ref_id** | **str**| External ref. ID that workspace can use to identify ticket outside of Fireblocks system. | [optional] **after** | **str**| ID of the record after which to fetch $limit records | [optional] **limit** | **float**| Number of records to fetch. By default, it is 100 | [optional] diff --git a/docs/SmartTransferApproveTerm.md b/docs/SmartTransferApproveTerm.md new file mode 100644 index 0000000..c474876 --- /dev/null +++ b/docs/SmartTransferApproveTerm.md @@ -0,0 +1,34 @@ +# SmartTransferApproveTerm + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | Asset name | +**amount** | **str** | Amount | +**src_id** | **str** | Id of the vault that is used as the source of the asset. | +**fee** | **str** | Transaction fee | [optional] +**fee_level** | **str** | Transaction fee level. | [optional] +**note** | **str** | Transaction note | [optional] + +## Example + +```python +from fireblocks.models.smart_transfer_approve_term import SmartTransferApproveTerm + +# TODO update the JSON string below +json = "{}" +# create an instance of SmartTransferApproveTerm from a JSON string +smart_transfer_approve_term_instance = SmartTransferApproveTerm.from_json(json) +# print the JSON string representation of the object +print(SmartTransferApproveTerm.to_json()) + +# convert the object into a dict +smart_transfer_approve_term_dict = smart_transfer_approve_term_instance.to_dict() +# create an instance of SmartTransferApproveTerm from a dict +smart_transfer_approve_term_from_dict = SmartTransferApproveTerm.from_dict(smart_transfer_approve_term_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/SmartTransferCoinStatistic.md b/docs/SmartTransferCoinStatistic.md new file mode 100644 index 0000000..7595be8 --- /dev/null +++ b/docs/SmartTransferCoinStatistic.md @@ -0,0 +1,31 @@ +# SmartTransferCoinStatistic + +Smart transfer coin statistic + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | [optional] +**amount** | **str** | | [optional] + +## Example + +```python +from fireblocks.models.smart_transfer_coin_statistic import SmartTransferCoinStatistic + +# TODO update the JSON string below +json = "{}" +# create an instance of SmartTransferCoinStatistic from a JSON string +smart_transfer_coin_statistic_instance = SmartTransferCoinStatistic.from_json(json) +# print the JSON string representation of the object +print(SmartTransferCoinStatistic.to_json()) + +# convert the object into a dict +smart_transfer_coin_statistic_dict = smart_transfer_coin_statistic_instance.to_dict() +# create an instance of SmartTransferCoinStatistic from a dict +smart_transfer_coin_statistic_from_dict = SmartTransferCoinStatistic.from_dict(smart_transfer_coin_statistic_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/SmartTransferStatistic.md b/docs/SmartTransferStatistic.md new file mode 100644 index 0000000..b82b28d --- /dev/null +++ b/docs/SmartTransferStatistic.md @@ -0,0 +1,33 @@ +# SmartTransferStatistic + +Smart transfers statistic + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inflow** | [**SmartTransferStatisticInflow**](SmartTransferStatisticInflow.md) | | +**outflow** | [**SmartTransferStatisticOutflow**](SmartTransferStatisticOutflow.md) | | +**total_active_tickets** | **int** | Number of total active tickets | +**total_inactive_tickets** | **int** | Number of total inactive tickets (expired, canceled, completed) | + +## Example + +```python +from fireblocks.models.smart_transfer_statistic import SmartTransferStatistic + +# TODO update the JSON string below +json = "{}" +# create an instance of SmartTransferStatistic from a JSON string +smart_transfer_statistic_instance = SmartTransferStatistic.from_json(json) +# print the JSON string representation of the object +print(SmartTransferStatistic.to_json()) + +# convert the object into a dict +smart_transfer_statistic_dict = smart_transfer_statistic_instance.to_dict() +# create an instance of SmartTransferStatistic from a dict +smart_transfer_statistic_from_dict = SmartTransferStatistic.from_dict(smart_transfer_statistic_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/SmartTransferStatisticInflow.md b/docs/SmartTransferStatisticInflow.md new file mode 100644 index 0000000..a1b1b6e --- /dev/null +++ b/docs/SmartTransferStatisticInflow.md @@ -0,0 +1,31 @@ +# SmartTransferStatisticInflow + +Inflow tickets data + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**coins** | [**List[SmartTransferCoinStatistic]**](SmartTransferCoinStatistic.md) | | [optional] +**ticket_count** | **int** | | [optional] + +## Example + +```python +from fireblocks.models.smart_transfer_statistic_inflow import SmartTransferStatisticInflow + +# TODO update the JSON string below +json = "{}" +# create an instance of SmartTransferStatisticInflow from a JSON string +smart_transfer_statistic_inflow_instance = SmartTransferStatisticInflow.from_json(json) +# print the JSON string representation of the object +print(SmartTransferStatisticInflow.to_json()) + +# convert the object into a dict +smart_transfer_statistic_inflow_dict = smart_transfer_statistic_inflow_instance.to_dict() +# create an instance of SmartTransferStatisticInflow from a dict +smart_transfer_statistic_inflow_from_dict = SmartTransferStatisticInflow.from_dict(smart_transfer_statistic_inflow_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/SmartTransferStatisticOutflow.md b/docs/SmartTransferStatisticOutflow.md new file mode 100644 index 0000000..2ef76d5 --- /dev/null +++ b/docs/SmartTransferStatisticOutflow.md @@ -0,0 +1,31 @@ +# SmartTransferStatisticOutflow + +Outflow tickets data + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**coins** | [**List[SmartTransferCoinStatistic]**](SmartTransferCoinStatistic.md) | | [optional] +**ticket_count** | **int** | | [optional] + +## Example + +```python +from fireblocks.models.smart_transfer_statistic_outflow import SmartTransferStatisticOutflow + +# TODO update the JSON string below +json = "{}" +# create an instance of SmartTransferStatisticOutflow from a JSON string +smart_transfer_statistic_outflow_instance = SmartTransferStatisticOutflow.from_json(json) +# print the JSON string representation of the object +print(SmartTransferStatisticOutflow.to_json()) + +# convert the object into a dict +smart_transfer_statistic_outflow_dict = smart_transfer_statistic_outflow_instance.to_dict() +# create an instance of SmartTransferStatisticOutflow from a dict +smart_transfer_statistic_outflow_from_dict = SmartTransferStatisticOutflow.from_dict(smart_transfer_statistic_outflow_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 0d368a7..668c153 100644 --- a/docs/SmartTransferTicket.md +++ b/docs/SmartTransferTicket.md @@ -7,7 +7,7 @@ Data object with result data Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique id of Smart Transfer ticket | -**type** | **str** | Kind of Smart Transfer. Can be either `ASYNC` or `ATOMIC` | +**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 | **terms** | [**List[SmartTransferTicketTerm]**](SmartTransferTicketTerm.md) | Ticket terms (legs) | [optional] diff --git a/docs/TransactionRequest.md b/docs/TransactionRequest.md index 70c61ca..4062e39 100644 --- a/docs/TransactionRequest.md +++ b/docs/TransactionRequest.md @@ -31,7 +31,7 @@ Name | Type | Description | Notes **auto_staking** | **bool** | This feature is no longer supported. | [optional] **network_staking** | [**TransactionRequestNetworkStaking**](TransactionRequestNetworkStaking.md) | | [optional] **cpu_staking** | [**TransactionRequestNetworkStaking**](TransactionRequestNetworkStaking.md) | | [optional] -**use_gasless** | **bool** | - Override the default gaslsess configuration by sending true\\false | [optional] +**use_gasless** | **bool** | - Override the default gasless configuration by sending true\\false | [optional] ## Example diff --git a/docs/TravelRuleBetaApi.md b/docs/TravelRuleBetaApi.md index ab210c7..fe1d785 100644 --- a/docs/TravelRuleBetaApi.md +++ b/docs/TravelRuleBetaApi.md @@ -4,13 +4,89 @@ All URIs are relative to *https://api.fireblocks.io/v1* Method | HTTP request | Description ------------- | ------------- | ------------- +[**get_vasp_for_vault**](TravelRuleBetaApi.md#get_vasp_for_vault) | **GET** /screening/travel_rule/vault/{vaultAccountId}/vasp | Get assigned VASP to vault [**get_vaspby_did**](TravelRuleBetaApi.md#get_vaspby_did) | **GET** /screening/travel_rule/vasp/{did} | Get VASP details [**get_vasps**](TravelRuleBetaApi.md#get_vasps) | **GET** /screening/travel_rule/vasp | Get All VASPs +[**set_vasp_for_vault**](TravelRuleBetaApi.md#set_vasp_for_vault) | **POST** /screening/travel_rule/vault/{vaultAccountId}/vasp | Assign VASP to vault [**update_vasp**](TravelRuleBetaApi.md#update_vasp) | **PUT** /screening/travel_rule/vasp/update | Add jsonDidKey to VASP details [**validate_full_travel_rule_transaction**](TravelRuleBetaApi.md#validate_full_travel_rule_transaction) | **POST** /screening/travel_rule/transaction/validate/full | Validate Full Travel Rule Transaction [**validate_travel_rule_transaction**](TravelRuleBetaApi.md#validate_travel_rule_transaction) | **POST** /screening/travel_rule/transaction/validate | Validate Travel Rule Transaction +# **get_vasp_for_vault** +> TravelRuleVaspForVault get_vasp_for_vault(vault_account_id) + +Get assigned VASP to vault + +Get assigned VASP Did for a specific vault. Returns empty string vaspDid value in response if none assigned. + +### Example + + +```python +from fireblocks.models.travel_rule_vasp_for_vault import TravelRuleVaspForVault +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: + vault_account_id = '1' # str | The ID of the vault account + + try: + # Get assigned VASP to vault + api_response = fireblocks.travel_rule_beta.get_vasp_for_vault(vault_account_id).result() + print("The response of TravelRuleBetaApi->get_vasp_for_vault:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TravelRuleBetaApi->get_vasp_for_vault: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **vault_account_id** | **str**| The ID of the vault account | + +### Return type + +[**TravelRuleVaspForVault**](TravelRuleVaspForVault.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | * 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) + # **get_vaspby_did** > TravelRuleVASP get_vaspby_did(did, fields=fields) @@ -167,6 +243,84 @@ 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) +# **set_vasp_for_vault** +> TravelRuleVaspForVault set_vasp_for_vault(vault_account_id, travel_rule_vasp_for_vault, idempotency_key=idempotency_key) + +Assign VASP to vault + +Sets the VASP Did for a specific vault. Pass empty string to remove existing one. + +### Example + + +```python +from fireblocks.models.travel_rule_vasp_for_vault import TravelRuleVaspForVault +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: + vault_account_id = 'vault_account_id_example' # str | The ID of the vault account + travel_rule_vasp_for_vault = fireblocks.TravelRuleVaspForVault() # TravelRuleVaspForVault | + 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: + # Assign VASP to vault + api_response = fireblocks.travel_rule_beta.set_vasp_for_vault(vault_account_id, travel_rule_vasp_for_vault, idempotency_key=idempotency_key).result() + print("The response of TravelRuleBetaApi->set_vasp_for_vault:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TravelRuleBetaApi->set_vasp_for_vault: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **vault_account_id** | **str**| The ID of the vault account | + **travel_rule_vasp_for_vault** | [**TravelRuleVaspForVault**](TravelRuleVaspForVault.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 + +[**TravelRuleVaspForVault**](TravelRuleVaspForVault.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | * 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) + # **update_vasp** > TravelRuleUpdateVASPDetails update_vasp(travel_rule_update_vasp_details, idempotency_key=idempotency_key) diff --git a/docs/TravelRuleVaspForVault.md b/docs/TravelRuleVaspForVault.md new file mode 100644 index 0000000..f6cccbf --- /dev/null +++ b/docs/TravelRuleVaspForVault.md @@ -0,0 +1,29 @@ +# TravelRuleVaspForVault + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vasp_did** | **str** | VASP DID | [optional] + +## Example + +```python +from fireblocks.models.travel_rule_vasp_for_vault import TravelRuleVaspForVault + +# TODO update the JSON string below +json = "{}" +# create an instance of TravelRuleVaspForVault from a JSON string +travel_rule_vasp_for_vault_instance = TravelRuleVaspForVault.from_json(json) +# print the JSON string representation of the object +print(TravelRuleVaspForVault.to_json()) + +# convert the object into a dict +travel_rule_vasp_for_vault_dict = travel_rule_vasp_for_vault_instance.to_dict() +# create an instance of TravelRuleVaspForVault from a dict +travel_rule_vasp_for_vault_from_dict = TravelRuleVaspForVault.from_dict(travel_rule_vasp_for_vault_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/fireblocks/__init__.py b/fireblocks/__init__.py index c532906..1a737c3 100644 --- a/fireblocks/__init__.py +++ b/fireblocks/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "3.0.0" +__version__ = "0.0.0" # import apis into sdk package from fireblocks.api.api_user_api import ApiUserApi @@ -509,6 +509,8 @@ 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 @@ -581,9 +583,11 @@ from fireblocks.models.signed_message import SignedMessage from fireblocks.models.signed_message_signature import SignedMessageSignature from fireblocks.models.signing_key_dto import SigningKeyDto +from fireblocks.models.smart_transfer_approve_term import SmartTransferApproveTerm from fireblocks.models.smart_transfer_bad_request_response import ( SmartTransferBadRequestResponse, ) +from fireblocks.models.smart_transfer_coin_statistic import SmartTransferCoinStatistic from fireblocks.models.smart_transfer_create_ticket import SmartTransferCreateTicket from fireblocks.models.smart_transfer_create_ticket_term import ( SmartTransferCreateTicketTerm, @@ -605,6 +609,13 @@ SmartTransferSetTicketExternalId, ) from fireblocks.models.smart_transfer_set_user_groups import SmartTransferSetUserGroups +from fireblocks.models.smart_transfer_statistic import SmartTransferStatistic +from fireblocks.models.smart_transfer_statistic_inflow import ( + SmartTransferStatisticInflow, +) +from fireblocks.models.smart_transfer_statistic_outflow import ( + SmartTransferStatisticOutflow, +) from fireblocks.models.smart_transfer_submit_ticket import SmartTransferSubmitTicket from fireblocks.models.smart_transfer_ticket import SmartTransferTicket from fireblocks.models.smart_transfer_ticket_filtered_response import ( @@ -739,6 +750,7 @@ from fireblocks.models.travel_rule_validate_transaction_response import ( TravelRuleValidateTransactionResponse, ) +from fireblocks.models.travel_rule_vasp_for_vault import TravelRuleVaspForVault from fireblocks.models.unfreeze_transaction_response import UnfreezeTransactionResponse from fireblocks.models.unmanaged_wallet import UnmanagedWallet from fireblocks.models.unspent_input import UnspentInput diff --git a/fireblocks/api/contract_interactions_api.py b/fireblocks/api/contract_interactions_api.py index bf12d1c..e6dd238 100644 --- a/fireblocks/api/contract_interactions_api.py +++ b/fireblocks/api/contract_interactions_api.py @@ -50,7 +50,7 @@ def __init__(self, api_client=None) -> None: def get_deployed_contract_abi( self, contract_address: Annotated[StrictStr, Field(description="The contract's onchain address")], - asset_id: StrictStr, + base_asset_id: StrictStr, 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, @@ -71,8 +71,8 @@ def get_deployed_contract_abi( :param contract_address: The contract's onchain address (required) :type contract_address: str - :param asset_id: (required) - :type asset_id: str + :param base_asset_id: (required) + :type base_asset_id: str :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 @@ -98,11 +98,11 @@ def get_deployed_contract_abi( """ # noqa: E501 validate_not_empty_string(function_name="get_deployed_contract_abi", param_name="contract_address", param_value=contract_address) - validate_not_empty_string(function_name="get_deployed_contract_abi", param_name="asset_id", param_value=asset_id) + validate_not_empty_string(function_name="get_deployed_contract_abi", param_name="base_asset_id", param_value=base_asset_id) _param = self._get_deployed_contract_abi_serialize( contract_address=contract_address, - asset_id=asset_id, + base_asset_id=base_asset_id, idempotency_key=idempotency_key, _request_auth=_request_auth, _content_type=_content_type, @@ -124,7 +124,7 @@ def get_deployed_contract_abi( def _get_deployed_contract_abi_serialize( self, contract_address, - asset_id, + base_asset_id, idempotency_key, _request_auth, _content_type, @@ -147,8 +147,8 @@ def _get_deployed_contract_abi_serialize( # process the path parameters if contract_address is not None: _path_params['contractAddress'] = contract_address - if asset_id is not None: - _path_params['assetId'] = asset_id + if base_asset_id is not None: + _path_params['baseAssetId'] = base_asset_id # process the query parameters # process the header parameters if idempotency_key is not None: @@ -171,7 +171,7 @@ def _get_deployed_contract_abi_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions', + resource_path='/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -191,7 +191,7 @@ def _get_deployed_contract_abi_serialize( def read_call_function( self, contract_address: Annotated[StrictStr, Field(description="The contract's onchain address")], - asset_id: StrictStr, + base_asset_id: StrictStr, read_call_function_dto: ReadCallFunctionDto, 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[ @@ -213,8 +213,8 @@ def read_call_function( :param contract_address: The contract's onchain address (required) :type contract_address: str - :param asset_id: (required) - :type asset_id: str + :param base_asset_id: (required) + :type base_asset_id: str :param read_call_function_dto: (required) :type read_call_function_dto: ReadCallFunctionDto :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. @@ -242,11 +242,11 @@ def read_call_function( """ # noqa: E501 validate_not_empty_string(function_name="read_call_function", param_name="contract_address", param_value=contract_address) - validate_not_empty_string(function_name="read_call_function", param_name="asset_id", param_value=asset_id) + validate_not_empty_string(function_name="read_call_function", param_name="base_asset_id", param_value=base_asset_id) _param = self._read_call_function_serialize( contract_address=contract_address, - asset_id=asset_id, + base_asset_id=base_asset_id, read_call_function_dto=read_call_function_dto, idempotency_key=idempotency_key, _request_auth=_request_auth, @@ -269,7 +269,7 @@ def read_call_function( def _read_call_function_serialize( self, contract_address, - asset_id, + base_asset_id, read_call_function_dto, idempotency_key, _request_auth, @@ -293,8 +293,8 @@ def _read_call_function_serialize( # process the path parameters if contract_address is not None: _path_params['contractAddress'] = contract_address - if asset_id is not None: - _path_params['assetId'] = asset_id + if base_asset_id is not None: + _path_params['baseAssetId'] = base_asset_id # process the query parameters # process the header parameters if idempotency_key is not None: @@ -332,7 +332,7 @@ def _read_call_function_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/read', + resource_path='/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/read', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -352,7 +352,7 @@ def _read_call_function_serialize( def write_call_function( self, contract_address: Annotated[StrictStr, Field(description="The contract's onchain address")], - asset_id: StrictStr, + base_asset_id: StrictStr, write_call_function_dto: WriteCallFunctionDto, 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[ @@ -374,8 +374,8 @@ def write_call_function( :param contract_address: The contract's onchain address (required) :type contract_address: str - :param asset_id: (required) - :type asset_id: str + :param base_asset_id: (required) + :type base_asset_id: str :param write_call_function_dto: (required) :type write_call_function_dto: WriteCallFunctionDto :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. @@ -403,11 +403,11 @@ def write_call_function( """ # noqa: E501 validate_not_empty_string(function_name="write_call_function", param_name="contract_address", param_value=contract_address) - validate_not_empty_string(function_name="write_call_function", param_name="asset_id", param_value=asset_id) + validate_not_empty_string(function_name="write_call_function", param_name="base_asset_id", param_value=base_asset_id) _param = self._write_call_function_serialize( contract_address=contract_address, - asset_id=asset_id, + base_asset_id=base_asset_id, write_call_function_dto=write_call_function_dto, idempotency_key=idempotency_key, _request_auth=_request_auth, @@ -430,7 +430,7 @@ def write_call_function( def _write_call_function_serialize( self, contract_address, - asset_id, + base_asset_id, write_call_function_dto, idempotency_key, _request_auth, @@ -454,8 +454,8 @@ def _write_call_function_serialize( # process the path parameters if contract_address is not None: _path_params['contractAddress'] = contract_address - if asset_id is not None: - _path_params['assetId'] = asset_id + if base_asset_id is not None: + _path_params['baseAssetId'] = base_asset_id # process the query parameters # process the header parameters if idempotency_key is not None: @@ -493,7 +493,7 @@ def _write_call_function_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/write', + resource_path='/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/write', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/fireblocks/api/deployed_contracts_api.py b/fireblocks/api/deployed_contracts_api.py index 481b4f9..c0e3c5d 100644 --- a/fireblocks/api/deployed_contracts_api.py +++ b/fireblocks/api/deployed_contracts_api.py @@ -604,7 +604,7 @@ def get_deployed_contracts( page_cursor: Annotated[Optional[StrictStr], Field(description="Page cursor to get the next page")] = None, 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, - asset_id: Optional[StrictStr] = None, + base_asset_id: Optional[StrictStr] = None, template_id: Optional[StrictStr] = None, _request_timeout: Union[ None, @@ -629,8 +629,8 @@ def get_deployed_contracts( :type page_size: float :param contract_address: The contract's onchain address :type contract_address: str - :param asset_id: - :type asset_id: str + :param base_asset_id: + :type base_asset_id: str :param template_id: :type template_id: str :param _request_timeout: timeout setting for this request. If one @@ -660,7 +660,7 @@ def get_deployed_contracts( page_cursor=page_cursor, page_size=page_size, contract_address=contract_address, - asset_id=asset_id, + base_asset_id=base_asset_id, template_id=template_id, _request_auth=_request_auth, _content_type=_content_type, @@ -684,7 +684,7 @@ def _get_deployed_contracts_serialize( page_cursor, page_size, contract_address, - asset_id, + base_asset_id, template_id, _request_auth, _content_type, @@ -718,9 +718,9 @@ def _get_deployed_contracts_serialize( _query_params.append(('contractAddress', contract_address)) - if asset_id is not None: + if base_asset_id is not None: - _query_params.append(('assetId', asset_id)) + _query_params.append(('baseAssetId', base_asset_id)) if template_id is not None: diff --git a/fireblocks/api/smart_transfer_api.py b/fireblocks/api/smart_transfer_api.py index 24e10b9..1cb7a3d 100644 --- a/fireblocks/api/smart_transfer_api.py +++ b/fireblocks/api/smart_transfer_api.py @@ -22,6 +22,7 @@ from pydantic import Field, StrictBool, StrictStr, field_validator from typing import List, Optional, Union from typing_extensions import Annotated +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_term import SmartTransferFundTerm @@ -29,6 +30,7 @@ from fireblocks.models.smart_transfer_set_ticket_expiration import SmartTransferSetTicketExpiration from fireblocks.models.smart_transfer_set_ticket_external_id import SmartTransferSetTicketExternalId from fireblocks.models.smart_transfer_set_user_groups import SmartTransferSetUserGroups +from fireblocks.models.smart_transfer_statistic import SmartTransferStatistic from fireblocks.models.smart_transfer_submit_ticket import SmartTransferSubmitTicket from fireblocks.models.smart_transfer_ticket_filtered_response import SmartTransferTicketFilteredResponse from fireblocks.models.smart_transfer_ticket_response import SmartTransferTicketResponse @@ -55,6 +57,169 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def approve_dv_p_ticket_term( + self, + ticket_id: StrictStr, + term_id: StrictStr, + smart_transfer_approve_term: SmartTransferApproveTerm, + 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, + 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[SmartTransferTicketTermResponse]]: + """Define funding source and give approve to contract to transfer asset + + Set funding source for ticket term and creating approving transaction for contract to transfer asset + + :param ticket_id: (required) + :type ticket_id: str + :param term_id: (required) + :type term_id: str + :param smart_transfer_approve_term: (required) + :type smart_transfer_approve_term: SmartTransferApproveTerm + :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 + 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 + + validate_not_empty_string(function_name="approve_dv_p_ticket_term", param_name="ticket_id", param_value=ticket_id) + validate_not_empty_string(function_name="approve_dv_p_ticket_term", param_name="term_id", param_value=term_id) + + _param = self._approve_dv_p_ticket_term_serialize( + ticket_id=ticket_id, + term_id=term_id, + smart_transfer_approve_term=smart_transfer_approve_term, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "SmartTransferTicketTermResponse", + '403': "SmartTransferForbiddenResponse", + '404': "SmartTransferNotFoundResponse", + '422': "SmartTransferBadRequestResponse", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _approve_dv_p_ticket_term_serialize( + self, + ticket_id, + term_id, + smart_transfer_approve_term, + idempotency_key, + _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 + if ticket_id is not None: + _path_params['ticketId'] = ticket_id + if term_id is not None: + _path_params['termId'] = term_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + if smart_transfer_approve_term is not None: + _body_params = smart_transfer_approve_term + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # 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] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/smart_transfers/{ticketId}/terms/{termId}/dvp/approve', + 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 cancel_ticket( self, @@ -887,6 +1052,141 @@ def _fulfill_ticket_serialize( + @validate_call + def fund_dvp_ticket( + self, + ticket_id: StrictStr, + 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, + 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[SmartTransferTicketResponse]]: + """Fund dvp ticket + + Create or fulfill dvp ticket order + + :param ticket_id: (required) + :type ticket_id: str + :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 + 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 + + validate_not_empty_string(function_name="fund_dvp_ticket", param_name="ticket_id", param_value=ticket_id) + + _param = self._fund_dvp_ticket_serialize( + ticket_id=ticket_id, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SmartTransferTicketResponse", + '403': "SmartTransferForbiddenResponse", + '404': "SmartTransferNotFoundResponse", + '422': "SmartTransferBadRequestResponse", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _fund_dvp_ticket_serialize( + self, + ticket_id, + idempotency_key, + _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 + if ticket_id is not None: + _path_params['ticketId'] = ticket_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # 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='PUT', + resource_path='/smart_transfers/{ticketId}/dvp/fund', + 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 fund_ticket_term( self, @@ -1050,6 +1350,125 @@ def _fund_ticket_term_serialize( + @validate_call + def get_smart_transfer_statistic( + self, + _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[SmartTransferStatistic]]: + """Get smart transfers statistic + + Get smart transfer statistic + + :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._get_smart_transfer_statistic_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SmartTransferStatistic", + '403': "SmartTransferForbiddenResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_smart_transfer_statistic_serialize( + self, + _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 + # 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='/smart_transfers/statistic', + 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 get_smart_transfer_user_groups( self, @@ -1476,7 +1895,7 @@ def search_tickets( created_by_me: Annotated[Optional[StrictBool], Field(description="Filter created tickets by created by self or by others. Optional")] = None, expires_after: Annotated[Optional[datetime], Field(description="Lower bound of search range. Optional")] = None, expires_before: Annotated[Optional[datetime], Field(description="Upper bound of search range. Optional")] = None, - type: Annotated[Optional[StrictStr], Field(description="Type of transfer. ASYNC executes transfers as they are funded, ATOMIC executes all terms (legs) as one atomic transfer")] = None, + type: Annotated[Optional[StrictStr], Field(description="Type of transfer. ASYNC executes transfers as they are funded, DVP executes all terms (legs) as one dvp transfer")] = None, external_ref_id: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True, max_length=64)]], Field(description="External ref. ID that workspace can use to identify ticket outside of Fireblocks system.")] = None, after: Annotated[Optional[StrictStr], Field(description="ID of the record after which to fetch $limit records")] = None, limit: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Number of records to fetch. By default, it is 100")] = None, @@ -1509,7 +1928,7 @@ def search_tickets( :type expires_after: datetime :param expires_before: Upper bound of search range. Optional :type expires_before: datetime - :param type: Type of transfer. ASYNC executes transfers as they are funded, ATOMIC executes all terms (legs) as one atomic transfer + :param type: Type of transfer. ASYNC executes transfers as they are funded, DVP executes all terms (legs) as one dvp transfer :type type: str :param external_ref_id: External ref. ID that workspace can use to identify ticket outside of Fireblocks system. :type external_ref_id: str diff --git a/fireblocks/api/travel_rule_beta_api.py b/fireblocks/api/travel_rule_beta_api.py index 0ededd4..4eb222b 100644 --- a/fireblocks/api/travel_rule_beta_api.py +++ b/fireblocks/api/travel_rule_beta_api.py @@ -27,6 +27,7 @@ from fireblocks.models.travel_rule_validate_full_transaction_request import TravelRuleValidateFullTransactionRequest from fireblocks.models.travel_rule_validate_transaction_request import TravelRuleValidateTransactionRequest from fireblocks.models.travel_rule_validate_transaction_response import TravelRuleValidateTransactionResponse +from fireblocks.models.travel_rule_vasp_for_vault import TravelRuleVaspForVault from fireblocks.api_client import ApiClient, RequestSerialized from fireblocks.api_response import ApiResponse @@ -47,6 +48,132 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def get_vasp_for_vault( + self, + vault_account_id: Annotated[StrictStr, Field(description="The ID of the vault account")], + _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[TravelRuleVaspForVault]]: + """Get assigned VASP to vault + + Get assigned VASP Did for a specific vault. Returns empty string vaspDid value in response if none assigned. + + :param vault_account_id: The ID of the vault account (required) + :type vault_account_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 + (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 + + validate_not_empty_string(function_name="get_vasp_for_vault", param_name="vault_account_id", param_value=vault_account_id) + + _param = self._get_vasp_for_vault_serialize( + vault_account_id=vault_account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TravelRuleVaspForVault", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_vasp_for_vault_serialize( + self, + vault_account_id, + _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 + if vault_account_id is not None: + _path_params['vaultAccountId'] = vault_account_id + # process the query parameters + # 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='/screening/travel_rule/vault/{vaultAccountId}/vasp', + 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 get_vaspby_did( self, @@ -336,6 +463,159 @@ def _get_vasps_serialize( + @validate_call + def set_vasp_for_vault( + self, + vault_account_id: Annotated[StrictStr, Field(description="The ID of the vault account")], + travel_rule_vasp_for_vault: TravelRuleVaspForVault, + 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, + 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[TravelRuleVaspForVault]]: + """Assign VASP to vault + + Sets the VASP Did for a specific vault. Pass empty string to remove existing one. + + :param vault_account_id: The ID of the vault account (required) + :type vault_account_id: str + :param travel_rule_vasp_for_vault: (required) + :type travel_rule_vasp_for_vault: TravelRuleVaspForVault + :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 + 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 + + validate_not_empty_string(function_name="set_vasp_for_vault", param_name="vault_account_id", param_value=vault_account_id) + + _param = self._set_vasp_for_vault_serialize( + vault_account_id=vault_account_id, + travel_rule_vasp_for_vault=travel_rule_vasp_for_vault, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TravelRuleVaspForVault", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _set_vasp_for_vault_serialize( + self, + vault_account_id, + travel_rule_vasp_for_vault, + idempotency_key, + _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 + if vault_account_id is not None: + _path_params['vaultAccountId'] = vault_account_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + if travel_rule_vasp_for_vault is not None: + _body_params = travel_rule_vasp_for_vault + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # 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] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/screening/travel_rule/vault/{vaultAccountId}/vasp', + 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 update_vasp( self, diff --git a/fireblocks/configuration.py b/fireblocks/configuration.py index 3cb99ad..03f60c7 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: 3.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 56b1445..40a7787 100644 --- a/fireblocks/models/__init__.py +++ b/fireblocks/models/__init__.py @@ -299,6 +299,8 @@ from fireblocks.models.read_call_function_dto import ReadCallFunctionDto 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 @@ -345,7 +347,9 @@ from fireblocks.models.signed_message import SignedMessage from fireblocks.models.signed_message_signature import SignedMessageSignature from fireblocks.models.signing_key_dto import SigningKeyDto +from fireblocks.models.smart_transfer_approve_term import SmartTransferApproveTerm from fireblocks.models.smart_transfer_bad_request_response import SmartTransferBadRequestResponse +from fireblocks.models.smart_transfer_coin_statistic import SmartTransferCoinStatistic 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 @@ -355,6 +359,9 @@ from fireblocks.models.smart_transfer_set_ticket_expiration import SmartTransferSetTicketExpiration from fireblocks.models.smart_transfer_set_ticket_external_id import SmartTransferSetTicketExternalId from fireblocks.models.smart_transfer_set_user_groups import SmartTransferSetUserGroups +from fireblocks.models.smart_transfer_statistic import SmartTransferStatistic +from fireblocks.models.smart_transfer_statistic_inflow import SmartTransferStatisticInflow +from fireblocks.models.smart_transfer_statistic_outflow import SmartTransferStatisticOutflow from fireblocks.models.smart_transfer_submit_ticket import SmartTransferSubmitTicket from fireblocks.models.smart_transfer_ticket import SmartTransferTicket from fireblocks.models.smart_transfer_ticket_filtered_response import SmartTransferTicketFilteredResponse @@ -433,6 +440,7 @@ from fireblocks.models.travel_rule_validate_full_transaction_request import TravelRuleValidateFullTransactionRequest from fireblocks.models.travel_rule_validate_transaction_request import TravelRuleValidateTransactionRequest from fireblocks.models.travel_rule_validate_transaction_response import TravelRuleValidateTransactionResponse +from fireblocks.models.travel_rule_vasp_for_vault import TravelRuleVaspForVault from fireblocks.models.unfreeze_transaction_response import UnfreezeTransactionResponse from fireblocks.models.unmanaged_wallet import UnmanagedWallet from fireblocks.models.unspent_input import UnspentInput diff --git a/fireblocks/models/delegation_dto.py b/fireblocks/models/delegation_dto.py index 7dc3f97..204d6ab 100644 --- a/fireblocks/models/delegation_dto.py +++ b/fireblocks/models/delegation_dto.py @@ -18,8 +18,10 @@ import re # noqa: F401 import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.related_request_dto import RelatedRequestDto from fireblocks.models.related_transaction_dto import RelatedTransactionDto from fireblocks.models.solana_blockchain_data_dto import SolanaBlockchainDataDto from typing import Optional, Set @@ -36,7 +38,8 @@ class DelegationDto(BaseModel): chain_descriptor: StrictStr = Field(description="The protocol identifier (e.g. \"ETH\"/ \"SOL\") to use", alias="chainDescriptor") amount: StrictStr = Field(description="Amount of tokens to stake, measured in the staked asset unit.") rewards_amount: StrictStr = Field(description="The amount staked in the position, measured in the staked asset unit.", alias="rewardsAmount") - date_created: StrictStr = Field(description="When was the request made (ISO Date).", alias="dateCreated") + date_created: datetime = Field(description="When was the request made (ISO Date).", alias="dateCreated") + date_updated: Optional[datetime] = Field(default=None, description="When has the position last changed (ISO Date).", alias="dateUpdated") status: StrictStr = Field(description="The current status.") related_transactions: List[RelatedTransactionDto] = Field(description="An array of transaction objects related to this position. Each object includes a 'txId' representing the transaction ID and a 'completed' boolean indicating if the transaction was completed.", alias="relatedTransactions") validator_address: StrictStr = Field(description="The destination address of the staking transaction.", alias="validatorAddress") @@ -45,7 +48,8 @@ class DelegationDto(BaseModel): in_progress: StrictBool = Field(description="Indicates whether there is an ongoing action for this position (true if ongoing, false if not).", alias="inProgress") in_progress_tx_id: Optional[StrictStr] = Field(default=None, description="The transaction ID of the ongoing request", alias="inProgressTxId") blockchain_position_info: SolanaBlockchainDataDto = Field(description="Additional fields per blockchain - can be empty or missing if not initialized or no additional info exists. The type depends on the chainDescriptor value. For Solana (SOL), stake account address. For Ethereum (ETH), an empty object is returned as no specific data is available.", alias="blockchainPositionInfo") - __properties: ClassVar[List[str]] = ["id", "vaultAccountId", "validatorName", "providerName", "chainDescriptor", "amount", "rewardsAmount", "dateCreated", "status", "relatedTransactions", "validatorAddress", "providerId", "availableActions", "inProgress", "inProgressTxId", "blockchainPositionInfo"] + related_requests: Optional[List[RelatedRequestDto]] = Field(default=None, description="An array of partial unstake requests for this position, relevant only for the Lido provider. Each object includes the status of the unstake request, a boolean indicating whether the action is in progress, the amount of tokens to unstake, and the transaction ID of the request. With Lido, a position may have multiple partial unstake requests in different states. This field is optional and not applicable for other providers.", alias="relatedRequests") + __properties: ClassVar[List[str]] = ["id", "vaultAccountId", "validatorName", "providerName", "chainDescriptor", "amount", "rewardsAmount", "dateCreated", "dateUpdated", "status", "relatedTransactions", "validatorAddress", "providerId", "availableActions", "inProgress", "inProgressTxId", "blockchainPositionInfo", "relatedRequests"] model_config = ConfigDict( populate_by_name=True, @@ -96,6 +100,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of blockchain_position_info if self.blockchain_position_info: _dict['blockchainPositionInfo'] = self.blockchain_position_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in related_requests (list) + _items = [] + if self.related_requests: + for _item in self.related_requests: + if _item: + _items.append(_item.to_dict()) + _dict['relatedRequests'] = _items return _dict @classmethod @@ -116,6 +127,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "amount": obj.get("amount"), "rewardsAmount": obj.get("rewardsAmount"), "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), "status": obj.get("status"), "relatedTransactions": [RelatedTransactionDto.from_dict(_item) for _item in obj["relatedTransactions"]] if obj.get("relatedTransactions") is not None else None, "validatorAddress": obj.get("validatorAddress"), @@ -123,7 +135,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "availableActions": obj.get("availableActions"), "inProgress": obj.get("inProgress"), "inProgressTxId": obj.get("inProgressTxId"), - "blockchainPositionInfo": SolanaBlockchainDataDto.from_dict(obj["blockchainPositionInfo"]) if obj.get("blockchainPositionInfo") is not None else None + "blockchainPositionInfo": SolanaBlockchainDataDto.from_dict(obj["blockchainPositionInfo"]) if obj.get("blockchainPositionInfo") is not None else None, + "relatedRequests": [RelatedRequestDto.from_dict(_item) for _item in obj["relatedRequests"]] if obj.get("relatedRequests") is not None else None }) return _obj diff --git a/fireblocks/models/evm_token_create_params_dto.py b/fireblocks/models/evm_token_create_params_dto.py index f321b47..3b17f1f 100644 --- a/fireblocks/models/evm_token_create_params_dto.py +++ b/fireblocks/models/evm_token_create_params_dto.py @@ -29,8 +29,8 @@ class EVMTokenCreateParamsDto(BaseModel): EVMTokenCreateParamsDto """ # noqa: E501 contract_id: StrictStr = Field(description="The id of the contract template that will be used to create the token", alias="contractId") - constructor_params: Optional[List[List[ParameterWithValue]]] = Field(default=None, description="The constructor parameters and values of the contract template", alias="constructorParams") - __properties: ClassVar[List[str]] = ["contractId", "constructorParams"] + deploy_function_params: Optional[List[ParameterWithValue]] = Field(default=None, description="The deploy function parameters and values of the contract template", alias="deployFunctionParams") + __properties: ClassVar[List[str]] = ["contractId", "deployFunctionParams"] model_config = ConfigDict( populate_by_name=True, @@ -71,15 +71,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in constructor_params (list of list) + # override the default output from pydantic by calling `to_dict()` of each item in deploy_function_params (list) _items = [] - if self.constructor_params: - for _item in self.constructor_params: + if self.deploy_function_params: + for _item in self.deploy_function_params: if _item: - _items.append( - [_inner_item.to_dict() for _inner_item in _item if _inner_item is not None] - ) - _dict['constructorParams'] = _items + _items.append(_item.to_dict()) + _dict['deployFunctionParams'] = _items return _dict @classmethod @@ -93,10 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "contractId": obj.get("contractId"), - "constructorParams": [ - [ParameterWithValue.from_dict(_inner_item) for _inner_item in _item] - for _item in obj["constructorParams"] - ] if obj.get("constructorParams") is not None else None + "deployFunctionParams": [ParameterWithValue.from_dict(_item) for _item in obj["deployFunctionParams"]] if obj.get("deployFunctionParams") is not None else None }) return _obj diff --git a/fireblocks/models/lean_abi_function.py b/fireblocks/models/lean_abi_function.py index fa1cb34..0bf26da 100644 --- a/fireblocks/models/lean_abi_function.py +++ b/fireblocks/models/lean_abi_function.py @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +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 @@ -29,7 +29,19 @@ class LeanAbiFunction(BaseModel): """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="The function name") inputs: List[ParameterWithValue] = Field(description="The function inputs") - __properties: ClassVar[List[str]] = ["name", "inputs"] + outputs: Optional[List[ParameterWithValue]] = Field(default=None, description="The function outputs") + state_mutability: Optional[StrictStr] = Field(default=None, description="The state mutability of the function (e.g., view, pure, nonpayable, payable)", alias="stateMutability") + __properties: ClassVar[List[str]] = ["name", "inputs", "outputs", "stateMutability"] + + @field_validator('state_mutability') + def state_mutability_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['view', 'pure', 'nonpayable', 'payable']): + raise ValueError("must be one of enum values ('view', 'pure', 'nonpayable', 'payable')") + return value model_config = ConfigDict( populate_by_name=True, @@ -77,6 +89,13 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['inputs'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in outputs (list) + _items = [] + if self.outputs: + for _item in self.outputs: + if _item: + _items.append(_item.to_dict()) + _dict['outputs'] = _items return _dict @classmethod @@ -90,7 +109,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), - "inputs": [ParameterWithValue.from_dict(_item) for _item in obj["inputs"]] if obj.get("inputs") is not None else None + "inputs": [ParameterWithValue.from_dict(_item) for _item in obj["inputs"]] if obj.get("inputs") is not None else None, + "outputs": [ParameterWithValue.from_dict(_item) for _item in obj["outputs"]] if obj.get("outputs") is not None else None, + "stateMutability": obj.get("stateMutability") }) return _obj diff --git a/fireblocks/models/related_request_dto.py b/fireblocks/models/related_request_dto.py new file mode 100644 index 0000000..686d85b --- /dev/null +++ b/fireblocks/models/related_request_dto.py @@ -0,0 +1,95 @@ +# 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, StrictBool, StrictStr +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 + +class RelatedRequestDto(BaseModel): + """ + RelatedRequestDto + """ # noqa: E501 + status: RelatedRequestStatusType + 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"] + + 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 RelatedRequestDto 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 RelatedRequestDto from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "inProgress": obj.get("inProgress"), + "amount": obj.get("amount"), + "txId": obj.get("txId") + }) + return _obj + + diff --git a/fireblocks/models/related_request_status_type.py b/fireblocks/models/related_request_status_type.py new file mode 100644 index 0000000..9598686 --- /dev/null +++ b/fireblocks/models/related_request_status_type.py @@ -0,0 +1,68 @@ +# 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/smart_transfer_approve_term.py b/fireblocks/models/smart_transfer_approve_term.py new file mode 100644 index 0000000..2872b29 --- /dev/null +++ b/fireblocks/models/smart_transfer_approve_term.py @@ -0,0 +1,108 @@ +# 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 SmartTransferApproveTerm(BaseModel): + """ + SmartTransferApproveTerm + """ # noqa: E501 + asset: StrictStr = Field(description="Asset name") + amount: StrictStr = Field(description="Amount") + src_id: StrictStr = Field(description="Id of the vault that is used as the source of the asset.", alias="srcId") + 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]] = ["asset", "amount", "srcId", "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 SmartTransferApproveTerm 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 SmartTransferApproveTerm from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "amount": obj.get("amount"), + "srcId": obj.get("srcId"), + "fee": obj.get("fee"), + "feeLevel": obj.get("feeLevel"), + "note": obj.get("note") + }) + return _obj + + diff --git a/fireblocks/models/smart_transfer_coin_statistic.py b/fireblocks/models/smart_transfer_coin_statistic.py new file mode 100644 index 0000000..497d0b8 --- /dev/null +++ b/fireblocks/models/smart_transfer_coin_statistic.py @@ -0,0 +1,90 @@ +# 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 typing import Optional, Set +from typing_extensions import Self + +class SmartTransferCoinStatistic(BaseModel): + """ + Smart transfer coin statistic + """ # noqa: E501 + asset: Optional[StrictStr] = None + amount: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["asset", "amount"] + + 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 SmartTransferCoinStatistic 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 SmartTransferCoinStatistic from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "amount": obj.get("amount") + }) + return _obj + + diff --git a/fireblocks/models/smart_transfer_create_ticket.py b/fireblocks/models/smart_transfer_create_ticket.py index ad75ccd..fe8ab1c 100644 --- a/fireblocks/models/smart_transfer_create_ticket.py +++ b/fireblocks/models/smart_transfer_create_ticket.py @@ -41,8 +41,8 @@ class SmartTransferCreateTicket(BaseModel): @field_validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ASYNC']): - raise ValueError("must be one of enum values ('ASYNC')") + if value not in set(['ASYNC', 'DVP']): + raise ValueError("must be one of enum values ('ASYNC', 'DVP')") return value model_config = ConfigDict( diff --git a/fireblocks/models/smart_transfer_statistic.py b/fireblocks/models/smart_transfer_statistic.py new file mode 100644 index 0000000..e92a011 --- /dev/null +++ b/fireblocks/models/smart_transfer_statistic.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, StrictInt +from typing import Any, ClassVar, Dict, List +from fireblocks.models.smart_transfer_statistic_inflow import SmartTransferStatisticInflow +from fireblocks.models.smart_transfer_statistic_outflow import SmartTransferStatisticOutflow +from typing import Optional, Set +from typing_extensions import Self + +class SmartTransferStatistic(BaseModel): + """ + Smart transfers statistic + """ # noqa: E501 + inflow: SmartTransferStatisticInflow + outflow: SmartTransferStatisticOutflow + total_active_tickets: StrictInt = Field(description="Number of total active tickets", alias="totalActiveTickets") + total_inactive_tickets: StrictInt = Field(description="Number of total inactive tickets (expired, canceled, completed)", alias="totalInactiveTickets") + __properties: ClassVar[List[str]] = ["inflow", "outflow", "totalActiveTickets", "totalInactiveTickets"] + + 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 SmartTransferStatistic 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 inflow + if self.inflow: + _dict['inflow'] = self.inflow.to_dict() + # override the default output from pydantic by calling `to_dict()` of outflow + if self.outflow: + _dict['outflow'] = self.outflow.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SmartTransferStatistic from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inflow": SmartTransferStatisticInflow.from_dict(obj["inflow"]) if obj.get("inflow") is not None else None, + "outflow": SmartTransferStatisticOutflow.from_dict(obj["outflow"]) if obj.get("outflow") is not None else None, + "totalActiveTickets": obj.get("totalActiveTickets"), + "totalInactiveTickets": obj.get("totalInactiveTickets") + }) + return _obj + + diff --git a/fireblocks/models/smart_transfer_statistic_inflow.py b/fireblocks/models/smart_transfer_statistic_inflow.py new file mode 100644 index 0000000..551338f --- /dev/null +++ b/fireblocks/models/smart_transfer_statistic_inflow.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, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.smart_transfer_coin_statistic import SmartTransferCoinStatistic +from typing import Optional, Set +from typing_extensions import Self + +class SmartTransferStatisticInflow(BaseModel): + """ + Inflow tickets data + """ # noqa: E501 + coins: Optional[List[SmartTransferCoinStatistic]] = None + ticket_count: Optional[StrictInt] = Field(default=None, alias="ticketCount") + __properties: ClassVar[List[str]] = ["coins", "ticketCount"] + + 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 SmartTransferStatisticInflow 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 coins (list) + _items = [] + if self.coins: + for _item in self.coins: + if _item: + _items.append(_item.to_dict()) + _dict['coins'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SmartTransferStatisticInflow from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "coins": [SmartTransferCoinStatistic.from_dict(_item) for _item in obj["coins"]] if obj.get("coins") is not None else None, + "ticketCount": obj.get("ticketCount") + }) + return _obj + + diff --git a/fireblocks/models/smart_transfer_statistic_outflow.py b/fireblocks/models/smart_transfer_statistic_outflow.py new file mode 100644 index 0000000..6c8676c --- /dev/null +++ b/fireblocks/models/smart_transfer_statistic_outflow.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, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.smart_transfer_coin_statistic import SmartTransferCoinStatistic +from typing import Optional, Set +from typing_extensions import Self + +class SmartTransferStatisticOutflow(BaseModel): + """ + Outflow tickets data + """ # noqa: E501 + coins: Optional[List[SmartTransferCoinStatistic]] = None + ticket_count: Optional[StrictInt] = Field(default=None, alias="ticketCount") + __properties: ClassVar[List[str]] = ["coins", "ticketCount"] + + 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 SmartTransferStatisticOutflow 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 coins (list) + _items = [] + if self.coins: + for _item in self.coins: + if _item: + _items.append(_item.to_dict()) + _dict['coins'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SmartTransferStatisticOutflow from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "coins": [SmartTransferCoinStatistic.from_dict(_item) for _item in obj["coins"]] if obj.get("coins") is not None else None, + "ticketCount": obj.get("ticketCount") + }) + return _obj + + diff --git a/fireblocks/models/smart_transfer_ticket.py b/fireblocks/models/smart_transfer_ticket.py index 63b7bb3..c48fc27 100644 --- a/fireblocks/models/smart_transfer_ticket.py +++ b/fireblocks/models/smart_transfer_ticket.py @@ -30,7 +30,7 @@ class SmartTransferTicket(BaseModel): Data object with result data """ # noqa: E501 id: StrictStr = Field(description="Unique id of Smart Transfer ticket") - type: StrictStr = Field(description="Kind of Smart Transfer. Can be either `ASYNC` or `ATOMIC`") + 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") terms: Optional[List[Optional[SmartTransferTicketTerm]]] = Field(default=None, description="Ticket terms (legs)") @@ -54,8 +54,8 @@ class SmartTransferTicket(BaseModel): @field_validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ASYNC']): - raise ValueError("must be one of enum values ('ASYNC')") + if value not in set(['ASYNC', 'DVP']): + raise ValueError("must be one of enum values ('ASYNC', 'DVP')") return value @field_validator('direction') diff --git a/fireblocks/models/transaction_request.py b/fireblocks/models/transaction_request.py index e823659..be0fdd6 100644 --- a/fireblocks/models/transaction_request.py +++ b/fireblocks/models/transaction_request.py @@ -65,7 +65,7 @@ class TransactionRequest(BaseModel): auto_staking: Optional[StrictBool] = Field(default=None, description="This feature is no longer supported.", alias="autoStaking") network_staking: Optional[TransactionRequestNetworkStaking] = Field(default=None, alias="networkStaking") cpu_staking: Optional[TransactionRequestNetworkStaking] = Field(default=None, alias="cpuStaking") - use_gasless: Optional[StrictBool] = Field(default=None, description="- Override the default gaslsess configuration by sending true\\false", alias="useGasless") + use_gasless: Optional[StrictBool] = Field(default=None, description="- Override the default gasless configuration by sending true\\false", alias="useGasless") __properties: ClassVar[List[str]] = ["operation", "note", "externalTxId", "assetId", "source", "destination", "destinations", "amount", "treatAsGrossAmount", "forceSweep", "feeLevel", "fee", "priorityFee", "failOnLowFee", "maxFee", "maxTotalFee", "gasLimit", "gasPrice", "networkFee", "replaceTxByHash", "extraParameters", "customerRefId", "travelRuleMessage", "autoStaking", "networkStaking", "cpuStaking", "useGasless"] @field_validator('fee_level') diff --git a/fireblocks/models/travel_rule_vasp_for_vault.py b/fireblocks/models/travel_rule_vasp_for_vault.py new file mode 100644 index 0000000..bb9ea4f --- /dev/null +++ b/fireblocks/models/travel_rule_vasp_for_vault.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TravelRuleVaspForVault(BaseModel): + """ + TravelRuleVaspForVault + """ # noqa: E501 + vasp_did: Optional[StrictStr] = Field(default=None, description="VASP DID", alias="vaspDid") + __properties: ClassVar[List[str]] = ["vaspDid"] + + 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 TravelRuleVaspForVault 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 TravelRuleVaspForVault from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vaspDid": obj.get("vaspDid") + }) + return _obj + + diff --git a/pyproject.toml b/pyproject.toml index 6e00a0c..176ccaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fireblocks" -version = "3.0.0" +version = "0.0.0" description = "Fireblocks API" authors = ["Fireblocks "] license = "MIT License" diff --git a/setup.py b/setup.py index d2e71f9..f0a9f52 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "fireblocks" -VERSION = "3.0.0" +VERSION = "0.0.0" PYTHON_REQUIRES = ">=3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", diff --git a/test/test_create_token_request_dto_create_params.py b/test/test_create_token_request_dto_create_params.py index 35c561b..6af43b1 100644 --- a/test/test_create_token_request_dto_create_params.py +++ b/test/test_create_token_request_dto_create_params.py @@ -40,7 +40,7 @@ def make_instance(self, include_optional) -> CreateTokenRequestDtoCreateParams: if include_optional: return CreateTokenRequestDtoCreateParams( contract_id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850d', - constructor_params = [{internalType=string, name=name, type=string, value=name}, {internalType=string, name=symbol, type=string, value=symbol}, {components=[{internalType=bool, name=_isMintable, type=bool}], internalType=struct MyStruct, name=customConfigProps, type=tuple, value=[{internalType=bool, name=_isMintable, type=bool, value=false}]}], + deploy_function_params = [{internalType=string, name=name, type=string, value=name}, {internalType=string, name=symbol, type=string, value=symbol}, {components=[{internalType=bool, name=_isMintable, type=bool}], internalType=struct MyStruct, name=customConfigProps, type=tuple, value=[{internalType=bool, name=_isMintable, type=bool, value=false}]}], symbol = 'MyUSDT', name = 'My USD Tether', issuer_address = 'rnDV4JiwgRNhudPY2sm65AzECpRXaasL4r' diff --git a/test/test_delegation_dto.py b/test/test_delegation_dto.py index 3fca6e8..4c4c605 100644 --- a/test/test_delegation_dto.py +++ b/test/test_delegation_dto.py @@ -45,6 +45,7 @@ def make_instance(self, include_optional) -> DelegationDto: amount = '0.05', rewards_amount = '0.000856038', date_created = '2023-07-13T15:55:34.256Z', + date_updated = '2023-07-13T15:55:34.256Z', status = 'active', related_transactions = [{"txId":"b70601f4-d7b1-4795-a8ee-b09cdb4r850d","completed":true},{"txId":"c80601f4-d7b1-4795-a8ee-b09cdb5b450c","completed":false}], validator_address = 'FwR3PbjS5iyqzLiLugrBqKSa5EKZ4vK9SKs7eQXtT59f', @@ -53,7 +54,8 @@ def make_instance(self, include_optional) -> DelegationDto: in_progress = True, in_progress_tx_id = 'c80601f4-d7b1-4795-a8ee-b09cdb5b450c', blockchain_position_info = fireblocks.models.solana_blockchain_data_dto.SolanaBlockchainDataDto( - stake_account_address = '3Ru67FyzMTcdENmmRL4Eve4dtPd6AdpuypR21q5EQCdq', ) + stake_account_address = '3Ru67FyzMTcdENmmRL4Eve4dtPd6AdpuypR21q5EQCdq', ), + related_requests = [{"status":"deactivating","inProgress":false,"amount":"0.05","txId":"c80601f4-d7b1-4795-a8ee-b09cdb5b450c"}] ) else: return DelegationDto( diff --git a/test/test_evm_token_create_params_dto.py b/test/test_evm_token_create_params_dto.py index 02406aa..2c4dc86 100644 --- a/test/test_evm_token_create_params_dto.py +++ b/test/test_evm_token_create_params_dto.py @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> EVMTokenCreateParamsDto: if include_optional: return EVMTokenCreateParamsDto( contract_id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850d', - constructor_params = [{"internalType":"string","name":"name","type":"string","value":"name"},{"internalType":"string","name":"symbol","type":"string","value":"symbol"},{"components":[{"internalType":"bool","name":"_isMintable","type":"bool"}],"internalType":"struct MyStruct","name":"customConfigProps","type":"tuple","value":[{"internalType":"bool","name":"_isMintable","type":"bool","value":false}]}] + deploy_function_params = [{"internalType":"string","name":"name","type":"string","value":"name"},{"internalType":"string","name":"symbol","type":"string","value":"symbol"},{"components":[{"internalType":"bool","name":"_isMintable","type":"bool"}],"internalType":"struct MyStruct","name":"customConfigProps","type":"tuple","value":[{"internalType":"bool","name":"_isMintable","type":"bool","value":false}]}] ) else: return EVMTokenCreateParamsDto( diff --git a/test/test_lean_abi_function.py b/test/test_lean_abi_function.py index 1153e33..b1399cc 100644 --- a/test/test_lean_abi_function.py +++ b/test/test_lean_abi_function.py @@ -53,7 +53,24 @@ def make_instance(self, include_optional) -> LeanAbiFunction: ], value = 'true', function_value = null, ) - ] + ], + outputs = [ + fireblocks.models.parameter_with_value.ParameterWithValue( + 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', ) + ], + value = 'true', + function_value = null, ) + ], + state_mutability = 'nonpayable' ) else: return LeanAbiFunction( diff --git a/test/test_parameter_with_value.py b/test/test_parameter_with_value.py index 99e26d6..1f58844 100644 --- a/test/test_parameter_with_value.py +++ b/test/test_parameter_with_value.py @@ -73,7 +73,17 @@ def make_instance(self, include_optional) -> ParameterWithValue: ], value = 'true', function_value = null, ) - ], ) + ], + outputs = [ + fireblocks.models.parameter_with_value.ParameterWithValue( + name = '_name', + description = 'The name of the token', + internal_type = 'string', + type = 'string', + value = 'true', + function_value = null, ) + ], + state_mutability = 'nonpayable', ) ) else: return ParameterWithValue( diff --git a/test/test_related_request_dto.py b/test/test_related_request_dto.py new file mode 100644 index 0000000..1388ad0 --- /dev/null +++ b/test/test_related_request_dto.py @@ -0,0 +1,60 @@ +# 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_dto import RelatedRequestDto + + +class TestRelatedRequestDto(unittest.TestCase): + """RelatedRequestDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RelatedRequestDto: + """Test RelatedRequestDto + 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 `RelatedRequestDto` + """ + model = RelatedRequestDto() + if include_optional: + return RelatedRequestDto( + status = 'deactivating', + in_progress = False, + amount = '0.05', + tx_id = 'c80601f4-d7b1-4795-a8ee-b09cdb5b450c' + ) + else: + return RelatedRequestDto( + status = 'deactivating', + in_progress = False, + amount = '0.05', + ) + """ + + def testRelatedRequestDto(self): + """Test RelatedRequestDto""" + # 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_related_request_status_type.py b/test/test_related_request_status_type.py new file mode 100644 index 0000000..b355da8 --- /dev/null +++ b/test/test_related_request_status_type.py @@ -0,0 +1,36 @@ +# 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_smart_transfer_api.py b/test/test_smart_transfer_api.py index f6f9f78..7f9b810 100644 --- a/test/test_smart_transfer_api.py +++ b/test/test_smart_transfer_api.py @@ -27,6 +27,13 @@ def setUp(self) -> None: def tearDown(self) -> None: pass + def test_approve_dv_p_ticket_term(self) -> None: + """Test case for approve_dv_p_ticket_term + + Define funding source and give approve to contract to transfer asset + """ + pass + def test_cancel_ticket(self) -> None: """Test case for cancel_ticket @@ -69,6 +76,13 @@ def test_fulfill_ticket(self) -> None: """ pass + def test_fund_dvp_ticket(self) -> None: + """Test case for fund_dvp_ticket + + Fund dvp ticket + """ + pass + def test_fund_ticket_term(self) -> None: """Test case for fund_ticket_term @@ -76,6 +90,13 @@ def test_fund_ticket_term(self) -> None: """ pass + def test_get_smart_transfer_statistic(self) -> None: + """Test case for get_smart_transfer_statistic + + Get smart transfers statistic + """ + pass + def test_get_smart_transfer_user_groups(self) -> None: """Test case for get_smart_transfer_user_groups diff --git a/test/test_smart_transfer_approve_term.py b/test/test_smart_transfer_approve_term.py new file mode 100644 index 0000000..8b36269 --- /dev/null +++ b/test/test_smart_transfer_approve_term.py @@ -0,0 +1,62 @@ +# 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_approve_term import SmartTransferApproveTerm + + +class TestSmartTransferApproveTerm(unittest.TestCase): + """SmartTransferApproveTerm unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SmartTransferApproveTerm: + """Test SmartTransferApproveTerm + 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 `SmartTransferApproveTerm` + """ + model = SmartTransferApproveTerm() + if include_optional: + return SmartTransferApproveTerm( + asset = 'USDC', + amount = '133.789161216184', + src_id = '2', + fee = '0.001', + fee_level = 'MEDIUM', + note = 'Transaction note' + ) + else: + return SmartTransferApproveTerm( + asset = 'USDC', + amount = '133.789161216184', + src_id = '2', + ) + """ + + def testSmartTransferApproveTerm(self): + """Test SmartTransferApproveTerm""" + # 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_coin_statistic.py b/test/test_smart_transfer_coin_statistic.py new file mode 100644 index 0000000..d74af54 --- /dev/null +++ b/test/test_smart_transfer_coin_statistic.py @@ -0,0 +1,55 @@ +# 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_coin_statistic import SmartTransferCoinStatistic + + +class TestSmartTransferCoinStatistic(unittest.TestCase): + """SmartTransferCoinStatistic unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SmartTransferCoinStatistic: + """Test SmartTransferCoinStatistic + 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 `SmartTransferCoinStatistic` + """ + model = SmartTransferCoinStatistic() + if include_optional: + return SmartTransferCoinStatistic( + asset = 'BTC', + amount = '15' + ) + else: + return SmartTransferCoinStatistic( + ) + """ + + def testSmartTransferCoinStatistic(self): + """Test SmartTransferCoinStatistic""" + # 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_statistic.py b/test/test_smart_transfer_statistic.py new file mode 100644 index 0000000..77aacaf --- /dev/null +++ b/test/test_smart_transfer_statistic.py @@ -0,0 +1,85 @@ +# 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_statistic import SmartTransferStatistic + + +class TestSmartTransferStatistic(unittest.TestCase): + """SmartTransferStatistic unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SmartTransferStatistic: + """Test SmartTransferStatistic + 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 `SmartTransferStatistic` + """ + model = SmartTransferStatistic() + if include_optional: + return SmartTransferStatistic( + inflow = fireblocks.models.smart_transfer_statistic_inflow.SmartTransferStatistic_inflow( + coins = [ + fireblocks.models.smart_transfer_coin_statistic.SmartTransferCoinStatistic( + asset = 'BTC', + amount = '15', ) + ], + ticket_count = 4, ), + outflow = fireblocks.models.smart_transfer_statistic_outflow.SmartTransferStatistic_outflow( + coins = [ + fireblocks.models.smart_transfer_coin_statistic.SmartTransferCoinStatistic( + asset = 'BTC', + amount = '15', ) + ], + ticket_count = 4, ), + total_active_tickets = 5, + total_inactive_tickets = 5 + ) + else: + return SmartTransferStatistic( + inflow = fireblocks.models.smart_transfer_statistic_inflow.SmartTransferStatistic_inflow( + coins = [ + fireblocks.models.smart_transfer_coin_statistic.SmartTransferCoinStatistic( + asset = 'BTC', + amount = '15', ) + ], + ticket_count = 4, ), + outflow = fireblocks.models.smart_transfer_statistic_outflow.SmartTransferStatistic_outflow( + coins = [ + fireblocks.models.smart_transfer_coin_statistic.SmartTransferCoinStatistic( + asset = 'BTC', + amount = '15', ) + ], + ticket_count = 4, ), + total_active_tickets = 5, + total_inactive_tickets = 5, + ) + """ + + def testSmartTransferStatistic(self): + """Test SmartTransferStatistic""" + # 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_statistic_inflow.py b/test/test_smart_transfer_statistic_inflow.py new file mode 100644 index 0000000..ca71045 --- /dev/null +++ b/test/test_smart_transfer_statistic_inflow.py @@ -0,0 +1,61 @@ +# 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_statistic_inflow import ( + SmartTransferStatisticInflow, +) + + +class TestSmartTransferStatisticInflow(unittest.TestCase): + """SmartTransferStatisticInflow unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SmartTransferStatisticInflow: + """Test SmartTransferStatisticInflow + 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 `SmartTransferStatisticInflow` + """ + model = SmartTransferStatisticInflow() + if include_optional: + return SmartTransferStatisticInflow( + coins = [ + fireblocks.models.smart_transfer_coin_statistic.SmartTransferCoinStatistic( + asset = 'BTC', + amount = '15', ) + ], + ticket_count = 4 + ) + else: + return SmartTransferStatisticInflow( + ) + """ + + def testSmartTransferStatisticInflow(self): + """Test SmartTransferStatisticInflow""" + # 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_statistic_outflow.py b/test/test_smart_transfer_statistic_outflow.py new file mode 100644 index 0000000..24166fd --- /dev/null +++ b/test/test_smart_transfer_statistic_outflow.py @@ -0,0 +1,61 @@ +# 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_statistic_outflow import ( + SmartTransferStatisticOutflow, +) + + +class TestSmartTransferStatisticOutflow(unittest.TestCase): + """SmartTransferStatisticOutflow unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SmartTransferStatisticOutflow: + """Test SmartTransferStatisticOutflow + 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 `SmartTransferStatisticOutflow` + """ + model = SmartTransferStatisticOutflow() + if include_optional: + return SmartTransferStatisticOutflow( + coins = [ + fireblocks.models.smart_transfer_coin_statistic.SmartTransferCoinStatistic( + asset = 'BTC', + amount = '15', ) + ], + ticket_count = 4 + ) + else: + return SmartTransferStatisticOutflow( + ) + """ + + def testSmartTransferStatisticOutflow(self): + """Test SmartTransferStatisticOutflow""" + # 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_travel_rule_beta_api.py b/test/test_travel_rule_beta_api.py index 5680a40..db5317b 100644 --- a/test/test_travel_rule_beta_api.py +++ b/test/test_travel_rule_beta_api.py @@ -27,6 +27,13 @@ def setUp(self) -> None: def tearDown(self) -> None: pass + def test_get_vasp_for_vault(self) -> None: + """Test case for get_vasp_for_vault + + Get assigned VASP to vault + """ + pass + def test_get_vaspby_did(self) -> None: """Test case for get_vaspby_did @@ -41,6 +48,13 @@ def test_get_vasps(self) -> None: """ pass + def test_set_vasp_for_vault(self) -> None: + """Test case for set_vasp_for_vault + + Assign VASP to vault + """ + pass + def test_update_vasp(self) -> None: """Test case for update_vasp diff --git a/test/test_travel_rule_vasp_for_vault.py b/test/test_travel_rule_vasp_for_vault.py new file mode 100644 index 0000000..eb2a12d --- /dev/null +++ b/test/test_travel_rule_vasp_for_vault.py @@ -0,0 +1,54 @@ +# 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.travel_rule_vasp_for_vault import TravelRuleVaspForVault + + +class TestTravelRuleVaspForVault(unittest.TestCase): + """TravelRuleVaspForVault unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TravelRuleVaspForVault: + """Test TravelRuleVaspForVault + 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 `TravelRuleVaspForVault` + """ + model = TravelRuleVaspForVault() + if include_optional: + return TravelRuleVaspForVault( + vasp_did = 'did:ethr:0x5dddec8dd669c49304ddbcba36ccc6e0798534dc' + ) + else: + return TravelRuleVaspForVault( + ) + """ + + def testTravelRuleVaspForVault(self): + """Test TravelRuleVaspForVault""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main()