diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index aed6b8a2..225cbeb1 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -55,6 +55,7 @@ docs/AddressRegistryAddVaultOptOutsRequestVaultAccountIdsInner.md docs/AddressRegistryAddVaultOptOutsResponse.md docs/AddressRegistryCreateProofOfOwnershipRequest.md docs/AddressRegistryCreateProofOfOwnershipResponse.md +docs/AddressRegistryCustomerRegistryResponse.md docs/AddressRegistryGetVaultOptOutResponse.md docs/AddressRegistryLegalEntity.md docs/AddressRegistryListVaultOptOutsResponse.md @@ -819,6 +820,7 @@ docs/PostalAddress.md docs/PreScreening.md docs/PrefundedSettlement.md docs/PrefundedSettlementType.md +docs/PricingSide.md docs/ProgramCallConfig.md docs/ProgramCallDecodedDataItem.md docs/Provider.md @@ -1023,6 +1025,7 @@ docs/SolanaInstruction.md docs/SolanaInstructionWithValue.md docs/SolanaRewardsBreakdown.md docs/SolanaSimpleCreateParams.md +docs/SorobanCallData.md docs/SourceConfig.md docs/SourceOfFunds.md docs/SourceTransferPeerPath.md @@ -1507,6 +1510,7 @@ fireblocks/models/address_registry_add_vault_opt_outs_request_vault_account_ids_ fireblocks/models/address_registry_add_vault_opt_outs_response.py fireblocks/models/address_registry_create_proof_of_ownership_request.py fireblocks/models/address_registry_create_proof_of_ownership_response.py +fireblocks/models/address_registry_customer_registry_response.py fireblocks/models/address_registry_get_vault_opt_out_response.py fireblocks/models/address_registry_legal_entity.py fireblocks/models/address_registry_list_vault_opt_outs_response.py @@ -2236,6 +2240,7 @@ fireblocks/models/postal_address.py fireblocks/models/pre_screening.py fireblocks/models/prefunded_settlement.py fireblocks/models/prefunded_settlement_type.py +fireblocks/models/pricing_side.py fireblocks/models/program_call_config.py fireblocks/models/program_call_decoded_data_item.py fireblocks/models/provider.py @@ -2436,6 +2441,7 @@ fireblocks/models/solana_instruction.py fireblocks/models/solana_instruction_with_value.py fireblocks/models/solana_rewards_breakdown.py fireblocks/models/solana_simple_create_params.py +fireblocks/models/soroban_call_data.py fireblocks/models/source_config.py fireblocks/models/source_of_funds.py fireblocks/models/source_transfer_peer_path.py @@ -2855,6 +2861,7 @@ test/test_address_registry_add_vault_opt_outs_request_vault_account_ids_inner.py test/test_address_registry_add_vault_opt_outs_response.py test/test_address_registry_create_proof_of_ownership_request.py test/test_address_registry_create_proof_of_ownership_response.py +test/test_address_registry_customer_registry_response.py test/test_address_registry_get_vault_opt_out_response.py test/test_address_registry_legal_entity.py test/test_address_registry_list_vault_opt_outs_response.py @@ -3620,6 +3627,7 @@ test/test_postal_address.py test/test_pre_screening.py test/test_prefunded_settlement.py test/test_prefunded_settlement_type.py +test/test_pricing_side.py test/test_program_call_config.py test/test_program_call_decoded_data_item.py test/test_provider.py @@ -3824,6 +3832,7 @@ test/test_solana_instruction.py test/test_solana_instruction_with_value.py test/test_solana_rewards_breakdown.py test/test_solana_simple_create_params.py +test/test_soroban_call_data.py test/test_source_config.py test/test_source_of_funds.py test/test_source_transfer_peer_path.py diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 1f718b80..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,290 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v35.1.0](https://github.com/fireblocks/py-sdk/compare/v24.0.0...v35.1.0) - 2026-10-20 - -### Merged - -- Generated SDK #2966549409 [`#165`](https://github.com/fireblocks/py-sdk/pull/165) - -## [v24.0.0](https://github.com/fireblocks/py-sdk/compare/v23.0.0...v24.0.0) - 2026-07-23 - -### Merged - -- Generated SDK #2700459745 (major) [`#146`](https://github.com/fireblocks/py-sdk/pull/146) - -## [v23.0.0](https://github.com/fireblocks/py-sdk/compare/v22.0.0...v23.0.0) - 2026-07-01 - -### Merged - -- Generated SDK #1180 [`#145`](https://github.com/fireblocks/py-sdk/pull/145) - -## [v22.0.0](https://github.com/fireblocks/py-sdk/compare/v21.0.0...v22.0.0) - 2026-06-28 - -### Merged - -- Generated SDK #5347 [`#144`](https://github.com/fireblocks/py-sdk/pull/144) - -## [v21.0.0](https://github.com/fireblocks/py-sdk/compare/v20.0.0...v21.0.0) - 2026-06-11 - -### Merged - -- Generated SDK #5364 [`#142`](https://github.com/fireblocks/py-sdk/pull/142) - -## [v20.0.0](https://github.com/fireblocks/py-sdk/compare/v19.1.0...v20.0.0) - 2026-06-02 - -### Merged - -- Generated SDK #2839 (major) [`#141`](https://github.com/fireblocks/py-sdk/pull/141) - -## [v19.1.0](https://github.com/fireblocks/py-sdk/compare/v19.0.0...v19.1.0) - 2026-05-27 - -### Merged - -- Generated SDK #2710 (minor) [`#140`](https://github.com/fireblocks/py-sdk/pull/140) - -## [v19.0.0](https://github.com/fireblocks/py-sdk/compare/v18.0.0...v19.0.0) - 2026-05-17 - -### Merged - -- Generated SDK #7742 (major) [`#139`](https://github.com/fireblocks/py-sdk/pull/139) - -## [v18.0.0](https://github.com/fireblocks/py-sdk/compare/v17.0.0...v18.0.0) - 2026-05-07 - -### Merged - -- Generated SDK #3222 (major) [`#138`](https://github.com/fireblocks/py-sdk/pull/138) - -## [v17.0.0](https://github.com/fireblocks/py-sdk/compare/v16.0.0...v17.0.0) - 2026-04-20 - -### Merged - -- Generated SDK #9605 (major) [`#137`](https://github.com/fireblocks/py-sdk/pull/137) - -## [v16.0.0](https://github.com/fireblocks/py-sdk/compare/v15.0.0...v16.0.0) - 2026-04-06 - -### Merged - -- Generated SDK #3331 [`#135`](https://github.com/fireblocks/py-sdk/pull/135) - -## [v15.0.0](https://github.com/fireblocks/py-sdk/compare/v14.1.0...v15.0.0) - 2026-03-15 - -### Merged - -- Generated SDK #3733 (major) [`#129`](https://github.com/fireblocks/py-sdk/pull/129) - -## [v14.1.0](https://github.com/fireblocks/py-sdk/compare/v14.0.0...v14.1.0) - 2026-02-26 - -### Merged - -- Generated SDK #2167 [`#127`](https://github.com/fireblocks/py-sdk/pull/127) - -## [v14.0.0](https://github.com/fireblocks/py-sdk/compare/v13.0.0...v14.0.0) - 2026-02-03 - -### Merged - -- Generated SDK #4746 [`#123`](https://github.com/fireblocks/py-sdk/pull/123) - -## [v13.0.0](https://github.com/fireblocks/py-sdk/compare/v12.1.2...v13.0.0) - 2025-11-13 - -### Merged - -- Generated SDK #5834 [`#121`](https://github.com/fireblocks/py-sdk/pull/121) - -## [v12.1.2](https://github.com/fireblocks/py-sdk/compare/v12.1.1...v12.1.2) - 2025-10-22 - -### Merged - -- Generated SDK #8293 [`#120`](https://github.com/fireblocks/py-sdk/pull/120) - -## [v12.1.1](https://github.com/fireblocks/py-sdk/compare/v12.1.0...v12.1.1) - 2025-09-29 - -### Merged - -- Generated SDK #6061 [`#119`](https://github.com/fireblocks/py-sdk/pull/119) - -## [v12.1.0](https://github.com/fireblocks/py-sdk/compare/v12.0.0...v12.1.0) - 2025-09-09 - -### Merged - -- Generated SDK #4521 [`#118`](https://github.com/fireblocks/py-sdk/pull/118) - -## [v12.0.0](https://github.com/fireblocks/py-sdk/compare/v11.2.0...v12.0.0) - 2025-09-01 - -### Merged - -- Generated SDK #7741 [`#117`](https://github.com/fireblocks/py-sdk/pull/117) - -## [v11.2.0](https://github.com/fireblocks/py-sdk/compare/v11.1.0...v11.2.0) - 2025-08-18 - -### Merged - -- Generated SDK #3302 [`#116`](https://github.com/fireblocks/py-sdk/pull/116) - -## [v11.1.0](https://github.com/fireblocks/py-sdk/compare/v11.0.0...v11.1.0) - 2025-08-11 - -### Merged - -- Generated SDK #1782 [`#115`](https://github.com/fireblocks/py-sdk/pull/115) - -## [v11.0.0](https://github.com/fireblocks/py-sdk/compare/v10.4.0...v11.0.0) - 2025-07-15 - -### Merged - -- Generated SDK #5610 [`#114`](https://github.com/fireblocks/py-sdk/pull/114) - -## [v10.4.0](https://github.com/fireblocks/py-sdk/compare/v10.3.0...v10.4.0) - 2025-06-29 - -### Merged - -- Generated SDK #1492 [`#113`](https://github.com/fireblocks/py-sdk/pull/113) - -## [v10.3.0](https://github.com/fireblocks/py-sdk/compare/v10.2.0...v10.3.0) - 2025-06-18 - -### Merged - -- Generated SDK #4009 [`#112`](https://github.com/fireblocks/py-sdk/pull/112) - -## [v10.2.0](https://github.com/fireblocks/py-sdk/compare/v10.1.1...v10.2.0) - 2025-06-04 - -### Merged - -- Generated SDK #8912 [`#111`](https://github.com/fireblocks/py-sdk/pull/111) - -## [v10.1.1](https://github.com/fireblocks/py-sdk/compare/v10.1.0...v10.1.1) - 2025-05-18 - -### Merged - -- Generated SDK #5019 [`#110`](https://github.com/fireblocks/py-sdk/pull/110) - -## [v10.1.0](https://github.com/fireblocks/py-sdk/compare/v10.0.0...v10.1.0) - 2025-05-07 - -### Merged - -- Generated SDK #7076 [`#107`](https://github.com/fireblocks/py-sdk/pull/107) - -## [v10.0.0](https://github.com/fireblocks/py-sdk/compare/v9.0.1...v10.0.0) - 2025-04-20 - -### Merged - -- Generated SDK #4794 [`#105`](https://github.com/fireblocks/py-sdk/pull/105) - -## [v9.0.1](https://github.com/fireblocks/py-sdk/compare/v9.0.0...v9.0.1) - 2025-04-07 - -### Merged - -- Generated SDK #3065 [`#104`](https://github.com/fireblocks/py-sdk/pull/104) - -## [v9.0.0](https://github.com/fireblocks/py-sdk/compare/v8.0.0...v9.0.0) - 2025-03-27 - -### Merged - -- Generated SDK #619 [`#102`](https://github.com/fireblocks/py-sdk/pull/102) - -## [v8.0.0](https://github.com/fireblocks/py-sdk/compare/v7.1.0...v8.0.0) - 2025-03-17 - -### Merged - -- Generated SDK #645 [`#101`](https://github.com/fireblocks/py-sdk/pull/101) -- Generated SDK #726 [`#99`](https://github.com/fireblocks/py-sdk/pull/99) - -## [v7.1.0](https://github.com/fireblocks/py-sdk/compare/v7.0.1...v7.1.0) - 2025-02-25 - -### Merged - -- Generated SDK #9833 [`#96`](https://github.com/fireblocks/py-sdk/pull/96) - -## [v7.0.1](https://github.com/fireblocks/py-sdk/compare/v7.0.0...v7.0.1) - 2025-02-12 - -### Merged - -- Generated SDK #4262 [`#95`](https://github.com/fireblocks/py-sdk/pull/95) - -## [v7.0.0](https://github.com/fireblocks/py-sdk/compare/v6.0.0...v7.0.0) - 2025-02-02 - -### Merged - -- Generated SDK #538 [`#92`](https://github.com/fireblocks/py-sdk/pull/92) - -## [v6.0.0](https://github.com/fireblocks/py-sdk/compare/v5.0.0...v6.0.0) - 2025-01-08 - -### Merged - -- Generated SDK #8699 [`#89`](https://github.com/fireblocks/py-sdk/pull/89) - -## [v5.0.0](https://github.com/fireblocks/py-sdk/compare/v4.0.0...v5.0.0) - 2024-12-05 - -### Merged - -- Generated SDK #1430 [`#85`](https://github.com/fireblocks/py-sdk/pull/85) -- Update python-package.yml, deprecate macos-12 [`#86`](https://github.com/fireblocks/py-sdk/pull/86) - -## [v4.0.0](https://github.com/fireblocks/py-sdk/compare/v3.0.0...v4.0.0) - 2024-10-31 - -### Merged - -- Generated SDK #5184 [`#82`](https://github.com/fireblocks/py-sdk/pull/82) - -## [v3.0.0](https://github.com/fireblocks/py-sdk/compare/v2.1.0...v3.0.0) - 2024-09-17 - -### Merged - -- Generated SDK #237 [`#81`](https://github.com/fireblocks/py-sdk/pull/81) - -## [v2.1.0](https://github.com/fireblocks/py-sdk/compare/v2.0.0...v2.1.0) - 2024-07-25 - -### Merged - -- Generated SDK #6749 [`#78`](https://github.com/fireblocks/py-sdk/pull/78) - -## [v2.0.0](https://github.com/fireblocks/py-sdk/compare/v1.0.4...v2.0.0) - 2024-07-17 - -### Merged - -- Generated SDK #6152 [`#76`](https://github.com/fireblocks/py-sdk/pull/76) -- Generated SDK #7647 [`#73`](https://github.com/fireblocks/py-sdk/pull/73) -- Generated SDK #7984 [`#70`](https://github.com/fireblocks/py-sdk/pull/70) - -## [v1.0.4](https://github.com/fireblocks/py-sdk/compare/v1.0.3...v1.0.4) - 2024-06-26 - -### Merged - -- Generated SDK #5779 [`#69`](https://github.com/fireblocks/py-sdk/pull/69) -- Generated SDK #913 [`#68`](https://github.com/fireblocks/py-sdk/pull/68) -- Generated SDK #1353 [`#67`](https://github.com/fireblocks/py-sdk/pull/67) -- Generated SDK #9982 [`#66`](https://github.com/fireblocks/py-sdk/pull/66) -- Generated SDK #1362 [`#65`](https://github.com/fireblocks/py-sdk/pull/65) -- Generated SDK #3652 [`#64`](https://github.com/fireblocks/py-sdk/pull/64) - -## [v1.0.3](https://github.com/fireblocks/py-sdk/compare/v1.0.2...v1.0.3) - 2024-06-06 - -### Merged - -- Generated SDK #2648 [`#30`](https://github.com/fireblocks/py-sdk/pull/30) - -## [v1.0.2](https://github.com/fireblocks/py-sdk/compare/v0.0.2-beta...v1.0.2) - 2024-06-04 - -### Merged - -- version 1.0.2 [`#25`](https://github.com/fireblocks/py-sdk/pull/25) -- version 1.0.0 [`#24`](https://github.com/fireblocks/py-sdk/pull/24) - -## v0.0.2-beta - 2024-05-30 - -### Merged - -- version 0.0.2-beta [`#23`](https://github.com/fireblocks/py-sdk/pull/23) -- Update .bumpversion.cfg [`#14`](https://github.com/fireblocks/py-sdk/pull/14) -- Update setup.py [`#13`](https://github.com/fireblocks/py-sdk/pull/13) -- Bug Fixes [`#12`](https://github.com/fireblocks/py-sdk/pull/12) -- update support for beta in bumpversion [`#11`](https://github.com/fireblocks/py-sdk/pull/11) -- Update setup.py [`#10`](https://github.com/fireblocks/py-sdk/pull/10) -- Update setup.py [`#9`](https://github.com/fireblocks/py-sdk/pull/9) -- Added Idempotency & NCW headers support [`#7`](https://github.com/fireblocks/py-sdk/pull/7) -- Added Idempotency & NCW headers support [`#8`](https://github.com/fireblocks/py-sdk/pull/8) -- Update setup.py [`#5`](https://github.com/fireblocks/py-sdk/pull/5) -- API Support Updates [`#4`](https://github.com/fireblocks/py-sdk/pull/4) diff --git a/README.md b/README.md index c8dd288c..ab4e8fac 100644 --- a/README.md +++ b/README.md @@ -319,7 +319,8 @@ Class | Method | HTTP request | Description *ComplianceApi* | [**deactivate_byork_config**](docs/ComplianceApi.md#deactivate_byork_config) | **POST** /screening/byork/config/deactivate | Deactivate BYORK Light *ComplianceApi* | [**delete_counterparty_group**](docs/ComplianceApi.md#delete_counterparty_group) | **DELETE** /counterparty_groups/{groupId} | Delete a counterparty group *ComplianceApi* | [**delete_legal_entity**](docs/ComplianceApi.md#delete_legal_entity) | **DELETE** /legal_entities/{legalEntityId} | Delete a legal entity -*ComplianceApi* | [**get_address_registry_tenant_participation_status**](docs/ComplianceApi.md#get_address_registry_tenant_participation_status) | **GET** /address_registry/tenant | Get address registry participation status for the authenticated workspace +*ComplianceApi* | [**get_address_registry_customer_participation_status**](docs/ComplianceApi.md#get_address_registry_customer_participation_status) | **GET** /address_registry/customer | Get your customer's address registry default +*ComplianceApi* | [**get_address_registry_tenant_participation_status**](docs/ComplianceApi.md#get_address_registry_tenant_participation_status) | **GET** /address_registry/tenant | Get address registry status for this workspace *ComplianceApi* | [**get_address_registry_vault_opt_out**](docs/ComplianceApi.md#get_address_registry_vault_opt_out) | **GET** /address_registry/vaults/{vaultAccountId} | Get whether a vault account is opted out of the address registry *ComplianceApi* | [**get_aml_post_screening_policy**](docs/ComplianceApi.md#get_aml_post_screening_policy) | **GET** /screening/aml/post_screening_policy | AML - View Post-Screening Policy *ComplianceApi* | [**get_aml_screening_policy**](docs/ComplianceApi.md#get_aml_screening_policy) | **GET** /screening/aml/screening_policy | AML - View Screening Policy @@ -335,8 +336,10 @@ Class | Method | HTTP request | Description *ComplianceApi* | [**list_counterparty_groups**](docs/ComplianceApi.md#list_counterparty_groups) | **GET** /counterparty_groups | List counterparty groups *ComplianceApi* | [**list_legal_entities**](docs/ComplianceApi.md#list_legal_entities) | **GET** /legal_entities | List legal entities (Paginated) *ComplianceApi* | [**list_vaults_for_legal_entity**](docs/ComplianceApi.md#list_vaults_for_legal_entity) | **GET** /legal_entities/{legalEntityId}/vaults | List vault accounts for a legal entity (Paginated) -*ComplianceApi* | [**opt_in_address_registry_tenant**](docs/ComplianceApi.md#opt_in_address_registry_tenant) | **POST** /address_registry/tenant | Opt the workspace in to the address registry -*ComplianceApi* | [**opt_out_address_registry_tenant**](docs/ComplianceApi.md#opt_out_address_registry_tenant) | **DELETE** /address_registry/tenant | Opt the workspace out of the address registry +*ComplianceApi* | [**opt_in_address_registry_customer**](docs/ComplianceApi.md#opt_in_address_registry_customer) | **POST** /address_registry/customer | Opt your customer in to the address registry +*ComplianceApi* | [**opt_in_address_registry_tenant**](docs/ComplianceApi.md#opt_in_address_registry_tenant) | **POST** /address_registry/tenant | Opt this workspace in to the address registry +*ComplianceApi* | [**opt_out_address_registry_customer**](docs/ComplianceApi.md#opt_out_address_registry_customer) | **DELETE** /address_registry/customer | Opt your customer out of the address registry +*ComplianceApi* | [**opt_out_address_registry_tenant**](docs/ComplianceApi.md#opt_out_address_registry_tenant) | **DELETE** /address_registry/tenant | Opt this workspace out of the address registry *ComplianceApi* | [**register_legal_entity**](docs/ComplianceApi.md#register_legal_entity) | **POST** /legal_entities | Register a new legal entity *ComplianceApi* | [**remove_address_registry_vault_opt_out**](docs/ComplianceApi.md#remove_address_registry_vault_opt_out) | **DELETE** /address_registry/vaults/{vaultAccountId} | Remove a single vault account from the address registry opt-out list *ComplianceApi* | [**remove_all_address_registry_vault_opt_outs**](docs/ComplianceApi.md#remove_all_address_registry_vault_opt_outs) | **DELETE** /address_registry/vaults | Remove all vault-level address registry opt-outs for the workspace @@ -826,6 +829,7 @@ Class | Method | HTTP request | Description - [AddressRegistryAddVaultOptOutsResponse](docs/AddressRegistryAddVaultOptOutsResponse.md) - [AddressRegistryCreateProofOfOwnershipRequest](docs/AddressRegistryCreateProofOfOwnershipRequest.md) - [AddressRegistryCreateProofOfOwnershipResponse](docs/AddressRegistryCreateProofOfOwnershipResponse.md) + - [AddressRegistryCustomerRegistryResponse](docs/AddressRegistryCustomerRegistryResponse.md) - [AddressRegistryGetVaultOptOutResponse](docs/AddressRegistryGetVaultOptOutResponse.md) - [AddressRegistryLegalEntity](docs/AddressRegistryLegalEntity.md) - [AddressRegistryListVaultOptOutsResponse](docs/AddressRegistryListVaultOptOutsResponse.md) @@ -1554,6 +1558,7 @@ Class | Method | HTTP request | Description - [PreScreening](docs/PreScreening.md) - [PrefundedSettlement](docs/PrefundedSettlement.md) - [PrefundedSettlementType](docs/PrefundedSettlementType.md) + - [PricingSide](docs/PricingSide.md) - [ProgramCallConfig](docs/ProgramCallConfig.md) - [ProgramCallDecodedDataItem](docs/ProgramCallDecodedDataItem.md) - [Provider](docs/Provider.md) @@ -1754,6 +1759,7 @@ Class | Method | HTTP request | Description - [SolanaInstructionWithValue](docs/SolanaInstructionWithValue.md) - [SolanaRewardsBreakdown](docs/SolanaRewardsBreakdown.md) - [SolanaSimpleCreateParams](docs/SolanaSimpleCreateParams.md) + - [SorobanCallData](docs/SorobanCallData.md) - [SourceConfig](docs/SourceConfig.md) - [SourceOfFunds](docs/SourceOfFunds.md) - [SourceTransferPeerPath](docs/SourceTransferPeerPath.md) diff --git a/docs/AddressRegistryCustomerRegistryResponse.md b/docs/AddressRegistryCustomerRegistryResponse.md new file mode 100644 index 00000000..1d405a89 --- /dev/null +++ b/docs/AddressRegistryCustomerRegistryResponse.md @@ -0,0 +1,30 @@ +# AddressRegistryCustomerRegistryResponse + +Your customer's organization-wide address registry default. Workspaces without their own setting use this value. GET, POST (opt in), and DELETE (opt out) all return this object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | `NOT_SET`, `OPTED_IN`, or `OPTED_OUT`. On GET, `NOT_SET` means no default has been chosen yet. On POST or DELETE, returns `OPTED_IN` or `OPTED_OUT` after a successful change. | + +## Example + +```python +from fireblocks.models.address_registry_customer_registry_response import AddressRegistryCustomerRegistryResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AddressRegistryCustomerRegistryResponse from a JSON string +address_registry_customer_registry_response_instance = AddressRegistryCustomerRegistryResponse.from_json(json) +# print the JSON string representation of the object +print(AddressRegistryCustomerRegistryResponse.to_json()) + +# convert the object into a dict +address_registry_customer_registry_response_dict = address_registry_customer_registry_response_instance.to_dict() +# create an instance of AddressRegistryCustomerRegistryResponse from a dict +address_registry_customer_registry_response_from_dict = AddressRegistryCustomerRegistryResponse.from_dict(address_registry_customer_registry_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddressRegistryTenantRegistryResponse.md b/docs/AddressRegistryTenantRegistryResponse.md index af863761..5fce0ce8 100644 --- a/docs/AddressRegistryTenantRegistryResponse.md +++ b/docs/AddressRegistryTenantRegistryResponse.md @@ -1,12 +1,12 @@ # AddressRegistryTenantRegistryResponse -Workspace participation in the address registry. Same shape for GET, POST (opt in), and DELETE (opt out). +Whether this workspace uses the address registry. GET, POST (opt in), and DELETE (opt out) all return this object. On GET, if this workspace has no explicit choice, `status` follows the customer default when one is set, otherwise the workspace is opted in by default. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **str** | OPTED_IN or OPTED_OUT. | +**status** | **str** | `OPTED_IN` or `OPTED_OUT`. On GET, uses the customer default when this workspace has no setting of its own and the customer has made an explicit choice; is `OPTED_IN` when neither is set. On POST or DELETE, reflects the choice you just made for this workspace. | ## Example diff --git a/docs/ComplianceApi.md b/docs/ComplianceApi.md index a14a6111..b6dcec8b 100644 --- a/docs/ComplianceApi.md +++ b/docs/ComplianceApi.md @@ -14,7 +14,8 @@ Method | HTTP request | Description [**deactivate_byork_config**](ComplianceApi.md#deactivate_byork_config) | **POST** /screening/byork/config/deactivate | Deactivate BYORK Light [**delete_counterparty_group**](ComplianceApi.md#delete_counterparty_group) | **DELETE** /counterparty_groups/{groupId} | Delete a counterparty group [**delete_legal_entity**](ComplianceApi.md#delete_legal_entity) | **DELETE** /legal_entities/{legalEntityId} | Delete a legal entity -[**get_address_registry_tenant_participation_status**](ComplianceApi.md#get_address_registry_tenant_participation_status) | **GET** /address_registry/tenant | Get address registry participation status for the authenticated workspace +[**get_address_registry_customer_participation_status**](ComplianceApi.md#get_address_registry_customer_participation_status) | **GET** /address_registry/customer | Get your customer's address registry default +[**get_address_registry_tenant_participation_status**](ComplianceApi.md#get_address_registry_tenant_participation_status) | **GET** /address_registry/tenant | Get address registry status for this workspace [**get_address_registry_vault_opt_out**](ComplianceApi.md#get_address_registry_vault_opt_out) | **GET** /address_registry/vaults/{vaultAccountId} | Get whether a vault account is opted out of the address registry [**get_aml_post_screening_policy**](ComplianceApi.md#get_aml_post_screening_policy) | **GET** /screening/aml/post_screening_policy | AML - View Post-Screening Policy [**get_aml_screening_policy**](ComplianceApi.md#get_aml_screening_policy) | **GET** /screening/aml/screening_policy | AML - View Screening Policy @@ -30,8 +31,10 @@ Method | HTTP request | Description [**list_counterparty_groups**](ComplianceApi.md#list_counterparty_groups) | **GET** /counterparty_groups | List counterparty groups [**list_legal_entities**](ComplianceApi.md#list_legal_entities) | **GET** /legal_entities | List legal entities (Paginated) [**list_vaults_for_legal_entity**](ComplianceApi.md#list_vaults_for_legal_entity) | **GET** /legal_entities/{legalEntityId}/vaults | List vault accounts for a legal entity (Paginated) -[**opt_in_address_registry_tenant**](ComplianceApi.md#opt_in_address_registry_tenant) | **POST** /address_registry/tenant | Opt the workspace in to the address registry -[**opt_out_address_registry_tenant**](ComplianceApi.md#opt_out_address_registry_tenant) | **DELETE** /address_registry/tenant | Opt the workspace out of the address registry +[**opt_in_address_registry_customer**](ComplianceApi.md#opt_in_address_registry_customer) | **POST** /address_registry/customer | Opt your customer in to the address registry +[**opt_in_address_registry_tenant**](ComplianceApi.md#opt_in_address_registry_tenant) | **POST** /address_registry/tenant | Opt this workspace in to the address registry +[**opt_out_address_registry_customer**](ComplianceApi.md#opt_out_address_registry_customer) | **DELETE** /address_registry/customer | Opt your customer out of the address registry +[**opt_out_address_registry_tenant**](ComplianceApi.md#opt_out_address_registry_tenant) | **DELETE** /address_registry/tenant | Opt this workspace out of the address registry [**register_legal_entity**](ComplianceApi.md#register_legal_entity) | **POST** /legal_entities | Register a new legal entity [**remove_address_registry_vault_opt_out**](ComplianceApi.md#remove_address_registry_vault_opt_out) | **DELETE** /address_registry/vaults/{vaultAccountId} | Remove a single vault account from the address registry opt-out list [**remove_all_address_registry_vault_opt_outs**](ComplianceApi.md#remove_all_address_registry_vault_opt_outs) | **DELETE** /address_registry/vaults | Remove all vault-level address registry opt-outs for the workspace @@ -818,12 +821,82 @@ 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_address_registry_customer_participation_status** +> AddressRegistryCustomerRegistryResponse get_address_registry_customer_participation_status() + +Get your customer's address registry default + +Read your customer's organization-wide address registry setting. Workspaces without their own choice use this as the default. Returns `NOT_SET` when no choice has been made yet, or `OPTED_IN` / `OPTED_OUT` when one has. + +### Example + + +```python +from fireblocks.models.address_registry_customer_registry_response import AddressRegistryCustomerRegistryResponse +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 your customer's address registry default + api_response = fireblocks.compliance.get_address_registry_customer_participation_status().result() + print("The response of ComplianceApi->get_address_registry_customer_participation_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ComplianceApi->get_address_registry_customer_participation_status: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**AddressRegistryCustomerRegistryResponse**](AddressRegistryCustomerRegistryResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Customer registry status in the response body | * 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_address_registry_tenant_participation_status** > AddressRegistryTenantRegistryResponse get_address_registry_tenant_participation_status() -Get address registry participation status for the authenticated workspace +Get address registry status for this workspace -Returns whether the workspace is `OPTED_IN` or `OPTED_OUT` of the address registry. +Check whether this workspace uses the address registry. The response is `OPTED_IN` or `OPTED_OUT`. If this workspace has not been configured yet, it follows your customer's default (see `GET /v1/address_registry/customer`) when that default is `OPTED_IN` or `OPTED_OUT`; otherwise the workspace is opted in by default. ### Example @@ -852,7 +925,7 @@ configuration = ClientConfiguration( with Fireblocks(configuration) as fireblocks: try: - # Get address registry participation status for the authenticated workspace + # Get address registry status for this workspace api_response = fireblocks.compliance.get_address_registry_tenant_participation_status().result() print("The response of ComplianceApi->get_address_registry_tenant_participation_status:\n") pprint(api_response) @@ -2012,12 +2085,87 @@ 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) +# **opt_in_address_registry_customer** +> AddressRegistryCustomerRegistryResponse opt_in_address_registry_customer(idempotency_key=idempotency_key) + +Opt your customer in to the address registry + +Set your customer's default to opted in. Workspaces without their own setting will follow this default. No request body. Returns `OPTED_IN`. If the customer for this workspace cannot be determined, returns HTTP 404 with error code **2147**. + +### Example + + +```python +from fireblocks.models.address_registry_customer_registry_response import AddressRegistryCustomerRegistryResponse +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: + 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: + # Opt your customer in to the address registry + api_response = fireblocks.compliance.opt_in_address_registry_customer(idempotency_key=idempotency_key).result() + print("The response of ComplianceApi->opt_in_address_registry_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ComplianceApi->opt_in_address_registry_customer: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + +[**AddressRegistryCustomerRegistryResponse**](AddressRegistryCustomerRegistryResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success; response body includes status OPTED_IN | * X-Request-ID -
| +**404** | The customer for this workspace could not be determined (error code 2147) | * 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) + # **opt_in_address_registry_tenant** > AddressRegistryTenantRegistryResponse opt_in_address_registry_tenant(idempotency_key=idempotency_key) -Opt the workspace in to the address registry +Opt this workspace in to the address registry -Opts the workspace in. No request body. Response uses the same JSON shape as GET; status is OPTED_IN. +Turn on the address registry for this workspace. No request body. Returns `OPTED_IN`. ### Example @@ -2047,7 +2195,7 @@ with Fireblocks(configuration) as fireblocks: 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: - # Opt the workspace in to the address registry + # Opt this workspace in to the address registry api_response = fireblocks.compliance.opt_in_address_registry_tenant(idempotency_key=idempotency_key).result() print("The response of ComplianceApi->opt_in_address_registry_tenant:\n") pprint(api_response) @@ -2086,12 +2234,83 @@ 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) +# **opt_out_address_registry_customer** +> AddressRegistryCustomerRegistryResponse opt_out_address_registry_customer() + +Opt your customer out of the address registry + +Set your customer's default to opted out. Workspaces without their own setting will follow this default. No request body. Returns `OPTED_OUT`. If the customer for this workspace cannot be determined, returns HTTP 404 with error code **2147**. + +### Example + + +```python +from fireblocks.models.address_registry_customer_registry_response import AddressRegistryCustomerRegistryResponse +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: + # Opt your customer out of the address registry + api_response = fireblocks.compliance.opt_out_address_registry_customer().result() + print("The response of ComplianceApi->opt_out_address_registry_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ComplianceApi->opt_out_address_registry_customer: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**AddressRegistryCustomerRegistryResponse**](AddressRegistryCustomerRegistryResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success; response body includes status OPTED_OUT | * X-Request-ID -
| +**404** | The customer for this workspace could not be determined (error code 2147) | * 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) + # **opt_out_address_registry_tenant** > AddressRegistryTenantRegistryResponse opt_out_address_registry_tenant() -Opt the workspace out of the address registry +Opt this workspace out of the address registry -Opts the workspace out. No request body. Response uses the same JSON shape as GET; status is OPTED_OUT. +Turn off the address registry for this workspace. No request body. Returns `OPTED_OUT`. ### Example @@ -2120,7 +2339,7 @@ configuration = ClientConfiguration( with Fireblocks(configuration) as fireblocks: try: - # Opt the workspace out of the address registry + # Opt this workspace out of the address registry api_response = fireblocks.compliance.opt_out_address_registry_tenant().result() print("The response of ComplianceApi->opt_out_address_registry_tenant:\n") pprint(api_response) diff --git a/docs/CreateOffersRequest.md b/docs/CreateOffersRequest.md index 7a0ed1f0..4f63c5ed 100644 --- a/docs/CreateOffersRequest.md +++ b/docs/CreateOffersRequest.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **base_amount** | **str** | The amount to get offers for | **slippage_bps** | **int** | Slippage tolerance in basis points (bps) for defi quotes - 1 is 0.01% and 10000 is 100%. If not set, defaults to 50 bps (0.5%). | [optional] [default to 50] **settlement** | [**DVPSettlement**](DVPSettlement.md) | | [optional] -**side** | [**Side**](Side.md) | | +**side** | [**PricingSide**](PricingSide.md) | | [optional] [default to PricingSide.SELL] ## Example diff --git a/docs/CreateQuote.md b/docs/CreateQuote.md index d308f016..19050cbb 100644 --- a/docs/CreateQuote.md +++ b/docs/CreateQuote.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **base_amount** | **str** | Amount in baseAssetId. BUY = base amount to receive; SELL = base amount to sell. | **slippage_bps** | **float** | Slippage tolerance in basis points (bps) for defi quotes - 1 is 0.01% and 10000 is 100% | [optional] [default to 50] **settlement** | [**DVPSettlement**](DVPSettlement.md) | | [optional] -**side** | [**Side**](Side.md) | | +**side** | [**PricingSide**](PricingSide.md) | | [optional] [default to PricingSide.SELL] **participants_identification** | [**ParticipantsIdentification**](ParticipantsIdentification.md) | | [optional] ## Example diff --git a/docs/ExtraParameters.md b/docs/ExtraParameters.md index 7dc34551..344b9143 100644 --- a/docs/ExtraParameters.md +++ b/docs/ExtraParameters.md @@ -1,6 +1,6 @@ # ExtraParameters -Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set to the [input selection structure.](https://developers.fireblocks.com/reference/transaction-objects#inputsselection) The inputs can be retrieved from the [Retrieve Unspent Inputs endpoint.](https://developers.fireblocks.com/reference/getunspentinputs) For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. For **exchange compliance (e.g., Binance) and Travel Rule purposes**, include the key `piiData` containing a **custom JSON structure** with Personally Identifiable Information (PII) relevant to the transaction. This data must be fully **encrypted by the sender** before being submitted to the Fireblocks API. The recommended encryption method is **hybrid encryption** using AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange's public key. [development libraries](https://developers.fireblocks.com/docs/a-developers-guide-to-constructing-encrypted-pii-messages-for-binance-via-fireblocks) **Note:** `rawMessageData`, `contractCallData`, and `inputsSelection` cannot be used together in the same call. +Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set to the [input selection structure.](https://developers.fireblocks.com/reference/transaction-objects#inputsselection) The inputs can be retrieved from the [Retrieve Unspent Inputs endpoint.](https://developers.fireblocks.com/reference/getunspentinputs) For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `SOROBAN_CALL` operations, add the key `sorobanCallData` with the value set to an object containing `envelopeXdr` - a base64 encoded, unsigned Stellar `TransactionEnvelope` holding the contract invocation. For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. For **exchange compliance (e.g., Binance) and Travel Rule purposes**, include the key `piiData` containing a **custom JSON structure** with Personally Identifiable Information (PII) relevant to the transaction. This data must be fully **encrypted by the sender** before being submitted to the Fireblocks API. The recommended encryption method is **hybrid encryption** using AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange's public key. [development libraries](https://developers.fireblocks.com/docs/a-developers-guide-to-constructing-encrypted-pii-messages-for-binance-via-fireblocks) **Note:** `rawMessageData`, `contractCallData`, `sorobanCallData`, and `inputsSelection` cannot be used together in the same call. ## Properties @@ -10,6 +10,7 @@ Name | Type | Description | Notes **raw_message_data** | **Dict[str, object]** | | [optional] **contract_call_data** | **str** | | [optional] **program_call_data** | **str** | | [optional] +**soroban_call_data** | [**SorobanCallData**](SorobanCallData.md) | | [optional] **inputs_selection** | **Dict[str, object]** | | [optional] **allow_base_asset_address** | **bool** | | [optional] **pii_data** | **Dict[str, object]** | | [optional] diff --git a/docs/GetTransactionOperation.md b/docs/GetTransactionOperation.md index 50727db8..75fbefc8 100644 --- a/docs/GetTransactionOperation.md +++ b/docs/GetTransactionOperation.md @@ -1,6 +1,6 @@ # GetTransactionOperation -* `TRANSFER` - Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address. * `MINT` - Mints new tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `CONTRACT_CALL` - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) * `ENABLE_ASSET` - Algorand, DigitalBits, Solana, and Stellar require an on-chain transaction to create an asset wallet and enable the deposit address. This transaction is automatically created when adding assets on these blockchains at a vault account. * `STAKE` - Assign assets to a staking pool managed by a staking validator. Supported for Stellar and EVM-based blockchains. This transaction is automatically created when performing staking operations. * `SUPPLY_TO_COMPOUND` - Deprecated since April 1st, 2023. Older transactions may have this as their operation, in case users in the workspace have used the direct integration between Fireblocks and the Compound DeFI protocol. * `REDEEM_FROM_COMPOUND` - Deprecated since April 1st, 2023. Older transactions may have this as their operation, in case users in the workspace have used the direct integration between Fireblocks and the Compound DeFI protocol. * `PROGRAM_CALL` - In Solana refers to invoking on-chain programs (smart contracts) to execute transactions and interact with the blockchain. * `APPROVE` - Enables the approve function for a smart contract or wallet to withdraw from a designated wallet. [Learn more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Amount-Cap-for-Approve-transactions). +* `TRANSFER` - Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address. * `MINT` - Mints new tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `CONTRACT_CALL` - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) * `ENABLE_ASSET` - Algorand, DigitalBits, Solana, and Stellar require an on-chain transaction to create an asset wallet and enable the deposit address. This transaction is automatically created when adding assets on these blockchains at a vault account. * `STAKE` - Assign assets to a staking pool managed by a staking validator. Supported for Stellar and EVM-based blockchains. This transaction is automatically created when performing staking operations. * `SUPPLY_TO_COMPOUND` - Deprecated since April 1st, 2023. Older transactions may have this as their operation, in case users in the workspace have used the direct integration between Fireblocks and the Compound DeFI protocol. * `REDEEM_FROM_COMPOUND` - Deprecated since April 1st, 2023. Older transactions may have this as their operation, in case users in the workspace have used the direct integration between Fireblocks and the Compound DeFI protocol. * `PROGRAM_CALL` - In Solana refers to invoking on-chain programs (smart contracts) to execute transactions and interact with the blockchain. * `APPROVE` - Enables the approve function for a smart contract or wallet to withdraw from a designated wallet. [Learn more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Amount-Cap-for-Approve-transactions). * `SOROBAN_CALL` - Invokes a Soroban smart contract on the Stellar blockchain. ## Enum @@ -28,6 +28,8 @@ * `APPROVE` (value: `'APPROVE'`) +* `SOROBAN_CALL` (value: `'SOROBAN_CALL'`) + [[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/Offer.md b/docs/Offer.md index d20e0a71..4573791a 100644 --- a/docs/Offer.md +++ b/docs/Offer.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **quote_asset_id** | **str** | The target asset identifier. | **quote_asset_rail** | [**TransferRail**](TransferRail.md) | | [optional] **rate** | **str** | The indicative exchange rate — the number of units of the quote asset that equal 1 unit of the base asset. For example, if base is BTC and quote is USD, a rate of 75000 means 1 BTC = 75,000 USD. | +**side** | [**Side**](Side.md) | | **offer_type** | **str** | The type of offer — QUOTE for executable committed quotes. | **id** | **str** | The unique identifier of the quote. | **base_amount** | **str** | The amount of the base asset. | @@ -20,7 +21,6 @@ Name | Type | Description | Notes **is_slippage_applied** | **bool** | Indicates if slippage was applied to the quote. | [optional] [default to False] **execution_steps** | [**List[QuoteExecutionStep]**](QuoteExecutionStep.md) | Ordered list of execution steps for the quote. | [optional] **general_fees** | [**List[Fee]**](Fee.md) | General fees associated with the quote. | [optional] -**side** | [**Side**](Side.md) | | **expires_at** | **str** | The expiration time of the quote in ISO 8601 format, taken verbatim from the provider. This is not safety-margined by the server — integrators must apply their own margin if one is needed. | **required_participants_identification_on_order** | **str** | A JSON Schema Draft-7 document in string format describing the fields required when creating an order so clients can validate their order payload before sending. | [optional] **type** | **str** | The type of the quote. | diff --git a/docs/PricingSide.md b/docs/PricingSide.md new file mode 100644 index 00000000..78ead312 --- /dev/null +++ b/docs/PricingSide.md @@ -0,0 +1,15 @@ +# PricingSide + +Side to price on a quote, rate or offer request. BUY: receive base / pay quote; SELL: give base / receive quote; BOTH: request pricing for both sides at once. Providers that support only one of the sides return entries for that side only. BOTH is accepted on requests only, never on order execution requests, and responses never return it: every returned quote, rate or offer carries a concrete BUY or SELL. When omitted, defaults to SELL. + +## Enum + +* `BUY` (value: `'BUY'`) + +* `SELL` (value: `'SELL'`) + +* `BOTH` (value: `'BOTH'`) + +[[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/Rate.md b/docs/Rate.md index ea6f36fe..b0b51170 100644 --- a/docs/Rate.md +++ b/docs/Rate.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **quote_asset_id** | **str** | The target asset identifier | **quote_asset_rail** | [**TransferRail**](TransferRail.md) | | [optional] **rate** | **str** | The indicative exchange rate — the number of units of the quote asset that equal 1 unit of the base asset. For example, if base is BTC and quote is USD, a rate of 75000 means 1 BTC = 75,000 USD. | +**side** | [**Side**](Side.md) | | [optional] ## Example diff --git a/docs/RateOffer.md b/docs/RateOffer.md index 8a10555b..3d2af6ac 100644 --- a/docs/RateOffer.md +++ b/docs/RateOffer.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **quote_asset_id** | **str** | The target asset identifier | **quote_asset_rail** | [**TransferRail**](TransferRail.md) | | [optional] **rate** | **str** | The indicative exchange rate — the number of units of the quote asset that equal 1 unit of the base asset. For example, if base is BTC and quote is USD, a rate of 75000 means 1 BTC = 75,000 USD. | +**side** | [**Side**](Side.md) | | [optional] **offer_type** | **str** | The type of offer — RATE for indicative pricing. | ## Example diff --git a/docs/RatesRequest.md b/docs/RatesRequest.md index 0f4c95ea..f9e52d57 100644 --- a/docs/RatesRequest.md +++ b/docs/RatesRequest.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **base_asset_id** | **str** | The source asset identifier. | **quote_asset_id** | **str** | The target asset identifier. | **base_amount** | **str** | The amount to convert from | [optional] +**side** | [**PricingSide**](PricingSide.md) | | [optional] [default to PricingSide.SELL] ## Example diff --git a/docs/SorobanCallData.md b/docs/SorobanCallData.md new file mode 100644 index 00000000..079553c1 --- /dev/null +++ b/docs/SorobanCallData.md @@ -0,0 +1,30 @@ +# SorobanCallData + +The Soroban contract invocation to execute, for `SOROBAN_CALL` operations. Fireblocks decodes the submitted envelope, determines the footprint, resource fee, sequence number and authorization entries from its own simulation, and signs a transaction it rebuilt from the invocation. Only the contract invocation itself is carried through unchanged. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envelope_xdr** | **bytearray** | A base64 encoded, unsigned Stellar `TransactionEnvelope` carrying exactly one `invokeHostFunction` operation that invokes a contract. The API only checks that the value is present. The envelope is decoded and validated after the transaction is created, and a transaction whose envelope fails validation is not signed and ends as `FAILED`. An envelope is rejected if it carries signatures or authorization entries, a memo or a fee-bump wrapper, if its source account is not the Stellar address of the vault account, or if it has no bounded time window. A Stellar transaction cannot exceed 132096 bytes, about 176128 base64 characters. | + +## Example + +```python +from fireblocks.models.soroban_call_data import SorobanCallData + +# TODO update the JSON string below +json = "{}" +# create an instance of SorobanCallData from a JSON string +soroban_call_data_instance = SorobanCallData.from_json(json) +# print the JSON string representation of the object +print(SorobanCallData.to_json()) + +# convert the object into a dict +soroban_call_data_dict = soroban_call_data_instance.to_dict() +# create an instance of SorobanCallData from a dict +soroban_call_data_from_dict = SorobanCallData.from_dict(soroban_call_data_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/TradingApi.md b/docs/TradingApi.md index 0345b444..74baffb2 100644 --- a/docs/TradingApi.md +++ b/docs/TradingApi.md @@ -110,6 +110,8 @@ Create a quote Generate a time-limited quote for asset conversion, providing exchange rate and amount calculations. +If `side` is omitted it defaults to `SELL`. Use `side: BOTH` to get quotes for each side the provider supports in a single call; providers that support only one side return that side only. Every returned quote carries a concrete `BUY` or `SELL` side, never `BOTH`. + Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). @@ -198,6 +200,8 @@ Retrieve all available offers across the workspace for a given asset pair. Always operates in open scope — no provider or account selection required. Returns a mix of indicative rates and committed quotes as applicable per provider. +If `side` is omitted it defaults to `SELL`. Use `side: BOTH` to get offers for each side the provider supports in a single call; providers that support only one side return that side only. Every returned offer carries a concrete `BUY` or `SELL` side, never `BOTH`. + If no slippageBps is provided, it defaults to 50 bps (0.5%). Slippage and settlement configuration do not affect the returned rate. @@ -288,6 +292,8 @@ Get rates Retrieve indicative exchange rate from specified providers for a given asset pair. Rates are non-executable price signals intended for discovery and display purposes. +If `side` is omitted it defaults to `SELL`. Use `side: BOTH` to get rates for each side the provider supports in a single call; providers that support only one side return that side only. Every returned rate carries a concrete `BUY` or `SELL` side, never `BOTH`. + Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). diff --git a/docs/TransactionOperation.md b/docs/TransactionOperation.md index b2f2cd88..e8a6fe12 100644 --- a/docs/TransactionOperation.md +++ b/docs/TransactionOperation.md @@ -1,6 +1,6 @@ # TransactionOperation -* `TRANSFER` - The default value for an operation. Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address. * `MINT` - Mints new tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `CONTRACT_CALL` - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. * `PROGRAM_CALL` - Execute multiple instructions on Solana blockchain. The @solana/web3.js library is recommended for building program call transactions. * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) * `APPROVE` - Enables the approve function for a smart contract or wallet to withdraw from a designated wallet. [Learn more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Amount-Cap-for-Approve-transactions). * `ENABLE_ASSET` - Algorand, DigitalBits, Solana, and Stellar require an on-chain transaction to create an asset wallet and enable the deposit address. This transaction is automatically created when adding assets on these blockchains at a vault account. * `CANTON_CALL` - A customer-initiated Canton operation, such as withdrawing an allocation or responding to an onboarding offer. Note that not every Canton transaction carries this operation — an incoming Canton transfer offer is a `TRANSFER` — so use the top-level `cantonDetails` rather than `operation` to identify a Canton transaction. +* `TRANSFER` - The default value for an operation. Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address. * `MINT` - Mints new tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `CONTRACT_CALL` - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. * `PROGRAM_CALL` - Execute multiple instructions on Solana blockchain. The @solana/web3.js library is recommended for building program call transactions. * `SOROBAN_CALL` - Invokes a Soroban smart contract on the Stellar blockchain. The call is submitted as a base64-encoded, unsigned Stellar `TransactionEnvelope` in `extraParameters.sorobanCallData.envelopeXdr`, which is the same artifact a Soroban dApp hands a wallet. Fireblocks decodes the envelope, determines the footprint, resource fee, sequence number and authorization entries itself, and signs a transaction it rebuilt - the submitted envelope must therefore carry no signatures and no authorization entries. `assetId` is the fee asset (`XLM` or `XLM_TEST`), not the token being moved, and `destination` is the contract wallet or, when enabled for your workspace, a `ONE_TIME_ADDRESS` holding a Stellar contract address (`C...`). `amount` must be omitted or `0`. Fee estimation is not supported for this operation. * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) * `APPROVE` - Enables the approve function for a smart contract or wallet to withdraw from a designated wallet. [Learn more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Amount-Cap-for-Approve-transactions). * `ENABLE_ASSET` - Algorand, DigitalBits, Solana, and Stellar require an on-chain transaction to create an asset wallet and enable the deposit address. This transaction is automatically created when adding assets on these blockchains at a vault account. * `CANTON_CALL` - A customer-initiated Canton operation, such as withdrawing an allocation or responding to an onboarding offer. Note that not every Canton transaction carries this operation — an incoming Canton transfer offer is a `TRANSFER` — so use the top-level `cantonDetails` rather than `operation` to identify a Canton transaction. ## Enum @@ -12,6 +12,8 @@ * `PROGRAM_CALL` (value: `'PROGRAM_CALL'`) +* `SOROBAN_CALL` (value: `'SOROBAN_CALL'`) + * `MINT` (value: `'MINT'`) * `RAW` (value: `'RAW'`) diff --git a/docs/TransactionsApi.md b/docs/TransactionsApi.md index 21aff8a2..78fab1c3 100644 --- a/docs/TransactionsApi.md +++ b/docs/TransactionsApi.md @@ -356,6 +356,7 @@ Estimates the transaction fee for a specific transaction request. This endpoint simulates a transaction which means that the system will expect to have the requested asset and balance in the specified wallet. **Note**: Supports all Fireblocks assets except ZCash (ZEC). The PROGRAM_CALL operation is not supported by this endpoint — fee estimation for Solana program calls is not available. +The SOROBAN_CALL operation is not supported by this endpoint - fee estimation for Stellar Soroban contract calls is not available. Learn more about Fireblocks Fee Management in the following [guide](https://developers.fireblocks.com/reference/estimate-transaction-fee). Endpoint Permission: Admin, Signer, Approver, Editor. diff --git a/docs/TransferPeerPathType.md b/docs/TransferPeerPathType.md index 11ec3ff2..a115d6a3 100644 --- a/docs/TransferPeerPathType.md +++ b/docs/TransferPeerPathType.md @@ -37,6 +37,8 @@ * `WALLET_POOL` (value: `'WALLET_POOL'`) +* `SOROBAN_CONTRACT` (value: `'SOROBAN_CONTRACT'`) + [[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/VaultsApi.md b/docs/VaultsApi.md index 92b9db8c..51314f91 100644 --- a/docs/VaultsApi.md +++ b/docs/VaultsApi.md @@ -1288,7 +1288,7 @@ configuration = ClientConfiguration( # 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, or 'default' for the default vault account + vault_account_id = 'vault_account_id_example' # str | The ID of the vault account asset_id = 'asset_id_example' # str | The ID of the asset manual_signging = True # bool | False by default. The maximum number of inputs depends if the transaction will be signed by an automated co-signer server or on a mobile device. (optional) include_all_labels = ['include_all_labels_example'] # List[str] | Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. (optional) @@ -1314,7 +1314,7 @@ with Fireblocks(configuration) as fireblocks: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **vault_account_id** | **str**| The ID of the vault account, or 'default' for the default vault account | + **vault_account_id** | **str**| The ID of the vault account | **asset_id** | **str**| The ID of the asset | **manual_signging** | **bool**| False by default. The maximum number of inputs depends if the transaction will be signed by an automated co-signer server or on a mobile device. | [optional] **include_all_labels** | [**List[str]**](str.md)| Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. | [optional] diff --git a/fireblocks/__init__.py b/fireblocks/__init__.py index 476b7743..f948cdb2 100644 --- a/fireblocks/__init__.py +++ b/fireblocks/__init__.py @@ -14,7 +14,7 @@ Do not edit the class manually. """ # noqa: E501 -__version__ = "35.1.0" +__version__ = "0.0.0" # import apis into sdk package from fireblocks.api.api_user_api import ApiUserApi @@ -171,6 +171,9 @@ from fireblocks.models.address_registry_create_proof_of_ownership_response import ( AddressRegistryCreateProofOfOwnershipResponse, ) +from fireblocks.models.address_registry_customer_registry_response import ( + AddressRegistryCustomerRegistryResponse, +) from fireblocks.models.address_registry_get_vault_opt_out_response import ( AddressRegistryGetVaultOptOutResponse, ) @@ -1271,6 +1274,7 @@ from fireblocks.models.pre_screening import PreScreening from fireblocks.models.prefunded_settlement import PrefundedSettlement from fireblocks.models.prefunded_settlement_type import PrefundedSettlementType +from fireblocks.models.pricing_side import PricingSide from fireblocks.models.program_call_config import ProgramCallConfig from fireblocks.models.program_call_decoded_data_item import ProgramCallDecodedDataItem from fireblocks.models.provider import Provider @@ -1581,6 +1585,7 @@ from fireblocks.models.solana_instruction_with_value import SolanaInstructionWithValue from fireblocks.models.solana_rewards_breakdown import SolanaRewardsBreakdown from fireblocks.models.solana_simple_create_params import SolanaSimpleCreateParams +from fireblocks.models.soroban_call_data import SorobanCallData from fireblocks.models.source_config import SourceConfig from fireblocks.models.source_of_funds import SourceOfFunds from fireblocks.models.source_transfer_peer_path import SourceTransferPeerPath diff --git a/fireblocks/api/compliance_api.py b/fireblocks/api/compliance_api.py index 17f89867..5aa77792 100644 --- a/fireblocks/api/compliance_api.py +++ b/fireblocks/api/compliance_api.py @@ -25,6 +25,7 @@ from fireblocks.models.address_registry_add_vault_opt_outs_response import AddressRegistryAddVaultOptOutsResponse from fireblocks.models.address_registry_create_proof_of_ownership_request import AddressRegistryCreateProofOfOwnershipRequest from fireblocks.models.address_registry_create_proof_of_ownership_response import AddressRegistryCreateProofOfOwnershipResponse +from fireblocks.models.address_registry_customer_registry_response import AddressRegistryCustomerRegistryResponse from fireblocks.models.address_registry_get_vault_opt_out_response import AddressRegistryGetVaultOptOutResponse from fireblocks.models.address_registry_legal_entity import AddressRegistryLegalEntity from fireblocks.models.address_registry_list_vault_opt_outs_response import AddressRegistryListVaultOptOutsResponse @@ -1476,6 +1477,128 @@ def _delete_legal_entity_serialize( + @validate_call + def get_address_registry_customer_participation_status( + 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[AddressRegistryCustomerRegistryResponse]]: + """Get your customer's address registry default + + Read your customer's organization-wide address registry setting. Workspaces without their own choice use this as the default. Returns `NOT_SET` when no choice has been made yet, or `OPTED_IN` / `OPTED_OUT` when one has. + + :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_address_registry_customer_participation_status_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddressRegistryCustomerRegistryResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + _operation_id="get_address_registry_customer_participation_status", + ) + + def _get_address_registry_customer_participation_status_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, List[str], List[bytes], List[Tuple[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` + if 'Accept' not in _header_params: + _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='/address_registry/customer', + 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_address_registry_tenant_participation_status( self, @@ -1492,9 +1615,9 @@ def get_address_registry_tenant_participation_status( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Future[ApiResponse[AddressRegistryTenantRegistryResponse]]: - """Get address registry participation status for the authenticated workspace + """Get address registry status for this workspace - Returns whether the workspace is `OPTED_IN` or `OPTED_OUT` of the address registry. + Check whether this workspace uses the address registry. The response is `OPTED_IN` or `OPTED_OUT`. If this workspace has not been configured yet, it follows your customer's default (see `GET /v1/address_registry/customer`) when that default is `OPTED_IN` or `OPTED_OUT`; otherwise the workspace is opted in by default. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3584,6 +3707,136 @@ def _list_vaults_for_legal_entity_serialize( + @validate_call + def opt_in_address_registry_customer( + self, + 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[AddressRegistryCustomerRegistryResponse]]: + """Opt your customer in to the address registry + + Set your customer's default to opted in. Workspaces without their own setting will follow this default. No request body. Returns `OPTED_IN`. If the customer for this workspace cannot be determined, returns HTTP 404 with error code **2147**. + + :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 + + + _param = self._opt_in_address_registry_customer_serialize( + 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': "AddressRegistryCustomerRegistryResponse", + '404': "ErrorSchema", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + _operation_id="opt_in_address_registry_customer", + ) + + def _opt_in_address_registry_customer_serialize( + self, + 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, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # 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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/address_registry/customer', + 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 opt_in_address_registry_tenant( self, @@ -3601,9 +3854,9 @@ def opt_in_address_registry_tenant( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Future[ApiResponse[AddressRegistryTenantRegistryResponse]]: - """Opt the workspace in to the address registry + """Opt this workspace in to the address registry - Opts the workspace in. No request body. Response uses the same JSON shape as GET; status is OPTED_IN. + Turn on the address registry for this workspace. No request body. Returns `OPTED_IN`. :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 @@ -3713,6 +3966,129 @@ def _opt_in_address_registry_tenant_serialize( + @validate_call + def opt_out_address_registry_customer( + 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[AddressRegistryCustomerRegistryResponse]]: + """Opt your customer out of the address registry + + Set your customer's default to opted out. Workspaces without their own setting will follow this default. No request body. Returns `OPTED_OUT`. If the customer for this workspace cannot be determined, returns HTTP 404 with error code **2147**. + + :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._opt_out_address_registry_customer_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddressRegistryCustomerRegistryResponse", + '404': "ErrorSchema", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + _operation_id="opt_out_address_registry_customer", + ) + + def _opt_out_address_registry_customer_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, List[str], List[bytes], List[Tuple[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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/address_registry/customer', + 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 opt_out_address_registry_tenant( self, @@ -3729,9 +4105,9 @@ def opt_out_address_registry_tenant( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Future[ApiResponse[AddressRegistryTenantRegistryResponse]]: - """Opt the workspace out of the address registry + """Opt this workspace out of the address registry - Opts the workspace out. No request body. Response uses the same JSON shape as GET; status is OPTED_OUT. + Turn off the address registry for this workspace. No request body. Returns `OPTED_OUT`. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/fireblocks/api/trading_api.py b/fireblocks/api/trading_api.py index ce184de1..408a4b15 100644 --- a/fireblocks/api/trading_api.py +++ b/fireblocks/api/trading_api.py @@ -229,7 +229,7 @@ def create_quote( ) -> Future[ApiResponse[QuotesResponse]]: """Create a quote - Generate a time-limited quote for asset conversion, providing exchange rate and amount calculations. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). + Generate a time-limited quote for asset conversion, providing exchange rate and amount calculations. If `side` is omitted it defaults to `SELL`. Use `side: BOTH` to get quotes for each side the provider supports in a single call; providers that support only one side return that side only. Every returned quote carries a concrete `BUY` or `SELL` side, never `BOTH`. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). :param create_quote: (required) :type create_quote: CreateQuote @@ -383,7 +383,7 @@ def fetch_all_offers( ) -> Future[ApiResponse[OffersResponse]]: """Get all offers - Retrieve all available offers across the workspace for a given asset pair. Always operates in open scope — no provider or account selection required. Returns a mix of indicative rates and committed quotes as applicable per provider. If no slippageBps is provided, it defaults to 50 bps (0.5%). Slippage and settlement configuration do not affect the returned rate. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). + Retrieve all available offers across the workspace for a given asset pair. Always operates in open scope — no provider or account selection required. Returns a mix of indicative rates and committed quotes as applicable per provider. If `side` is omitted it defaults to `SELL`. Use `side: BOTH` to get offers for each side the provider supports in a single call; providers that support only one side return that side only. Every returned offer carries a concrete `BUY` or `SELL` side, never `BOTH`. If no slippageBps is provided, it defaults to 50 bps (0.5%). Slippage and settlement configuration do not affect the returned rate. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). :param create_offers_request: (required) :type create_offers_request: CreateOffersRequest @@ -537,7 +537,7 @@ def fetch_rates( ) -> Future[ApiResponse[RatesResponse]]: """Get rates - Retrieve indicative exchange rate from specified providers for a given asset pair. Rates are non-executable price signals intended for discovery and display purposes. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). + Retrieve indicative exchange rate from specified providers for a given asset pair. Rates are non-executable price signals intended for discovery and display purposes. If `side` is omitted it defaults to `SELL`. Use `side: BOTH` to get rates for each side the provider supports in a single call; providers that support only one side return that side only. Every returned rate carries a concrete `BUY` or `SELL` side, never `BOTH`. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). :param rates_request: (required) :type rates_request: RatesRequest diff --git a/fireblocks/api/transactions_api.py b/fireblocks/api/transactions_api.py index 3bafd1fd..41d174f8 100644 --- a/fireblocks/api/transactions_api.py +++ b/fireblocks/api/transactions_api.py @@ -670,7 +670,7 @@ def estimate_transaction_fee( ) -> Future[ApiResponse[EstimatedTransactionFeeResponse]]: """Estimate transaction fee - Estimates the transaction fee for a specific transaction request. This endpoint simulates a transaction which means that the system will expect to have the requested asset and balance in the specified wallet. **Note**: Supports all Fireblocks assets except ZCash (ZEC). The PROGRAM_CALL operation is not supported by this endpoint — fee estimation for Solana program calls is not available. Learn more about Fireblocks Fee Management in the following [guide](https://developers.fireblocks.com/reference/estimate-transaction-fee). Endpoint Permission: Admin, Signer, Approver, Editor. + Estimates the transaction fee for a specific transaction request. This endpoint simulates a transaction which means that the system will expect to have the requested asset and balance in the specified wallet. **Note**: Supports all Fireblocks assets except ZCash (ZEC). The PROGRAM_CALL operation is not supported by this endpoint — fee estimation for Solana program calls is not available. The SOROBAN_CALL operation is not supported by this endpoint - fee estimation for Stellar Soroban contract calls is not available. Learn more about Fireblocks Fee Management in the following [guide](https://developers.fireblocks.com/reference/estimate-transaction-fee). Endpoint Permission: Admin, Signer, Approver, Editor. :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 diff --git a/fireblocks/api/vaults_api.py b/fireblocks/api/vaults_api.py index 4541dc89..9e26c978 100644 --- a/fireblocks/api/vaults_api.py +++ b/fireblocks/api/vaults_api.py @@ -2308,7 +2308,7 @@ def _get_max_bip_index_used_serialize( @validate_call def get_max_spendable_amount( self, - vault_account_id: Annotated[StrictStr, Field(description="The ID of the vault account, or 'default' for the default vault account")], + vault_account_id: Annotated[StrictStr, Field(description="The ID of the vault account")], asset_id: Annotated[StrictStr, Field(description="The ID of the asset")], manual_signging: Annotated[Optional[StrictBool], Field(description="False by default. The maximum number of inputs depends if the transaction will be signed by an automated co-signer server or on a mobile device.")] = None, include_all_labels: Annotated[Optional[List[StrictStr]], Field(description="Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes.")] = None, @@ -2334,7 +2334,7 @@ def get_max_spendable_amount( **UTXO assets only.** Retrieve the maximum amount of the specified asset that can be spent in a single transaction from the specified vault account. **Endpoint Permissions:** Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - :param vault_account_id: The ID of the vault account, or 'default' for the default vault account (required) + :param vault_account_id: The ID of the vault account (required) :type vault_account_id: str :param asset_id: The ID of the asset (required) :type asset_id: str diff --git a/fireblocks/configuration.py b/fireblocks/configuration.py index ef212971..c1a025c0 100644 --- a/fireblocks/configuration.py +++ b/fireblocks/configuration.py @@ -550,7 +550,7 @@ def to_debug_report(self) -> str: "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.6.2\n" - "SDK Package Version: 35.1.0".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 0.0.0".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self) -> List[HostSetting]: diff --git a/fireblocks/models/__init__.py b/fireblocks/models/__init__.py index a266198a..834c42dc 100644 --- a/fireblocks/models/__init__.py +++ b/fireblocks/models/__init__.py @@ -68,6 +68,7 @@ from fireblocks.models.address_registry_add_vault_opt_outs_response import AddressRegistryAddVaultOptOutsResponse from fireblocks.models.address_registry_create_proof_of_ownership_request import AddressRegistryCreateProofOfOwnershipRequest from fireblocks.models.address_registry_create_proof_of_ownership_response import AddressRegistryCreateProofOfOwnershipResponse +from fireblocks.models.address_registry_customer_registry_response import AddressRegistryCustomerRegistryResponse from fireblocks.models.address_registry_get_vault_opt_out_response import AddressRegistryGetVaultOptOutResponse from fireblocks.models.address_registry_legal_entity import AddressRegistryLegalEntity from fireblocks.models.address_registry_list_vault_opt_outs_response import AddressRegistryListVaultOptOutsResponse @@ -796,6 +797,7 @@ from fireblocks.models.pre_screening import PreScreening from fireblocks.models.prefunded_settlement import PrefundedSettlement from fireblocks.models.prefunded_settlement_type import PrefundedSettlementType +from fireblocks.models.pricing_side import PricingSide from fireblocks.models.program_call_config import ProgramCallConfig from fireblocks.models.program_call_decoded_data_item import ProgramCallDecodedDataItem from fireblocks.models.provider import Provider @@ -996,6 +998,7 @@ from fireblocks.models.solana_instruction_with_value import SolanaInstructionWithValue from fireblocks.models.solana_rewards_breakdown import SolanaRewardsBreakdown from fireblocks.models.solana_simple_create_params import SolanaSimpleCreateParams +from fireblocks.models.soroban_call_data import SorobanCallData from fireblocks.models.source_config import SourceConfig from fireblocks.models.source_of_funds import SourceOfFunds from fireblocks.models.source_transfer_peer_path import SourceTransferPeerPath diff --git a/fireblocks/models/address_registry_customer_registry_response.py b/fireblocks/models/address_registry_customer_registry_response.py new file mode 100644 index 00000000..b69d8c16 --- /dev/null +++ b/fireblocks/models/address_registry_customer_registry_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@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 +from typing import Optional, Set +from typing_extensions import Self + +class AddressRegistryCustomerRegistryResponse(BaseModel): + """ + Your customer's organization-wide address registry default. Workspaces without their own setting use this value. GET, POST (opt in), and DELETE (opt out) all return this object. + """ # noqa: E501 + status: StrictStr = Field(description="`NOT_SET`, `OPTED_IN`, or `OPTED_OUT`. On GET, `NOT_SET` means no default has been chosen yet. On POST or DELETE, returns `OPTED_IN` or `OPTED_OUT` after a successful change.") + __properties: ClassVar[List[str]] = ["status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['NOT_SET', 'OPTED_IN', 'OPTED_OUT']): + raise ValueError("must be one of enum values ('NOT_SET', 'OPTED_IN', 'OPTED_OUT')") + 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 AddressRegistryCustomerRegistryResponse 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 AddressRegistryCustomerRegistryResponse 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") + }) + return _obj + + diff --git a/fireblocks/models/address_registry_tenant_registry_response.py b/fireblocks/models/address_registry_tenant_registry_response.py index bd99849a..563f9954 100644 --- a/fireblocks/models/address_registry_tenant_registry_response.py +++ b/fireblocks/models/address_registry_tenant_registry_response.py @@ -25,9 +25,9 @@ class AddressRegistryTenantRegistryResponse(BaseModel): """ - Workspace participation in the address registry. Same shape for GET, POST (opt in), and DELETE (opt out). + Whether this workspace uses the address registry. GET, POST (opt in), and DELETE (opt out) all return this object. On GET, if this workspace has no explicit choice, `status` follows the customer default when one is set, otherwise the workspace is opted in by default. """ # noqa: E501 - status: StrictStr = Field(description="OPTED_IN or OPTED_OUT.") + status: StrictStr = Field(description="`OPTED_IN` or `OPTED_OUT`. On GET, uses the customer default when this workspace has no setting of its own and the customer has made an explicit choice; is `OPTED_IN` when neither is set. On POST or DELETE, reflects the choice you just made for this workspace.") __properties: ClassVar[List[str]] = ["status"] @field_validator('status') diff --git a/fireblocks/models/create_offers_request.py b/fireblocks/models/create_offers_request.py index 2387e93f..6f245fd7 100644 --- a/fireblocks/models/create_offers_request.py +++ b/fireblocks/models/create_offers_request.py @@ -22,7 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from fireblocks.models.dvp_settlement import DVPSettlement -from fireblocks.models.side import Side +from fireblocks.models.pricing_side import PricingSide from fireblocks.models.transfer_rail import TransferRail from typing import Optional, Set from typing_extensions import Self @@ -38,7 +38,7 @@ class CreateOffersRequest(BaseModel): base_amount: Annotated[str, Field(strict=True)] = Field(description="The amount to get offers for", alias="baseAmount") slippage_bps: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = Field(default=50, description="Slippage tolerance in basis points (bps) for defi quotes - 1 is 0.01% and 10000 is 100%. If not set, defaults to 50 bps (0.5%).", alias="slippageBps") settlement: Optional[DVPSettlement] = None - side: Side + side: Optional[PricingSide] = PricingSide.SELL __properties: ClassVar[List[str]] = ["baseAssetId", "baseAssetRail", "quoteAssetId", "quoteAssetRail", "baseAmount", "slippageBps", "settlement", "side"] @field_validator('base_amount') @@ -109,7 +109,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "baseAmount": obj.get("baseAmount"), "slippageBps": obj.get("slippageBps") if obj.get("slippageBps") is not None else 50, "settlement": DVPSettlement.from_dict(obj["settlement"]) if obj.get("settlement") is not None else None, - "side": obj.get("side") + "side": obj.get("side") if obj.get("side") is not None else PricingSide.SELL }) return _obj diff --git a/fireblocks/models/create_quote.py b/fireblocks/models/create_quote.py index f70bad64..59fdb6c7 100644 --- a/fireblocks/models/create_quote.py +++ b/fireblocks/models/create_quote.py @@ -24,7 +24,7 @@ from fireblocks.models.create_quote_scope_inner import CreateQuoteScopeInner from fireblocks.models.dvp_settlement import DVPSettlement from fireblocks.models.participants_identification import ParticipantsIdentification -from fireblocks.models.side import Side +from fireblocks.models.pricing_side import PricingSide from fireblocks.models.transfer_rail import TransferRail from typing import Optional, Set from typing_extensions import Self @@ -41,7 +41,7 @@ class CreateQuote(BaseModel): base_amount: Annotated[str, Field(strict=True)] = Field(description="Amount in baseAssetId. BUY = base amount to receive; SELL = base amount to sell.", alias="baseAmount") slippage_bps: Optional[Union[Annotated[float, Field(le=10000, strict=True, ge=1)], Annotated[int, Field(le=10000, strict=True, ge=1)]]] = Field(default=50, description="Slippage tolerance in basis points (bps) for defi quotes - 1 is 0.01% and 10000 is 100%", alias="slippageBps") settlement: Optional[DVPSettlement] = None - side: Side + side: Optional[PricingSide] = PricingSide.SELL participants_identification: Optional[ParticipantsIdentification] = Field(default=None, alias="participantsIdentification") __properties: ClassVar[List[str]] = ["scope", "baseAssetId", "baseAssetRail", "quoteAssetId", "quoteAssetRail", "baseAmount", "slippageBps", "settlement", "side", "participantsIdentification"] @@ -124,7 +124,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "baseAmount": obj.get("baseAmount"), "slippageBps": obj.get("slippageBps") if obj.get("slippageBps") is not None else 50, "settlement": DVPSettlement.from_dict(obj["settlement"]) if obj.get("settlement") is not None else None, - "side": obj.get("side"), + "side": obj.get("side") if obj.get("side") is not None else PricingSide.SELL, "participantsIdentification": ParticipantsIdentification.from_dict(obj["participantsIdentification"]) if obj.get("participantsIdentification") is not None else None }) return _obj diff --git a/fireblocks/models/extra_parameters.py b/fireblocks/models/extra_parameters.py index 40259ee1..dd281da0 100644 --- a/fireblocks/models/extra_parameters.py +++ b/fireblocks/models/extra_parameters.py @@ -20,22 +20,24 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.soroban_call_data import SorobanCallData from typing import Optional, Set from typing_extensions import Self class ExtraParameters(BaseModel): """ - Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set to the [input selection structure.](https://developers.fireblocks.com/reference/transaction-objects#inputsselection) The inputs can be retrieved from the [Retrieve Unspent Inputs endpoint.](https://developers.fireblocks.com/reference/getunspentinputs) For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. For **exchange compliance (e.g., Binance) and Travel Rule purposes**, include the key `piiData` containing a **custom JSON structure** with Personally Identifiable Information (PII) relevant to the transaction. This data must be fully **encrypted by the sender** before being submitted to the Fireblocks API. The recommended encryption method is **hybrid encryption** using AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange's public key. [development libraries](https://developers.fireblocks.com/docs/a-developers-guide-to-constructing-encrypted-pii-messages-for-binance-via-fireblocks) **Note:** `rawMessageData`, `contractCallData`, and `inputsSelection` cannot be used together in the same call. + Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set to the [input selection structure.](https://developers.fireblocks.com/reference/transaction-objects#inputsselection) The inputs can be retrieved from the [Retrieve Unspent Inputs endpoint.](https://developers.fireblocks.com/reference/getunspentinputs) For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `SOROBAN_CALL` operations, add the key `sorobanCallData` with the value set to an object containing `envelopeXdr` - a base64 encoded, unsigned Stellar `TransactionEnvelope` holding the contract invocation. For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. For **exchange compliance (e.g., Binance) and Travel Rule purposes**, include the key `piiData` containing a **custom JSON structure** with Personally Identifiable Information (PII) relevant to the transaction. This data must be fully **encrypted by the sender** before being submitted to the Fireblocks API. The recommended encryption method is **hybrid encryption** using AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange's public key. [development libraries](https://developers.fireblocks.com/docs/a-developers-guide-to-constructing-encrypted-pii-messages-for-binance-via-fireblocks) **Note:** `rawMessageData`, `contractCallData`, `sorobanCallData`, and `inputsSelection` cannot be used together in the same call. """ # noqa: E501 node_controls: Optional[Dict[str, Any]] = Field(default=None, alias="nodeControls") raw_message_data: Optional[Dict[str, Any]] = Field(default=None, alias="rawMessageData") contract_call_data: Optional[StrictStr] = Field(default=None, alias="contractCallData") program_call_data: Optional[StrictStr] = Field(default=None, alias="programCallData") + soroban_call_data: Optional[SorobanCallData] = Field(default=None, alias="sorobanCallData") inputs_selection: Optional[Dict[str, Any]] = Field(default=None, alias="inputsSelection") allow_base_asset_address: Optional[StrictBool] = Field(default=None, alias="allowBaseAssetAddress") pii_data: Optional[Dict[str, Any]] = Field(default=None, alias="piiData") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["nodeControls", "rawMessageData", "contractCallData", "programCallData", "inputsSelection", "allowBaseAssetAddress", "piiData"] + __properties: ClassVar[List[str]] = ["nodeControls", "rawMessageData", "contractCallData", "programCallData", "sorobanCallData", "inputsSelection", "allowBaseAssetAddress", "piiData"] model_config = ConfigDict( populate_by_name=True, @@ -78,6 +80,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of soroban_call_data + if self.soroban_call_data: + _dict['sorobanCallData'] = self.soroban_call_data.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -103,6 +108,11 @@ def to_dict(self) -> Dict[str, Any]: if self.program_call_data is None and "program_call_data" in self.model_fields_set: _dict['programCallData'] = None + # set to None if soroban_call_data (nullable) is None + # and model_fields_set contains the field + if self.soroban_call_data is None and "soroban_call_data" in self.model_fields_set: + _dict['sorobanCallData'] = None + # set to None if inputs_selection (nullable) is None # and model_fields_set contains the field if self.inputs_selection is None and "inputs_selection" in self.model_fields_set: @@ -134,6 +144,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "rawMessageData": obj.get("rawMessageData"), "contractCallData": obj.get("contractCallData"), "programCallData": obj.get("programCallData"), + "sorobanCallData": SorobanCallData.from_dict(obj["sorobanCallData"]) if obj.get("sorobanCallData") is not None else None, "inputsSelection": obj.get("inputsSelection"), "allowBaseAssetAddress": obj.get("allowBaseAssetAddress"), "piiData": obj.get("piiData") diff --git a/fireblocks/models/get_transaction_operation.py b/fireblocks/models/get_transaction_operation.py index a212de16..e3fb7998 100644 --- a/fireblocks/models/get_transaction_operation.py +++ b/fireblocks/models/get_transaction_operation.py @@ -21,7 +21,7 @@ class GetTransactionOperation(str, Enum): """ - * `TRANSFER` - Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address. * `MINT` - Mints new tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `CONTRACT_CALL` - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) * `ENABLE_ASSET` - Algorand, DigitalBits, Solana, and Stellar require an on-chain transaction to create an asset wallet and enable the deposit address. This transaction is automatically created when adding assets on these blockchains at a vault account. * `STAKE` - Assign assets to a staking pool managed by a staking validator. Supported for Stellar and EVM-based blockchains. This transaction is automatically created when performing staking operations. * `SUPPLY_TO_COMPOUND` - Deprecated since April 1st, 2023. Older transactions may have this as their operation, in case users in the workspace have used the direct integration between Fireblocks and the Compound DeFI protocol. * `REDEEM_FROM_COMPOUND` - Deprecated since April 1st, 2023. Older transactions may have this as their operation, in case users in the workspace have used the direct integration between Fireblocks and the Compound DeFI protocol. * `PROGRAM_CALL` - In Solana refers to invoking on-chain programs (smart contracts) to execute transactions and interact with the blockchain. * `APPROVE` - Enables the approve function for a smart contract or wallet to withdraw from a designated wallet. [Learn more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Amount-Cap-for-Approve-transactions). + * `TRANSFER` - Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address. * `MINT` - Mints new tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `CONTRACT_CALL` - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) * `ENABLE_ASSET` - Algorand, DigitalBits, Solana, and Stellar require an on-chain transaction to create an asset wallet and enable the deposit address. This transaction is automatically created when adding assets on these blockchains at a vault account. * `STAKE` - Assign assets to a staking pool managed by a staking validator. Supported for Stellar and EVM-based blockchains. This transaction is automatically created when performing staking operations. * `SUPPLY_TO_COMPOUND` - Deprecated since April 1st, 2023. Older transactions may have this as their operation, in case users in the workspace have used the direct integration between Fireblocks and the Compound DeFI protocol. * `REDEEM_FROM_COMPOUND` - Deprecated since April 1st, 2023. Older transactions may have this as their operation, in case users in the workspace have used the direct integration between Fireblocks and the Compound DeFI protocol. * `PROGRAM_CALL` - In Solana refers to invoking on-chain programs (smart contracts) to execute transactions and interact with the blockchain. * `APPROVE` - Enables the approve function for a smart contract or wallet to withdraw from a designated wallet. [Learn more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Amount-Cap-for-Approve-transactions). * `SOROBAN_CALL` - Invokes a Soroban smart contract on the Stellar blockchain. """ """ @@ -39,6 +39,7 @@ class GetTransactionOperation(str, Enum): SUPPLY_TO_COMPOUND = 'SUPPLY_TO_COMPOUND' PROGRAM_CALL = 'PROGRAM_CALL' APPROVE = 'APPROVE' + SOROBAN_CALL = 'SOROBAN_CALL' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/fireblocks/models/pricing_side.py b/fireblocks/models/pricing_side.py new file mode 100644 index 00000000..e4803668 --- /dev/null +++ b/fireblocks/models/pricing_side.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@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 PricingSide(str, Enum): + """ + Side to price on a quote, rate or offer request. BUY: receive base / pay quote; SELL: give base / receive quote; BOTH: request pricing for both sides at once. Providers that support only one of the sides return entries for that side only. BOTH is accepted on requests only, never on order execution requests, and responses never return it: every returned quote, rate or offer carries a concrete BUY or SELL. When omitted, defaults to SELL. + """ + + """ + allowed enum values + """ + BUY = 'BUY' + SELL = 'SELL' + BOTH = 'BOTH' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PricingSide from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/fireblocks/models/rate.py b/fireblocks/models/rate.py index 930048e6..86511614 100644 --- a/fireblocks/models/rate.py +++ b/fireblocks/models/rate.py @@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from fireblocks.models.access_type_response import AccessTypeResponse +from fireblocks.models.side import Side from fireblocks.models.transfer_rail import TransferRail from typing import Optional, Set from typing_extensions import Self @@ -36,7 +37,8 @@ class Rate(BaseModel): quote_asset_id: StrictStr = Field(description="The target asset identifier", alias="quoteAssetId") quote_asset_rail: Optional[TransferRail] = Field(default=None, alias="quoteAssetRail") rate: Annotated[str, Field(strict=True)] = Field(description="The indicative exchange rate — the number of units of the quote asset that equal 1 unit of the base asset. For example, if base is BTC and quote is USD, a rate of 75000 means 1 BTC = 75,000 USD.") - __properties: ClassVar[List[str]] = ["via", "baseAssetId", "baseAssetRail", "quoteAssetId", "quoteAssetRail", "rate"] + side: Optional[Side] = None + __properties: ClassVar[List[str]] = ["via", "baseAssetId", "baseAssetRail", "quoteAssetId", "quoteAssetRail", "rate", "side"] @field_validator('rate') def rate_validate_regular_expression(cls, value): @@ -104,7 +106,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "baseAssetRail": obj.get("baseAssetRail"), "quoteAssetId": obj.get("quoteAssetId"), "quoteAssetRail": obj.get("quoteAssetRail"), - "rate": obj.get("rate") + "rate": obj.get("rate"), + "side": obj.get("side") }) return _obj diff --git a/fireblocks/models/rate_offer.py b/fireblocks/models/rate_offer.py index 0bed2332..6fc0ac6c 100644 --- a/fireblocks/models/rate_offer.py +++ b/fireblocks/models/rate_offer.py @@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from fireblocks.models.access_type_response import AccessTypeResponse +from fireblocks.models.side import Side from fireblocks.models.transfer_rail import TransferRail from typing import Optional, Set from typing_extensions import Self @@ -36,8 +37,9 @@ class RateOffer(BaseModel): quote_asset_id: StrictStr = Field(description="The target asset identifier", alias="quoteAssetId") quote_asset_rail: Optional[TransferRail] = Field(default=None, alias="quoteAssetRail") rate: Annotated[str, Field(strict=True)] = Field(description="The indicative exchange rate — the number of units of the quote asset that equal 1 unit of the base asset. For example, if base is BTC and quote is USD, a rate of 75000 means 1 BTC = 75,000 USD.") + side: Optional[Side] = None offer_type: StrictStr = Field(description="The type of offer — RATE for indicative pricing.", alias="offerType") - __properties: ClassVar[List[str]] = ["via", "baseAssetId", "baseAssetRail", "quoteAssetId", "quoteAssetRail", "rate", "offerType"] + __properties: ClassVar[List[str]] = ["via", "baseAssetId", "baseAssetRail", "quoteAssetId", "quoteAssetRail", "rate", "side", "offerType"] @field_validator('rate') def rate_validate_regular_expression(cls, value): @@ -113,6 +115,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "quoteAssetId": obj.get("quoteAssetId"), "quoteAssetRail": obj.get("quoteAssetRail"), "rate": obj.get("rate"), + "side": obj.get("side"), "offerType": obj.get("offerType") }) return _obj diff --git a/fireblocks/models/rates_request.py b/fireblocks/models/rates_request.py index c163452e..4eb901ff 100644 --- a/fireblocks/models/rates_request.py +++ b/fireblocks/models/rates_request.py @@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated +from fireblocks.models.pricing_side import PricingSide from fireblocks.models.scope_item import ScopeItem from typing import Optional, Set from typing_extensions import Self @@ -33,7 +34,8 @@ class RatesRequest(BaseModel): base_asset_id: StrictStr = Field(description="The source asset identifier.", alias="baseAssetId") quote_asset_id: StrictStr = Field(description="The target asset identifier.", alias="quoteAssetId") base_amount: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="The amount to convert from", alias="baseAmount") - __properties: ClassVar[List[str]] = ["scope", "baseAssetId", "quoteAssetId", "baseAmount"] + side: Optional[PricingSide] = PricingSide.SELL + __properties: ClassVar[List[str]] = ["scope", "baseAssetId", "quoteAssetId", "baseAmount", "side"] @field_validator('base_amount') def base_amount_validate_regular_expression(cls, value): @@ -106,7 +108,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "scope": [ScopeItem.from_dict(_item) for _item in obj["scope"]] if obj.get("scope") is not None else None, "baseAssetId": obj.get("baseAssetId"), "quoteAssetId": obj.get("quoteAssetId"), - "baseAmount": obj.get("baseAmount") + "baseAmount": obj.get("baseAmount"), + "side": obj.get("side") if obj.get("side") is not None else PricingSide.SELL }) return _obj diff --git a/fireblocks/models/soroban_call_data.py b/fireblocks/models/soroban_call_data.py new file mode 100644 index 00000000..d0a30ec3 --- /dev/null +++ b/fireblocks/models/soroban_call_data.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@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 +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class SorobanCallData(BaseModel): + """ + The Soroban contract invocation to execute, for `SOROBAN_CALL` operations. Fireblocks decodes the submitted envelope, determines the footprint, resource fee, sequence number and authorization entries from its own simulation, and signs a transaction it rebuilt from the invocation. Only the contract invocation itself is carried through unchanged. + """ # noqa: E501 + envelope_xdr: Union[Annotated[bytes, Field(min_length=1, strict=True, max_length=176128)], Annotated[str, Field(min_length=1, strict=True, max_length=176128)]] = Field(description="A base64 encoded, unsigned Stellar `TransactionEnvelope` carrying exactly one `invokeHostFunction` operation that invokes a contract. The API only checks that the value is present. The envelope is decoded and validated after the transaction is created, and a transaction whose envelope fails validation is not signed and ends as `FAILED`. An envelope is rejected if it carries signatures or authorization entries, a memo or a fee-bump wrapper, if its source account is not the Stellar address of the vault account, or if it has no bounded time window. A Stellar transaction cannot exceed 132096 bytes, about 176128 base64 characters.", alias="envelopeXdr") + __properties: ClassVar[List[str]] = ["envelopeXdr"] + + 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 SorobanCallData 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 SorobanCallData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "envelopeXdr": obj.get("envelopeXdr") + }) + return _obj + + diff --git a/fireblocks/models/transaction_operation.py b/fireblocks/models/transaction_operation.py index 672f6787..acc1d6c7 100644 --- a/fireblocks/models/transaction_operation.py +++ b/fireblocks/models/transaction_operation.py @@ -21,7 +21,7 @@ class TransactionOperation(str, Enum): """ - * `TRANSFER` - The default value for an operation. Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address. * `MINT` - Mints new tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `CONTRACT_CALL` - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. * `PROGRAM_CALL` - Execute multiple instructions on Solana blockchain. The @solana/web3.js library is recommended for building program call transactions. * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) * `APPROVE` - Enables the approve function for a smart contract or wallet to withdraw from a designated wallet. [Learn more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Amount-Cap-for-Approve-transactions). * `ENABLE_ASSET` - Algorand, DigitalBits, Solana, and Stellar require an on-chain transaction to create an asset wallet and enable the deposit address. This transaction is automatically created when adding assets on these blockchains at a vault account. * `CANTON_CALL` - A customer-initiated Canton operation, such as withdrawing an allocation or responding to an onboarding offer. Note that not every Canton transaction carries this operation — an incoming Canton transfer offer is a `TRANSFER` — so use the top-level `cantonDetails` rather than `operation` to identify a Canton transaction. + * `TRANSFER` - The default value for an operation. Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address. * `MINT` - Mints new tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `CONTRACT_CALL` - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. * `PROGRAM_CALL` - Execute multiple instructions on Solana blockchain. The @solana/web3.js library is recommended for building program call transactions. * `SOROBAN_CALL` - Invokes a Soroban smart contract on the Stellar blockchain. The call is submitted as a base64-encoded, unsigned Stellar `TransactionEnvelope` in `extraParameters.sorobanCallData.envelopeXdr`, which is the same artifact a Soroban dApp hands a wallet. Fireblocks decodes the envelope, determines the footprint, resource fee, sequence number and authorization entries itself, and signs a transaction it rebuilt - the submitted envelope must therefore carry no signatures and no authorization entries. `assetId` is the fee asset (`XLM` or `XLM_TEST`), not the token being moved, and `destination` is the contract wallet or, when enabled for your workspace, a `ONE_TIME_ADDRESS` holding a Stellar contract address (`C...`). `amount` must be omitted or `0`. Fee estimation is not supported for this operation. * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) * `APPROVE` - Enables the approve function for a smart contract or wallet to withdraw from a designated wallet. [Learn more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Amount-Cap-for-Approve-transactions). * `ENABLE_ASSET` - Algorand, DigitalBits, Solana, and Stellar require an on-chain transaction to create an asset wallet and enable the deposit address. This transaction is automatically created when adding assets on these blockchains at a vault account. * `CANTON_CALL` - A customer-initiated Canton operation, such as withdrawing an allocation or responding to an onboarding offer. Note that not every Canton transaction carries this operation — an incoming Canton transfer offer is a `TRANSFER` — so use the top-level `cantonDetails` rather than `operation` to identify a Canton transaction. """ """ @@ -31,6 +31,7 @@ class TransactionOperation(str, Enum): BURN = 'BURN' CONTRACT_CALL = 'CONTRACT_CALL' PROGRAM_CALL = 'PROGRAM_CALL' + SOROBAN_CALL = 'SOROBAN_CALL' MINT = 'MINT' RAW = 'RAW' TYPED_MESSAGE = 'TYPED_MESSAGE' diff --git a/fireblocks/models/transfer_peer_path_type.py b/fireblocks/models/transfer_peer_path_type.py index 8dbababe..74313471 100644 --- a/fireblocks/models/transfer_peer_path_type.py +++ b/fireblocks/models/transfer_peer_path_type.py @@ -44,6 +44,7 @@ class TransferPeerPathType(str, Enum): MULTI_DESTINATION = 'MULTI_DESTINATION' OEC_PARTNER = 'OEC_PARTNER' WALLET_POOL = 'WALLET_POOL' + SOROBAN_CONTRACT = 'SOROBAN_CONTRACT' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/pyproject.toml b/pyproject.toml index bd42c00e..08a27f53 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fireblocks" -version = "35.1.0" +version = "0.0.0" description = "Fireblocks API" authors = ["Fireblocks "] license = "MIT License" diff --git a/setup.py b/setup.py index de807652..8e55f57b 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "fireblocks" -VERSION = "35.1.0" +VERSION = "0.0.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 2.1.0, < 3.0.0", diff --git a/test/test_add_connected_account_request.py b/test/test_add_connected_account_request.py index 007a1ba5..78f5165e 100644 --- a/test/test_add_connected_account_request.py +++ b/test/test_add_connected_account_request.py @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> AddConnectedAccountRequest: return AddConnectedAccountRequest( provider_id = 'BINANCE', display_name = 'My Binance Account', - creds = '[B@ad8c28d', + creds = '[B@430b8f4b', api_key = 'api_key_abc123', main_account_id = 'acc-parent-001', account_id = 'provider-acc-001', @@ -47,7 +47,7 @@ def make_instance(self, include_optional) -> AddConnectedAccountRequest: else: return AddConnectedAccountRequest( provider_id = 'BINANCE', - creds = '[B@ad8c28d', + creds = '[B@430b8f4b', api_key = 'api_key_abc123', ) """ diff --git a/test/test_address_registry_create_proof_of_ownership_response.py b/test/test_address_registry_create_proof_of_ownership_response.py index 4c9becbd..343fc235 100644 --- a/test/test_address_registry_create_proof_of_ownership_response.py +++ b/test/test_address_registry_create_proof_of_ownership_response.py @@ -40,14 +40,14 @@ def make_instance( model = AddressRegistryCreateProofOfOwnershipResponse() if include_optional: return AddressRegistryCreateProofOfOwnershipResponse( - pdf = '[B@4ebc751e', + pdf = '[B@2da901c1', export_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6', verification_hash = 'BHS2QaqGyYegvLBy5qrGhrES3A2n5JPD7ubpgJozRgeA', expires_at = '2027-08-17' ) else: return AddressRegistryCreateProofOfOwnershipResponse( - pdf = '[B@4ebc751e', + pdf = '[B@2da901c1', export_id = '3fa85f64-5717-4562-b3fc-2c963f66afa6', verification_hash = 'BHS2QaqGyYegvLBy5qrGhrES3A2n5JPD7ubpgJozRgeA', expires_at = '2027-08-17', diff --git a/test/test_address_registry_customer_registry_response.py b/test/test_address_registry_customer_registry_response.py new file mode 100644 index 00000000..94d3abf2 --- /dev/null +++ b/test/test_address_registry_customer_registry_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.address_registry_customer_registry_response import ( + AddressRegistryCustomerRegistryResponse, +) + + +class TestAddressRegistryCustomerRegistryResponse(unittest.TestCase): + """AddressRegistryCustomerRegistryResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance( + self, include_optional + ) -> AddressRegistryCustomerRegistryResponse: + """Test AddressRegistryCustomerRegistryResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `AddressRegistryCustomerRegistryResponse` + """ + model = AddressRegistryCustomerRegistryResponse() + if include_optional: + return AddressRegistryCustomerRegistryResponse( + status = 'NOT_SET' + ) + else: + return AddressRegistryCustomerRegistryResponse( + status = 'NOT_SET', + ) + """ + + def testAddressRegistryCustomerRegistryResponse(self): + """Test AddressRegistryCustomerRegistryResponse""" + # 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_audit_log_entry.py b/test/test_audit_log_entry.py index be66f165..2c9a3145 100644 --- a/test/test_audit_log_entry.py +++ b/test/test_audit_log_entry.py @@ -38,13 +38,13 @@ def make_instance(self, include_optional) -> AuditLogEntry: return AuditLogEntry( timestamp = '1700000000', event_type = 'STATUS_TRANSITION', - data = '[B@3ddf2a72' + data = '[B@423321e7' ) else: return AuditLogEntry( timestamp = '1700000000', event_type = 'STATUS_TRANSITION', - data = '[B@3ddf2a72', + data = '[B@423321e7', ) """ diff --git a/test/test_compliance_api.py b/test/test_compliance_api.py index e0ff4800..734e0bd9 100644 --- a/test/test_compliance_api.py +++ b/test/test_compliance_api.py @@ -96,10 +96,17 @@ def test_delete_legal_entity(self) -> None: """ pass + def test_get_address_registry_customer_participation_status(self) -> None: + """Test case for get_address_registry_customer_participation_status + + Get your customer's address registry default + """ + pass + def test_get_address_registry_tenant_participation_status(self) -> None: """Test case for get_address_registry_tenant_participation_status - Get address registry participation status for the authenticated workspace + Get address registry status for this workspace """ pass @@ -208,17 +215,31 @@ def test_list_vaults_for_legal_entity(self) -> None: """ pass + def test_opt_in_address_registry_customer(self) -> None: + """Test case for opt_in_address_registry_customer + + Opt your customer in to the address registry + """ + pass + def test_opt_in_address_registry_tenant(self) -> None: """Test case for opt_in_address_registry_tenant - Opt the workspace in to the address registry + Opt this workspace in to the address registry + """ + pass + + def test_opt_out_address_registry_customer(self) -> None: + """Test case for opt_out_address_registry_customer + + Opt your customer out of the address registry """ pass def test_opt_out_address_registry_tenant(self) -> None: """Test case for opt_out_address_registry_tenant - Opt the workspace out of the address registry + Opt this workspace out of the address registry """ pass diff --git a/test/test_create_offers_request.py b/test/test_create_offers_request.py index 679ffba1..5c925f4e 100644 --- a/test/test_create_offers_request.py +++ b/test/test_create_offers_request.py @@ -43,14 +43,13 @@ def make_instance(self, include_optional) -> CreateOffersRequest: base_amount = '100.00', slippage_bps = 1, settlement = {"type":"DVP","sourceAccount":{"type":"VAULT_ACCOUNT","id":"vault_acc_3f7e1d9b2c5a8e4f"},"destinationAccount":{"type":"VAULT_ACCOUNT","id":"vault_acc_7b2e5d8f1c4a9e3b"}}, - side = 'BUY' + side = 'SELL' ) else: return CreateOffersRequest( base_asset_id = 'BTC', quote_asset_id = 'USD', base_amount = '100.00', - side = 'BUY', ) """ diff --git a/test/test_create_quote.py b/test/test_create_quote.py index 8cbe4dab..10cb635a 100644 --- a/test/test_create_quote.py +++ b/test/test_create_quote.py @@ -46,7 +46,7 @@ def make_instance(self, include_optional) -> CreateQuote: base_amount = '100.00', slippage_bps = 1, settlement = {"type":"DVP","sourceAccount":{"type":"VAULT_ACCOUNT","id":"vault_acc_3f7e1d9b2c5a8e4f"},"destinationAccount":{"type":"VAULT_ACCOUNT","id":"vault_acc_7b2e5d8f1c4a9e3b"}}, - side = 'BUY', + side = 'SELL', participants_identification = {"originator":{"externalReferenceId":"user_123456","entityType":"INDIVIDUAL","participantRelationshipType":"FirstParty","fullName":{"firstName":"John","lastName":"Smith"},"dateOfBirth":"1985-03-15","email":"john.smith@example.com","phone":"+14155551234","postalAddress":{"streetName":"Main Street","buildingNumber":"123","postalCode":"10001","city":"New York","subdivision":"NY","district":"Manhattan","country":"US"}},"beneficiary":{"externalReferenceId":"user_789012","entityType":"INDIVIDUAL","participantRelationshipType":"ThirdParty","fullName":{"firstName":"Alice","lastName":"Johnson"},"dateOfBirth":"1990-07-22","email":"alice.johnson@example.com","phone":"+14155551234","postalAddress":{"streetName":"Broadway","buildingNumber":"456","postalCode":"10002","city":"New York","subdivision":"NY","district":"Manhattan","country":"US"}}} ) else: @@ -57,7 +57,6 @@ def make_instance(self, include_optional) -> CreateQuote: base_asset_id = '', quote_asset_id = '', base_amount = '100.00', - side = 'BUY', ) """ diff --git a/test/test_extra_parameters.py b/test/test_extra_parameters.py index c963dccf..85a75fa5 100644 --- a/test/test_extra_parameters.py +++ b/test/test_extra_parameters.py @@ -40,6 +40,8 @@ def make_instance(self, include_optional) -> ExtraParameters: raw_message_data = { }, contract_call_data = '', program_call_data = '', + soroban_call_data = fireblocks.models.soroban_call_data.SorobanCallData( + envelope_xdr = '[B@753348c3', ), inputs_selection = { }, allow_base_asset_address = True, pii_data = { } diff --git a/test/test_offer.py b/test/test_offer.py index 60ce679f..856b54be 100644 --- a/test/test_offer.py +++ b/test/test_offer.py @@ -42,6 +42,7 @@ def make_instance(self, include_optional) -> Offer: quote_asset_id = 'USD', quote_asset_rail = 'BLOCKCHAIN', rate = '1.2345', + side = 'BUY', offer_type = 'QUOTE', id = 'quote_8f2e4d1a9c5b7e3f', base_amount = '1000.00', @@ -55,7 +56,6 @@ def make_instance(self, include_optional) -> Offer: general_fees = [ null ], - side = 'BUY', expires_at = '2024-01-15T10:35:00.000Z', required_participants_identification_on_order = '', type = 'COMMITTED' @@ -66,11 +66,11 @@ def make_instance(self, include_optional) -> Offer: base_asset_id = 'BTC', quote_asset_id = 'USD', rate = '1.2345', + side = 'BUY', offer_type = 'QUOTE', id = 'quote_8f2e4d1a9c5b7e3f', base_amount = '1000.00', quote_amount = '0.02458', - side = 'BUY', expires_at = '2024-01-15T10:35:00.000Z', type = 'COMMITTED', ) diff --git a/test/test_pricing_side.py b/test/test_pricing_side.py new file mode 100644 index 00000000..4ac2c75c --- /dev/null +++ b/test/test_pricing_side.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.pricing_side import PricingSide + + +class TestPricingSide(unittest.TestCase): + """PricingSide unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPricingSide(self): + """Test PricingSide""" + # inst = PricingSide() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_rate.py b/test/test_rate.py index 74fa4666..8b9aed5c 100644 --- a/test/test_rate.py +++ b/test/test_rate.py @@ -41,7 +41,8 @@ def make_instance(self, include_optional) -> Rate: base_asset_rail = 'BLOCKCHAIN', quote_asset_id = '', quote_asset_rail = 'BLOCKCHAIN', - rate = '1.2345' + rate = '1.2345', + side = 'BUY' ) else: return Rate( diff --git a/test/test_rate_offer.py b/test/test_rate_offer.py index 04bc139d..193e543a 100644 --- a/test/test_rate_offer.py +++ b/test/test_rate_offer.py @@ -42,6 +42,7 @@ def make_instance(self, include_optional) -> RateOffer: quote_asset_id = '', quote_asset_rail = 'BLOCKCHAIN', rate = '1.2345', + side = 'BUY', offer_type = 'RATE' ) else: diff --git a/test/test_rates_request.py b/test/test_rates_request.py index 57f753d8..8d018027 100644 --- a/test/test_rates_request.py +++ b/test/test_rates_request.py @@ -41,7 +41,8 @@ def make_instance(self, include_optional) -> RatesRequest: ], base_asset_id = 'BTC', quote_asset_id = 'USD', - base_amount = '100.00' + base_amount = '100.00', + side = 'SELL' ) else: return RatesRequest( diff --git a/test/test_rates_response.py b/test/test_rates_response.py index b09e2501..d88a777e 100644 --- a/test/test_rates_response.py +++ b/test/test_rates_response.py @@ -43,7 +43,8 @@ def make_instance(self, include_optional) -> RatesResponse: base_asset_rail = 'BLOCKCHAIN', quote_asset_id = '', quote_asset_rail = 'BLOCKCHAIN', - rate = '1.2345', ) + rate = '1.2345', + side = 'BUY', ) ], errors = [ fireblocks.models.scope_item_failure.ScopeItemFailure( @@ -61,7 +62,8 @@ def make_instance(self, include_optional) -> RatesResponse: base_asset_rail = 'BLOCKCHAIN', quote_asset_id = '', quote_asset_rail = 'BLOCKCHAIN', - rate = '1.2345', ) + rate = '1.2345', + side = 'BUY', ) ], errors = [ fireblocks.models.scope_item_failure.ScopeItemFailure( diff --git a/test/test_soroban_call_data.py b/test/test_soroban_call_data.py new file mode 100644 index 00000000..d8d2ce52 --- /dev/null +++ b/test/test_soroban_call_data.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.soroban_call_data import SorobanCallData + + +class TestSorobanCallData(unittest.TestCase): + """SorobanCallData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SorobanCallData: + """Test SorobanCallData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `SorobanCallData` + """ + model = SorobanCallData() + if include_optional: + return SorobanCallData( + envelope_xdr = '[B@753348c3' + ) + else: + return SorobanCallData( + envelope_xdr = '[B@753348c3', + ) + """ + + def testSorobanCallData(self): + """Test SorobanCallData""" + # 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_update_connected_account_credentials_request.py b/test/test_update_connected_account_credentials_request.py index 243987a3..6f5f8382 100644 --- a/test/test_update_connected_account_credentials_request.py +++ b/test/test_update_connected_account_credentials_request.py @@ -40,12 +40,12 @@ def make_instance( model = UpdateConnectedAccountCredentialsRequest() if include_optional: return UpdateConnectedAccountCredentialsRequest( - creds = '[B@21c60504', + creds = '[B@3714e415', api_key = 'api_key_new_abc123' ) else: return UpdateConnectedAccountCredentialsRequest( - creds = '[B@21c60504', + creds = '[B@3714e415', api_key = 'api_key_new_abc123', ) """