Skip to content

Commit

Permalink
Generated SDK #6152
Browse files Browse the repository at this point in the history
  • Loading branch information
fireblocks_dx_team committed Jul 17, 2024
1 parent 8ef3361 commit ddd9652
Show file tree
Hide file tree
Showing 34 changed files with 323 additions and 46 deletions.
3 changes: 3 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/AssetResponseOnchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions docs/BlockchainsAssetsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 | - |
Expand Down
8 changes: 4 additions & 4 deletions docs/CreateInternalTransferRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions docs/DestinationTransferPeerPathResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
29 changes: 29 additions & 0 deletions docs/GetExchangeAccountsCredentialsPublicKeyResponse.md
Original file line number Diff line number Diff line change
@@ -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)


1 change: 1 addition & 0 deletions docs/InternalTransferResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 12 additions & 2 deletions docs/KeyLinkBetaApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/RegisterNewAssetRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions docs/SourceTransferPeerPathResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions fireblocks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion fireblocks/api/blockchains_assets_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
47 changes: 46 additions & 1 deletion fireblocks/api/key_link_beta_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)],
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions fireblocks/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fireblocks/models/asset_response_onchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions fireblocks/models/collection_ownership_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading

0 comments on commit ddd9652

Please sign in to comment.