diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 3b633f9..c305eb7 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -196,6 +196,7 @@ docs/GetAuditLogsResponse.md docs/GetAuditLogsResponseDTO.md docs/GetConnectionsResponse.md docs/GetConsoleUsersResponse.md +docs/GetExchangeAccountsCredentialsPublicKeyResponse.md docs/GetFilterParameter.md docs/GetMaxSpendableAmountResponse.md docs/GetNFTsResponse.md @@ -703,6 +704,7 @@ fireblocks/models/get_audit_logs_response.py fireblocks/models/get_audit_logs_response_dto.py fireblocks/models/get_connections_response.py fireblocks/models/get_console_users_response.py +fireblocks/models/get_exchange_accounts_credentials_public_key_response.py fireblocks/models/get_filter_parameter.py fireblocks/models/get_max_spendable_amount_response.py fireblocks/models/get_nfts_response.py @@ -1177,6 +1179,7 @@ test/test_get_audit_logs_response.py test/test_get_audit_logs_response_dto.py test/test_get_connections_response.py test/test_get_console_users_response.py +test/test_get_exchange_accounts_credentials_public_key_response.py test/test_get_filter_parameter.py test/test_get_max_spendable_amount_response.py test/test_get_nfts_response.py diff --git a/README.md b/README.md index cd8267c..cd8ccd1 100644 --- a/README.md +++ b/README.md @@ -629,6 +629,7 @@ Class | Method | HTTP request | Description - [GetAuditLogsResponseDTO](docs/GetAuditLogsResponseDTO.md) - [GetConnectionsResponse](docs/GetConnectionsResponse.md) - [GetConsoleUsersResponse](docs/GetConsoleUsersResponse.md) + - [GetExchangeAccountsCredentialsPublicKeyResponse](docs/GetExchangeAccountsCredentialsPublicKeyResponse.md) - [GetFilterParameter](docs/GetFilterParameter.md) - [GetMaxSpendableAmountResponse](docs/GetMaxSpendableAmountResponse.md) - [GetNFTsResponse](docs/GetNFTsResponse.md) diff --git a/docs/AssetResponseOnchain.md b/docs/AssetResponseOnchain.md index 3dd989a..18f5753 100644 --- a/docs/AssetResponseOnchain.md +++ b/docs/AssetResponseOnchain.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **name** | **str** | The asset name | **address** | **str** | The asset address | [optional] **decimals** | **float** | Number of decimals | -**standard** | **str** | The asset standard | +**standard** | **str** | The asset standard | [optional] ## Example diff --git a/docs/BlockchainsAssetsApi.md b/docs/BlockchainsAssetsApi.md index d46ee03..d750b0f 100644 --- a/docs/BlockchainsAssetsApi.md +++ b/docs/BlockchainsAssetsApi.md @@ -83,7 +83,7 @@ No authorization required Register an asset -Register a new asset to a workspace and return the newly created asset's details. Currently supported chains are: - EVM based chains - Stellar - Algorand - TRON - NEAR +Register a new asset to a workspace and return the newly created asset's details. Currently supported chains are: - EVM based chains - Stellar - Algorand - TRON - NEAR - Solana ### Example @@ -151,8 +151,8 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A new asset has been created successfully | - | -**400** | - Listing an asset on the requested blockchain is not supported. Error code: 1000 - The asset address is invalid. Error code: 1003 - Self serve listing an asset on the requested blockchain is currently not supported, please contact support. Error code: 1004 | - | -**403** | - The asset creation quota reached. Error code: 1005 | - | +**400** | - Listing an asset on the requested blockchain is not supported. Error code: 1000 - The asset address is invalid. Error code: 1003 - Self serve listing an asset on the requested blockchain is currently not supported, please contact support. Error code: 1004 - Blockchain is deprecated. Error code: 1006 - The asset's standard is not supported. Error code: 1007 | - | +**403** | - The asset creation quota reached. Error code: 1005 - Tenant is not allowed to create testnet assets. Error code: 1008 - Tenant is not allowed to create mainnet assets. Error code: 1009 | - | **404** | - Invalid address, could not get asset information. Error code 1003 | - | **409** | - The asset is already supported globally. Error code: 1001 - The asset has already been added to this workspace. Error code: 1002 | - | **500** | Failed to create asset | - | diff --git a/docs/CreateInternalTransferRequest.md b/docs/CreateInternalTransferRequest.md index 05f01ac..c1cdbbd 100644 --- a/docs/CreateInternalTransferRequest.md +++ b/docs/CreateInternalTransferRequest.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**asset** | **str** | | [optional] -**amount** | **str** | | [optional] -**source_type** | [**TradingAccountType**](TradingAccountType.md) | | [optional] -**dest_type** | [**TradingAccountType**](TradingAccountType.md) | | [optional] +**asset** | **str** | | +**amount** | **str** | | +**source_type** | [**TradingAccountType**](TradingAccountType.md) | | +**dest_type** | [**TradingAccountType**](TradingAccountType.md) | | ## Example diff --git a/docs/DestinationTransferPeerPathResponse.md b/docs/DestinationTransferPeerPathResponse.md index 2092e60..780a86b 100644 --- a/docs/DestinationTransferPeerPathResponse.md +++ b/docs/DestinationTransferPeerPathResponse.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **id** | **str** | The ID of the peer. You can retrieve the ID of each venue object using the endpoints for [listing vault accounts](https://developers.fireblocks.com/reference/get_vault-accounts-paged), [listing exchange account](https://developers.fireblocks.com/reference/get_exchange-accounts), [listing fiat accounts](https://developers.fireblocks.com/reference/get_fiat-accounts), [listing internal wallets](https://developers.fireblocks.com/reference/get_internal-wallets), [listing external wallets](https://developers.fireblocks.com/reference/get_external-wallets), [listing network connections](https://developers.fireblocks.com/reference/get_network-connections). For the other types, this parameter is not needed. | [optional] **name** | **str** | The name of the peer. | [optional] **wallet_id** | **str** | | [optional] +**trading_account** | **str** | If this transaction is an exchange internal transfer, this field will be populated with the type of that trading account. | [optional] ## Example diff --git a/docs/GetExchangeAccountsCredentialsPublicKeyResponse.md b/docs/GetExchangeAccountsCredentialsPublicKeyResponse.md new file mode 100644 index 0000000..325e9c2 --- /dev/null +++ b/docs/GetExchangeAccountsCredentialsPublicKeyResponse.md @@ -0,0 +1,29 @@ +# GetExchangeAccountsCredentialsPublicKeyResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**public_key** | **str** | Public key string | + +## Example + +```python +from fireblocks.models.get_exchange_accounts_credentials_public_key_response import GetExchangeAccountsCredentialsPublicKeyResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetExchangeAccountsCredentialsPublicKeyResponse from a JSON string +get_exchange_accounts_credentials_public_key_response_instance = GetExchangeAccountsCredentialsPublicKeyResponse.from_json(json) +# print the JSON string representation of the object +print(GetExchangeAccountsCredentialsPublicKeyResponse.to_json()) + +# convert the object into a dict +get_exchange_accounts_credentials_public_key_response_dict = get_exchange_accounts_credentials_public_key_response_instance.to_dict() +# create an instance of GetExchangeAccountsCredentialsPublicKeyResponse from a dict +get_exchange_accounts_credentials_public_key_response_from_dict = GetExchangeAccountsCredentialsPublicKeyResponse.from_dict(get_exchange_accounts_credentials_public_key_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/InternalTransferResponse.md b/docs/InternalTransferResponse.md index 056594c..7124304 100644 --- a/docs/InternalTransferResponse.md +++ b/docs/InternalTransferResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **success** | **bool** | Indicates whether the transfer was successful | +**id** | **str** | The transaction ID of the internal transfer | [optional] ## Example diff --git a/docs/KeyLinkBetaApi.md b/docs/KeyLinkBetaApi.md index 9aef0d7..b00750e 100644 --- a/docs/KeyLinkBetaApi.md +++ b/docs/KeyLinkBetaApi.md @@ -321,7 +321,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_signing_keys_list** -> GetSigningKeyResponseDto get_signing_keys_list(page_cursor=page_cursor, page_size=page_size, sort_by=sort_by, order=order) +> GetSigningKeyResponseDto get_signing_keys_list(page_cursor=page_cursor, page_size=page_size, sort_by=sort_by, order=order, vault_account_id=vault_account_id, agent_user_id=agent_user_id, algorithm=algorithm, enabled=enabled, available=available) Get list of signing keys @@ -356,10 +356,15 @@ with Fireblocks(configuration) as fireblocks: page_size = 10 # float | Amount of results to return in the next page (optional) (default to 10) sort_by = 'createdAt' # str | Field(s) to use for sorting (optional) (default to 'createdAt') order = 'ASC' # str | Is the order ascending or descending (optional) (default to 'ASC') + vault_account_id = 4 # float | Return keys assigned to a specific vault (optional) + agent_user_id = '12fed207-5bdf-4a0c-ab12-fcd2627f75d1' # str | Return keys associated with a specific agent user (optional) + algorithm = 'ECDSA_SECP256K1' # str | Return only keys with a specific algorithm (optional) + enabled = True # bool | Return keys that have been proof of ownership (optional) + available = True # bool | Return keys that are proof of ownership but not assigned. Available filter can be used only when vaultAccountId and enabled filters are not set (optional) try: # Get list of signing keys - api_response = fireblocks.key_link_beta.get_signing_keys_list(page_cursor=page_cursor, page_size=page_size, sort_by=sort_by, order=order).result() + api_response = fireblocks.key_link_beta.get_signing_keys_list(page_cursor=page_cursor, page_size=page_size, sort_by=sort_by, order=order, vault_account_id=vault_account_id, agent_user_id=agent_user_id, algorithm=algorithm, enabled=enabled, available=available).result() print("The response of KeyLinkBetaApi->get_signing_keys_list:\n") pprint(api_response) except Exception as e: @@ -377,6 +382,11 @@ Name | Type | Description | Notes **page_size** | **float**| Amount of results to return in the next page | [optional] [default to 10] **sort_by** | **str**| Field(s) to use for sorting | [optional] [default to 'createdAt'] **order** | **str**| Is the order ascending or descending | [optional] [default to 'ASC'] + **vault_account_id** | **float**| Return keys assigned to a specific vault | [optional] + **agent_user_id** | **str**| Return keys associated with a specific agent user | [optional] + **algorithm** | **str**| Return only keys with a specific algorithm | [optional] + **enabled** | **bool**| Return keys that have been proof of ownership | [optional] + **available** | **bool**| Return keys that are proof of ownership but not assigned. Available filter can be used only when vaultAccountId and enabled filters are not set | [optional] ### Return type diff --git a/docs/RegisterNewAssetRequest.md b/docs/RegisterNewAssetRequest.md index 5485b42..84e6582 100644 --- a/docs/RegisterNewAssetRequest.md +++ b/docs/RegisterNewAssetRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **blockchain_id** | **str** | Native asset ID of the blockchain | -**address** | **str** | Asset address. - For EVM based chains this should be the token contract address. - For Stellar (XLM) this should be the issuer address. - For Algorand (ALGO) this should be the asset ID. - For TRON (TRX) this should be the token contract address. - For NEAR this will be the token address. | +**address** | **str** | Asset address. - EVM-based chains: token contract address - Stellar (XLM): issuer address - Algorand (ALGO): asset ID - TRON (TRX): token contract address - NEAR: token address - Solana: token's mint account address | **symbol** | **str** | Required for Stellar only, asset code is expected. | [optional] ## Example diff --git a/docs/SourceTransferPeerPathResponse.md b/docs/SourceTransferPeerPathResponse.md index 74ebc80..1a0c595 100644 --- a/docs/SourceTransferPeerPathResponse.md +++ b/docs/SourceTransferPeerPathResponse.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **id** | **str** | The ID of the peer. You can retrieve the ID of each venue object using the endpoints for [listing vault accounts](https://developers.fireblocks.com/reference/get_vault-accounts-paged), [listing exchange account](https://developers.fireblocks.com/reference/get_exchange-accounts), [listing fiat accounts](https://developers.fireblocks.com/reference/get_fiat-accounts), [listing internal wallets](https://developers.fireblocks.com/reference/get_internal-wallets), [listing external wallets](https://developers.fireblocks.com/reference/get_external-wallets), [listing network connections](https://developers.fireblocks.com/reference/get_network-connections). For the other types, this parameter is not needed. | [optional] **name** | **str** | The name of the peer. | [optional] **wallet_id** | **str** | | [optional] +**trading_account** | **str** | If this transaction is an exchange internal transfer, this field will be populated with the type of that trading account. | [optional] ## Example diff --git a/fireblocks/__init__.py b/fireblocks/__init__.py index 7678e5e..97c24ec 100644 --- a/fireblocks/__init__.py +++ b/fireblocks/__init__.py @@ -359,6 +359,9 @@ from fireblocks.models.get_audit_logs_response_dto import GetAuditLogsResponseDTO from fireblocks.models.get_connections_response import GetConnectionsResponse from fireblocks.models.get_console_users_response import GetConsoleUsersResponse +from fireblocks.models.get_exchange_accounts_credentials_public_key_response import ( + GetExchangeAccountsCredentialsPublicKeyResponse, +) from fireblocks.models.get_filter_parameter import GetFilterParameter from fireblocks.models.get_max_spendable_amount_response import ( GetMaxSpendableAmountResponse, diff --git a/fireblocks/api/blockchains_assets_api.py b/fireblocks/api/blockchains_assets_api.py index c25ac75..216478d 100644 --- a/fireblocks/api/blockchains_assets_api.py +++ b/fireblocks/api/blockchains_assets_api.py @@ -182,7 +182,7 @@ def register_new_asset( ) -> Future[ApiResponse[AssetResponse]]: """Register an asset - Register a new asset to a workspace and return the newly created asset's details. Currently supported chains are: - EVM based chains - Stellar - Algorand - TRON - NEAR + Register a new asset to a workspace and return the newly created asset's details. Currently supported chains are: - EVM based chains - Stellar - Algorand - TRON - NEAR - Solana :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/key_link_beta_api.py b/fireblocks/api/key_link_beta_api.py index da3ed34..bb8be8b 100644 --- a/fireblocks/api/key_link_beta_api.py +++ b/fireblocks/api/key_link_beta_api.py @@ -18,7 +18,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr, field_validator +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Optional, Union from typing_extensions import Annotated from fireblocks.models.create_signing_key_dto import CreateSigningKeyDto @@ -620,6 +620,11 @@ def get_signing_keys_list( page_size: Annotated[Optional[Union[Annotated[float, Field(le=50, strict=True, ge=1)], Annotated[int, Field(le=50, strict=True, ge=1)]]], Field(description="Amount of results to return in the next page")] = None, sort_by: Annotated[Optional[StrictStr], Field(description="Field(s) to use for sorting")] = None, order: Annotated[Optional[StrictStr], Field(description="Is the order ascending or descending")] = None, + vault_account_id: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Return keys assigned to a specific vault")] = None, + agent_user_id: Annotated[Optional[StrictStr], Field(description="Return keys associated with a specific agent user")] = None, + algorithm: Annotated[Optional[StrictStr], Field(description="Return only keys with a specific algorithm")] = None, + enabled: Annotated[Optional[StrictBool], Field(description="Return keys that have been proof of ownership")] = None, + available: Annotated[Optional[StrictBool], Field(description="Return keys that are proof of ownership but not assigned. Available filter can be used only when vaultAccountId and enabled filters are not set")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -645,6 +650,16 @@ def get_signing_keys_list( :type sort_by: str :param order: Is the order ascending or descending :type order: str + :param vault_account_id: Return keys assigned to a specific vault + :type vault_account_id: float + :param agent_user_id: Return keys associated with a specific agent user + :type agent_user_id: str + :param algorithm: Return only keys with a specific algorithm + :type algorithm: str + :param enabled: Return keys that have been proof of ownership + :type enabled: bool + :param available: Return keys that are proof of ownership but not assigned. Available filter can be used only when vaultAccountId and enabled filters are not set + :type available: bool :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 @@ -673,6 +688,11 @@ def get_signing_keys_list( page_size=page_size, sort_by=sort_by, order=order, + vault_account_id=vault_account_id, + agent_user_id=agent_user_id, + algorithm=algorithm, + enabled=enabled, + available=available, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -696,6 +716,11 @@ def _get_signing_keys_list_serialize( page_size, sort_by, order, + vault_account_id, + agent_user_id, + algorithm, + enabled, + available, _request_auth, _content_type, _headers, @@ -732,6 +757,26 @@ def _get_signing_keys_list_serialize( _query_params.append(('order', order)) + if vault_account_id is not None: + + _query_params.append(('vaultAccountId', vault_account_id)) + + if agent_user_id is not None: + + _query_params.append(('agentUserId', agent_user_id)) + + if algorithm is not None: + + _query_params.append(('algorithm', algorithm)) + + if enabled is not None: + + _query_params.append(('enabled', enabled)) + + if available is not None: + + _query_params.append(('available', available)) + # process the header parameters # process the form parameters # process the body parameter diff --git a/fireblocks/models/__init__.py b/fireblocks/models/__init__.py index d8149ab..86df317 100644 --- a/fireblocks/models/__init__.py +++ b/fireblocks/models/__init__.py @@ -193,6 +193,7 @@ from fireblocks.models.get_audit_logs_response_dto import GetAuditLogsResponseDTO from fireblocks.models.get_connections_response import GetConnectionsResponse from fireblocks.models.get_console_users_response import GetConsoleUsersResponse +from fireblocks.models.get_exchange_accounts_credentials_public_key_response import GetExchangeAccountsCredentialsPublicKeyResponse from fireblocks.models.get_filter_parameter import GetFilterParameter from fireblocks.models.get_max_spendable_amount_response import GetMaxSpendableAmountResponse from fireblocks.models.get_nfts_response import GetNFTsResponse diff --git a/fireblocks/models/asset_response_onchain.py b/fireblocks/models/asset_response_onchain.py index db4c652..cd04403 100644 --- a/fireblocks/models/asset_response_onchain.py +++ b/fireblocks/models/asset_response_onchain.py @@ -31,7 +31,7 @@ class AssetResponseOnchain(BaseModel): name: StrictStr = Field(description="The asset name") address: Optional[StrictStr] = Field(default=None, description="The asset address") decimals: Union[StrictFloat, StrictInt] = Field(description="Number of decimals") - standard: StrictStr = Field(description="The asset standard") + standard: Optional[StrictStr] = Field(default=None, description="The asset standard") __properties: ClassVar[List[str]] = ["symbol", "name", "address", "decimals", "standard"] model_config = ConfigDict( diff --git a/fireblocks/models/collection_ownership_response.py b/fireblocks/models/collection_ownership_response.py index 7cbcd78..324e992 100644 --- a/fireblocks/models/collection_ownership_response.py +++ b/fireblocks/models/collection_ownership_response.py @@ -38,8 +38,8 @@ class CollectionOwnershipResponse(BaseModel): @field_validator('blockchain_descriptor') def blockchain_descriptor_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ETH', 'ETH_TEST3', 'ETH_TEST5', 'ETH_TEST6', 'POLYGON', 'POLYGON_TEST_MUMBAI', 'AMOY_POLYGON_TEST', 'XTZ', 'XTZ_TEST', 'BASECHAIN_ETH']): - raise ValueError("must be one of enum values ('ETH', 'ETH_TEST3', 'ETH_TEST5', 'ETH_TEST6', 'POLYGON', 'POLYGON_TEST_MUMBAI', 'AMOY_POLYGON_TEST', 'XTZ', 'XTZ_TEST', 'BASECHAIN_ETH')") + if value not in set(['ETH', 'ETH_TEST3', 'ETH_TEST5', 'ETH_TEST6', 'POLYGON', 'POLYGON_TEST_MUMBAI', 'AMOY_POLYGON_TEST', 'XTZ', 'XTZ_TEST', 'BASECHAIN_ETH', 'BASECHAIN_ETH_TEST3']): + raise ValueError("must be one of enum values ('ETH', 'ETH_TEST3', 'ETH_TEST5', 'ETH_TEST6', 'POLYGON', 'POLYGON_TEST_MUMBAI', 'AMOY_POLYGON_TEST', 'XTZ', 'XTZ_TEST', 'BASECHAIN_ETH', 'BASECHAIN_ETH_TEST3')") return value model_config = ConfigDict( diff --git a/fireblocks/models/create_internal_transfer_request.py b/fireblocks/models/create_internal_transfer_request.py index effd10d..48185c7 100644 --- a/fireblocks/models/create_internal_transfer_request.py +++ b/fireblocks/models/create_internal_transfer_request.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from fireblocks.models.trading_account_type import TradingAccountType from typing import Optional, Set from typing_extensions import Self @@ -28,10 +28,10 @@ class CreateInternalTransferRequest(BaseModel): """ CreateInternalTransferRequest """ # noqa: E501 - asset: Optional[StrictStr] = None - amount: Optional[StrictStr] = None - source_type: Optional[TradingAccountType] = Field(default=None, alias="sourceType") - dest_type: Optional[TradingAccountType] = Field(default=None, alias="destType") + asset: StrictStr + amount: StrictStr + source_type: TradingAccountType = Field(alias="sourceType") + dest_type: TradingAccountType = Field(alias="destType") __properties: ClassVar[List[str]] = ["asset", "amount", "sourceType", "destType"] model_config = ConfigDict( diff --git a/fireblocks/models/destination_transfer_peer_path_response.py b/fireblocks/models/destination_transfer_peer_path_response.py index 53c17b1..f67263c 100644 --- a/fireblocks/models/destination_transfer_peer_path_response.py +++ b/fireblocks/models/destination_transfer_peer_path_response.py @@ -33,7 +33,8 @@ class DestinationTransferPeerPathResponse(BaseModel): id: Optional[StrictStr] = Field(default=None, description="The ID of the peer. You can retrieve the ID of each venue object using the endpoints for [listing vault accounts](https://developers.fireblocks.com/reference/get_vault-accounts-paged), [listing exchange account](https://developers.fireblocks.com/reference/get_exchange-accounts), [listing fiat accounts](https://developers.fireblocks.com/reference/get_fiat-accounts), [listing internal wallets](https://developers.fireblocks.com/reference/get_internal-wallets), [listing external wallets](https://developers.fireblocks.com/reference/get_external-wallets), [listing network connections](https://developers.fireblocks.com/reference/get_network-connections). For the other types, this parameter is not needed.") name: Optional[StrictStr] = Field(default=None, description="The name of the peer.") wallet_id: Optional[StrictStr] = Field(default=None, alias="walletId") - __properties: ClassVar[List[str]] = ["type", "subType", "id", "name", "walletId"] + trading_account: Optional[StrictStr] = Field(default=None, description="If this transaction is an exchange internal transfer, this field will be populated with the type of that trading account.", alias="tradingAccount") + __properties: ClassVar[List[str]] = ["type", "subType", "id", "name", "walletId", "tradingAccount"] model_config = ConfigDict( populate_by_name=True, @@ -79,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: if self.id is None and "id" in self.model_fields_set: _dict['id'] = None + # set to None if trading_account (nullable) is None + # and model_fields_set contains the field + if self.trading_account is None and "trading_account" in self.model_fields_set: + _dict['tradingAccount'] = None + return _dict @classmethod @@ -95,7 +101,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "subType": obj.get("subType"), "id": obj.get("id"), "name": obj.get("name"), - "walletId": obj.get("walletId") + "walletId": obj.get("walletId"), + "tradingAccount": obj.get("tradingAccount") }) return _obj diff --git a/fireblocks/models/get_exchange_accounts_credentials_public_key_response.py b/fireblocks/models/get_exchange_accounts_credentials_public_key_response.py new file mode 100644 index 0000000..931a334 --- /dev/null +++ b/fireblocks/models/get_exchange_accounts_credentials_public_key_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GetExchangeAccountsCredentialsPublicKeyResponse(BaseModel): + """ + GetExchangeAccountsCredentialsPublicKeyResponse + """ # noqa: E501 + public_key: StrictStr = Field(description="Public key string", alias="publicKey") + __properties: ClassVar[List[str]] = ["publicKey"] + + 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 GetExchangeAccountsCredentialsPublicKeyResponse 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 GetExchangeAccountsCredentialsPublicKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "publicKey": obj.get("publicKey") + }) + return _obj + + diff --git a/fireblocks/models/internal_transfer_response.py b/fireblocks/models/internal_transfer_response.py index c54f906..7d16e60 100644 --- a/fireblocks/models/internal_transfer_response.py +++ b/fireblocks/models/internal_transfer_response.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,8 @@ class InternalTransferResponse(BaseModel): InternalTransferResponse """ # noqa: E501 success: StrictBool = Field(description="Indicates whether the transfer was successful") - __properties: ClassVar[List[str]] = ["success"] + id: Optional[StrictStr] = Field(default=None, description="The transaction ID of the internal transfer") + __properties: ClassVar[List[str]] = ["success", "id"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + return _dict @classmethod @@ -81,7 +87,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "success": obj.get("success") + "success": obj.get("success"), + "id": obj.get("id") }) return _obj diff --git a/fireblocks/models/register_new_asset_request.py b/fireblocks/models/register_new_asset_request.py index b1a5e16..45f6ae0 100644 --- a/fireblocks/models/register_new_asset_request.py +++ b/fireblocks/models/register_new_asset_request.py @@ -28,7 +28,7 @@ class RegisterNewAssetRequest(BaseModel): RegisterNewAssetRequest """ # noqa: E501 blockchain_id: StrictStr = Field(description="Native asset ID of the blockchain", alias="blockchainId") - address: StrictStr = Field(description="Asset address. - For EVM based chains this should be the token contract address. - For Stellar (XLM) this should be the issuer address. - For Algorand (ALGO) this should be the asset ID. - For TRON (TRX) this should be the token contract address. - For NEAR this will be the token address. ") + address: StrictStr = Field(description="Asset address. - EVM-based chains: token contract address - Stellar (XLM): issuer address - Algorand (ALGO): asset ID - TRON (TRX): token contract address - NEAR: token address - Solana: token's mint account address ") symbol: Optional[StrictStr] = Field(default=None, description="Required for Stellar only, asset code is expected.") __properties: ClassVar[List[str]] = ["blockchainId", "address", "symbol"] diff --git a/fireblocks/models/source_transfer_peer_path_response.py b/fireblocks/models/source_transfer_peer_path_response.py index 1015f04..54d4d04 100644 --- a/fireblocks/models/source_transfer_peer_path_response.py +++ b/fireblocks/models/source_transfer_peer_path_response.py @@ -33,7 +33,8 @@ class SourceTransferPeerPathResponse(BaseModel): id: Optional[StrictStr] = Field(default=None, description="The ID of the peer. You can retrieve the ID of each venue object using the endpoints for [listing vault accounts](https://developers.fireblocks.com/reference/get_vault-accounts-paged), [listing exchange account](https://developers.fireblocks.com/reference/get_exchange-accounts), [listing fiat accounts](https://developers.fireblocks.com/reference/get_fiat-accounts), [listing internal wallets](https://developers.fireblocks.com/reference/get_internal-wallets), [listing external wallets](https://developers.fireblocks.com/reference/get_external-wallets), [listing network connections](https://developers.fireblocks.com/reference/get_network-connections). For the other types, this parameter is not needed.") name: Optional[StrictStr] = Field(default=None, description="The name of the peer.") wallet_id: Optional[StrictStr] = Field(default=None, alias="walletId") - __properties: ClassVar[List[str]] = ["type", "subType", "id", "name", "walletId"] + trading_account: Optional[StrictStr] = Field(default=None, description="If this transaction is an exchange internal transfer, this field will be populated with the type of that trading account.", alias="tradingAccount") + __properties: ClassVar[List[str]] = ["type", "subType", "id", "name", "walletId", "tradingAccount"] model_config = ConfigDict( populate_by_name=True, @@ -79,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: if self.id is None and "id" in self.model_fields_set: _dict['id'] = None + # set to None if trading_account (nullable) is None + # and model_fields_set contains the field + if self.trading_account is None and "trading_account" in self.model_fields_set: + _dict['tradingAccount'] = None + return _dict @classmethod @@ -95,7 +101,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "subType": obj.get("subType"), "id": obj.get("id"), "name": obj.get("name"), - "walletId": obj.get("walletId") + "walletId": obj.get("walletId"), + "tradingAccount": obj.get("tradingAccount") }) return _obj diff --git a/fireblocks/models/token_ownership_response.py b/fireblocks/models/token_ownership_response.py index e4aa118..7190eff 100644 --- a/fireblocks/models/token_ownership_response.py +++ b/fireblocks/models/token_ownership_response.py @@ -53,8 +53,8 @@ class TokenOwnershipResponse(BaseModel): @field_validator('blockchain_descriptor') def blockchain_descriptor_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ETH', 'ETH_TEST3', 'ETH_TEST5', 'ETH_TEST6', 'POLYGON', 'POLYGON_TEST_MUMBAI', 'AMOY_POLYGON_TEST', 'XTZ', 'XTZ_TEST', 'BASECHAIN_ETH']): - raise ValueError("must be one of enum values ('ETH', 'ETH_TEST3', 'ETH_TEST5', 'ETH_TEST6', 'POLYGON', 'POLYGON_TEST_MUMBAI', 'AMOY_POLYGON_TEST', 'XTZ', 'XTZ_TEST', 'BASECHAIN_ETH')") + if value not in set(['ETH', 'ETH_TEST3', 'ETH_TEST5', 'ETH_TEST6', 'POLYGON', 'POLYGON_TEST_MUMBAI', 'AMOY_POLYGON_TEST', 'XTZ', 'XTZ_TEST', 'BASECHAIN_ETH', 'BASECHAIN_ETH_TEST3']): + raise ValueError("must be one of enum values ('ETH', 'ETH_TEST3', 'ETH_TEST5', 'ETH_TEST6', 'POLYGON', 'POLYGON_TEST_MUMBAI', 'AMOY_POLYGON_TEST', 'XTZ', 'XTZ_TEST', 'BASECHAIN_ETH', 'BASECHAIN_ETH_TEST3')") return value @field_validator('status') diff --git a/fireblocks/models/token_response.py b/fireblocks/models/token_response.py index b8c6323..c66b405 100644 --- a/fireblocks/models/token_response.py +++ b/fireblocks/models/token_response.py @@ -46,8 +46,8 @@ class TokenResponse(BaseModel): @field_validator('blockchain_descriptor') def blockchain_descriptor_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ETH', 'ETH_TEST3', 'ETH_TEST5', 'ETH_TEST6', 'POLYGON', 'POLYGON_TEST_MUMBAI', 'AMOY_POLYGON_TEST', 'XTZ', 'XTZ_TEST', 'BASECHAIN_ETH']): - raise ValueError("must be one of enum values ('ETH', 'ETH_TEST3', 'ETH_TEST5', 'ETH_TEST6', 'POLYGON', 'POLYGON_TEST_MUMBAI', 'AMOY_POLYGON_TEST', 'XTZ', 'XTZ_TEST', 'BASECHAIN_ETH')") + if value not in set(['ETH', 'ETH_TEST3', 'ETH_TEST5', 'ETH_TEST6', 'POLYGON', 'POLYGON_TEST_MUMBAI', 'AMOY_POLYGON_TEST', 'XTZ', 'XTZ_TEST', 'BASECHAIN_ETH', 'BASECHAIN_ETH_TEST3']): + raise ValueError("must be one of enum values ('ETH', 'ETH_TEST3', 'ETH_TEST5', 'ETH_TEST6', 'POLYGON', 'POLYGON_TEST_MUMBAI', 'AMOY_POLYGON_TEST', 'XTZ', 'XTZ_TEST', 'BASECHAIN_ETH', 'BASECHAIN_ETH_TEST3')") return value model_config = ConfigDict( diff --git a/test/test_asset_response_onchain.py b/test/test_asset_response_onchain.py index 79423a0..066ef95 100644 --- a/test/test_asset_response_onchain.py +++ b/test/test_asset_response_onchain.py @@ -48,7 +48,6 @@ def make_instance(self, include_optional) -> AssetResponseOnchain: symbol = 'TST3', name = 'Test 3', decimals = 18, - standard = 'ERC20', ) """ diff --git a/test/test_create_internal_transfer_request.py b/test/test_create_internal_transfer_request.py index 5f6e5f5..2692475 100644 --- a/test/test_create_internal_transfer_request.py +++ b/test/test_create_internal_transfer_request.py @@ -46,6 +46,10 @@ def make_instance(self, include_optional) -> CreateInternalTransferRequest: ) else: return CreateInternalTransferRequest( + asset = '', + amount = '', + source_type = 'COIN_FUTURES', + dest_type = 'COIN_FUTURES', ) """ diff --git a/test/test_destination_transfer_peer_path_response.py b/test/test_destination_transfer_peer_path_response.py index 00ee72d..b57dc52 100644 --- a/test/test_destination_transfer_peer_path_response.py +++ b/test/test_destination_transfer_peer_path_response.py @@ -43,7 +43,8 @@ def make_instance(self, include_optional) -> DestinationTransferPeerPathResponse sub_type = '', id = '', name = '', - wallet_id = '' + wallet_id = '', + trading_account = '' ) else: return DestinationTransferPeerPathResponse( diff --git a/test/test_get_exchange_accounts_credentials_public_key_response.py b/test/test_get_exchange_accounts_credentials_public_key_response.py new file mode 100644 index 0000000..67ed807 --- /dev/null +++ b/test/test_get_exchange_accounts_credentials_public_key_response.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.get_exchange_accounts_credentials_public_key_response import ( + GetExchangeAccountsCredentialsPublicKeyResponse, +) + + +class TestGetExchangeAccountsCredentialsPublicKeyResponse(unittest.TestCase): + """GetExchangeAccountsCredentialsPublicKeyResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance( + self, include_optional + ) -> GetExchangeAccountsCredentialsPublicKeyResponse: + """Test GetExchangeAccountsCredentialsPublicKeyResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `GetExchangeAccountsCredentialsPublicKeyResponse` + """ + model = GetExchangeAccountsCredentialsPublicKeyResponse() + if include_optional: + return GetExchangeAccountsCredentialsPublicKeyResponse( + public_key = '' + ) + else: + return GetExchangeAccountsCredentialsPublicKeyResponse( + public_key = '', + ) + """ + + def testGetExchangeAccountsCredentialsPublicKeyResponse(self): + """Test GetExchangeAccountsCredentialsPublicKeyResponse""" + # 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_internal_transfer_response.py b/test/test_internal_transfer_response.py index d47d00b..80273db 100644 --- a/test/test_internal_transfer_response.py +++ b/test/test_internal_transfer_response.py @@ -37,7 +37,8 @@ def make_instance(self, include_optional) -> InternalTransferResponse: model = InternalTransferResponse() if include_optional: return InternalTransferResponse( - success = True + success = True, + id = '' ) else: return InternalTransferResponse( diff --git a/test/test_network_record.py b/test/test_network_record.py index 1c52203..eeff2a8 100644 --- a/test/test_network_record.py +++ b/test/test_network_record.py @@ -42,13 +42,15 @@ def make_instance(self, include_optional) -> NetworkRecord: sub_type = '', id = '', name = '', - wallet_id = '', ), + wallet_id = '', + trading_account = '', ), destination = fireblocks.models.destination_transfer_peer_path_response.DestinationTransferPeerPathResponse( type = 'VAULT_ACCOUNT', sub_type = '', id = '', name = '', - wallet_id = '', ), + wallet_id = '', + trading_account = '', ), tx_hash = '', network_fee = '', asset_id = '', diff --git a/test/test_source_transfer_peer_path_response.py b/test/test_source_transfer_peer_path_response.py index eac8e26..df07a7b 100644 --- a/test/test_source_transfer_peer_path_response.py +++ b/test/test_source_transfer_peer_path_response.py @@ -43,7 +43,8 @@ def make_instance(self, include_optional) -> SourceTransferPeerPathResponse: sub_type = '', id = '', name = '', - wallet_id = '' + wallet_id = '', + trading_account = '' ) else: return SourceTransferPeerPathResponse( diff --git a/test/test_transaction_response.py b/test/test_transaction_response.py index 73b8fd4..86846b7 100644 --- a/test/test_transaction_response.py +++ b/test/test_transaction_response.py @@ -50,7 +50,8 @@ def make_instance(self, include_optional) -> TransactionResponse: sub_type = '', id = '', name = '', - wallet_id = '', ), + wallet_id = '', + trading_account = '', ), source_address = '', tag = '', destination = fireblocks.models.destination_transfer_peer_path_response.DestinationTransferPeerPathResponse( @@ -58,7 +59,8 @@ def make_instance(self, include_optional) -> TransactionResponse: sub_type = '', id = '', name = '', - wallet_id = '', ), + wallet_id = '', + trading_account = '', ), destinations = [ fireblocks.models.transaction_response_destination.TransactionResponseDestination( destination_address = null, @@ -73,7 +75,8 @@ def make_instance(self, include_optional) -> TransactionResponse: sub_type = '', id = '', name = '', - wallet_id = '', ), + wallet_id = '', + trading_account = '', ), authorization_info = fireblocks.models.authorization_info.AuthorizationInfo( allow_operator_as_authorizer = True, logic = 'AND', @@ -111,13 +114,15 @@ def make_instance(self, include_optional) -> TransactionResponse: sub_type = '', id = '', name = '', - wallet_id = '', ), + wallet_id = '', + trading_account = '', ), destination = fireblocks.models.destination_transfer_peer_path_response.DestinationTransferPeerPathResponse( type = 'VAULT_ACCOUNT', sub_type = '', id = '', name = '', - wallet_id = '', ), + wallet_id = '', + trading_account = '', ), tx_hash = '', network_fee = '', asset_id = '', diff --git a/test/test_transaction_response_destination.py b/test/test_transaction_response_destination.py index 65a311b..066fdf3 100644 --- a/test/test_transaction_response_destination.py +++ b/test/test_transaction_response_destination.py @@ -51,7 +51,8 @@ def make_instance(self, include_optional) -> TransactionResponseDestination: sub_type = '', id = '', name = '', - wallet_id = '', ), + wallet_id = '', + trading_account = '', ), authorization_info = fireblocks.models.authorization_info.AuthorizationInfo( allow_operator_as_authorizer = True, logic = 'AND',