Skip to content

Commit

Permalink
Generated SDK #5009
Browse files Browse the repository at this point in the history
  • Loading branch information
fireblocks_dx_team committed Dec 18, 2024
1 parent 01bfbf7 commit 5ea910a
Show file tree
Hide file tree
Showing 15 changed files with 626 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ docs/DropTransactionRequest.md
docs/DropTransactionResponse.md
docs/EVMTokenCreateParamsDto.md
docs/EditGasStationConfigurationResponse.md
docs/EmbeddedWalletsApi.md
docs/ErrorResponse.md
docs/ErrorResponseError.md
docs/ErrorSchema.md
Expand Down Expand Up @@ -518,6 +519,7 @@ fireblocks/api/contract_templates_api.py
fireblocks/api/contracts_api.py
fireblocks/api/cosigners_beta_api.py
fireblocks/api/deployed_contracts_api.py
fireblocks/api/embedded_wallets_api.py
fireblocks/api/exchange_accounts_api.py
fireblocks/api/external_wallets_api.py
fireblocks/api/fiat_accounts_api.py
Expand Down Expand Up @@ -1207,6 +1209,7 @@ test/test_draft_review_and_validation_response.py
test/test_drop_transaction_request.py
test/test_drop_transaction_response.py
test/test_edit_gas_station_configuration_response.py
test/test_embedded_wallets_api.py
test/test_error_response.py
test/test_error_response_error.py
test/test_error_schema.py
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ Class | Method | HTTP request | Description
*DeployedContractsApi* | [**get_deployed_contract_by_address**](docs/DeployedContractsApi.md#get_deployed_contract_by_address) | **GET** /tokenization/contracts/{assetId}/{contractAddress} | Return deployed contract data
*DeployedContractsApi* | [**get_deployed_contract_by_id**](docs/DeployedContractsApi.md#get_deployed_contract_by_id) | **GET** /tokenization/contracts/{id} | Return deployed contract data by id
*DeployedContractsApi* | [**get_deployed_contracts**](docs/DeployedContractsApi.md#get_deployed_contracts) | **GET** /tokenization/contracts | List deployed contracts data
*EmbeddedWalletsApi* | [**get_public_key_info_for_address_ncw**](docs/EmbeddedWalletsApi.md#get_public_key_info_for_address_ncw) | **GET** /ncw/{walletId}/accounts/{accountId}/{assetId}/{change}/{addressIndex}/public_key_info | Get the public key of an asset
*EmbeddedWalletsApi* | [**get_public_key_info_ncw**](docs/EmbeddedWalletsApi.md#get_public_key_info_ncw) | **GET** /ncw/{walletId}/public_key_info | Get the public key for a derivation path
*ExchangeAccountsApi* | [**convert_assets**](docs/ExchangeAccountsApi.md#convert_assets) | **POST** /exchange_accounts/{exchangeAccountId}/convert | Convert exchange account funds from the source asset to the destination asset.
*ExchangeAccountsApi* | [**get_exchange_account**](docs/ExchangeAccountsApi.md#get_exchange_account) | **GET** /exchange_accounts/{exchangeAccountId} | Find a specific exchange account
*ExchangeAccountsApi* | [**get_exchange_account_asset**](docs/ExchangeAccountsApi.md#get_exchange_account_asset) | **GET** /exchange_accounts/{exchangeAccountId}/{assetId} | Find an asset for an exchange account
Expand Down
174 changes: 174 additions & 0 deletions docs/EmbeddedWalletsApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# fireblocks.EmbeddedWalletsApi

All URIs are relative to *https://api.fireblocks.io/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_public_key_info_for_address_ncw**](EmbeddedWalletsApi.md#get_public_key_info_for_address_ncw) | **GET** /ncw/{walletId}/accounts/{accountId}/{assetId}/{change}/{addressIndex}/public_key_info | Get the public key of an asset
[**get_public_key_info_ncw**](EmbeddedWalletsApi.md#get_public_key_info_ncw) | **GET** /ncw/{walletId}/public_key_info | Get the public key for a derivation path


# **get_public_key_info_for_address_ncw**
> PublicKeyInformation get_public_key_info_for_address_ncw(wallet_id, account_id, asset_id, change, address_index, compressed=compressed)
Get the public key of an asset

Gets the public key of an asset associated with a specific account within a Non-Custodial Wallet

### Example


```python
from fireblocks.models.public_key_information import PublicKeyInformation
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:
wallet_id = '550e8400-e29b-41d4-a716-446655440000' # str | The ID of the Non-Custodial wallet
account_id = '0' # str | The ID of the account
asset_id = 'BTC' # str | The ID of the asset
change = 0 # float | BIP44 derivation path - change value
address_index = 0 # float | BIP44 derivation path - index value
compressed = True # bool | Compressed/Uncompressed public key format (optional)

try:
# Get the public key of an asset
api_response = fireblocks.embedded_wallets.get_public_key_info_for_address_ncw(wallet_id, account_id, asset_id, change, address_index, compressed=compressed).result()
print("The response of EmbeddedWalletsApi->get_public_key_info_for_address_ncw:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EmbeddedWalletsApi->get_public_key_info_for_address_ncw: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**wallet_id** | **str**| The ID of the Non-Custodial wallet |
**account_id** | **str**| The ID of the account |
**asset_id** | **str**| The ID of the asset |
**change** | **float**| BIP44 derivation path - change value |
**address_index** | **float**| BIP44 derivation path - index value |
**compressed** | **bool**| Compressed/Uncompressed public key format | [optional]

### Return type

[**PublicKeyInformation**](PublicKeyInformation.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Public Key Information | * X-Request-ID - <br> |
**0** | Error Response | * X-Request-ID - <br> |

[[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_public_key_info_ncw**
> PublicKeyInformation get_public_key_info_ncw(wallet_id, derivation_path, algorithm, compressed=compressed)
Get the public key for a derivation path

Gets the public key information based on derivation path and signing algorithm within a Non-Custodial Wallet

### Example


```python
from fireblocks.models.public_key_information import PublicKeyInformation
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:
wallet_id = '550e8400-e29b-41d4-a716-446655440000' # str | The ID of the Non-Custodial wallet
derivation_path = '[44,0,0,0,0]' # str | An array of integers (passed as JSON stringified array) representing the full BIP44 derivation path of the requested public key. The first element must always be 44.
algorithm = 'algorithm_example' # str | Elliptic Curve
compressed = True # bool | (optional)

try:
# Get the public key for a derivation path
api_response = fireblocks.embedded_wallets.get_public_key_info_ncw(wallet_id, derivation_path, algorithm, compressed=compressed).result()
print("The response of EmbeddedWalletsApi->get_public_key_info_ncw:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EmbeddedWalletsApi->get_public_key_info_ncw: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**wallet_id** | **str**| The ID of the Non-Custodial wallet |
**derivation_path** | **str**| An array of integers (passed as JSON stringified array) representing the full BIP44 derivation path of the requested public key. The first element must always be 44. |
**algorithm** | **str**| Elliptic Curve |
**compressed** | **bool**| | [optional]

### Return type

[**PublicKeyInformation**](PublicKeyInformation.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Public key information | * X-Request-ID - <br> |
**0** | Error Response | * X-Request-ID - <br> |

[[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)

6 changes: 3 additions & 3 deletions docs/PublicKeyInformation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**algorithm** | **str** | | [optional]
**derivation_path** | **List[float]** | | [optional]
**public_key** | **str** | | [optional]
**algorithm** | **str** | Elliptic Curve | [optional]
**derivation_path** | **List[int]** | BIP44 derivation path | [optional]
**public_key** | **str** | Compressed/Uncompressed public key value in hex representation | [optional]

## Example

Expand Down
3 changes: 2 additions & 1 deletion fireblocks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
""" # noqa: E501


__version__ = "5.0.0"
__version__ = "0.0.0"

# import apis into sdk package
from fireblocks.api.api_user_api import ApiUserApi
Expand All @@ -32,6 +32,7 @@
from fireblocks.api.contracts_api import ContractsApi
from fireblocks.api.cosigners_beta_api import CosignersBetaApi
from fireblocks.api.deployed_contracts_api import DeployedContractsApi
from fireblocks.api.embedded_wallets_api import EmbeddedWalletsApi
from fireblocks.api.exchange_accounts_api import ExchangeAccountsApi
from fireblocks.api.external_wallets_api import ExternalWalletsApi
from fireblocks.api.fiat_accounts_api import FiatAccountsApi
Expand Down
1 change: 1 addition & 0 deletions fireblocks/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from fireblocks.api.contracts_api import ContractsApi
from fireblocks.api.cosigners_beta_api import CosignersBetaApi
from fireblocks.api.deployed_contracts_api import DeployedContractsApi
from fireblocks.api.embedded_wallets_api import EmbeddedWalletsApi
from fireblocks.api.exchange_accounts_api import ExchangeAccountsApi
from fireblocks.api.external_wallets_api import ExternalWalletsApi
from fireblocks.api.fiat_accounts_api import FiatAccountsApi
Expand Down
Loading

0 comments on commit 5ea910a

Please sign in to comment.