diff --git a/.lib/skyhwd/.gitignore b/.lib/skyhwd/.gitignore new file mode 100644 index 00000000..a655050c --- /dev/null +++ b/.lib/skyhwd/.gitignore @@ -0,0 +1,64 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.python-version + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/.lib/skyhwd/.openapi-generator-ignore b/.lib/skyhwd/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/.lib/skyhwd/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.lib/skyhwd/.openapi-generator/VERSION b/.lib/skyhwd/.openapi-generator/VERSION new file mode 100644 index 00000000..2c6109e5 --- /dev/null +++ b/.lib/skyhwd/.openapi-generator/VERSION @@ -0,0 +1 @@ +3.3.4 \ No newline at end of file diff --git a/.lib/skyhwd/.travis.yml b/.lib/skyhwd/.travis.yml new file mode 100644 index 00000000..86211e2d --- /dev/null +++ b/.lib/skyhwd/.travis.yml @@ -0,0 +1,14 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "2.7" + - "3.2" + - "3.3" + - "3.4" + - "3.5" + #- "3.5-dev" # 3.5 development branch + #- "nightly" # points to the latest development branch e.g. 3.6-dev +# command to install dependencies +install: "pip install -r requirements.txt" +# command to run tests +script: nosetests diff --git a/.lib/skyhwd/README.md b/.lib/skyhwd/README.md new file mode 100644 index 00000000..3b0d828f --- /dev/null +++ b/.lib/skyhwd/README.md @@ -0,0 +1,140 @@ +# skyhwd +This is the hardware-wallet-daemon API + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 0.1.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +If the python package is hosted on Github, you can install directly from Github + +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import skyhwd +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import skyhwd +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +apply_settings_request = skyhwd.ApplySettingsRequest() # ApplySettingsRequest | ApplySettingsRequest is request data for /api/v1/apply_settings (optional) + +try: + api_response = api_instance.apply_settings_post(apply_settings_request=apply_settings_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->apply_settings_post: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://127.0.0.1:9510/api/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**apply_settings_post**](docs/DefaultApi.md#apply_settings_post) | **POST** /apply_settings | +*DefaultApi* | [**backup_post**](docs/DefaultApi.md#backup_post) | **POST** /backup | +*DefaultApi* | [**cancel_put**](docs/DefaultApi.md#cancel_put) | **PUT** /cancel | +*DefaultApi* | [**check_message_signature_post**](docs/DefaultApi.md#check_message_signature_post) | **POST** /check_message_signature | +*DefaultApi* | [**connected_get**](docs/DefaultApi.md#connected_get) | **GET** /connected | +*DefaultApi* | [**csrf_get**](docs/DefaultApi.md#csrf_get) | **GET** /csrf | +*DefaultApi* | [**features_get**](docs/DefaultApi.md#features_get) | **GET** /features | +*DefaultApi* | [**firmware_update_put**](docs/DefaultApi.md#firmware_update_put) | **PUT** /firmware_update | +*DefaultApi* | [**generate_addresses_post**](docs/DefaultApi.md#generate_addresses_post) | **POST** /generate_addresses | +*DefaultApi* | [**generate_mnemonic_post**](docs/DefaultApi.md#generate_mnemonic_post) | **POST** /generate_mnemonic | +*DefaultApi* | [**intermediate_passphrase_post**](docs/DefaultApi.md#intermediate_passphrase_post) | **POST** /intermediate/passphrase | +*DefaultApi* | [**intermediate_pin_matrix_post**](docs/DefaultApi.md#intermediate_pin_matrix_post) | **POST** /intermediate/pin_matrix | +*DefaultApi* | [**intermediate_word_post**](docs/DefaultApi.md#intermediate_word_post) | **POST** /intermediate/word | +*DefaultApi* | [**recovery_post**](docs/DefaultApi.md#recovery_post) | **POST** /recovery | +*DefaultApi* | [**set_mnemonic_post**](docs/DefaultApi.md#set_mnemonic_post) | **POST** /set_mnemonic | +*DefaultApi* | [**set_pin_code_post**](docs/DefaultApi.md#set_pin_code_post) | **POST** /set_pin_code | +*DefaultApi* | [**sign_message_post**](docs/DefaultApi.md#sign_message_post) | **POST** /sign_message | +*DefaultApi* | [**transaction_sign_post**](docs/DefaultApi.md#transaction_sign_post) | **POST** /transaction_sign | +*DefaultApi* | [**wipe_delete**](docs/DefaultApi.md#wipe_delete) | **DELETE** /wipe | + + +## Documentation For Models + + - [ApplySettingsRequest](docs/ApplySettingsRequest.md) + - [CSRFResponse](docs/CSRFResponse.md) + - [CheckMessageSignatureRequest](docs/CheckMessageSignatureRequest.md) + - [FeaturesResponse](docs/FeaturesResponse.md) + - [FeaturesResponseData](docs/FeaturesResponseData.md) + - [GenerateAddressesRequest](docs/GenerateAddressesRequest.md) + - [GenerateAddressesResponse](docs/GenerateAddressesResponse.md) + - [GenerateMnemonicRequest](docs/GenerateMnemonicRequest.md) + - [HTTPErrorResponse](docs/HTTPErrorResponse.md) + - [HTTPErrorResponseError](docs/HTTPErrorResponseError.md) + - [HTTPSuccessResponse](docs/HTTPSuccessResponse.md) + - [InlineResponse200](docs/InlineResponse200.md) + - [PassphraseRequest](docs/PassphraseRequest.md) + - [PinMatrixRequest](docs/PinMatrixRequest.md) + - [RecoveryRequest](docs/RecoveryRequest.md) + - [SetMnemonicRequest](docs/SetMnemonicRequest.md) + - [SignMessageRequest](docs/SignMessageRequest.md) + - [SignMessageResponse](docs/SignMessageResponse.md) + - [TransactionInput](docs/TransactionInput.md) + - [TransactionOutput](docs/TransactionOutput.md) + - [TransactionSignRequest](docs/TransactionSignRequest.md) + - [TransactionSignResponse](docs/TransactionSignResponse.md) + - [WordRequest](docs/WordRequest.md) + + +## Documentation For Authorization + + +## csrfAuth + +- **Type**: API key +- **API key parameter name**: X-CSRF-TOKEN +- **Location**: HTTP header + + +## Author + +steve@skycoin.net + + diff --git a/.lib/skyhwd/docs/ApplySettingsRequest.md b/.lib/skyhwd/docs/ApplySettingsRequest.md new file mode 100644 index 00000000..d1934a0d --- /dev/null +++ b/.lib/skyhwd/docs/ApplySettingsRequest.md @@ -0,0 +1,11 @@ +# ApplySettingsRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | | [optional] +**use_passphrase** | **bool** | | [optional] + +[[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/.lib/skyhwd/docs/CSRFResponse.md b/.lib/skyhwd/docs/CSRFResponse.md new file mode 100644 index 00000000..050b748c --- /dev/null +++ b/.lib/skyhwd/docs/CSRFResponse.md @@ -0,0 +1,10 @@ +# CSRFResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **str** | | [optional] + +[[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/.lib/skyhwd/docs/CheckMessageSignatureRequest.md b/.lib/skyhwd/docs/CheckMessageSignatureRequest.md new file mode 100644 index 00000000..e213693c --- /dev/null +++ b/.lib/skyhwd/docs/CheckMessageSignatureRequest.md @@ -0,0 +1,12 @@ +# CheckMessageSignatureRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | +**signature** | **str** | | +**address** | **str** | | + +[[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/.lib/skyhwd/docs/DefaultApi.md b/.lib/skyhwd/docs/DefaultApi.md new file mode 100644 index 00000000..fb815c47 --- /dev/null +++ b/.lib/skyhwd/docs/DefaultApi.md @@ -0,0 +1,1032 @@ +# skyhwd.DefaultApi + +All URIs are relative to *http://127.0.0.1:9510/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**apply_settings_post**](DefaultApi.md#apply_settings_post) | **POST** /apply_settings | +[**backup_post**](DefaultApi.md#backup_post) | **POST** /backup | +[**cancel_put**](DefaultApi.md#cancel_put) | **PUT** /cancel | +[**check_message_signature_post**](DefaultApi.md#check_message_signature_post) | **POST** /check_message_signature | +[**connected_get**](DefaultApi.md#connected_get) | **GET** /connected | +[**csrf_get**](DefaultApi.md#csrf_get) | **GET** /csrf | +[**features_get**](DefaultApi.md#features_get) | **GET** /features | +[**firmware_update_put**](DefaultApi.md#firmware_update_put) | **PUT** /firmware_update | +[**generate_addresses_post**](DefaultApi.md#generate_addresses_post) | **POST** /generate_addresses | +[**generate_mnemonic_post**](DefaultApi.md#generate_mnemonic_post) | **POST** /generate_mnemonic | +[**intermediate_passphrase_post**](DefaultApi.md#intermediate_passphrase_post) | **POST** /intermediate/passphrase | +[**intermediate_pin_matrix_post**](DefaultApi.md#intermediate_pin_matrix_post) | **POST** /intermediate/pin_matrix | +[**intermediate_word_post**](DefaultApi.md#intermediate_word_post) | **POST** /intermediate/word | +[**recovery_post**](DefaultApi.md#recovery_post) | **POST** /recovery | +[**set_mnemonic_post**](DefaultApi.md#set_mnemonic_post) | **POST** /set_mnemonic | +[**set_pin_code_post**](DefaultApi.md#set_pin_code_post) | **POST** /set_pin_code | +[**sign_message_post**](DefaultApi.md#sign_message_post) | **POST** /sign_message | +[**transaction_sign_post**](DefaultApi.md#transaction_sign_post) | **POST** /transaction_sign | +[**wipe_delete**](DefaultApi.md#wipe_delete) | **DELETE** /wipe | + + +# **apply_settings_post** +> HTTPSuccessResponse apply_settings_post(apply_settings_request=apply_settings_request) + + + +Apply hardware wallet settings. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +apply_settings_request = skyhwd.ApplySettingsRequest() # ApplySettingsRequest | ApplySettingsRequest is request data for /api/v1/apply_settings (optional) + +try: + api_response = api_instance.apply_settings_post(apply_settings_request=apply_settings_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->apply_settings_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **apply_settings_request** | [**ApplySettingsRequest**](ApplySettingsRequest.md)| ApplySettingsRequest is request data for /api/v1/apply_settings | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **backup_post** +> HTTPSuccessResponse backup_post() + + + +Start seed backup procedure. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) + +try: + api_response = api_instance.backup_post() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->backup_post: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_put** +> HTTPSuccessResponse cancel_put() + + + +Cancels the current operation. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) + +try: + api_response = api_instance.cancel_put() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->cancel_put: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **check_message_signature_post** +> HTTPSuccessResponse check_message_signature_post(check_message_signature_request=check_message_signature_request) + + + +Check a message signature matches the given address. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +check_message_signature_request = skyhwd.CheckMessageSignatureRequest() # CheckMessageSignatureRequest | CheckMessageSignatureRequest is request data for /api/v1/check_message_signature (optional) + +try: + api_response = api_instance.check_message_signature_post(check_message_signature_request=check_message_signature_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->check_message_signature_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **check_message_signature_request** | [**CheckMessageSignatureRequest**](CheckMessageSignatureRequest.md)| CheckMessageSignatureRequest is request data for /api/v1/check_message_signature | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **connected_get** +> InlineResponse200 connected_get() + + + +check whether device is connected or not. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) + +try: + api_response = api_instance.connected_get() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->connected_get: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **csrf_get** +> CSRFResponse csrf_get() + + + +Returns csrf token + +### Example +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = skyhwd.DefaultApi() + +try: + api_response = api_instance.csrf_get() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->csrf_get: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CSRFResponse**](CSRFResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **features_get** +> FeaturesResponse features_get() + + + +Returns device information. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) + +try: + api_response = api_instance.features_get() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->features_get: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**FeaturesResponse**](FeaturesResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **firmware_update_put** +> HTTPSuccessResponse firmware_update_put() + + + +Update firmware + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) + +try: + api_response = api_instance.firmware_update_put() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->firmware_update_put: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **generate_addresses_post** +> GenerateAddressesResponse generate_addresses_post(generate_addresses_request=generate_addresses_request) + + + +Generate addresses for the hardware wallet seed. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +generate_addresses_request = skyhwd.GenerateAddressesRequest() # GenerateAddressesRequest | GenerateAddressesRequest is request data for /api/v1/generate_addresses (optional) + +try: + api_response = api_instance.generate_addresses_post(generate_addresses_request=generate_addresses_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->generate_addresses_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **generate_addresses_request** | [**GenerateAddressesRequest**](GenerateAddressesRequest.md)| GenerateAddressesRequest is request data for /api/v1/generate_addresses | [optional] + +### Return type + +[**GenerateAddressesResponse**](GenerateAddressesResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **generate_mnemonic_post** +> HTTPSuccessResponse generate_mnemonic_post(generate_mnemonic_request=generate_mnemonic_request) + + + +Generate mnemonic can be used to initialize the device with a random seed. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +generate_mnemonic_request = skyhwd.GenerateMnemonicRequest() # GenerateMnemonicRequest | GenerateMnemonicRequest is request data for /api/v1/generate_mnemonic (optional) + +try: + api_response = api_instance.generate_mnemonic_post(generate_mnemonic_request=generate_mnemonic_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->generate_mnemonic_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **generate_mnemonic_request** | [**GenerateMnemonicRequest**](GenerateMnemonicRequest.md)| GenerateMnemonicRequest is request data for /api/v1/generate_mnemonic | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **intermediate_passphrase_post** +> HTTPSuccessResponse intermediate_passphrase_post(passphrase_request=passphrase_request) + + + +passphrase ack request. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +passphrase_request = skyhwd.PassphraseRequest() # PassphraseRequest | PassPhraseRequest is request data for /api/v1/intermediate/passphrase (optional) + +try: + api_response = api_instance.intermediate_passphrase_post(passphrase_request=passphrase_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->intermediate_passphrase_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **passphrase_request** | [**PassphraseRequest**](PassphraseRequest.md)| PassPhraseRequest is request data for /api/v1/intermediate/passphrase | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **intermediate_pin_matrix_post** +> HTTPSuccessResponse intermediate_pin_matrix_post(pin_matrix_request=pin_matrix_request) + + + +pin matrix ack request. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +pin_matrix_request = skyhwd.PinMatrixRequest() # PinMatrixRequest | PinMatrixRequest is request data for /api/v1/intermediate/pin_matrix (optional) + +try: + api_response = api_instance.intermediate_pin_matrix_post(pin_matrix_request=pin_matrix_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->intermediate_pin_matrix_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pin_matrix_request** | [**PinMatrixRequest**](PinMatrixRequest.md)| PinMatrixRequest is request data for /api/v1/intermediate/pin_matrix | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **intermediate_word_post** +> HTTPSuccessResponse intermediate_word_post(word_request=word_request) + + + +word ack request. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +word_request = skyhwd.WordRequest() # WordRequest | WordRequest is request data for /api/v1/intermediate/word (optional) + +try: + api_response = api_instance.intermediate_word_post(word_request=word_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->intermediate_word_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **word_request** | [**WordRequest**](WordRequest.md)| WordRequest is request data for /api/v1/intermediate/word | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **recovery_post** +> HTTPSuccessResponse recovery_post(recovery_request=recovery_request) + + + +Recover existing wallet using seed. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +recovery_request = skyhwd.RecoveryRequest() # RecoveryRequest | RecoveryRequest is request data for /api/v1/check_message_signature (optional) + +try: + api_response = api_instance.recovery_post(recovery_request=recovery_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->recovery_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **recovery_request** | [**RecoveryRequest**](RecoveryRequest.md)| RecoveryRequest is request data for /api/v1/check_message_signature | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_mnemonic_post** +> HTTPSuccessResponse set_mnemonic_post(set_mnemonic_request=set_mnemonic_request) + + + +Set mnemonic can be used to initialize the device with your own seed. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +set_mnemonic_request = skyhwd.SetMnemonicRequest() # SetMnemonicRequest | SetMnemonicRequest is request data for /api/v1/set_mnemonic (optional) + +try: + api_response = api_instance.set_mnemonic_post(set_mnemonic_request=set_mnemonic_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->set_mnemonic_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set_mnemonic_request** | [**SetMnemonicRequest**](SetMnemonicRequest.md)| SetMnemonicRequest is request data for /api/v1/set_mnemonic | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_pin_code_post** +> HTTPSuccessResponse set_pin_code_post() + + + +Configure a pin code on the device. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) + +try: + api_response = api_instance.set_pin_code_post() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->set_pin_code_post: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **sign_message_post** +> SignMessageResponse sign_message_post(sign_message_request=sign_message_request) + + + +Sign a message using the secret key at given index. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +sign_message_request = skyhwd.SignMessageRequest() # SignMessageRequest | SignMessageRequest is request data for /api/signMessage (optional) + +try: + api_response = api_instance.sign_message_post(sign_message_request=sign_message_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->sign_message_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_message_request** | [**SignMessageRequest**](SignMessageRequest.md)| SignMessageRequest is request data for /api/signMessage | [optional] + +### Return type + +[**SignMessageResponse**](SignMessageResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **transaction_sign_post** +> TransactionSignResponse transaction_sign_post(transaction_sign_request=transaction_sign_request) + + + +Sign a transaction with the hardware wallet. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +transaction_sign_request = skyhwd.TransactionSignRequest() # TransactionSignRequest | TransactionSignRequest is request data for /api/v1/transactionSign (optional) + +try: + api_response = api_instance.transaction_sign_post(transaction_sign_request=transaction_sign_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->transaction_sign_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **transaction_sign_request** | [**TransactionSignRequest**](TransactionSignRequest.md)| TransactionSignRequest is request data for /api/v1/transactionSign | [optional] + +### Return type + +[**TransactionSignResponse**](TransactionSignResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **wipe_delete** +> HTTPSuccessResponse wipe_delete() + + + +clean all the configurations. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) + +try: + api_response = api_instance.wipe_delete() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->wipe_delete: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + diff --git a/.lib/skyhwd/docs/FeaturesResponse.md b/.lib/skyhwd/docs/FeaturesResponse.md new file mode 100644 index 00000000..16f32423 --- /dev/null +++ b/.lib/skyhwd/docs/FeaturesResponse.md @@ -0,0 +1,10 @@ +# FeaturesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**FeaturesResponseData**](FeaturesResponseData.md) | | [optional] + +[[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/.lib/skyhwd/docs/FeaturesResponseData.md b/.lib/skyhwd/docs/FeaturesResponseData.md new file mode 100644 index 00000000..f6427473 --- /dev/null +++ b/.lib/skyhwd/docs/FeaturesResponseData.md @@ -0,0 +1,26 @@ +# FeaturesResponseData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_id** | **str** | | [optional] +**passphrase_protection** | **bool** | | +**label** | **str** | | [optional] +**fw_patch** | **int** | | +**fw_major** | **int** | | +**fw_minor** | **int** | | +**minor_version** | **int** | | [optional] +**pin_protection** | **bool** | | +**bootloader_hash** | **str** | | [optional] +**major_version** | **int** | | [optional] +**pin_cached** | **bool** | | +**vendor** | **str** | | +**needs_backup** | **bool** | | +**initialized** | **bool** | | +**model** | **str** | | [optional] +**passphrase_cached** | **bool** | | +**patch_version** | **int** | | [optional] + +[[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/.lib/skyhwd/docs/GenerateAddressesRequest.md b/.lib/skyhwd/docs/GenerateAddressesRequest.md new file mode 100644 index 00000000..06b03c43 --- /dev/null +++ b/.lib/skyhwd/docs/GenerateAddressesRequest.md @@ -0,0 +1,12 @@ +# GenerateAddressesRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address_n** | **int** | | +**start_index** | **int** | | [optional] +**confirm_address** | **bool** | | [optional] + +[[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/.lib/skyhwd/docs/GenerateAddressesResponse.md b/.lib/skyhwd/docs/GenerateAddressesResponse.md new file mode 100644 index 00000000..8441cb50 --- /dev/null +++ b/.lib/skyhwd/docs/GenerateAddressesResponse.md @@ -0,0 +1,10 @@ +# GenerateAddressesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **list[str]** | | [optional] + +[[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/.lib/skyhwd/docs/GenerateMnemonicRequest.md b/.lib/skyhwd/docs/GenerateMnemonicRequest.md new file mode 100644 index 00000000..da4a132d --- /dev/null +++ b/.lib/skyhwd/docs/GenerateMnemonicRequest.md @@ -0,0 +1,11 @@ +# GenerateMnemonicRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**word_count** | **int** | | +**use_passphrase** | **bool** | | [optional] + +[[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/.lib/skyhwd/docs/HTTPErrorResponse.md b/.lib/skyhwd/docs/HTTPErrorResponse.md new file mode 100644 index 00000000..5a0fbe5d --- /dev/null +++ b/.lib/skyhwd/docs/HTTPErrorResponse.md @@ -0,0 +1,10 @@ +# HTTPErrorResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**HTTPErrorResponseError**](HTTPErrorResponseError.md) | | [optional] + +[[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/.lib/skyhwd/docs/HTTPErrorResponseError.md b/.lib/skyhwd/docs/HTTPErrorResponseError.md new file mode 100644 index 00000000..a6a54270 --- /dev/null +++ b/.lib/skyhwd/docs/HTTPErrorResponseError.md @@ -0,0 +1,11 @@ +# HTTPErrorResponseError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] +**message** | **str** | | [optional] + +[[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/.lib/skyhwd/docs/HTTPSuccessResponse.md b/.lib/skyhwd/docs/HTTPSuccessResponse.md new file mode 100644 index 00000000..d465736f --- /dev/null +++ b/.lib/skyhwd/docs/HTTPSuccessResponse.md @@ -0,0 +1,10 @@ +# HTTPSuccessResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **str** | | [optional] + +[[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/.lib/skyhwd/docs/InlineResponse200.md b/.lib/skyhwd/docs/InlineResponse200.md new file mode 100644 index 00000000..ba95f4a3 --- /dev/null +++ b/.lib/skyhwd/docs/InlineResponse200.md @@ -0,0 +1,10 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **bool** | | [optional] + +[[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/.lib/skyhwd/docs/PassphraseRequest.md b/.lib/skyhwd/docs/PassphraseRequest.md new file mode 100644 index 00000000..80b5e1da --- /dev/null +++ b/.lib/skyhwd/docs/PassphraseRequest.md @@ -0,0 +1,10 @@ +# PassphraseRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**passphrase** | **str** | | + +[[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/.lib/skyhwd/docs/PinMatrixRequest.md b/.lib/skyhwd/docs/PinMatrixRequest.md new file mode 100644 index 00000000..14afbedd --- /dev/null +++ b/.lib/skyhwd/docs/PinMatrixRequest.md @@ -0,0 +1,10 @@ +# PinMatrixRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pin** | **str** | | + +[[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/.lib/skyhwd/docs/RecoveryRequest.md b/.lib/skyhwd/docs/RecoveryRequest.md new file mode 100644 index 00000000..c6d3198f --- /dev/null +++ b/.lib/skyhwd/docs/RecoveryRequest.md @@ -0,0 +1,12 @@ +# RecoveryRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**word_count** | **int** | | +**use_passphrase** | **bool** | | [optional] +**dry_run** | **bool** | | [optional] + +[[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/.lib/skyhwd/docs/SetMnemonicRequest.md b/.lib/skyhwd/docs/SetMnemonicRequest.md new file mode 100644 index 00000000..8f597440 --- /dev/null +++ b/.lib/skyhwd/docs/SetMnemonicRequest.md @@ -0,0 +1,10 @@ +# SetMnemonicRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mnemonic** | **str** | | + +[[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/.lib/skyhwd/docs/SignMessageRequest.md b/.lib/skyhwd/docs/SignMessageRequest.md new file mode 100644 index 00000000..c6945980 --- /dev/null +++ b/.lib/skyhwd/docs/SignMessageRequest.md @@ -0,0 +1,11 @@ +# SignMessageRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address_n** | **int** | | +**message** | **str** | | + +[[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/.lib/skyhwd/docs/SignMessageResponse.md b/.lib/skyhwd/docs/SignMessageResponse.md new file mode 100644 index 00000000..54ed6001 --- /dev/null +++ b/.lib/skyhwd/docs/SignMessageResponse.md @@ -0,0 +1,10 @@ +# SignMessageResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **str** | | [optional] + +[[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/.lib/skyhwd/docs/TransactionInput.md b/.lib/skyhwd/docs/TransactionInput.md new file mode 100644 index 00000000..e26e9e25 --- /dev/null +++ b/.lib/skyhwd/docs/TransactionInput.md @@ -0,0 +1,11 @@ +# TransactionInput + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index** | **int** | | +**hash** | **str** | | + +[[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/.lib/skyhwd/docs/TransactionOutput.md b/.lib/skyhwd/docs/TransactionOutput.md new file mode 100644 index 00000000..7f12ba32 --- /dev/null +++ b/.lib/skyhwd/docs/TransactionOutput.md @@ -0,0 +1,13 @@ +# TransactionOutput + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address_index** | **int** | | +**address** | **str** | | +**coins** | **str** | | +**hours** | **str** | | + +[[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/.lib/skyhwd/docs/TransactionSignRequest.md b/.lib/skyhwd/docs/TransactionSignRequest.md new file mode 100644 index 00000000..e7908bfc --- /dev/null +++ b/.lib/skyhwd/docs/TransactionSignRequest.md @@ -0,0 +1,11 @@ +# TransactionSignRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_inputs** | [**list[TransactionInput]**](TransactionInput.md) | | +**transaction_outputs** | [**list[TransactionOutput]**](TransactionOutput.md) | | + +[[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/.lib/skyhwd/docs/TransactionSignResponse.md b/.lib/skyhwd/docs/TransactionSignResponse.md new file mode 100644 index 00000000..df3f69b0 --- /dev/null +++ b/.lib/skyhwd/docs/TransactionSignResponse.md @@ -0,0 +1,10 @@ +# TransactionSignResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **list[str]** | | [optional] + +[[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/.lib/skyhwd/docs/WordRequest.md b/.lib/skyhwd/docs/WordRequest.md new file mode 100644 index 00000000..0c2f23f0 --- /dev/null +++ b/.lib/skyhwd/docs/WordRequest.md @@ -0,0 +1,10 @@ +# WordRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**word** | **str** | | + +[[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/.lib/skyhwd/git_push.sh b/.lib/skyhwd/git_push.sh new file mode 100644 index 00000000..8442b80b --- /dev/null +++ b/.lib/skyhwd/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/.lib/skyhwd/requirements.txt b/.lib/skyhwd/requirements.txt new file mode 100644 index 00000000..bafdc075 --- /dev/null +++ b/.lib/skyhwd/requirements.txt @@ -0,0 +1,5 @@ +certifi >= 14.05.14 +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/.lib/skyhwd/setup.py b/.lib/skyhwd/setup.py new file mode 100644 index 00000000..cefb220f --- /dev/null +++ b/.lib/skyhwd/setup.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "skyhwd" +VERSION = "1.0.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] + +setup( + name=NAME, + version=VERSION, + description="Hardware Wallet Daemon API", + author_email="steve@skycoin.net", + url="", + keywords=["OpenAPI", "OpenAPI-Generator", "Hardware Wallet Daemon API"], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + long_description="""\ + This is the hardware-wallet-daemon API # noqa: E501 + """ +) diff --git a/.lib/skyhwd/skyhwd/__init__.py b/.lib/skyhwd/skyhwd/__init__.py new file mode 100644 index 00000000..72a08ed6 --- /dev/null +++ b/.lib/skyhwd/skyhwd/__init__.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +__version__ = "1.0.0" + +# import apis into sdk package +from skyhwd.api.default_api import DefaultApi + +# import ApiClient +from skyhwd.api_client import ApiClient +from skyhwd.configuration import Configuration +# import models into sdk package +from skyhwd.models.apply_settings_request import ApplySettingsRequest +from skyhwd.models.csrf_response import CSRFResponse +from skyhwd.models.check_message_signature_request import CheckMessageSignatureRequest +from skyhwd.models.features_response import FeaturesResponse +from skyhwd.models.features_response_data import FeaturesResponseData +from skyhwd.models.generate_addresses_request import GenerateAddressesRequest +from skyhwd.models.generate_addresses_response import GenerateAddressesResponse +from skyhwd.models.generate_mnemonic_request import GenerateMnemonicRequest +from skyhwd.models.http_error_response import HTTPErrorResponse +from skyhwd.models.http_error_response_error import HTTPErrorResponseError +from skyhwd.models.http_success_response import HTTPSuccessResponse +from skyhwd.models.inline_response200 import InlineResponse200 +from skyhwd.models.passphrase_request import PassphraseRequest +from skyhwd.models.pin_matrix_request import PinMatrixRequest +from skyhwd.models.recovery_request import RecoveryRequest +from skyhwd.models.set_mnemonic_request import SetMnemonicRequest +from skyhwd.models.sign_message_request import SignMessageRequest +from skyhwd.models.sign_message_response import SignMessageResponse +from skyhwd.models.transaction_input import TransactionInput +from skyhwd.models.transaction_output import TransactionOutput +from skyhwd.models.transaction_sign_request import TransactionSignRequest +from skyhwd.models.transaction_sign_response import TransactionSignResponse +from skyhwd.models.word_request import WordRequest diff --git a/.lib/skyhwd/skyhwd/api/__init__.py b/.lib/skyhwd/skyhwd/api/__init__.py new file mode 100644 index 00000000..d6704bac --- /dev/null +++ b/.lib/skyhwd/skyhwd/api/__init__.py @@ -0,0 +1,6 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from skyhwd.api.default_api import DefaultApi diff --git a/.lib/skyhwd/skyhwd/api/default_api.py b/.lib/skyhwd/skyhwd/api/default_api.py new file mode 100644 index 00000000..d75f9e6a --- /dev/null +++ b/.lib/skyhwd/skyhwd/api/default_api.py @@ -0,0 +1,1794 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from skyhwd.api_client import ApiClient + + +class DefaultApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def apply_settings_post(self, **kwargs): # noqa: E501 + """apply_settings_post # noqa: E501 + + Apply hardware wallet settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.apply_settings_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ApplySettingsRequest apply_settings_request: ApplySettingsRequest is request data for /api/v1/apply_settings + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.apply_settings_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.apply_settings_post_with_http_info(**kwargs) # noqa: E501 + return data + + def apply_settings_post_with_http_info(self, **kwargs): # noqa: E501 + """apply_settings_post # noqa: E501 + + Apply hardware wallet settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.apply_settings_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ApplySettingsRequest apply_settings_request: ApplySettingsRequest is request data for /api/v1/apply_settings + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['apply_settings_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method apply_settings_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'apply_settings_request' in local_var_params: + body_params = local_var_params['apply_settings_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/apply_settings', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def backup_post(self, **kwargs): # noqa: E501 + """backup_post # noqa: E501 + + Start seed backup procedure. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.backup_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.backup_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.backup_post_with_http_info(**kwargs) # noqa: E501 + return data + + def backup_post_with_http_info(self, **kwargs): # noqa: E501 + """backup_post # noqa: E501 + + Start seed backup procedure. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.backup_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method backup_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/backup', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def cancel_put(self, **kwargs): # noqa: E501 + """cancel_put # noqa: E501 + + Cancels the current operation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_put(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.cancel_put_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.cancel_put_with_http_info(**kwargs) # noqa: E501 + return data + + def cancel_put_with_http_info(self, **kwargs): # noqa: E501 + """cancel_put # noqa: E501 + + Cancels the current operation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_put_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method cancel_put" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/cancel', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def check_message_signature_post(self, **kwargs): # noqa: E501 + """check_message_signature_post # noqa: E501 + + Check a message signature matches the given address. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.check_message_signature_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CheckMessageSignatureRequest check_message_signature_request: CheckMessageSignatureRequest is request data for /api/v1/check_message_signature + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.check_message_signature_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.check_message_signature_post_with_http_info(**kwargs) # noqa: E501 + return data + + def check_message_signature_post_with_http_info(self, **kwargs): # noqa: E501 + """check_message_signature_post # noqa: E501 + + Check a message signature matches the given address. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.check_message_signature_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CheckMessageSignatureRequest check_message_signature_request: CheckMessageSignatureRequest is request data for /api/v1/check_message_signature + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['check_message_signature_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method check_message_signature_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'check_message_signature_request' in local_var_params: + body_params = local_var_params['check_message_signature_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/check_message_signature', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def connected_get(self, **kwargs): # noqa: E501 + """connected_get # noqa: E501 + + check whether device is connected or not. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.connected_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: InlineResponse200 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.connected_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.connected_get_with_http_info(**kwargs) # noqa: E501 + return data + + def connected_get_with_http_info(self, **kwargs): # noqa: E501 + """connected_get # noqa: E501 + + check whether device is connected or not. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.connected_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: InlineResponse200 + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method connected_get" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/connected', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse200', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def csrf_get(self, **kwargs): # noqa: E501 + """csrf_get # noqa: E501 + + Returns csrf token # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.csrf_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: CSRFResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.csrf_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.csrf_get_with_http_info(**kwargs) # noqa: E501 + return data + + def csrf_get_with_http_info(self, **kwargs): # noqa: E501 + """csrf_get # noqa: E501 + + Returns csrf token # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.csrf_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: CSRFResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method csrf_get" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/csrf', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CSRFResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def features_get(self, **kwargs): # noqa: E501 + """features_get # noqa: E501 + + Returns device information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.features_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: FeaturesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.features_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.features_get_with_http_info(**kwargs) # noqa: E501 + return data + + def features_get_with_http_info(self, **kwargs): # noqa: E501 + """features_get # noqa: E501 + + Returns device information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.features_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: FeaturesResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method features_get" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/features', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FeaturesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def firmware_update_put(self, **kwargs): # noqa: E501 + """firmware_update_put # noqa: E501 + + Update firmware # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.firmware_update_put(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.firmware_update_put_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.firmware_update_put_with_http_info(**kwargs) # noqa: E501 + return data + + def firmware_update_put_with_http_info(self, **kwargs): # noqa: E501 + """firmware_update_put # noqa: E501 + + Update firmware # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.firmware_update_put_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method firmware_update_put" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/firmware_update', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def generate_addresses_post(self, **kwargs): # noqa: E501 + """generate_addresses_post # noqa: E501 + + Generate addresses for the hardware wallet seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_addresses_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param GenerateAddressesRequest generate_addresses_request: GenerateAddressesRequest is request data for /api/v1/generate_addresses + :return: GenerateAddressesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.generate_addresses_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.generate_addresses_post_with_http_info(**kwargs) # noqa: E501 + return data + + def generate_addresses_post_with_http_info(self, **kwargs): # noqa: E501 + """generate_addresses_post # noqa: E501 + + Generate addresses for the hardware wallet seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_addresses_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param GenerateAddressesRequest generate_addresses_request: GenerateAddressesRequest is request data for /api/v1/generate_addresses + :return: GenerateAddressesResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['generate_addresses_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method generate_addresses_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'generate_addresses_request' in local_var_params: + body_params = local_var_params['generate_addresses_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/generate_addresses', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GenerateAddressesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def generate_mnemonic_post(self, **kwargs): # noqa: E501 + """generate_mnemonic_post # noqa: E501 + + Generate mnemonic can be used to initialize the device with a random seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_mnemonic_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param GenerateMnemonicRequest generate_mnemonic_request: GenerateMnemonicRequest is request data for /api/v1/generate_mnemonic + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.generate_mnemonic_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.generate_mnemonic_post_with_http_info(**kwargs) # noqa: E501 + return data + + def generate_mnemonic_post_with_http_info(self, **kwargs): # noqa: E501 + """generate_mnemonic_post # noqa: E501 + + Generate mnemonic can be used to initialize the device with a random seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_mnemonic_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param GenerateMnemonicRequest generate_mnemonic_request: GenerateMnemonicRequest is request data for /api/v1/generate_mnemonic + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['generate_mnemonic_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method generate_mnemonic_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'generate_mnemonic_request' in local_var_params: + body_params = local_var_params['generate_mnemonic_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/generate_mnemonic', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def intermediate_passphrase_post(self, **kwargs): # noqa: E501 + """intermediate_passphrase_post # noqa: E501 + + passphrase ack request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.intermediate_passphrase_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param PassphraseRequest passphrase_request: PassPhraseRequest is request data for /api/v1/intermediate/passphrase + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.intermediate_passphrase_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.intermediate_passphrase_post_with_http_info(**kwargs) # noqa: E501 + return data + + def intermediate_passphrase_post_with_http_info(self, **kwargs): # noqa: E501 + """intermediate_passphrase_post # noqa: E501 + + passphrase ack request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.intermediate_passphrase_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param PassphraseRequest passphrase_request: PassPhraseRequest is request data for /api/v1/intermediate/passphrase + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['passphrase_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method intermediate_passphrase_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'passphrase_request' in local_var_params: + body_params = local_var_params['passphrase_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/intermediate/passphrase', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def intermediate_pin_matrix_post(self, **kwargs): # noqa: E501 + """intermediate_pin_matrix_post # noqa: E501 + + pin matrix ack request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.intermediate_pin_matrix_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param PinMatrixRequest pin_matrix_request: PinMatrixRequest is request data for /api/v1/intermediate/pin_matrix + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.intermediate_pin_matrix_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.intermediate_pin_matrix_post_with_http_info(**kwargs) # noqa: E501 + return data + + def intermediate_pin_matrix_post_with_http_info(self, **kwargs): # noqa: E501 + """intermediate_pin_matrix_post # noqa: E501 + + pin matrix ack request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.intermediate_pin_matrix_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param PinMatrixRequest pin_matrix_request: PinMatrixRequest is request data for /api/v1/intermediate/pin_matrix + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['pin_matrix_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method intermediate_pin_matrix_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'pin_matrix_request' in local_var_params: + body_params = local_var_params['pin_matrix_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/intermediate/pin_matrix', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def intermediate_word_post(self, **kwargs): # noqa: E501 + """intermediate_word_post # noqa: E501 + + word ack request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.intermediate_word_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param WordRequest word_request: WordRequest is request data for /api/v1/intermediate/word + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.intermediate_word_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.intermediate_word_post_with_http_info(**kwargs) # noqa: E501 + return data + + def intermediate_word_post_with_http_info(self, **kwargs): # noqa: E501 + """intermediate_word_post # noqa: E501 + + word ack request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.intermediate_word_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param WordRequest word_request: WordRequest is request data for /api/v1/intermediate/word + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['word_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method intermediate_word_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'word_request' in local_var_params: + body_params = local_var_params['word_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/intermediate/word', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def recovery_post(self, **kwargs): # noqa: E501 + """recovery_post # noqa: E501 + + Recover existing wallet using seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.recovery_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param RecoveryRequest recovery_request: RecoveryRequest is request data for /api/v1/check_message_signature + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.recovery_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.recovery_post_with_http_info(**kwargs) # noqa: E501 + return data + + def recovery_post_with_http_info(self, **kwargs): # noqa: E501 + """recovery_post # noqa: E501 + + Recover existing wallet using seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.recovery_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param RecoveryRequest recovery_request: RecoveryRequest is request data for /api/v1/check_message_signature + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['recovery_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method recovery_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'recovery_request' in local_var_params: + body_params = local_var_params['recovery_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/recovery', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def set_mnemonic_post(self, **kwargs): # noqa: E501 + """set_mnemonic_post # noqa: E501 + + Set mnemonic can be used to initialize the device with your own seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_mnemonic_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SetMnemonicRequest set_mnemonic_request: SetMnemonicRequest is request data for /api/v1/set_mnemonic + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.set_mnemonic_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.set_mnemonic_post_with_http_info(**kwargs) # noqa: E501 + return data + + def set_mnemonic_post_with_http_info(self, **kwargs): # noqa: E501 + """set_mnemonic_post # noqa: E501 + + Set mnemonic can be used to initialize the device with your own seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_mnemonic_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SetMnemonicRequest set_mnemonic_request: SetMnemonicRequest is request data for /api/v1/set_mnemonic + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['set_mnemonic_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method set_mnemonic_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'set_mnemonic_request' in local_var_params: + body_params = local_var_params['set_mnemonic_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/set_mnemonic', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def set_pin_code_post(self, **kwargs): # noqa: E501 + """set_pin_code_post # noqa: E501 + + Configure a pin code on the device. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_pin_code_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.set_pin_code_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.set_pin_code_post_with_http_info(**kwargs) # noqa: E501 + return data + + def set_pin_code_post_with_http_info(self, **kwargs): # noqa: E501 + """set_pin_code_post # noqa: E501 + + Configure a pin code on the device. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_pin_code_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method set_pin_code_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/set_pin_code', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def sign_message_post(self, **kwargs): # noqa: E501 + """sign_message_post # noqa: E501 + + Sign a message using the secret key at given index. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.sign_message_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SignMessageRequest sign_message_request: SignMessageRequest is request data for /api/signMessage + :return: SignMessageResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.sign_message_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.sign_message_post_with_http_info(**kwargs) # noqa: E501 + return data + + def sign_message_post_with_http_info(self, **kwargs): # noqa: E501 + """sign_message_post # noqa: E501 + + Sign a message using the secret key at given index. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.sign_message_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SignMessageRequest sign_message_request: SignMessageRequest is request data for /api/signMessage + :return: SignMessageResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['sign_message_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method sign_message_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'sign_message_request' in local_var_params: + body_params = local_var_params['sign_message_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/sign_message', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SignMessageResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def transaction_sign_post(self, **kwargs): # noqa: E501 + """transaction_sign_post # noqa: E501 + + Sign a transaction with the hardware wallet. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.transaction_sign_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param TransactionSignRequest transaction_sign_request: TransactionSignRequest is request data for /api/v1/transactionSign + :return: TransactionSignResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.transaction_sign_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.transaction_sign_post_with_http_info(**kwargs) # noqa: E501 + return data + + def transaction_sign_post_with_http_info(self, **kwargs): # noqa: E501 + """transaction_sign_post # noqa: E501 + + Sign a transaction with the hardware wallet. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.transaction_sign_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param TransactionSignRequest transaction_sign_request: TransactionSignRequest is request data for /api/v1/transactionSign + :return: TransactionSignResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['transaction_sign_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method transaction_sign_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'transaction_sign_request' in local_var_params: + body_params = local_var_params['transaction_sign_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/transaction_sign', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TransactionSignResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def wipe_delete(self, **kwargs): # noqa: E501 + """wipe_delete # noqa: E501 + + clean all the configurations. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wipe_delete(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.wipe_delete_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.wipe_delete_with_http_info(**kwargs) # noqa: E501 + return data + + def wipe_delete_with_http_info(self, **kwargs): # noqa: E501 + """wipe_delete # noqa: E501 + + clean all the configurations. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wipe_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method wipe_delete" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/wipe', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/.lib/skyhwd/skyhwd/api_client.py b/.lib/skyhwd/skyhwd/api_client.py new file mode 100644 index 00000000..935449b8 --- /dev/null +++ b/.lib/skyhwd/skyhwd/api_client.py @@ -0,0 +1,635 @@ +# coding: utf-8 +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + +from __future__ import absolute_import + +import datetime +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import quote + +from skyhwd.configuration import Configuration +import skyhwd.models +from skyhwd import rest + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, # noqa: F821 + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=None): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + + def __del__(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = self.prepare_post_parameters(post_params, files) + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + url = self.configuration.host + resource_path + + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + + self.last_response = response_data + + return_data = response_data + if _preload_content: + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.openapi_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(skyhwd.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datatime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async_req=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout) + else: + thread = self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, query_params, + header_params, body, + post_params, files, + response_type, auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, _request_timeout)) + return thread + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def prepare_post_parameters(self, post_params=None, files=None): + """Builds form parameters. + + :param post_params: Normal form parameters. + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if post_params: + params = post_params + + if files: + for k, v in six.iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if not auth_setting['value']: + continue + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return six.text_type(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datatime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + if not klass.openapi_types and not hasattr(klass, + 'get_real_child_model'): + return data + + kwargs = {} + if klass.openapi_types is not None: + for attr, attr_type in six.iteritems(klass.openapi_types): + if (data is not None and + klass.attribute_map[attr] in data and + isinstance(data, (list, dict))): + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if hasattr(instance, 'get_real_child_model'): + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/.lib/skyhwd/skyhwd/configuration.py b/.lib/skyhwd/skyhwd/configuration.py new file mode 100644 index 00000000..603453a0 --- /dev/null +++ b/.lib/skyhwd/skyhwd/configuration.py @@ -0,0 +1,236 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import six +from six.moves import http_client as httplib + + +class TypeWithDefault(type): + def __init__(cls, name, bases, dct): + super(TypeWithDefault, cls).__init__(name, bases, dct) + cls._default = None + + def __call__(cls): + if cls._default is None: + cls._default = type.__call__(cls) + return copy.copy(cls._default) + + def set_default(cls, default): + cls._default = copy.copy(default) + + +class Configuration(six.with_metaclass(TypeWithDefault, object)): + """NOTE: This class is auto generated by OpenAPI Generator + + Ref: https://openapi-generator.tech + Do not edit the class manually. + """ + + def __init__(self): + """Constructor""" + # Default Base url + self.host = "http://127.0.0.1:9510/api/v1" + # Temp file folder for downloading files + self.temp_folder_path = None + + # Authentication Settings + # dict to store API key(s) + self.api_key = {} + # dict to store API prefix (e.g. Bearer) + self.api_key_prefix = {} + # Username for HTTP basic authentication + self.username = "" + # Password for HTTP basic authentication + self.password = "" + + # Logging Settings + self.logger = {} + self.logger["package_logger"] = logging.getLogger("skyhwd") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + # Log format + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + # Log stream handler + self.logger_stream_handler = None + # Log file handler + self.logger_file_handler = None + # Debug file location + self.logger_file = None + # Debug switch + self.debug = False + + # SSL/TLS verification + # Set this to false to skip verifying SSL certificate when calling API + # from https server. + self.verify_ssl = True + # Set this to customize the certificate file to verify the peer. + self.ssl_ca_cert = None + # client certificate file + self.cert_file = None + # client key file + self.key_file = None + # Set this to True/False to enable/disable SSL hostname verification. + self.assert_hostname = None + + # urllib3 connection pool's maximum number of connections saved + # per pool. urllib3 uses 1 connection as default value, but this is + # not the best value when you are making a lot of possibly parallel + # requests to the same host, which is often the case here. + # cpu_count * 5 is used as default value to increase performance. + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + + # Proxy URL + self.proxy = None + # Safe chars for path_param + self.safe_chars_for_path_param = '' + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :return: The token for api key authentication. + """ + if (self.api_key.get(identifier) and + self.api_key_prefix.get(identifier)): + return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501 + elif self.api_key.get(identifier): + return self.api_key[identifier] + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + return urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + return { + 'csrfAuth': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'X-CSRF-TOKEN', + 'value': self.get_api_key_with_prefix('X-CSRF-TOKEN') + }, + + } + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 0.1.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/.lib/skyhwd/skyhwd/models/__init__.py b/.lib/skyhwd/skyhwd/models/__init__.py new file mode 100644 index 00000000..2a248590 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/__init__.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +# flake8: noqa +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +# import models into model package +from skyhwd.models.apply_settings_request import ApplySettingsRequest +from skyhwd.models.csrf_response import CSRFResponse +from skyhwd.models.check_message_signature_request import CheckMessageSignatureRequest +from skyhwd.models.features_response import FeaturesResponse +from skyhwd.models.features_response_data import FeaturesResponseData +from skyhwd.models.generate_addresses_request import GenerateAddressesRequest +from skyhwd.models.generate_addresses_response import GenerateAddressesResponse +from skyhwd.models.generate_mnemonic_request import GenerateMnemonicRequest +from skyhwd.models.http_error_response import HTTPErrorResponse +from skyhwd.models.http_error_response_error import HTTPErrorResponseError +from skyhwd.models.http_success_response import HTTPSuccessResponse +from skyhwd.models.inline_response200 import InlineResponse200 +from skyhwd.models.passphrase_request import PassphraseRequest +from skyhwd.models.pin_matrix_request import PinMatrixRequest +from skyhwd.models.recovery_request import RecoveryRequest +from skyhwd.models.set_mnemonic_request import SetMnemonicRequest +from skyhwd.models.sign_message_request import SignMessageRequest +from skyhwd.models.sign_message_response import SignMessageResponse +from skyhwd.models.transaction_input import TransactionInput +from skyhwd.models.transaction_output import TransactionOutput +from skyhwd.models.transaction_sign_request import TransactionSignRequest +from skyhwd.models.transaction_sign_response import TransactionSignResponse +from skyhwd.models.word_request import WordRequest diff --git a/.lib/skyhwd/skyhwd/models/apply_settings_request.py b/.lib/skyhwd/skyhwd/models/apply_settings_request.py new file mode 100644 index 00000000..9da76eb6 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/apply_settings_request.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApplySettingsRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'label': 'str', + 'use_passphrase': 'bool' + } + + attribute_map = { + 'label': 'label', + 'use_passphrase': 'use_passphrase' + } + + def __init__(self, label=None, use_passphrase=None): # noqa: E501 + """ApplySettingsRequest - a model defined in OpenAPI""" # noqa: E501 + + self._label = None + self._use_passphrase = None + self.discriminator = None + + if label is not None: + self.label = label + if use_passphrase is not None: + self.use_passphrase = use_passphrase + + @property + def label(self): + """Gets the label of this ApplySettingsRequest. # noqa: E501 + + + :return: The label of this ApplySettingsRequest. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ApplySettingsRequest. + + + :param label: The label of this ApplySettingsRequest. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def use_passphrase(self): + """Gets the use_passphrase of this ApplySettingsRequest. # noqa: E501 + + + :return: The use_passphrase of this ApplySettingsRequest. # noqa: E501 + :rtype: bool + """ + return self._use_passphrase + + @use_passphrase.setter + def use_passphrase(self, use_passphrase): + """Sets the use_passphrase of this ApplySettingsRequest. + + + :param use_passphrase: The use_passphrase of this ApplySettingsRequest. # noqa: E501 + :type: bool + """ + + self._use_passphrase = use_passphrase + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApplySettingsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/check_message_signature_request.py b/.lib/skyhwd/skyhwd/models/check_message_signature_request.py new file mode 100644 index 00000000..f3f8a791 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/check_message_signature_request.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CheckMessageSignatureRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message': 'str', + 'signature': 'str', + 'address': 'str' + } + + attribute_map = { + 'message': 'message', + 'signature': 'signature', + 'address': 'address' + } + + def __init__(self, message=None, signature=None, address=None): # noqa: E501 + """CheckMessageSignatureRequest - a model defined in OpenAPI""" # noqa: E501 + + self._message = None + self._signature = None + self._address = None + self.discriminator = None + + self.message = message + self.signature = signature + self.address = address + + @property + def message(self): + """Gets the message of this CheckMessageSignatureRequest. # noqa: E501 + + + :return: The message of this CheckMessageSignatureRequest. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this CheckMessageSignatureRequest. + + + :param message: The message of this CheckMessageSignatureRequest. # noqa: E501 + :type: str + """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def signature(self): + """Gets the signature of this CheckMessageSignatureRequest. # noqa: E501 + + + :return: The signature of this CheckMessageSignatureRequest. # noqa: E501 + :rtype: str + """ + return self._signature + + @signature.setter + def signature(self, signature): + """Sets the signature of this CheckMessageSignatureRequest. + + + :param signature: The signature of this CheckMessageSignatureRequest. # noqa: E501 + :type: str + """ + if signature is None: + raise ValueError("Invalid value for `signature`, must not be `None`") # noqa: E501 + + self._signature = signature + + @property + def address(self): + """Gets the address of this CheckMessageSignatureRequest. # noqa: E501 + + + :return: The address of this CheckMessageSignatureRequest. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this CheckMessageSignatureRequest. + + + :param address: The address of this CheckMessageSignatureRequest. # noqa: E501 + :type: str + """ + if address is None: + raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501 + + self._address = address + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CheckMessageSignatureRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/csrf_response.py b/.lib/skyhwd/skyhwd/models/csrf_response.py new file mode 100644 index 00000000..b14c0439 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/csrf_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CSRFResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'str' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """CSRFResponse - a model defined in OpenAPI""" # noqa: E501 + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this CSRFResponse. # noqa: E501 + + + :return: The data of this CSRFResponse. # noqa: E501 + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this CSRFResponse. + + + :param data: The data of this CSRFResponse. # noqa: E501 + :type: str + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CSRFResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/features_response.py b/.lib/skyhwd/skyhwd/models/features_response.py new file mode 100644 index 00000000..12b37763 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/features_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class FeaturesResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'FeaturesResponseData' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """FeaturesResponse - a model defined in OpenAPI""" # noqa: E501 + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this FeaturesResponse. # noqa: E501 + + + :return: The data of this FeaturesResponse. # noqa: E501 + :rtype: FeaturesResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this FeaturesResponse. + + + :param data: The data of this FeaturesResponse. # noqa: E501 + :type: FeaturesResponseData + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FeaturesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/features_response_data.py b/.lib/skyhwd/skyhwd/models/features_response_data.py new file mode 100644 index 00000000..f77d2b0c --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/features_response_data.py @@ -0,0 +1,539 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class FeaturesResponseData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'device_id': 'str', + 'passphrase_protection': 'bool', + 'label': 'str', + 'fw_patch': 'int', + 'fw_major': 'int', + 'fw_minor': 'int', + 'minor_version': 'int', + 'pin_protection': 'bool', + 'bootloader_hash': 'str', + 'major_version': 'int', + 'pin_cached': 'bool', + 'vendor': 'str', + 'needs_backup': 'bool', + 'initialized': 'bool', + 'model': 'str', + 'passphrase_cached': 'bool', + 'patch_version': 'int' + } + + attribute_map = { + 'device_id': 'device_id', + 'passphrase_protection': 'passphrase_protection', + 'label': 'label', + 'fw_patch': 'fw_patch', + 'fw_major': 'fw_major', + 'fw_minor': 'fw_minor', + 'minor_version': 'minor_version', + 'pin_protection': 'pin_protection', + 'bootloader_hash': 'bootloader_hash', + 'major_version': 'major_version', + 'pin_cached': 'pin_cached', + 'vendor': 'vendor', + 'needs_backup': 'needs_backup', + 'initialized': 'initialized', + 'model': 'model', + 'passphrase_cached': 'passphrase_cached', + 'patch_version': 'patch_version' + } + + def __init__(self, device_id=None, passphrase_protection=None, label=None, fw_patch=None, fw_major=None, fw_minor=None, minor_version=None, pin_protection=None, bootloader_hash=None, major_version=None, pin_cached=None, vendor=None, needs_backup=None, initialized=None, model=None, passphrase_cached=None, patch_version=None): # noqa: E501 + """FeaturesResponseData - a model defined in OpenAPI""" # noqa: E501 + + self._device_id = None + self._passphrase_protection = None + self._label = None + self._fw_patch = None + self._fw_major = None + self._fw_minor = None + self._minor_version = None + self._pin_protection = None + self._bootloader_hash = None + self._major_version = None + self._pin_cached = None + self._vendor = None + self._needs_backup = None + self._initialized = None + self._model = None + self._passphrase_cached = None + self._patch_version = None + self.discriminator = None + + if device_id is not None: + self.device_id = device_id + self.passphrase_protection = passphrase_protection + if label is not None: + self.label = label + self.fw_patch = fw_patch + self.fw_major = fw_major + self.fw_minor = fw_minor + if minor_version is not None: + self.minor_version = minor_version + self.pin_protection = pin_protection + if bootloader_hash is not None: + self.bootloader_hash = bootloader_hash + if major_version is not None: + self.major_version = major_version + self.pin_cached = pin_cached + self.vendor = vendor + self.needs_backup = needs_backup + self.initialized = initialized + if model is not None: + self.model = model + self.passphrase_cached = passphrase_cached + if patch_version is not None: + self.patch_version = patch_version + + @property + def device_id(self): + """Gets the device_id of this FeaturesResponseData. # noqa: E501 + + + :return: The device_id of this FeaturesResponseData. # noqa: E501 + :rtype: str + """ + return self._device_id + + @device_id.setter + def device_id(self, device_id): + """Sets the device_id of this FeaturesResponseData. + + + :param device_id: The device_id of this FeaturesResponseData. # noqa: E501 + :type: str + """ + + self._device_id = device_id + + @property + def passphrase_protection(self): + """Gets the passphrase_protection of this FeaturesResponseData. # noqa: E501 + + + :return: The passphrase_protection of this FeaturesResponseData. # noqa: E501 + :rtype: bool + """ + return self._passphrase_protection + + @passphrase_protection.setter + def passphrase_protection(self, passphrase_protection): + """Sets the passphrase_protection of this FeaturesResponseData. + + + :param passphrase_protection: The passphrase_protection of this FeaturesResponseData. # noqa: E501 + :type: bool + """ + if passphrase_protection is None: + raise ValueError("Invalid value for `passphrase_protection`, must not be `None`") # noqa: E501 + + self._passphrase_protection = passphrase_protection + + @property + def label(self): + """Gets the label of this FeaturesResponseData. # noqa: E501 + + + :return: The label of this FeaturesResponseData. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this FeaturesResponseData. + + + :param label: The label of this FeaturesResponseData. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def fw_patch(self): + """Gets the fw_patch of this FeaturesResponseData. # noqa: E501 + + + :return: The fw_patch of this FeaturesResponseData. # noqa: E501 + :rtype: int + """ + return self._fw_patch + + @fw_patch.setter + def fw_patch(self, fw_patch): + """Sets the fw_patch of this FeaturesResponseData. + + + :param fw_patch: The fw_patch of this FeaturesResponseData. # noqa: E501 + :type: int + """ + if fw_patch is None: + raise ValueError("Invalid value for `fw_patch`, must not be `None`") # noqa: E501 + + self._fw_patch = fw_patch + + @property + def fw_major(self): + """Gets the fw_major of this FeaturesResponseData. # noqa: E501 + + + :return: The fw_major of this FeaturesResponseData. # noqa: E501 + :rtype: int + """ + return self._fw_major + + @fw_major.setter + def fw_major(self, fw_major): + """Sets the fw_major of this FeaturesResponseData. + + + :param fw_major: The fw_major of this FeaturesResponseData. # noqa: E501 + :type: int + """ + if fw_major is None: + raise ValueError("Invalid value for `fw_major`, must not be `None`") # noqa: E501 + + self._fw_major = fw_major + + @property + def fw_minor(self): + """Gets the fw_minor of this FeaturesResponseData. # noqa: E501 + + + :return: The fw_minor of this FeaturesResponseData. # noqa: E501 + :rtype: int + """ + return self._fw_minor + + @fw_minor.setter + def fw_minor(self, fw_minor): + """Sets the fw_minor of this FeaturesResponseData. + + + :param fw_minor: The fw_minor of this FeaturesResponseData. # noqa: E501 + :type: int + """ + if fw_minor is None: + raise ValueError("Invalid value for `fw_minor`, must not be `None`") # noqa: E501 + + self._fw_minor = fw_minor + + @property + def minor_version(self): + """Gets the minor_version of this FeaturesResponseData. # noqa: E501 + + + :return: The minor_version of this FeaturesResponseData. # noqa: E501 + :rtype: int + """ + return self._minor_version + + @minor_version.setter + def minor_version(self, minor_version): + """Sets the minor_version of this FeaturesResponseData. + + + :param minor_version: The minor_version of this FeaturesResponseData. # noqa: E501 + :type: int + """ + + self._minor_version = minor_version + + @property + def pin_protection(self): + """Gets the pin_protection of this FeaturesResponseData. # noqa: E501 + + + :return: The pin_protection of this FeaturesResponseData. # noqa: E501 + :rtype: bool + """ + return self._pin_protection + + @pin_protection.setter + def pin_protection(self, pin_protection): + """Sets the pin_protection of this FeaturesResponseData. + + + :param pin_protection: The pin_protection of this FeaturesResponseData. # noqa: E501 + :type: bool + """ + if pin_protection is None: + raise ValueError("Invalid value for `pin_protection`, must not be `None`") # noqa: E501 + + self._pin_protection = pin_protection + + @property + def bootloader_hash(self): + """Gets the bootloader_hash of this FeaturesResponseData. # noqa: E501 + + + :return: The bootloader_hash of this FeaturesResponseData. # noqa: E501 + :rtype: str + """ + return self._bootloader_hash + + @bootloader_hash.setter + def bootloader_hash(self, bootloader_hash): + """Sets the bootloader_hash of this FeaturesResponseData. + + + :param bootloader_hash: The bootloader_hash of this FeaturesResponseData. # noqa: E501 + :type: str + """ + + self._bootloader_hash = bootloader_hash + + @property + def major_version(self): + """Gets the major_version of this FeaturesResponseData. # noqa: E501 + + + :return: The major_version of this FeaturesResponseData. # noqa: E501 + :rtype: int + """ + return self._major_version + + @major_version.setter + def major_version(self, major_version): + """Sets the major_version of this FeaturesResponseData. + + + :param major_version: The major_version of this FeaturesResponseData. # noqa: E501 + :type: int + """ + + self._major_version = major_version + + @property + def pin_cached(self): + """Gets the pin_cached of this FeaturesResponseData. # noqa: E501 + + + :return: The pin_cached of this FeaturesResponseData. # noqa: E501 + :rtype: bool + """ + return self._pin_cached + + @pin_cached.setter + def pin_cached(self, pin_cached): + """Sets the pin_cached of this FeaturesResponseData. + + + :param pin_cached: The pin_cached of this FeaturesResponseData. # noqa: E501 + :type: bool + """ + if pin_cached is None: + raise ValueError("Invalid value for `pin_cached`, must not be `None`") # noqa: E501 + + self._pin_cached = pin_cached + + @property + def vendor(self): + """Gets the vendor of this FeaturesResponseData. # noqa: E501 + + + :return: The vendor of this FeaturesResponseData. # noqa: E501 + :rtype: str + """ + return self._vendor + + @vendor.setter + def vendor(self, vendor): + """Sets the vendor of this FeaturesResponseData. + + + :param vendor: The vendor of this FeaturesResponseData. # noqa: E501 + :type: str + """ + if vendor is None: + raise ValueError("Invalid value for `vendor`, must not be `None`") # noqa: E501 + + self._vendor = vendor + + @property + def needs_backup(self): + """Gets the needs_backup of this FeaturesResponseData. # noqa: E501 + + + :return: The needs_backup of this FeaturesResponseData. # noqa: E501 + :rtype: bool + """ + return self._needs_backup + + @needs_backup.setter + def needs_backup(self, needs_backup): + """Sets the needs_backup of this FeaturesResponseData. + + + :param needs_backup: The needs_backup of this FeaturesResponseData. # noqa: E501 + :type: bool + """ + if needs_backup is None: + raise ValueError("Invalid value for `needs_backup`, must not be `None`") # noqa: E501 + + self._needs_backup = needs_backup + + @property + def initialized(self): + """Gets the initialized of this FeaturesResponseData. # noqa: E501 + + + :return: The initialized of this FeaturesResponseData. # noqa: E501 + :rtype: bool + """ + return self._initialized + + @initialized.setter + def initialized(self, initialized): + """Sets the initialized of this FeaturesResponseData. + + + :param initialized: The initialized of this FeaturesResponseData. # noqa: E501 + :type: bool + """ + if initialized is None: + raise ValueError("Invalid value for `initialized`, must not be `None`") # noqa: E501 + + self._initialized = initialized + + @property + def model(self): + """Gets the model of this FeaturesResponseData. # noqa: E501 + + + :return: The model of this FeaturesResponseData. # noqa: E501 + :rtype: str + """ + return self._model + + @model.setter + def model(self, model): + """Sets the model of this FeaturesResponseData. + + + :param model: The model of this FeaturesResponseData. # noqa: E501 + :type: str + """ + + self._model = model + + @property + def passphrase_cached(self): + """Gets the passphrase_cached of this FeaturesResponseData. # noqa: E501 + + + :return: The passphrase_cached of this FeaturesResponseData. # noqa: E501 + :rtype: bool + """ + return self._passphrase_cached + + @passphrase_cached.setter + def passphrase_cached(self, passphrase_cached): + """Sets the passphrase_cached of this FeaturesResponseData. + + + :param passphrase_cached: The passphrase_cached of this FeaturesResponseData. # noqa: E501 + :type: bool + """ + if passphrase_cached is None: + raise ValueError("Invalid value for `passphrase_cached`, must not be `None`") # noqa: E501 + + self._passphrase_cached = passphrase_cached + + @property + def patch_version(self): + """Gets the patch_version of this FeaturesResponseData. # noqa: E501 + + + :return: The patch_version of this FeaturesResponseData. # noqa: E501 + :rtype: int + """ + return self._patch_version + + @patch_version.setter + def patch_version(self, patch_version): + """Sets the patch_version of this FeaturesResponseData. + + + :param patch_version: The patch_version of this FeaturesResponseData. # noqa: E501 + :type: int + """ + + self._patch_version = patch_version + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FeaturesResponseData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/generate_addresses_request.py b/.lib/skyhwd/skyhwd/models/generate_addresses_request.py new file mode 100644 index 00000000..83cdded6 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/generate_addresses_request.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class GenerateAddressesRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'address_n': 'int', + 'start_index': 'int', + 'confirm_address': 'bool' + } + + attribute_map = { + 'address_n': 'address_n', + 'start_index': 'start_index', + 'confirm_address': 'confirm_address' + } + + def __init__(self, address_n=None, start_index=None, confirm_address=None): # noqa: E501 + """GenerateAddressesRequest - a model defined in OpenAPI""" # noqa: E501 + + self._address_n = None + self._start_index = None + self._confirm_address = None + self.discriminator = None + + self.address_n = address_n + if start_index is not None: + self.start_index = start_index + if confirm_address is not None: + self.confirm_address = confirm_address + + @property + def address_n(self): + """Gets the address_n of this GenerateAddressesRequest. # noqa: E501 + + + :return: The address_n of this GenerateAddressesRequest. # noqa: E501 + :rtype: int + """ + return self._address_n + + @address_n.setter + def address_n(self, address_n): + """Sets the address_n of this GenerateAddressesRequest. + + + :param address_n: The address_n of this GenerateAddressesRequest. # noqa: E501 + :type: int + """ + if address_n is None: + raise ValueError("Invalid value for `address_n`, must not be `None`") # noqa: E501 + + self._address_n = address_n + + @property + def start_index(self): + """Gets the start_index of this GenerateAddressesRequest. # noqa: E501 + + + :return: The start_index of this GenerateAddressesRequest. # noqa: E501 + :rtype: int + """ + return self._start_index + + @start_index.setter + def start_index(self, start_index): + """Sets the start_index of this GenerateAddressesRequest. + + + :param start_index: The start_index of this GenerateAddressesRequest. # noqa: E501 + :type: int + """ + + self._start_index = start_index + + @property + def confirm_address(self): + """Gets the confirm_address of this GenerateAddressesRequest. # noqa: E501 + + + :return: The confirm_address of this GenerateAddressesRequest. # noqa: E501 + :rtype: bool + """ + return self._confirm_address + + @confirm_address.setter + def confirm_address(self, confirm_address): + """Sets the confirm_address of this GenerateAddressesRequest. + + + :param confirm_address: The confirm_address of this GenerateAddressesRequest. # noqa: E501 + :type: bool + """ + + self._confirm_address = confirm_address + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GenerateAddressesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/generate_addresses_response.py b/.lib/skyhwd/skyhwd/models/generate_addresses_response.py new file mode 100644 index 00000000..bda0c1c3 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/generate_addresses_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class GenerateAddressesResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[str]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """GenerateAddressesResponse - a model defined in OpenAPI""" # noqa: E501 + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this GenerateAddressesResponse. # noqa: E501 + + + :return: The data of this GenerateAddressesResponse. # noqa: E501 + :rtype: list[str] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this GenerateAddressesResponse. + + + :param data: The data of this GenerateAddressesResponse. # noqa: E501 + :type: list[str] + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GenerateAddressesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/generate_mnemonic_request.py b/.lib/skyhwd/skyhwd/models/generate_mnemonic_request.py new file mode 100644 index 00000000..a397169b --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/generate_mnemonic_request.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class GenerateMnemonicRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'word_count': 'int', + 'use_passphrase': 'bool' + } + + attribute_map = { + 'word_count': 'word_count', + 'use_passphrase': 'use_passphrase' + } + + def __init__(self, word_count=None, use_passphrase=None): # noqa: E501 + """GenerateMnemonicRequest - a model defined in OpenAPI""" # noqa: E501 + + self._word_count = None + self._use_passphrase = None + self.discriminator = None + + self.word_count = word_count + if use_passphrase is not None: + self.use_passphrase = use_passphrase + + @property + def word_count(self): + """Gets the word_count of this GenerateMnemonicRequest. # noqa: E501 + + + :return: The word_count of this GenerateMnemonicRequest. # noqa: E501 + :rtype: int + """ + return self._word_count + + @word_count.setter + def word_count(self, word_count): + """Sets the word_count of this GenerateMnemonicRequest. + + + :param word_count: The word_count of this GenerateMnemonicRequest. # noqa: E501 + :type: int + """ + if word_count is None: + raise ValueError("Invalid value for `word_count`, must not be `None`") # noqa: E501 + + self._word_count = word_count + + @property + def use_passphrase(self): + """Gets the use_passphrase of this GenerateMnemonicRequest. # noqa: E501 + + + :return: The use_passphrase of this GenerateMnemonicRequest. # noqa: E501 + :rtype: bool + """ + return self._use_passphrase + + @use_passphrase.setter + def use_passphrase(self, use_passphrase): + """Sets the use_passphrase of this GenerateMnemonicRequest. + + + :param use_passphrase: The use_passphrase of this GenerateMnemonicRequest. # noqa: E501 + :type: bool + """ + + self._use_passphrase = use_passphrase + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GenerateMnemonicRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/http_error_response.py b/.lib/skyhwd/skyhwd/models/http_error_response.py new file mode 100644 index 00000000..78e2b2c4 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/http_error_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class HTTPErrorResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'error': 'HTTPErrorResponseError' + } + + attribute_map = { + 'error': 'error' + } + + def __init__(self, error=None): # noqa: E501 + """HTTPErrorResponse - a model defined in OpenAPI""" # noqa: E501 + + self._error = None + self.discriminator = None + + if error is not None: + self.error = error + + @property + def error(self): + """Gets the error of this HTTPErrorResponse. # noqa: E501 + + + :return: The error of this HTTPErrorResponse. # noqa: E501 + :rtype: HTTPErrorResponseError + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this HTTPErrorResponse. + + + :param error: The error of this HTTPErrorResponse. # noqa: E501 + :type: HTTPErrorResponseError + """ + + self._error = error + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HTTPErrorResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/http_error_response_error.py b/.lib/skyhwd/skyhwd/models/http_error_response_error.py new file mode 100644 index 00000000..b8d6e406 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/http_error_response_error.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class HTTPErrorResponseError(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'code': 'int', + 'message': 'str' + } + + attribute_map = { + 'code': 'code', + 'message': 'message' + } + + def __init__(self, code=None, message=None): # noqa: E501 + """HTTPErrorResponseError - a model defined in OpenAPI""" # noqa: E501 + + self._code = None + self._message = None + self.discriminator = None + + if code is not None: + self.code = code + if message is not None: + self.message = message + + @property + def code(self): + """Gets the code of this HTTPErrorResponseError. # noqa: E501 + + + :return: The code of this HTTPErrorResponseError. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this HTTPErrorResponseError. + + + :param code: The code of this HTTPErrorResponseError. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this HTTPErrorResponseError. # noqa: E501 + + + :return: The message of this HTTPErrorResponseError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this HTTPErrorResponseError. + + + :param message: The message of this HTTPErrorResponseError. # noqa: E501 + :type: str + """ + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HTTPErrorResponseError): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/http_success_response.py b/.lib/skyhwd/skyhwd/models/http_success_response.py new file mode 100644 index 00000000..9910e0ca --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/http_success_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class HTTPSuccessResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'str' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """HTTPSuccessResponse - a model defined in OpenAPI""" # noqa: E501 + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this HTTPSuccessResponse. # noqa: E501 + + + :return: The data of this HTTPSuccessResponse. # noqa: E501 + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this HTTPSuccessResponse. + + + :param data: The data of this HTTPSuccessResponse. # noqa: E501 + :type: str + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HTTPSuccessResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/inline_response200.py b/.lib/skyhwd/skyhwd/models/inline_response200.py new file mode 100644 index 00000000..86debfef --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/inline_response200.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class InlineResponse200(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'bool' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """InlineResponse200 - a model defined in OpenAPI""" # noqa: E501 + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this InlineResponse200. # noqa: E501 + + + :return: The data of this InlineResponse200. # noqa: E501 + :rtype: bool + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this InlineResponse200. + + + :param data: The data of this InlineResponse200. # noqa: E501 + :type: bool + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse200): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/passphrase_request.py b/.lib/skyhwd/skyhwd/models/passphrase_request.py new file mode 100644 index 00000000..ce054536 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/passphrase_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PassphraseRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'passphrase': 'str' + } + + attribute_map = { + 'passphrase': 'passphrase' + } + + def __init__(self, passphrase=None): # noqa: E501 + """PassphraseRequest - a model defined in OpenAPI""" # noqa: E501 + + self._passphrase = None + self.discriminator = None + + self.passphrase = passphrase + + @property + def passphrase(self): + """Gets the passphrase of this PassphraseRequest. # noqa: E501 + + + :return: The passphrase of this PassphraseRequest. # noqa: E501 + :rtype: str + """ + return self._passphrase + + @passphrase.setter + def passphrase(self, passphrase): + """Sets the passphrase of this PassphraseRequest. + + + :param passphrase: The passphrase of this PassphraseRequest. # noqa: E501 + :type: str + """ + if passphrase is None: + raise ValueError("Invalid value for `passphrase`, must not be `None`") # noqa: E501 + + self._passphrase = passphrase + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PassphraseRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/pin_matrix_request.py b/.lib/skyhwd/skyhwd/models/pin_matrix_request.py new file mode 100644 index 00000000..f857e265 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/pin_matrix_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PinMatrixRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'pin': 'str' + } + + attribute_map = { + 'pin': 'pin' + } + + def __init__(self, pin=None): # noqa: E501 + """PinMatrixRequest - a model defined in OpenAPI""" # noqa: E501 + + self._pin = None + self.discriminator = None + + self.pin = pin + + @property + def pin(self): + """Gets the pin of this PinMatrixRequest. # noqa: E501 + + + :return: The pin of this PinMatrixRequest. # noqa: E501 + :rtype: str + """ + return self._pin + + @pin.setter + def pin(self, pin): + """Sets the pin of this PinMatrixRequest. + + + :param pin: The pin of this PinMatrixRequest. # noqa: E501 + :type: str + """ + if pin is None: + raise ValueError("Invalid value for `pin`, must not be `None`") # noqa: E501 + + self._pin = pin + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PinMatrixRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/recovery_request.py b/.lib/skyhwd/skyhwd/models/recovery_request.py new file mode 100644 index 00000000..c3e7ff7c --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/recovery_request.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class RecoveryRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'word_count': 'int', + 'use_passphrase': 'bool', + 'dry_run': 'bool' + } + + attribute_map = { + 'word_count': 'word_count', + 'use_passphrase': 'use_passphrase', + 'dry_run': 'dry_run' + } + + def __init__(self, word_count=None, use_passphrase=None, dry_run=None): # noqa: E501 + """RecoveryRequest - a model defined in OpenAPI""" # noqa: E501 + + self._word_count = None + self._use_passphrase = None + self._dry_run = None + self.discriminator = None + + self.word_count = word_count + if use_passphrase is not None: + self.use_passphrase = use_passphrase + if dry_run is not None: + self.dry_run = dry_run + + @property + def word_count(self): + """Gets the word_count of this RecoveryRequest. # noqa: E501 + + + :return: The word_count of this RecoveryRequest. # noqa: E501 + :rtype: int + """ + return self._word_count + + @word_count.setter + def word_count(self, word_count): + """Sets the word_count of this RecoveryRequest. + + + :param word_count: The word_count of this RecoveryRequest. # noqa: E501 + :type: int + """ + if word_count is None: + raise ValueError("Invalid value for `word_count`, must not be `None`") # noqa: E501 + + self._word_count = word_count + + @property + def use_passphrase(self): + """Gets the use_passphrase of this RecoveryRequest. # noqa: E501 + + + :return: The use_passphrase of this RecoveryRequest. # noqa: E501 + :rtype: bool + """ + return self._use_passphrase + + @use_passphrase.setter + def use_passphrase(self, use_passphrase): + """Sets the use_passphrase of this RecoveryRequest. + + + :param use_passphrase: The use_passphrase of this RecoveryRequest. # noqa: E501 + :type: bool + """ + + self._use_passphrase = use_passphrase + + @property + def dry_run(self): + """Gets the dry_run of this RecoveryRequest. # noqa: E501 + + + :return: The dry_run of this RecoveryRequest. # noqa: E501 + :rtype: bool + """ + return self._dry_run + + @dry_run.setter + def dry_run(self, dry_run): + """Sets the dry_run of this RecoveryRequest. + + + :param dry_run: The dry_run of this RecoveryRequest. # noqa: E501 + :type: bool + """ + + self._dry_run = dry_run + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RecoveryRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/set_mnemonic_request.py b/.lib/skyhwd/skyhwd/models/set_mnemonic_request.py new file mode 100644 index 00000000..477cfbd0 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/set_mnemonic_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class SetMnemonicRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'mnemonic': 'str' + } + + attribute_map = { + 'mnemonic': 'mnemonic' + } + + def __init__(self, mnemonic=None): # noqa: E501 + """SetMnemonicRequest - a model defined in OpenAPI""" # noqa: E501 + + self._mnemonic = None + self.discriminator = None + + self.mnemonic = mnemonic + + @property + def mnemonic(self): + """Gets the mnemonic of this SetMnemonicRequest. # noqa: E501 + + + :return: The mnemonic of this SetMnemonicRequest. # noqa: E501 + :rtype: str + """ + return self._mnemonic + + @mnemonic.setter + def mnemonic(self, mnemonic): + """Sets the mnemonic of this SetMnemonicRequest. + + + :param mnemonic: The mnemonic of this SetMnemonicRequest. # noqa: E501 + :type: str + """ + if mnemonic is None: + raise ValueError("Invalid value for `mnemonic`, must not be `None`") # noqa: E501 + + self._mnemonic = mnemonic + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SetMnemonicRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/sign_message_request.py b/.lib/skyhwd/skyhwd/models/sign_message_request.py new file mode 100644 index 00000000..ec9eb36f --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/sign_message_request.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class SignMessageRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'address_n': 'int', + 'message': 'str' + } + + attribute_map = { + 'address_n': 'address_n', + 'message': 'message' + } + + def __init__(self, address_n=None, message=None): # noqa: E501 + """SignMessageRequest - a model defined in OpenAPI""" # noqa: E501 + + self._address_n = None + self._message = None + self.discriminator = None + + self.address_n = address_n + self.message = message + + @property + def address_n(self): + """Gets the address_n of this SignMessageRequest. # noqa: E501 + + + :return: The address_n of this SignMessageRequest. # noqa: E501 + :rtype: int + """ + return self._address_n + + @address_n.setter + def address_n(self, address_n): + """Sets the address_n of this SignMessageRequest. + + + :param address_n: The address_n of this SignMessageRequest. # noqa: E501 + :type: int + """ + if address_n is None: + raise ValueError("Invalid value for `address_n`, must not be `None`") # noqa: E501 + + self._address_n = address_n + + @property + def message(self): + """Gets the message of this SignMessageRequest. # noqa: E501 + + + :return: The message of this SignMessageRequest. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this SignMessageRequest. + + + :param message: The message of this SignMessageRequest. # noqa: E501 + :type: str + """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SignMessageRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/sign_message_response.py b/.lib/skyhwd/skyhwd/models/sign_message_response.py new file mode 100644 index 00000000..c09540d0 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/sign_message_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class SignMessageResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'str' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """SignMessageResponse - a model defined in OpenAPI""" # noqa: E501 + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this SignMessageResponse. # noqa: E501 + + + :return: The data of this SignMessageResponse. # noqa: E501 + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this SignMessageResponse. + + + :param data: The data of this SignMessageResponse. # noqa: E501 + :type: str + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SignMessageResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/transaction_input.py b/.lib/skyhwd/skyhwd/models/transaction_input.py new file mode 100644 index 00000000..15755006 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/transaction_input.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TransactionInput(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'index': 'int', + 'hash': 'str' + } + + attribute_map = { + 'index': 'index', + 'hash': 'hash' + } + + def __init__(self, index=None, hash=None): # noqa: E501 + """TransactionInput - a model defined in OpenAPI""" # noqa: E501 + + self._index = None + self._hash = None + self.discriminator = None + + self.index = index + self.hash = hash + + @property + def index(self): + """Gets the index of this TransactionInput. # noqa: E501 + + + :return: The index of this TransactionInput. # noqa: E501 + :rtype: int + """ + return self._index + + @index.setter + def index(self, index): + """Sets the index of this TransactionInput. + + + :param index: The index of this TransactionInput. # noqa: E501 + :type: int + """ + if index is None: + raise ValueError("Invalid value for `index`, must not be `None`") # noqa: E501 + + self._index = index + + @property + def hash(self): + """Gets the hash of this TransactionInput. # noqa: E501 + + + :return: The hash of this TransactionInput. # noqa: E501 + :rtype: str + """ + return self._hash + + @hash.setter + def hash(self, hash): + """Sets the hash of this TransactionInput. + + + :param hash: The hash of this TransactionInput. # noqa: E501 + :type: str + """ + if hash is None: + raise ValueError("Invalid value for `hash`, must not be `None`") # noqa: E501 + + self._hash = hash + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionInput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/transaction_output.py b/.lib/skyhwd/skyhwd/models/transaction_output.py new file mode 100644 index 00000000..286d5b2a --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/transaction_output.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TransactionOutput(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'address_index': 'int', + 'address': 'str', + 'coins': 'str', + 'hours': 'str' + } + + attribute_map = { + 'address_index': 'address_index', + 'address': 'address', + 'coins': 'coins', + 'hours': 'hours' + } + + def __init__(self, address_index=None, address=None, coins=None, hours=None): # noqa: E501 + """TransactionOutput - a model defined in OpenAPI""" # noqa: E501 + + self._address_index = None + self._address = None + self._coins = None + self._hours = None + self.discriminator = None + + self.address_index = address_index + self.address = address + self.coins = coins + self.hours = hours + + @property + def address_index(self): + """Gets the address_index of this TransactionOutput. # noqa: E501 + + + :return: The address_index of this TransactionOutput. # noqa: E501 + :rtype: int + """ + return self._address_index + + @address_index.setter + def address_index(self, address_index): + """Sets the address_index of this TransactionOutput. + + + :param address_index: The address_index of this TransactionOutput. # noqa: E501 + :type: int + """ + if address_index is None: + raise ValueError("Invalid value for `address_index`, must not be `None`") # noqa: E501 + + self._address_index = address_index + + @property + def address(self): + """Gets the address of this TransactionOutput. # noqa: E501 + + + :return: The address of this TransactionOutput. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this TransactionOutput. + + + :param address: The address of this TransactionOutput. # noqa: E501 + :type: str + """ + if address is None: + raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501 + + self._address = address + + @property + def coins(self): + """Gets the coins of this TransactionOutput. # noqa: E501 + + + :return: The coins of this TransactionOutput. # noqa: E501 + :rtype: str + """ + return self._coins + + @coins.setter + def coins(self, coins): + """Sets the coins of this TransactionOutput. + + + :param coins: The coins of this TransactionOutput. # noqa: E501 + :type: str + """ + if coins is None: + raise ValueError("Invalid value for `coins`, must not be `None`") # noqa: E501 + + self._coins = coins + + @property + def hours(self): + """Gets the hours of this TransactionOutput. # noqa: E501 + + + :return: The hours of this TransactionOutput. # noqa: E501 + :rtype: str + """ + return self._hours + + @hours.setter + def hours(self, hours): + """Sets the hours of this TransactionOutput. + + + :param hours: The hours of this TransactionOutput. # noqa: E501 + :type: str + """ + if hours is None: + raise ValueError("Invalid value for `hours`, must not be `None`") # noqa: E501 + + self._hours = hours + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionOutput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/transaction_sign_request.py b/.lib/skyhwd/skyhwd/models/transaction_sign_request.py new file mode 100644 index 00000000..4ed0558d --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/transaction_sign_request.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TransactionSignRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'transaction_inputs': 'list[TransactionInput]', + 'transaction_outputs': 'list[TransactionOutput]' + } + + attribute_map = { + 'transaction_inputs': 'transaction_inputs', + 'transaction_outputs': 'transaction_outputs' + } + + def __init__(self, transaction_inputs=None, transaction_outputs=None): # noqa: E501 + """TransactionSignRequest - a model defined in OpenAPI""" # noqa: E501 + + self._transaction_inputs = None + self._transaction_outputs = None + self.discriminator = None + + self.transaction_inputs = transaction_inputs + self.transaction_outputs = transaction_outputs + + @property + def transaction_inputs(self): + """Gets the transaction_inputs of this TransactionSignRequest. # noqa: E501 + + + :return: The transaction_inputs of this TransactionSignRequest. # noqa: E501 + :rtype: list[TransactionInput] + """ + return self._transaction_inputs + + @transaction_inputs.setter + def transaction_inputs(self, transaction_inputs): + """Sets the transaction_inputs of this TransactionSignRequest. + + + :param transaction_inputs: The transaction_inputs of this TransactionSignRequest. # noqa: E501 + :type: list[TransactionInput] + """ + if transaction_inputs is None: + raise ValueError("Invalid value for `transaction_inputs`, must not be `None`") # noqa: E501 + + self._transaction_inputs = transaction_inputs + + @property + def transaction_outputs(self): + """Gets the transaction_outputs of this TransactionSignRequest. # noqa: E501 + + + :return: The transaction_outputs of this TransactionSignRequest. # noqa: E501 + :rtype: list[TransactionOutput] + """ + return self._transaction_outputs + + @transaction_outputs.setter + def transaction_outputs(self, transaction_outputs): + """Sets the transaction_outputs of this TransactionSignRequest. + + + :param transaction_outputs: The transaction_outputs of this TransactionSignRequest. # noqa: E501 + :type: list[TransactionOutput] + """ + if transaction_outputs is None: + raise ValueError("Invalid value for `transaction_outputs`, must not be `None`") # noqa: E501 + + self._transaction_outputs = transaction_outputs + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionSignRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/transaction_sign_response.py b/.lib/skyhwd/skyhwd/models/transaction_sign_response.py new file mode 100644 index 00000000..a9c23a98 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/transaction_sign_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TransactionSignResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[str]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """TransactionSignResponse - a model defined in OpenAPI""" # noqa: E501 + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this TransactionSignResponse. # noqa: E501 + + + :return: The data of this TransactionSignResponse. # noqa: E501 + :rtype: list[str] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this TransactionSignResponse. + + + :param data: The data of this TransactionSignResponse. # noqa: E501 + :type: list[str] + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionSignResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/models/word_request.py b/.lib/skyhwd/skyhwd/models/word_request.py new file mode 100644 index 00000000..a603cb65 --- /dev/null +++ b/.lib/skyhwd/skyhwd/models/word_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class WordRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'word': 'str' + } + + attribute_map = { + 'word': 'word' + } + + def __init__(self, word=None): # noqa: E501 + """WordRequest - a model defined in OpenAPI""" # noqa: E501 + + self._word = None + self.discriminator = None + + self.word = word + + @property + def word(self): + """Gets the word of this WordRequest. # noqa: E501 + + + :return: The word of this WordRequest. # noqa: E501 + :rtype: str + """ + return self._word + + @word.setter + def word(self, word): + """Sets the word of this WordRequest. + + + :param word: The word of this WordRequest. # noqa: E501 + :type: str + """ + if word is None: + raise ValueError("Invalid value for `word`, must not be `None`") # noqa: E501 + + self._word = word + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WordRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/.lib/skyhwd/skyhwd/rest.py b/.lib/skyhwd/skyhwd/rest.py new file mode 100644 index 00000000..3c790875 --- /dev/null +++ b/.lib/skyhwd/skyhwd/rest.py @@ -0,0 +1,323 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import io +import json +import logging +import re +import ssl + +import certifi +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import urlencode + +try: + import urllib3 +except ImportError: + raise ImportError('OpenAPI Python client requires urllib3.') + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # In the python 3, the response.data is bytes. + # we need to decode it to string. + if six.PY3: + r.data = r.data.decode('utf8') + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + +class ApiException(Exception): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message diff --git a/.lib/skyhwd/test-requirements.txt b/.lib/skyhwd/test-requirements.txt new file mode 100644 index 00000000..2702246c --- /dev/null +++ b/.lib/skyhwd/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/.lib/skyhwd/test/__init__.py b/.lib/skyhwd/test/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/.lib/skyhwd/test/test_apply_settings_request.py b/.lib/skyhwd/test/test_apply_settings_request.py new file mode 100644 index 00000000..25db1788 --- /dev/null +++ b/.lib/skyhwd/test/test_apply_settings_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.apply_settings_request import ApplySettingsRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestApplySettingsRequest(unittest.TestCase): + """ApplySettingsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplySettingsRequest(self): + """Test ApplySettingsRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.apply_settings_request.ApplySettingsRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_check_message_signature_request.py b/.lib/skyhwd/test/test_check_message_signature_request.py new file mode 100644 index 00000000..6a9a5fd8 --- /dev/null +++ b/.lib/skyhwd/test/test_check_message_signature_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.check_message_signature_request import CheckMessageSignatureRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestCheckMessageSignatureRequest(unittest.TestCase): + """CheckMessageSignatureRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCheckMessageSignatureRequest(self): + """Test CheckMessageSignatureRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.check_message_signature_request.CheckMessageSignatureRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_csrf_response.py b/.lib/skyhwd/test/test_csrf_response.py new file mode 100644 index 00000000..a7f4722f --- /dev/null +++ b/.lib/skyhwd/test/test_csrf_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.csrf_response import CSRFResponse # noqa: E501 +from skyhwd.rest import ApiException + + +class TestCSRFResponse(unittest.TestCase): + """CSRFResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCSRFResponse(self): + """Test CSRFResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.csrf_response.CSRFResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_default_api.py b/.lib/skyhwd/test/test_default_api.py new file mode 100644 index 00000000..721cc3f0 --- /dev/null +++ b/.lib/skyhwd/test/test_default_api.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.api.default_api import DefaultApi # noqa: E501 +from skyhwd.rest import ApiException + + +class TestDefaultApi(unittest.TestCase): + """DefaultApi unit test stubs""" + + def setUp(self): + self.api = skyhwd.api.default_api.DefaultApi() # noqa: E501 + + def tearDown(self): + pass + + def test_apply_settings_post(self): + """Test case for apply_settings_post + + """ + pass + + def test_backup_post(self): + """Test case for backup_post + + """ + pass + + def test_cancel_put(self): + """Test case for cancel_put + + """ + pass + + def test_check_message_signature_post(self): + """Test case for check_message_signature_post + + """ + pass + + def test_connected_get(self): + """Test case for connected_get + + """ + pass + + def test_csrf_get(self): + """Test case for csrf_get + + """ + pass + + def test_features_get(self): + """Test case for features_get + + """ + pass + + def test_firmware_update_put(self): + """Test case for firmware_update_put + + """ + pass + + def test_generate_addresses_post(self): + """Test case for generate_addresses_post + + """ + pass + + def test_generate_mnemonic_post(self): + """Test case for generate_mnemonic_post + + """ + pass + + def test_intermediate_passphrase_post(self): + """Test case for intermediate_passphrase_post + + """ + pass + + def test_intermediate_pin_matrix_post(self): + """Test case for intermediate_pin_matrix_post + + """ + pass + + def test_intermediate_word_post(self): + """Test case for intermediate_word_post + + """ + pass + + def test_recovery_post(self): + """Test case for recovery_post + + """ + pass + + def test_set_mnemonic_post(self): + """Test case for set_mnemonic_post + + """ + pass + + def test_set_pin_code_post(self): + """Test case for set_pin_code_post + + """ + pass + + def test_sign_message_post(self): + """Test case for sign_message_post + + """ + pass + + def test_transaction_sign_post(self): + """Test case for transaction_sign_post + + """ + pass + + def test_wipe_delete(self): + """Test case for wipe_delete + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_features_response.py b/.lib/skyhwd/test/test_features_response.py new file mode 100644 index 00000000..0d8b573a --- /dev/null +++ b/.lib/skyhwd/test/test_features_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.features_response import FeaturesResponse # noqa: E501 +from skyhwd.rest import ApiException + + +class TestFeaturesResponse(unittest.TestCase): + """FeaturesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFeaturesResponse(self): + """Test FeaturesResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.features_response.FeaturesResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_features_response_data.py b/.lib/skyhwd/test/test_features_response_data.py new file mode 100644 index 00000000..865d70c2 --- /dev/null +++ b/.lib/skyhwd/test/test_features_response_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.features_response_data import FeaturesResponseData # noqa: E501 +from skyhwd.rest import ApiException + + +class TestFeaturesResponseData(unittest.TestCase): + """FeaturesResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFeaturesResponseData(self): + """Test FeaturesResponseData""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.features_response_data.FeaturesResponseData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_generate_addresses_request.py b/.lib/skyhwd/test/test_generate_addresses_request.py new file mode 100644 index 00000000..b0bb2993 --- /dev/null +++ b/.lib/skyhwd/test/test_generate_addresses_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.generate_addresses_request import GenerateAddressesRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestGenerateAddressesRequest(unittest.TestCase): + """GenerateAddressesRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGenerateAddressesRequest(self): + """Test GenerateAddressesRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.generate_addresses_request.GenerateAddressesRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_generate_addresses_response.py b/.lib/skyhwd/test/test_generate_addresses_response.py new file mode 100644 index 00000000..d2f6f85c --- /dev/null +++ b/.lib/skyhwd/test/test_generate_addresses_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.generate_addresses_response import GenerateAddressesResponse # noqa: E501 +from skyhwd.rest import ApiException + + +class TestGenerateAddressesResponse(unittest.TestCase): + """GenerateAddressesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGenerateAddressesResponse(self): + """Test GenerateAddressesResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.generate_addresses_response.GenerateAddressesResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_generate_mnemonic_request.py b/.lib/skyhwd/test/test_generate_mnemonic_request.py new file mode 100644 index 00000000..8d9359a5 --- /dev/null +++ b/.lib/skyhwd/test/test_generate_mnemonic_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.generate_mnemonic_request import GenerateMnemonicRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestGenerateMnemonicRequest(unittest.TestCase): + """GenerateMnemonicRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGenerateMnemonicRequest(self): + """Test GenerateMnemonicRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.generate_mnemonic_request.GenerateMnemonicRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_http_error_response.py b/.lib/skyhwd/test/test_http_error_response.py new file mode 100644 index 00000000..2094cfce --- /dev/null +++ b/.lib/skyhwd/test/test_http_error_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.http_error_response import HTTPErrorResponse # noqa: E501 +from skyhwd.rest import ApiException + + +class TestHTTPErrorResponse(unittest.TestCase): + """HTTPErrorResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHTTPErrorResponse(self): + """Test HTTPErrorResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.http_error_response.HTTPErrorResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_http_error_response_error.py b/.lib/skyhwd/test/test_http_error_response_error.py new file mode 100644 index 00000000..187cac3e --- /dev/null +++ b/.lib/skyhwd/test/test_http_error_response_error.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.http_error_response_error import HTTPErrorResponseError # noqa: E501 +from skyhwd.rest import ApiException + + +class TestHTTPErrorResponseError(unittest.TestCase): + """HTTPErrorResponseError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHTTPErrorResponseError(self): + """Test HTTPErrorResponseError""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.http_error_response_error.HTTPErrorResponseError() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_http_success_response.py b/.lib/skyhwd/test/test_http_success_response.py new file mode 100644 index 00000000..d21ea147 --- /dev/null +++ b/.lib/skyhwd/test/test_http_success_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.http_success_response import HTTPSuccessResponse # noqa: E501 +from skyhwd.rest import ApiException + + +class TestHTTPSuccessResponse(unittest.TestCase): + """HTTPSuccessResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHTTPSuccessResponse(self): + """Test HTTPSuccessResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.http_success_response.HTTPSuccessResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_inline_response200.py b/.lib/skyhwd/test/test_inline_response200.py new file mode 100644 index 00000000..eb367708 --- /dev/null +++ b/.lib/skyhwd/test/test_inline_response200.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.inline_response200 import InlineResponse200 # noqa: E501 +from skyhwd.rest import ApiException + + +class TestInlineResponse200(unittest.TestCase): + """InlineResponse200 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse200(self): + """Test InlineResponse200""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.inline_response200.InlineResponse200() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_passphrase_request.py b/.lib/skyhwd/test/test_passphrase_request.py new file mode 100644 index 00000000..792357a0 --- /dev/null +++ b/.lib/skyhwd/test/test_passphrase_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.passphrase_request import PassphraseRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestPassphraseRequest(unittest.TestCase): + """PassphraseRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPassphraseRequest(self): + """Test PassphraseRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.passphrase_request.PassphraseRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_pin_matrix_request.py b/.lib/skyhwd/test/test_pin_matrix_request.py new file mode 100644 index 00000000..f1424159 --- /dev/null +++ b/.lib/skyhwd/test/test_pin_matrix_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.pin_matrix_request import PinMatrixRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestPinMatrixRequest(unittest.TestCase): + """PinMatrixRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPinMatrixRequest(self): + """Test PinMatrixRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.pin_matrix_request.PinMatrixRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_recovery_request.py b/.lib/skyhwd/test/test_recovery_request.py new file mode 100644 index 00000000..d033e794 --- /dev/null +++ b/.lib/skyhwd/test/test_recovery_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.recovery_request import RecoveryRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestRecoveryRequest(unittest.TestCase): + """RecoveryRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRecoveryRequest(self): + """Test RecoveryRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.recovery_request.RecoveryRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_set_mnemonic_request.py b/.lib/skyhwd/test/test_set_mnemonic_request.py new file mode 100644 index 00000000..a3efe2ab --- /dev/null +++ b/.lib/skyhwd/test/test_set_mnemonic_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.set_mnemonic_request import SetMnemonicRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestSetMnemonicRequest(unittest.TestCase): + """SetMnemonicRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSetMnemonicRequest(self): + """Test SetMnemonicRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.set_mnemonic_request.SetMnemonicRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_sign_message_request.py b/.lib/skyhwd/test/test_sign_message_request.py new file mode 100644 index 00000000..9490d1d8 --- /dev/null +++ b/.lib/skyhwd/test/test_sign_message_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.sign_message_request import SignMessageRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestSignMessageRequest(unittest.TestCase): + """SignMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSignMessageRequest(self): + """Test SignMessageRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.sign_message_request.SignMessageRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_sign_message_response.py b/.lib/skyhwd/test/test_sign_message_response.py new file mode 100644 index 00000000..54fa95ac --- /dev/null +++ b/.lib/skyhwd/test/test_sign_message_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.sign_message_response import SignMessageResponse # noqa: E501 +from skyhwd.rest import ApiException + + +class TestSignMessageResponse(unittest.TestCase): + """SignMessageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSignMessageResponse(self): + """Test SignMessageResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.sign_message_response.SignMessageResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_transaction_input.py b/.lib/skyhwd/test/test_transaction_input.py new file mode 100644 index 00000000..eed62214 --- /dev/null +++ b/.lib/skyhwd/test/test_transaction_input.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.transaction_input import TransactionInput # noqa: E501 +from skyhwd.rest import ApiException + + +class TestTransactionInput(unittest.TestCase): + """TransactionInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionInput(self): + """Test TransactionInput""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.transaction_input.TransactionInput() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_transaction_output.py b/.lib/skyhwd/test/test_transaction_output.py new file mode 100644 index 00000000..a818f8a2 --- /dev/null +++ b/.lib/skyhwd/test/test_transaction_output.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.transaction_output import TransactionOutput # noqa: E501 +from skyhwd.rest import ApiException + + +class TestTransactionOutput(unittest.TestCase): + """TransactionOutput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionOutput(self): + """Test TransactionOutput""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.transaction_output.TransactionOutput() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_transaction_sign_request.py b/.lib/skyhwd/test/test_transaction_sign_request.py new file mode 100644 index 00000000..ee7279c0 --- /dev/null +++ b/.lib/skyhwd/test/test_transaction_sign_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.transaction_sign_request import TransactionSignRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestTransactionSignRequest(unittest.TestCase): + """TransactionSignRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionSignRequest(self): + """Test TransactionSignRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.transaction_sign_request.TransactionSignRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_transaction_sign_response.py b/.lib/skyhwd/test/test_transaction_sign_response.py new file mode 100644 index 00000000..f214c317 --- /dev/null +++ b/.lib/skyhwd/test/test_transaction_sign_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.transaction_sign_response import TransactionSignResponse # noqa: E501 +from skyhwd.rest import ApiException + + +class TestTransactionSignResponse(unittest.TestCase): + """TransactionSignResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionSignResponse(self): + """Test TransactionSignResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.transaction_sign_response.TransactionSignResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/test/test_word_request.py b/.lib/skyhwd/test/test_word_request.py new file mode 100644 index 00000000..4d1da541 --- /dev/null +++ b/.lib/skyhwd/test/test_word_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.word_request import WordRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestWordRequest(unittest.TestCase): + """WordRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWordRequest(self): + """Test WordRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.word_request.WordRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/.lib/skyhwd/tox.ini b/.lib/skyhwd/tox.ini new file mode 100644 index 00000000..3d0be613 --- /dev/null +++ b/.lib/skyhwd/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py27, py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + nosetests \ + [] diff --git a/lib/skyhwd/.gitignore b/lib/skyhwd/.gitignore new file mode 100644 index 00000000..a655050c --- /dev/null +++ b/lib/skyhwd/.gitignore @@ -0,0 +1,64 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.python-version + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/lib/skyhwd/.openapi-generator-ignore b/lib/skyhwd/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/lib/skyhwd/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/lib/skyhwd/.openapi-generator/VERSION b/lib/skyhwd/.openapi-generator/VERSION new file mode 100644 index 00000000..2c6109e5 --- /dev/null +++ b/lib/skyhwd/.openapi-generator/VERSION @@ -0,0 +1 @@ +3.3.4 \ No newline at end of file diff --git a/lib/skyhwd/.travis.yml b/lib/skyhwd/.travis.yml new file mode 100644 index 00000000..86211e2d --- /dev/null +++ b/lib/skyhwd/.travis.yml @@ -0,0 +1,14 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "2.7" + - "3.2" + - "3.3" + - "3.4" + - "3.5" + #- "3.5-dev" # 3.5 development branch + #- "nightly" # points to the latest development branch e.g. 3.6-dev +# command to install dependencies +install: "pip install -r requirements.txt" +# command to run tests +script: nosetests diff --git a/lib/skyhwd/README.md b/lib/skyhwd/README.md new file mode 100644 index 00000000..3b0d828f --- /dev/null +++ b/lib/skyhwd/README.md @@ -0,0 +1,140 @@ +# skyhwd +This is the hardware-wallet-daemon API + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 0.1.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +If the python package is hosted on Github, you can install directly from Github + +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import skyhwd +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import skyhwd +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +apply_settings_request = skyhwd.ApplySettingsRequest() # ApplySettingsRequest | ApplySettingsRequest is request data for /api/v1/apply_settings (optional) + +try: + api_response = api_instance.apply_settings_post(apply_settings_request=apply_settings_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->apply_settings_post: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://127.0.0.1:9510/api/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**apply_settings_post**](docs/DefaultApi.md#apply_settings_post) | **POST** /apply_settings | +*DefaultApi* | [**backup_post**](docs/DefaultApi.md#backup_post) | **POST** /backup | +*DefaultApi* | [**cancel_put**](docs/DefaultApi.md#cancel_put) | **PUT** /cancel | +*DefaultApi* | [**check_message_signature_post**](docs/DefaultApi.md#check_message_signature_post) | **POST** /check_message_signature | +*DefaultApi* | [**connected_get**](docs/DefaultApi.md#connected_get) | **GET** /connected | +*DefaultApi* | [**csrf_get**](docs/DefaultApi.md#csrf_get) | **GET** /csrf | +*DefaultApi* | [**features_get**](docs/DefaultApi.md#features_get) | **GET** /features | +*DefaultApi* | [**firmware_update_put**](docs/DefaultApi.md#firmware_update_put) | **PUT** /firmware_update | +*DefaultApi* | [**generate_addresses_post**](docs/DefaultApi.md#generate_addresses_post) | **POST** /generate_addresses | +*DefaultApi* | [**generate_mnemonic_post**](docs/DefaultApi.md#generate_mnemonic_post) | **POST** /generate_mnemonic | +*DefaultApi* | [**intermediate_passphrase_post**](docs/DefaultApi.md#intermediate_passphrase_post) | **POST** /intermediate/passphrase | +*DefaultApi* | [**intermediate_pin_matrix_post**](docs/DefaultApi.md#intermediate_pin_matrix_post) | **POST** /intermediate/pin_matrix | +*DefaultApi* | [**intermediate_word_post**](docs/DefaultApi.md#intermediate_word_post) | **POST** /intermediate/word | +*DefaultApi* | [**recovery_post**](docs/DefaultApi.md#recovery_post) | **POST** /recovery | +*DefaultApi* | [**set_mnemonic_post**](docs/DefaultApi.md#set_mnemonic_post) | **POST** /set_mnemonic | +*DefaultApi* | [**set_pin_code_post**](docs/DefaultApi.md#set_pin_code_post) | **POST** /set_pin_code | +*DefaultApi* | [**sign_message_post**](docs/DefaultApi.md#sign_message_post) | **POST** /sign_message | +*DefaultApi* | [**transaction_sign_post**](docs/DefaultApi.md#transaction_sign_post) | **POST** /transaction_sign | +*DefaultApi* | [**wipe_delete**](docs/DefaultApi.md#wipe_delete) | **DELETE** /wipe | + + +## Documentation For Models + + - [ApplySettingsRequest](docs/ApplySettingsRequest.md) + - [CSRFResponse](docs/CSRFResponse.md) + - [CheckMessageSignatureRequest](docs/CheckMessageSignatureRequest.md) + - [FeaturesResponse](docs/FeaturesResponse.md) + - [FeaturesResponseData](docs/FeaturesResponseData.md) + - [GenerateAddressesRequest](docs/GenerateAddressesRequest.md) + - [GenerateAddressesResponse](docs/GenerateAddressesResponse.md) + - [GenerateMnemonicRequest](docs/GenerateMnemonicRequest.md) + - [HTTPErrorResponse](docs/HTTPErrorResponse.md) + - [HTTPErrorResponseError](docs/HTTPErrorResponseError.md) + - [HTTPSuccessResponse](docs/HTTPSuccessResponse.md) + - [InlineResponse200](docs/InlineResponse200.md) + - [PassphraseRequest](docs/PassphraseRequest.md) + - [PinMatrixRequest](docs/PinMatrixRequest.md) + - [RecoveryRequest](docs/RecoveryRequest.md) + - [SetMnemonicRequest](docs/SetMnemonicRequest.md) + - [SignMessageRequest](docs/SignMessageRequest.md) + - [SignMessageResponse](docs/SignMessageResponse.md) + - [TransactionInput](docs/TransactionInput.md) + - [TransactionOutput](docs/TransactionOutput.md) + - [TransactionSignRequest](docs/TransactionSignRequest.md) + - [TransactionSignResponse](docs/TransactionSignResponse.md) + - [WordRequest](docs/WordRequest.md) + + +## Documentation For Authorization + + +## csrfAuth + +- **Type**: API key +- **API key parameter name**: X-CSRF-TOKEN +- **Location**: HTTP header + + +## Author + +steve@skycoin.net + + diff --git a/lib/skyhwd/docs/ApplySettingsRequest.md b/lib/skyhwd/docs/ApplySettingsRequest.md new file mode 100644 index 00000000..d1934a0d --- /dev/null +++ b/lib/skyhwd/docs/ApplySettingsRequest.md @@ -0,0 +1,11 @@ +# ApplySettingsRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | | [optional] +**use_passphrase** | **bool** | | [optional] + +[[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/lib/skyhwd/docs/CSRFResponse.md b/lib/skyhwd/docs/CSRFResponse.md new file mode 100644 index 00000000..050b748c --- /dev/null +++ b/lib/skyhwd/docs/CSRFResponse.md @@ -0,0 +1,10 @@ +# CSRFResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **str** | | [optional] + +[[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/lib/skyhwd/docs/CheckMessageSignatureRequest.md b/lib/skyhwd/docs/CheckMessageSignatureRequest.md new file mode 100644 index 00000000..e213693c --- /dev/null +++ b/lib/skyhwd/docs/CheckMessageSignatureRequest.md @@ -0,0 +1,12 @@ +# CheckMessageSignatureRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | +**signature** | **str** | | +**address** | **str** | | + +[[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/lib/skyhwd/docs/DefaultApi.md b/lib/skyhwd/docs/DefaultApi.md new file mode 100644 index 00000000..fb815c47 --- /dev/null +++ b/lib/skyhwd/docs/DefaultApi.md @@ -0,0 +1,1032 @@ +# skyhwd.DefaultApi + +All URIs are relative to *http://127.0.0.1:9510/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**apply_settings_post**](DefaultApi.md#apply_settings_post) | **POST** /apply_settings | +[**backup_post**](DefaultApi.md#backup_post) | **POST** /backup | +[**cancel_put**](DefaultApi.md#cancel_put) | **PUT** /cancel | +[**check_message_signature_post**](DefaultApi.md#check_message_signature_post) | **POST** /check_message_signature | +[**connected_get**](DefaultApi.md#connected_get) | **GET** /connected | +[**csrf_get**](DefaultApi.md#csrf_get) | **GET** /csrf | +[**features_get**](DefaultApi.md#features_get) | **GET** /features | +[**firmware_update_put**](DefaultApi.md#firmware_update_put) | **PUT** /firmware_update | +[**generate_addresses_post**](DefaultApi.md#generate_addresses_post) | **POST** /generate_addresses | +[**generate_mnemonic_post**](DefaultApi.md#generate_mnemonic_post) | **POST** /generate_mnemonic | +[**intermediate_passphrase_post**](DefaultApi.md#intermediate_passphrase_post) | **POST** /intermediate/passphrase | +[**intermediate_pin_matrix_post**](DefaultApi.md#intermediate_pin_matrix_post) | **POST** /intermediate/pin_matrix | +[**intermediate_word_post**](DefaultApi.md#intermediate_word_post) | **POST** /intermediate/word | +[**recovery_post**](DefaultApi.md#recovery_post) | **POST** /recovery | +[**set_mnemonic_post**](DefaultApi.md#set_mnemonic_post) | **POST** /set_mnemonic | +[**set_pin_code_post**](DefaultApi.md#set_pin_code_post) | **POST** /set_pin_code | +[**sign_message_post**](DefaultApi.md#sign_message_post) | **POST** /sign_message | +[**transaction_sign_post**](DefaultApi.md#transaction_sign_post) | **POST** /transaction_sign | +[**wipe_delete**](DefaultApi.md#wipe_delete) | **DELETE** /wipe | + + +# **apply_settings_post** +> HTTPSuccessResponse apply_settings_post(apply_settings_request=apply_settings_request) + + + +Apply hardware wallet settings. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +apply_settings_request = skyhwd.ApplySettingsRequest() # ApplySettingsRequest | ApplySettingsRequest is request data for /api/v1/apply_settings (optional) + +try: + api_response = api_instance.apply_settings_post(apply_settings_request=apply_settings_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->apply_settings_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **apply_settings_request** | [**ApplySettingsRequest**](ApplySettingsRequest.md)| ApplySettingsRequest is request data for /api/v1/apply_settings | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **backup_post** +> HTTPSuccessResponse backup_post() + + + +Start seed backup procedure. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) + +try: + api_response = api_instance.backup_post() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->backup_post: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel_put** +> HTTPSuccessResponse cancel_put() + + + +Cancels the current operation. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) + +try: + api_response = api_instance.cancel_put() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->cancel_put: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **check_message_signature_post** +> HTTPSuccessResponse check_message_signature_post(check_message_signature_request=check_message_signature_request) + + + +Check a message signature matches the given address. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +check_message_signature_request = skyhwd.CheckMessageSignatureRequest() # CheckMessageSignatureRequest | CheckMessageSignatureRequest is request data for /api/v1/check_message_signature (optional) + +try: + api_response = api_instance.check_message_signature_post(check_message_signature_request=check_message_signature_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->check_message_signature_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **check_message_signature_request** | [**CheckMessageSignatureRequest**](CheckMessageSignatureRequest.md)| CheckMessageSignatureRequest is request data for /api/v1/check_message_signature | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **connected_get** +> InlineResponse200 connected_get() + + + +check whether device is connected or not. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) + +try: + api_response = api_instance.connected_get() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->connected_get: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **csrf_get** +> CSRFResponse csrf_get() + + + +Returns csrf token + +### Example +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = skyhwd.DefaultApi() + +try: + api_response = api_instance.csrf_get() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->csrf_get: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CSRFResponse**](CSRFResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **features_get** +> FeaturesResponse features_get() + + + +Returns device information. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) + +try: + api_response = api_instance.features_get() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->features_get: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**FeaturesResponse**](FeaturesResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **firmware_update_put** +> HTTPSuccessResponse firmware_update_put() + + + +Update firmware + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) + +try: + api_response = api_instance.firmware_update_put() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->firmware_update_put: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **generate_addresses_post** +> GenerateAddressesResponse generate_addresses_post(generate_addresses_request=generate_addresses_request) + + + +Generate addresses for the hardware wallet seed. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +generate_addresses_request = skyhwd.GenerateAddressesRequest() # GenerateAddressesRequest | GenerateAddressesRequest is request data for /api/v1/generate_addresses (optional) + +try: + api_response = api_instance.generate_addresses_post(generate_addresses_request=generate_addresses_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->generate_addresses_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **generate_addresses_request** | [**GenerateAddressesRequest**](GenerateAddressesRequest.md)| GenerateAddressesRequest is request data for /api/v1/generate_addresses | [optional] + +### Return type + +[**GenerateAddressesResponse**](GenerateAddressesResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **generate_mnemonic_post** +> HTTPSuccessResponse generate_mnemonic_post(generate_mnemonic_request=generate_mnemonic_request) + + + +Generate mnemonic can be used to initialize the device with a random seed. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +generate_mnemonic_request = skyhwd.GenerateMnemonicRequest() # GenerateMnemonicRequest | GenerateMnemonicRequest is request data for /api/v1/generate_mnemonic (optional) + +try: + api_response = api_instance.generate_mnemonic_post(generate_mnemonic_request=generate_mnemonic_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->generate_mnemonic_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **generate_mnemonic_request** | [**GenerateMnemonicRequest**](GenerateMnemonicRequest.md)| GenerateMnemonicRequest is request data for /api/v1/generate_mnemonic | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **intermediate_passphrase_post** +> HTTPSuccessResponse intermediate_passphrase_post(passphrase_request=passphrase_request) + + + +passphrase ack request. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +passphrase_request = skyhwd.PassphraseRequest() # PassphraseRequest | PassPhraseRequest is request data for /api/v1/intermediate/passphrase (optional) + +try: + api_response = api_instance.intermediate_passphrase_post(passphrase_request=passphrase_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->intermediate_passphrase_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **passphrase_request** | [**PassphraseRequest**](PassphraseRequest.md)| PassPhraseRequest is request data for /api/v1/intermediate/passphrase | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **intermediate_pin_matrix_post** +> HTTPSuccessResponse intermediate_pin_matrix_post(pin_matrix_request=pin_matrix_request) + + + +pin matrix ack request. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +pin_matrix_request = skyhwd.PinMatrixRequest() # PinMatrixRequest | PinMatrixRequest is request data for /api/v1/intermediate/pin_matrix (optional) + +try: + api_response = api_instance.intermediate_pin_matrix_post(pin_matrix_request=pin_matrix_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->intermediate_pin_matrix_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pin_matrix_request** | [**PinMatrixRequest**](PinMatrixRequest.md)| PinMatrixRequest is request data for /api/v1/intermediate/pin_matrix | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **intermediate_word_post** +> HTTPSuccessResponse intermediate_word_post(word_request=word_request) + + + +word ack request. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +word_request = skyhwd.WordRequest() # WordRequest | WordRequest is request data for /api/v1/intermediate/word (optional) + +try: + api_response = api_instance.intermediate_word_post(word_request=word_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->intermediate_word_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **word_request** | [**WordRequest**](WordRequest.md)| WordRequest is request data for /api/v1/intermediate/word | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **recovery_post** +> HTTPSuccessResponse recovery_post(recovery_request=recovery_request) + + + +Recover existing wallet using seed. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +recovery_request = skyhwd.RecoveryRequest() # RecoveryRequest | RecoveryRequest is request data for /api/v1/check_message_signature (optional) + +try: + api_response = api_instance.recovery_post(recovery_request=recovery_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->recovery_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **recovery_request** | [**RecoveryRequest**](RecoveryRequest.md)| RecoveryRequest is request data for /api/v1/check_message_signature | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_mnemonic_post** +> HTTPSuccessResponse set_mnemonic_post(set_mnemonic_request=set_mnemonic_request) + + + +Set mnemonic can be used to initialize the device with your own seed. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +set_mnemonic_request = skyhwd.SetMnemonicRequest() # SetMnemonicRequest | SetMnemonicRequest is request data for /api/v1/set_mnemonic (optional) + +try: + api_response = api_instance.set_mnemonic_post(set_mnemonic_request=set_mnemonic_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->set_mnemonic_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set_mnemonic_request** | [**SetMnemonicRequest**](SetMnemonicRequest.md)| SetMnemonicRequest is request data for /api/v1/set_mnemonic | [optional] + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_pin_code_post** +> HTTPSuccessResponse set_pin_code_post() + + + +Configure a pin code on the device. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) + +try: + api_response = api_instance.set_pin_code_post() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->set_pin_code_post: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + +# **sign_message_post** +> SignMessageResponse sign_message_post(sign_message_request=sign_message_request) + + + +Sign a message using the secret key at given index. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +sign_message_request = skyhwd.SignMessageRequest() # SignMessageRequest | SignMessageRequest is request data for /api/signMessage (optional) + +try: + api_response = api_instance.sign_message_post(sign_message_request=sign_message_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->sign_message_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_message_request** | [**SignMessageRequest**](SignMessageRequest.md)| SignMessageRequest is request data for /api/signMessage | [optional] + +### Return type + +[**SignMessageResponse**](SignMessageResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **transaction_sign_post** +> TransactionSignResponse transaction_sign_post(transaction_sign_request=transaction_sign_request) + + + +Sign a transaction with the hardware wallet. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) +transaction_sign_request = skyhwd.TransactionSignRequest() # TransactionSignRequest | TransactionSignRequest is request data for /api/v1/transactionSign (optional) + +try: + api_response = api_instance.transaction_sign_post(transaction_sign_request=transaction_sign_request) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->transaction_sign_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **transaction_sign_request** | [**TransactionSignRequest**](TransactionSignRequest.md)| TransactionSignRequest is request data for /api/v1/transactionSign | [optional] + +### Return type + +[**TransactionSignResponse**](TransactionSignResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + +# **wipe_delete** +> HTTPSuccessResponse wipe_delete() + + + +clean all the configurations. + +### Example + +* Api Key Authentication (csrfAuth): +```python +from __future__ import print_function +import time +import skyhwd +from skyhwd.rest import ApiException +from pprint import pprint + +# Configure API key authorization: csrfAuth +configuration = skyhwd.Configuration() +configuration.api_key['X-CSRF-TOKEN'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-CSRF-TOKEN'] = 'Bearer' + +# create an instance of the API class +api_instance = skyhwd.DefaultApi(skyhwd.ApiClient(configuration)) + +try: + api_response = api_instance.wipe_delete() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->wipe_delete: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HTTPSuccessResponse**](HTTPSuccessResponse.md) + +### Authorization + +[csrfAuth](../README.md#csrfAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + diff --git a/lib/skyhwd/docs/FeaturesResponse.md b/lib/skyhwd/docs/FeaturesResponse.md new file mode 100644 index 00000000..16f32423 --- /dev/null +++ b/lib/skyhwd/docs/FeaturesResponse.md @@ -0,0 +1,10 @@ +# FeaturesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**FeaturesResponseData**](FeaturesResponseData.md) | | [optional] + +[[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/lib/skyhwd/docs/FeaturesResponseData.md b/lib/skyhwd/docs/FeaturesResponseData.md new file mode 100644 index 00000000..f6427473 --- /dev/null +++ b/lib/skyhwd/docs/FeaturesResponseData.md @@ -0,0 +1,26 @@ +# FeaturesResponseData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_id** | **str** | | [optional] +**passphrase_protection** | **bool** | | +**label** | **str** | | [optional] +**fw_patch** | **int** | | +**fw_major** | **int** | | +**fw_minor** | **int** | | +**minor_version** | **int** | | [optional] +**pin_protection** | **bool** | | +**bootloader_hash** | **str** | | [optional] +**major_version** | **int** | | [optional] +**pin_cached** | **bool** | | +**vendor** | **str** | | +**needs_backup** | **bool** | | +**initialized** | **bool** | | +**model** | **str** | | [optional] +**passphrase_cached** | **bool** | | +**patch_version** | **int** | | [optional] + +[[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/lib/skyhwd/docs/GenerateAddressesRequest.md b/lib/skyhwd/docs/GenerateAddressesRequest.md new file mode 100644 index 00000000..06b03c43 --- /dev/null +++ b/lib/skyhwd/docs/GenerateAddressesRequest.md @@ -0,0 +1,12 @@ +# GenerateAddressesRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address_n** | **int** | | +**start_index** | **int** | | [optional] +**confirm_address** | **bool** | | [optional] + +[[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/lib/skyhwd/docs/GenerateAddressesResponse.md b/lib/skyhwd/docs/GenerateAddressesResponse.md new file mode 100644 index 00000000..8441cb50 --- /dev/null +++ b/lib/skyhwd/docs/GenerateAddressesResponse.md @@ -0,0 +1,10 @@ +# GenerateAddressesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **list[str]** | | [optional] + +[[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/lib/skyhwd/docs/GenerateMnemonicRequest.md b/lib/skyhwd/docs/GenerateMnemonicRequest.md new file mode 100644 index 00000000..da4a132d --- /dev/null +++ b/lib/skyhwd/docs/GenerateMnemonicRequest.md @@ -0,0 +1,11 @@ +# GenerateMnemonicRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**word_count** | **int** | | +**use_passphrase** | **bool** | | [optional] + +[[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/lib/skyhwd/docs/HTTPErrorResponse.md b/lib/skyhwd/docs/HTTPErrorResponse.md new file mode 100644 index 00000000..5a0fbe5d --- /dev/null +++ b/lib/skyhwd/docs/HTTPErrorResponse.md @@ -0,0 +1,10 @@ +# HTTPErrorResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**HTTPErrorResponseError**](HTTPErrorResponseError.md) | | [optional] + +[[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/lib/skyhwd/docs/HTTPErrorResponseError.md b/lib/skyhwd/docs/HTTPErrorResponseError.md new file mode 100644 index 00000000..a6a54270 --- /dev/null +++ b/lib/skyhwd/docs/HTTPErrorResponseError.md @@ -0,0 +1,11 @@ +# HTTPErrorResponseError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] +**message** | **str** | | [optional] + +[[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/lib/skyhwd/docs/HTTPSuccessResponse.md b/lib/skyhwd/docs/HTTPSuccessResponse.md new file mode 100644 index 00000000..d465736f --- /dev/null +++ b/lib/skyhwd/docs/HTTPSuccessResponse.md @@ -0,0 +1,10 @@ +# HTTPSuccessResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **str** | | [optional] + +[[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/lib/skyhwd/docs/InlineResponse200.md b/lib/skyhwd/docs/InlineResponse200.md new file mode 100644 index 00000000..ba95f4a3 --- /dev/null +++ b/lib/skyhwd/docs/InlineResponse200.md @@ -0,0 +1,10 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **bool** | | [optional] + +[[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/lib/skyhwd/docs/PassphraseRequest.md b/lib/skyhwd/docs/PassphraseRequest.md new file mode 100644 index 00000000..80b5e1da --- /dev/null +++ b/lib/skyhwd/docs/PassphraseRequest.md @@ -0,0 +1,10 @@ +# PassphraseRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**passphrase** | **str** | | + +[[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/lib/skyhwd/docs/PinMatrixRequest.md b/lib/skyhwd/docs/PinMatrixRequest.md new file mode 100644 index 00000000..14afbedd --- /dev/null +++ b/lib/skyhwd/docs/PinMatrixRequest.md @@ -0,0 +1,10 @@ +# PinMatrixRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pin** | **str** | | + +[[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/lib/skyhwd/docs/RecoveryRequest.md b/lib/skyhwd/docs/RecoveryRequest.md new file mode 100644 index 00000000..c6d3198f --- /dev/null +++ b/lib/skyhwd/docs/RecoveryRequest.md @@ -0,0 +1,12 @@ +# RecoveryRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**word_count** | **int** | | +**use_passphrase** | **bool** | | [optional] +**dry_run** | **bool** | | [optional] + +[[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/lib/skyhwd/docs/SetMnemonicRequest.md b/lib/skyhwd/docs/SetMnemonicRequest.md new file mode 100644 index 00000000..8f597440 --- /dev/null +++ b/lib/skyhwd/docs/SetMnemonicRequest.md @@ -0,0 +1,10 @@ +# SetMnemonicRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mnemonic** | **str** | | + +[[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/lib/skyhwd/docs/SignMessageRequest.md b/lib/skyhwd/docs/SignMessageRequest.md new file mode 100644 index 00000000..c6945980 --- /dev/null +++ b/lib/skyhwd/docs/SignMessageRequest.md @@ -0,0 +1,11 @@ +# SignMessageRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address_n** | **int** | | +**message** | **str** | | + +[[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/lib/skyhwd/docs/SignMessageResponse.md b/lib/skyhwd/docs/SignMessageResponse.md new file mode 100644 index 00000000..54ed6001 --- /dev/null +++ b/lib/skyhwd/docs/SignMessageResponse.md @@ -0,0 +1,10 @@ +# SignMessageResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **str** | | [optional] + +[[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/lib/skyhwd/docs/TransactionInput.md b/lib/skyhwd/docs/TransactionInput.md new file mode 100644 index 00000000..e26e9e25 --- /dev/null +++ b/lib/skyhwd/docs/TransactionInput.md @@ -0,0 +1,11 @@ +# TransactionInput + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index** | **int** | | +**hash** | **str** | | + +[[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/lib/skyhwd/docs/TransactionOutput.md b/lib/skyhwd/docs/TransactionOutput.md new file mode 100644 index 00000000..7f12ba32 --- /dev/null +++ b/lib/skyhwd/docs/TransactionOutput.md @@ -0,0 +1,13 @@ +# TransactionOutput + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address_index** | **int** | | +**address** | **str** | | +**coins** | **str** | | +**hours** | **str** | | + +[[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/lib/skyhwd/docs/TransactionSignRequest.md b/lib/skyhwd/docs/TransactionSignRequest.md new file mode 100644 index 00000000..e7908bfc --- /dev/null +++ b/lib/skyhwd/docs/TransactionSignRequest.md @@ -0,0 +1,11 @@ +# TransactionSignRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_inputs** | [**list[TransactionInput]**](TransactionInput.md) | | +**transaction_outputs** | [**list[TransactionOutput]**](TransactionOutput.md) | | + +[[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/lib/skyhwd/docs/TransactionSignResponse.md b/lib/skyhwd/docs/TransactionSignResponse.md new file mode 100644 index 00000000..df3f69b0 --- /dev/null +++ b/lib/skyhwd/docs/TransactionSignResponse.md @@ -0,0 +1,10 @@ +# TransactionSignResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **list[str]** | | [optional] + +[[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/lib/skyhwd/docs/WordRequest.md b/lib/skyhwd/docs/WordRequest.md new file mode 100644 index 00000000..0c2f23f0 --- /dev/null +++ b/lib/skyhwd/docs/WordRequest.md @@ -0,0 +1,10 @@ +# WordRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**word** | **str** | | + +[[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/lib/skyhwd/git_push.sh b/lib/skyhwd/git_push.sh new file mode 100644 index 00000000..8442b80b --- /dev/null +++ b/lib/skyhwd/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/lib/skyhwd/requirements.txt b/lib/skyhwd/requirements.txt new file mode 100644 index 00000000..bafdc075 --- /dev/null +++ b/lib/skyhwd/requirements.txt @@ -0,0 +1,5 @@ +certifi >= 14.05.14 +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/lib/skyhwd/setup.py b/lib/skyhwd/setup.py new file mode 100644 index 00000000..cefb220f --- /dev/null +++ b/lib/skyhwd/setup.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "skyhwd" +VERSION = "1.0.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] + +setup( + name=NAME, + version=VERSION, + description="Hardware Wallet Daemon API", + author_email="steve@skycoin.net", + url="", + keywords=["OpenAPI", "OpenAPI-Generator", "Hardware Wallet Daemon API"], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + long_description="""\ + This is the hardware-wallet-daemon API # noqa: E501 + """ +) diff --git a/lib/skyhwd/skyhwd/__init__.py b/lib/skyhwd/skyhwd/__init__.py new file mode 100644 index 00000000..72a08ed6 --- /dev/null +++ b/lib/skyhwd/skyhwd/__init__.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +__version__ = "1.0.0" + +# import apis into sdk package +from skyhwd.api.default_api import DefaultApi + +# import ApiClient +from skyhwd.api_client import ApiClient +from skyhwd.configuration import Configuration +# import models into sdk package +from skyhwd.models.apply_settings_request import ApplySettingsRequest +from skyhwd.models.csrf_response import CSRFResponse +from skyhwd.models.check_message_signature_request import CheckMessageSignatureRequest +from skyhwd.models.features_response import FeaturesResponse +from skyhwd.models.features_response_data import FeaturesResponseData +from skyhwd.models.generate_addresses_request import GenerateAddressesRequest +from skyhwd.models.generate_addresses_response import GenerateAddressesResponse +from skyhwd.models.generate_mnemonic_request import GenerateMnemonicRequest +from skyhwd.models.http_error_response import HTTPErrorResponse +from skyhwd.models.http_error_response_error import HTTPErrorResponseError +from skyhwd.models.http_success_response import HTTPSuccessResponse +from skyhwd.models.inline_response200 import InlineResponse200 +from skyhwd.models.passphrase_request import PassphraseRequest +from skyhwd.models.pin_matrix_request import PinMatrixRequest +from skyhwd.models.recovery_request import RecoveryRequest +from skyhwd.models.set_mnemonic_request import SetMnemonicRequest +from skyhwd.models.sign_message_request import SignMessageRequest +from skyhwd.models.sign_message_response import SignMessageResponse +from skyhwd.models.transaction_input import TransactionInput +from skyhwd.models.transaction_output import TransactionOutput +from skyhwd.models.transaction_sign_request import TransactionSignRequest +from skyhwd.models.transaction_sign_response import TransactionSignResponse +from skyhwd.models.word_request import WordRequest diff --git a/lib/skyhwd/skyhwd/api/__init__.py b/lib/skyhwd/skyhwd/api/__init__.py new file mode 100644 index 00000000..d6704bac --- /dev/null +++ b/lib/skyhwd/skyhwd/api/__init__.py @@ -0,0 +1,6 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from skyhwd.api.default_api import DefaultApi diff --git a/lib/skyhwd/skyhwd/api/default_api.py b/lib/skyhwd/skyhwd/api/default_api.py new file mode 100644 index 00000000..d75f9e6a --- /dev/null +++ b/lib/skyhwd/skyhwd/api/default_api.py @@ -0,0 +1,1794 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from skyhwd.api_client import ApiClient + + +class DefaultApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def apply_settings_post(self, **kwargs): # noqa: E501 + """apply_settings_post # noqa: E501 + + Apply hardware wallet settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.apply_settings_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ApplySettingsRequest apply_settings_request: ApplySettingsRequest is request data for /api/v1/apply_settings + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.apply_settings_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.apply_settings_post_with_http_info(**kwargs) # noqa: E501 + return data + + def apply_settings_post_with_http_info(self, **kwargs): # noqa: E501 + """apply_settings_post # noqa: E501 + + Apply hardware wallet settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.apply_settings_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ApplySettingsRequest apply_settings_request: ApplySettingsRequest is request data for /api/v1/apply_settings + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['apply_settings_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method apply_settings_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'apply_settings_request' in local_var_params: + body_params = local_var_params['apply_settings_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/apply_settings', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def backup_post(self, **kwargs): # noqa: E501 + """backup_post # noqa: E501 + + Start seed backup procedure. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.backup_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.backup_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.backup_post_with_http_info(**kwargs) # noqa: E501 + return data + + def backup_post_with_http_info(self, **kwargs): # noqa: E501 + """backup_post # noqa: E501 + + Start seed backup procedure. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.backup_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method backup_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/backup', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def cancel_put(self, **kwargs): # noqa: E501 + """cancel_put # noqa: E501 + + Cancels the current operation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_put(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.cancel_put_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.cancel_put_with_http_info(**kwargs) # noqa: E501 + return data + + def cancel_put_with_http_info(self, **kwargs): # noqa: E501 + """cancel_put # noqa: E501 + + Cancels the current operation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_put_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method cancel_put" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/cancel', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def check_message_signature_post(self, **kwargs): # noqa: E501 + """check_message_signature_post # noqa: E501 + + Check a message signature matches the given address. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.check_message_signature_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CheckMessageSignatureRequest check_message_signature_request: CheckMessageSignatureRequest is request data for /api/v1/check_message_signature + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.check_message_signature_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.check_message_signature_post_with_http_info(**kwargs) # noqa: E501 + return data + + def check_message_signature_post_with_http_info(self, **kwargs): # noqa: E501 + """check_message_signature_post # noqa: E501 + + Check a message signature matches the given address. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.check_message_signature_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CheckMessageSignatureRequest check_message_signature_request: CheckMessageSignatureRequest is request data for /api/v1/check_message_signature + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['check_message_signature_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method check_message_signature_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'check_message_signature_request' in local_var_params: + body_params = local_var_params['check_message_signature_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/check_message_signature', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def connected_get(self, **kwargs): # noqa: E501 + """connected_get # noqa: E501 + + check whether device is connected or not. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.connected_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: InlineResponse200 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.connected_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.connected_get_with_http_info(**kwargs) # noqa: E501 + return data + + def connected_get_with_http_info(self, **kwargs): # noqa: E501 + """connected_get # noqa: E501 + + check whether device is connected or not. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.connected_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: InlineResponse200 + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method connected_get" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/connected', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse200', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def csrf_get(self, **kwargs): # noqa: E501 + """csrf_get # noqa: E501 + + Returns csrf token # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.csrf_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: CSRFResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.csrf_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.csrf_get_with_http_info(**kwargs) # noqa: E501 + return data + + def csrf_get_with_http_info(self, **kwargs): # noqa: E501 + """csrf_get # noqa: E501 + + Returns csrf token # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.csrf_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: CSRFResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method csrf_get" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/csrf', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CSRFResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def features_get(self, **kwargs): # noqa: E501 + """features_get # noqa: E501 + + Returns device information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.features_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: FeaturesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.features_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.features_get_with_http_info(**kwargs) # noqa: E501 + return data + + def features_get_with_http_info(self, **kwargs): # noqa: E501 + """features_get # noqa: E501 + + Returns device information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.features_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: FeaturesResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method features_get" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/features', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FeaturesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def firmware_update_put(self, **kwargs): # noqa: E501 + """firmware_update_put # noqa: E501 + + Update firmware # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.firmware_update_put(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.firmware_update_put_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.firmware_update_put_with_http_info(**kwargs) # noqa: E501 + return data + + def firmware_update_put_with_http_info(self, **kwargs): # noqa: E501 + """firmware_update_put # noqa: E501 + + Update firmware # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.firmware_update_put_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method firmware_update_put" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/firmware_update', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def generate_addresses_post(self, **kwargs): # noqa: E501 + """generate_addresses_post # noqa: E501 + + Generate addresses for the hardware wallet seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_addresses_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param GenerateAddressesRequest generate_addresses_request: GenerateAddressesRequest is request data for /api/v1/generate_addresses + :return: GenerateAddressesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.generate_addresses_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.generate_addresses_post_with_http_info(**kwargs) # noqa: E501 + return data + + def generate_addresses_post_with_http_info(self, **kwargs): # noqa: E501 + """generate_addresses_post # noqa: E501 + + Generate addresses for the hardware wallet seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_addresses_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param GenerateAddressesRequest generate_addresses_request: GenerateAddressesRequest is request data for /api/v1/generate_addresses + :return: GenerateAddressesResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['generate_addresses_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method generate_addresses_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'generate_addresses_request' in local_var_params: + body_params = local_var_params['generate_addresses_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/generate_addresses', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GenerateAddressesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def generate_mnemonic_post(self, **kwargs): # noqa: E501 + """generate_mnemonic_post # noqa: E501 + + Generate mnemonic can be used to initialize the device with a random seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_mnemonic_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param GenerateMnemonicRequest generate_mnemonic_request: GenerateMnemonicRequest is request data for /api/v1/generate_mnemonic + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.generate_mnemonic_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.generate_mnemonic_post_with_http_info(**kwargs) # noqa: E501 + return data + + def generate_mnemonic_post_with_http_info(self, **kwargs): # noqa: E501 + """generate_mnemonic_post # noqa: E501 + + Generate mnemonic can be used to initialize the device with a random seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_mnemonic_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param GenerateMnemonicRequest generate_mnemonic_request: GenerateMnemonicRequest is request data for /api/v1/generate_mnemonic + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['generate_mnemonic_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method generate_mnemonic_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'generate_mnemonic_request' in local_var_params: + body_params = local_var_params['generate_mnemonic_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/generate_mnemonic', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def intermediate_passphrase_post(self, **kwargs): # noqa: E501 + """intermediate_passphrase_post # noqa: E501 + + passphrase ack request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.intermediate_passphrase_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param PassphraseRequest passphrase_request: PassPhraseRequest is request data for /api/v1/intermediate/passphrase + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.intermediate_passphrase_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.intermediate_passphrase_post_with_http_info(**kwargs) # noqa: E501 + return data + + def intermediate_passphrase_post_with_http_info(self, **kwargs): # noqa: E501 + """intermediate_passphrase_post # noqa: E501 + + passphrase ack request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.intermediate_passphrase_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param PassphraseRequest passphrase_request: PassPhraseRequest is request data for /api/v1/intermediate/passphrase + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['passphrase_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method intermediate_passphrase_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'passphrase_request' in local_var_params: + body_params = local_var_params['passphrase_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/intermediate/passphrase', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def intermediate_pin_matrix_post(self, **kwargs): # noqa: E501 + """intermediate_pin_matrix_post # noqa: E501 + + pin matrix ack request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.intermediate_pin_matrix_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param PinMatrixRequest pin_matrix_request: PinMatrixRequest is request data for /api/v1/intermediate/pin_matrix + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.intermediate_pin_matrix_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.intermediate_pin_matrix_post_with_http_info(**kwargs) # noqa: E501 + return data + + def intermediate_pin_matrix_post_with_http_info(self, **kwargs): # noqa: E501 + """intermediate_pin_matrix_post # noqa: E501 + + pin matrix ack request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.intermediate_pin_matrix_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param PinMatrixRequest pin_matrix_request: PinMatrixRequest is request data for /api/v1/intermediate/pin_matrix + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['pin_matrix_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method intermediate_pin_matrix_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'pin_matrix_request' in local_var_params: + body_params = local_var_params['pin_matrix_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/intermediate/pin_matrix', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def intermediate_word_post(self, **kwargs): # noqa: E501 + """intermediate_word_post # noqa: E501 + + word ack request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.intermediate_word_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param WordRequest word_request: WordRequest is request data for /api/v1/intermediate/word + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.intermediate_word_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.intermediate_word_post_with_http_info(**kwargs) # noqa: E501 + return data + + def intermediate_word_post_with_http_info(self, **kwargs): # noqa: E501 + """intermediate_word_post # noqa: E501 + + word ack request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.intermediate_word_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param WordRequest word_request: WordRequest is request data for /api/v1/intermediate/word + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['word_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method intermediate_word_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'word_request' in local_var_params: + body_params = local_var_params['word_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/intermediate/word', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def recovery_post(self, **kwargs): # noqa: E501 + """recovery_post # noqa: E501 + + Recover existing wallet using seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.recovery_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param RecoveryRequest recovery_request: RecoveryRequest is request data for /api/v1/check_message_signature + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.recovery_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.recovery_post_with_http_info(**kwargs) # noqa: E501 + return data + + def recovery_post_with_http_info(self, **kwargs): # noqa: E501 + """recovery_post # noqa: E501 + + Recover existing wallet using seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.recovery_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param RecoveryRequest recovery_request: RecoveryRequest is request data for /api/v1/check_message_signature + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['recovery_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method recovery_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'recovery_request' in local_var_params: + body_params = local_var_params['recovery_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/recovery', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def set_mnemonic_post(self, **kwargs): # noqa: E501 + """set_mnemonic_post # noqa: E501 + + Set mnemonic can be used to initialize the device with your own seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_mnemonic_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SetMnemonicRequest set_mnemonic_request: SetMnemonicRequest is request data for /api/v1/set_mnemonic + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.set_mnemonic_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.set_mnemonic_post_with_http_info(**kwargs) # noqa: E501 + return data + + def set_mnemonic_post_with_http_info(self, **kwargs): # noqa: E501 + """set_mnemonic_post # noqa: E501 + + Set mnemonic can be used to initialize the device with your own seed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_mnemonic_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SetMnemonicRequest set_mnemonic_request: SetMnemonicRequest is request data for /api/v1/set_mnemonic + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['set_mnemonic_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method set_mnemonic_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'set_mnemonic_request' in local_var_params: + body_params = local_var_params['set_mnemonic_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/set_mnemonic', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def set_pin_code_post(self, **kwargs): # noqa: E501 + """set_pin_code_post # noqa: E501 + + Configure a pin code on the device. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_pin_code_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.set_pin_code_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.set_pin_code_post_with_http_info(**kwargs) # noqa: E501 + return data + + def set_pin_code_post_with_http_info(self, **kwargs): # noqa: E501 + """set_pin_code_post # noqa: E501 + + Configure a pin code on the device. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_pin_code_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method set_pin_code_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/set_pin_code', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def sign_message_post(self, **kwargs): # noqa: E501 + """sign_message_post # noqa: E501 + + Sign a message using the secret key at given index. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.sign_message_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SignMessageRequest sign_message_request: SignMessageRequest is request data for /api/signMessage + :return: SignMessageResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.sign_message_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.sign_message_post_with_http_info(**kwargs) # noqa: E501 + return data + + def sign_message_post_with_http_info(self, **kwargs): # noqa: E501 + """sign_message_post # noqa: E501 + + Sign a message using the secret key at given index. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.sign_message_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SignMessageRequest sign_message_request: SignMessageRequest is request data for /api/signMessage + :return: SignMessageResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['sign_message_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method sign_message_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'sign_message_request' in local_var_params: + body_params = local_var_params['sign_message_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/sign_message', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SignMessageResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def transaction_sign_post(self, **kwargs): # noqa: E501 + """transaction_sign_post # noqa: E501 + + Sign a transaction with the hardware wallet. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.transaction_sign_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param TransactionSignRequest transaction_sign_request: TransactionSignRequest is request data for /api/v1/transactionSign + :return: TransactionSignResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.transaction_sign_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.transaction_sign_post_with_http_info(**kwargs) # noqa: E501 + return data + + def transaction_sign_post_with_http_info(self, **kwargs): # noqa: E501 + """transaction_sign_post # noqa: E501 + + Sign a transaction with the hardware wallet. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.transaction_sign_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param TransactionSignRequest transaction_sign_request: TransactionSignRequest is request data for /api/v1/transactionSign + :return: TransactionSignResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['transaction_sign_request'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method transaction_sign_post" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'transaction_sign_request' in local_var_params: + body_params = local_var_params['transaction_sign_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/transaction_sign', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TransactionSignResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def wipe_delete(self, **kwargs): # noqa: E501 + """wipe_delete # noqa: E501 + + clean all the configurations. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wipe_delete(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.wipe_delete_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.wipe_delete_with_http_info(**kwargs) # noqa: E501 + return data + + def wipe_delete_with_http_info(self, **kwargs): # noqa: E501 + """wipe_delete # noqa: E501 + + clean all the configurations. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wipe_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HTTPSuccessResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method wipe_delete" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['csrfAuth'] # noqa: E501 + + return self.api_client.call_api( + '/wipe', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HTTPSuccessResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/lib/skyhwd/skyhwd/api_client.py b/lib/skyhwd/skyhwd/api_client.py new file mode 100644 index 00000000..935449b8 --- /dev/null +++ b/lib/skyhwd/skyhwd/api_client.py @@ -0,0 +1,635 @@ +# coding: utf-8 +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + +from __future__ import absolute_import + +import datetime +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import quote + +from skyhwd.configuration import Configuration +import skyhwd.models +from skyhwd import rest + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, # noqa: F821 + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=None): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + + def __del__(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = self.prepare_post_parameters(post_params, files) + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + url = self.configuration.host + resource_path + + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + + self.last_response = response_data + + return_data = response_data + if _preload_content: + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.openapi_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(skyhwd.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datatime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async_req=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout) + else: + thread = self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, query_params, + header_params, body, + post_params, files, + response_type, auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, _request_timeout)) + return thread + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def prepare_post_parameters(self, post_params=None, files=None): + """Builds form parameters. + + :param post_params: Normal form parameters. + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if post_params: + params = post_params + + if files: + for k, v in six.iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if not auth_setting['value']: + continue + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return six.text_type(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datatime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + if not klass.openapi_types and not hasattr(klass, + 'get_real_child_model'): + return data + + kwargs = {} + if klass.openapi_types is not None: + for attr, attr_type in six.iteritems(klass.openapi_types): + if (data is not None and + klass.attribute_map[attr] in data and + isinstance(data, (list, dict))): + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if hasattr(instance, 'get_real_child_model'): + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/lib/skyhwd/skyhwd/configuration.py b/lib/skyhwd/skyhwd/configuration.py new file mode 100644 index 00000000..603453a0 --- /dev/null +++ b/lib/skyhwd/skyhwd/configuration.py @@ -0,0 +1,236 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import six +from six.moves import http_client as httplib + + +class TypeWithDefault(type): + def __init__(cls, name, bases, dct): + super(TypeWithDefault, cls).__init__(name, bases, dct) + cls._default = None + + def __call__(cls): + if cls._default is None: + cls._default = type.__call__(cls) + return copy.copy(cls._default) + + def set_default(cls, default): + cls._default = copy.copy(default) + + +class Configuration(six.with_metaclass(TypeWithDefault, object)): + """NOTE: This class is auto generated by OpenAPI Generator + + Ref: https://openapi-generator.tech + Do not edit the class manually. + """ + + def __init__(self): + """Constructor""" + # Default Base url + self.host = "http://127.0.0.1:9510/api/v1" + # Temp file folder for downloading files + self.temp_folder_path = None + + # Authentication Settings + # dict to store API key(s) + self.api_key = {} + # dict to store API prefix (e.g. Bearer) + self.api_key_prefix = {} + # Username for HTTP basic authentication + self.username = "" + # Password for HTTP basic authentication + self.password = "" + + # Logging Settings + self.logger = {} + self.logger["package_logger"] = logging.getLogger("skyhwd") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + # Log format + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + # Log stream handler + self.logger_stream_handler = None + # Log file handler + self.logger_file_handler = None + # Debug file location + self.logger_file = None + # Debug switch + self.debug = False + + # SSL/TLS verification + # Set this to false to skip verifying SSL certificate when calling API + # from https server. + self.verify_ssl = True + # Set this to customize the certificate file to verify the peer. + self.ssl_ca_cert = None + # client certificate file + self.cert_file = None + # client key file + self.key_file = None + # Set this to True/False to enable/disable SSL hostname verification. + self.assert_hostname = None + + # urllib3 connection pool's maximum number of connections saved + # per pool. urllib3 uses 1 connection as default value, but this is + # not the best value when you are making a lot of possibly parallel + # requests to the same host, which is often the case here. + # cpu_count * 5 is used as default value to increase performance. + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + + # Proxy URL + self.proxy = None + # Safe chars for path_param + self.safe_chars_for_path_param = '' + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :return: The token for api key authentication. + """ + if (self.api_key.get(identifier) and + self.api_key_prefix.get(identifier)): + return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501 + elif self.api_key.get(identifier): + return self.api_key[identifier] + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + return urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + return { + 'csrfAuth': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'X-CSRF-TOKEN', + 'value': self.get_api_key_with_prefix('X-CSRF-TOKEN') + }, + + } + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 0.1.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/lib/skyhwd/skyhwd/models/__init__.py b/lib/skyhwd/skyhwd/models/__init__.py new file mode 100644 index 00000000..2a248590 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/__init__.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +# flake8: noqa +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +# import models into model package +from skyhwd.models.apply_settings_request import ApplySettingsRequest +from skyhwd.models.csrf_response import CSRFResponse +from skyhwd.models.check_message_signature_request import CheckMessageSignatureRequest +from skyhwd.models.features_response import FeaturesResponse +from skyhwd.models.features_response_data import FeaturesResponseData +from skyhwd.models.generate_addresses_request import GenerateAddressesRequest +from skyhwd.models.generate_addresses_response import GenerateAddressesResponse +from skyhwd.models.generate_mnemonic_request import GenerateMnemonicRequest +from skyhwd.models.http_error_response import HTTPErrorResponse +from skyhwd.models.http_error_response_error import HTTPErrorResponseError +from skyhwd.models.http_success_response import HTTPSuccessResponse +from skyhwd.models.inline_response200 import InlineResponse200 +from skyhwd.models.passphrase_request import PassphraseRequest +from skyhwd.models.pin_matrix_request import PinMatrixRequest +from skyhwd.models.recovery_request import RecoveryRequest +from skyhwd.models.set_mnemonic_request import SetMnemonicRequest +from skyhwd.models.sign_message_request import SignMessageRequest +from skyhwd.models.sign_message_response import SignMessageResponse +from skyhwd.models.transaction_input import TransactionInput +from skyhwd.models.transaction_output import TransactionOutput +from skyhwd.models.transaction_sign_request import TransactionSignRequest +from skyhwd.models.transaction_sign_response import TransactionSignResponse +from skyhwd.models.word_request import WordRequest diff --git a/lib/skyhwd/skyhwd/models/apply_settings_request.py b/lib/skyhwd/skyhwd/models/apply_settings_request.py new file mode 100644 index 00000000..9da76eb6 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/apply_settings_request.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApplySettingsRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'label': 'str', + 'use_passphrase': 'bool' + } + + attribute_map = { + 'label': 'label', + 'use_passphrase': 'use_passphrase' + } + + def __init__(self, label=None, use_passphrase=None): # noqa: E501 + """ApplySettingsRequest - a model defined in OpenAPI""" # noqa: E501 + + self._label = None + self._use_passphrase = None + self.discriminator = None + + if label is not None: + self.label = label + if use_passphrase is not None: + self.use_passphrase = use_passphrase + + @property + def label(self): + """Gets the label of this ApplySettingsRequest. # noqa: E501 + + + :return: The label of this ApplySettingsRequest. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ApplySettingsRequest. + + + :param label: The label of this ApplySettingsRequest. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def use_passphrase(self): + """Gets the use_passphrase of this ApplySettingsRequest. # noqa: E501 + + + :return: The use_passphrase of this ApplySettingsRequest. # noqa: E501 + :rtype: bool + """ + return self._use_passphrase + + @use_passphrase.setter + def use_passphrase(self, use_passphrase): + """Sets the use_passphrase of this ApplySettingsRequest. + + + :param use_passphrase: The use_passphrase of this ApplySettingsRequest. # noqa: E501 + :type: bool + """ + + self._use_passphrase = use_passphrase + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApplySettingsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/check_message_signature_request.py b/lib/skyhwd/skyhwd/models/check_message_signature_request.py new file mode 100644 index 00000000..f3f8a791 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/check_message_signature_request.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CheckMessageSignatureRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message': 'str', + 'signature': 'str', + 'address': 'str' + } + + attribute_map = { + 'message': 'message', + 'signature': 'signature', + 'address': 'address' + } + + def __init__(self, message=None, signature=None, address=None): # noqa: E501 + """CheckMessageSignatureRequest - a model defined in OpenAPI""" # noqa: E501 + + self._message = None + self._signature = None + self._address = None + self.discriminator = None + + self.message = message + self.signature = signature + self.address = address + + @property + def message(self): + """Gets the message of this CheckMessageSignatureRequest. # noqa: E501 + + + :return: The message of this CheckMessageSignatureRequest. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this CheckMessageSignatureRequest. + + + :param message: The message of this CheckMessageSignatureRequest. # noqa: E501 + :type: str + """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def signature(self): + """Gets the signature of this CheckMessageSignatureRequest. # noqa: E501 + + + :return: The signature of this CheckMessageSignatureRequest. # noqa: E501 + :rtype: str + """ + return self._signature + + @signature.setter + def signature(self, signature): + """Sets the signature of this CheckMessageSignatureRequest. + + + :param signature: The signature of this CheckMessageSignatureRequest. # noqa: E501 + :type: str + """ + if signature is None: + raise ValueError("Invalid value for `signature`, must not be `None`") # noqa: E501 + + self._signature = signature + + @property + def address(self): + """Gets the address of this CheckMessageSignatureRequest. # noqa: E501 + + + :return: The address of this CheckMessageSignatureRequest. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this CheckMessageSignatureRequest. + + + :param address: The address of this CheckMessageSignatureRequest. # noqa: E501 + :type: str + """ + if address is None: + raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501 + + self._address = address + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CheckMessageSignatureRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/csrf_response.py b/lib/skyhwd/skyhwd/models/csrf_response.py new file mode 100644 index 00000000..b14c0439 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/csrf_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CSRFResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'str' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """CSRFResponse - a model defined in OpenAPI""" # noqa: E501 + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this CSRFResponse. # noqa: E501 + + + :return: The data of this CSRFResponse. # noqa: E501 + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this CSRFResponse. + + + :param data: The data of this CSRFResponse. # noqa: E501 + :type: str + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CSRFResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/features_response.py b/lib/skyhwd/skyhwd/models/features_response.py new file mode 100644 index 00000000..12b37763 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/features_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class FeaturesResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'FeaturesResponseData' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """FeaturesResponse - a model defined in OpenAPI""" # noqa: E501 + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this FeaturesResponse. # noqa: E501 + + + :return: The data of this FeaturesResponse. # noqa: E501 + :rtype: FeaturesResponseData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this FeaturesResponse. + + + :param data: The data of this FeaturesResponse. # noqa: E501 + :type: FeaturesResponseData + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FeaturesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/features_response_data.py b/lib/skyhwd/skyhwd/models/features_response_data.py new file mode 100644 index 00000000..f77d2b0c --- /dev/null +++ b/lib/skyhwd/skyhwd/models/features_response_data.py @@ -0,0 +1,539 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class FeaturesResponseData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'device_id': 'str', + 'passphrase_protection': 'bool', + 'label': 'str', + 'fw_patch': 'int', + 'fw_major': 'int', + 'fw_minor': 'int', + 'minor_version': 'int', + 'pin_protection': 'bool', + 'bootloader_hash': 'str', + 'major_version': 'int', + 'pin_cached': 'bool', + 'vendor': 'str', + 'needs_backup': 'bool', + 'initialized': 'bool', + 'model': 'str', + 'passphrase_cached': 'bool', + 'patch_version': 'int' + } + + attribute_map = { + 'device_id': 'device_id', + 'passphrase_protection': 'passphrase_protection', + 'label': 'label', + 'fw_patch': 'fw_patch', + 'fw_major': 'fw_major', + 'fw_minor': 'fw_minor', + 'minor_version': 'minor_version', + 'pin_protection': 'pin_protection', + 'bootloader_hash': 'bootloader_hash', + 'major_version': 'major_version', + 'pin_cached': 'pin_cached', + 'vendor': 'vendor', + 'needs_backup': 'needs_backup', + 'initialized': 'initialized', + 'model': 'model', + 'passphrase_cached': 'passphrase_cached', + 'patch_version': 'patch_version' + } + + def __init__(self, device_id=None, passphrase_protection=None, label=None, fw_patch=None, fw_major=None, fw_minor=None, minor_version=None, pin_protection=None, bootloader_hash=None, major_version=None, pin_cached=None, vendor=None, needs_backup=None, initialized=None, model=None, passphrase_cached=None, patch_version=None): # noqa: E501 + """FeaturesResponseData - a model defined in OpenAPI""" # noqa: E501 + + self._device_id = None + self._passphrase_protection = None + self._label = None + self._fw_patch = None + self._fw_major = None + self._fw_minor = None + self._minor_version = None + self._pin_protection = None + self._bootloader_hash = None + self._major_version = None + self._pin_cached = None + self._vendor = None + self._needs_backup = None + self._initialized = None + self._model = None + self._passphrase_cached = None + self._patch_version = None + self.discriminator = None + + if device_id is not None: + self.device_id = device_id + self.passphrase_protection = passphrase_protection + if label is not None: + self.label = label + self.fw_patch = fw_patch + self.fw_major = fw_major + self.fw_minor = fw_minor + if minor_version is not None: + self.minor_version = minor_version + self.pin_protection = pin_protection + if bootloader_hash is not None: + self.bootloader_hash = bootloader_hash + if major_version is not None: + self.major_version = major_version + self.pin_cached = pin_cached + self.vendor = vendor + self.needs_backup = needs_backup + self.initialized = initialized + if model is not None: + self.model = model + self.passphrase_cached = passphrase_cached + if patch_version is not None: + self.patch_version = patch_version + + @property + def device_id(self): + """Gets the device_id of this FeaturesResponseData. # noqa: E501 + + + :return: The device_id of this FeaturesResponseData. # noqa: E501 + :rtype: str + """ + return self._device_id + + @device_id.setter + def device_id(self, device_id): + """Sets the device_id of this FeaturesResponseData. + + + :param device_id: The device_id of this FeaturesResponseData. # noqa: E501 + :type: str + """ + + self._device_id = device_id + + @property + def passphrase_protection(self): + """Gets the passphrase_protection of this FeaturesResponseData. # noqa: E501 + + + :return: The passphrase_protection of this FeaturesResponseData. # noqa: E501 + :rtype: bool + """ + return self._passphrase_protection + + @passphrase_protection.setter + def passphrase_protection(self, passphrase_protection): + """Sets the passphrase_protection of this FeaturesResponseData. + + + :param passphrase_protection: The passphrase_protection of this FeaturesResponseData. # noqa: E501 + :type: bool + """ + if passphrase_protection is None: + raise ValueError("Invalid value for `passphrase_protection`, must not be `None`") # noqa: E501 + + self._passphrase_protection = passphrase_protection + + @property + def label(self): + """Gets the label of this FeaturesResponseData. # noqa: E501 + + + :return: The label of this FeaturesResponseData. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this FeaturesResponseData. + + + :param label: The label of this FeaturesResponseData. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def fw_patch(self): + """Gets the fw_patch of this FeaturesResponseData. # noqa: E501 + + + :return: The fw_patch of this FeaturesResponseData. # noqa: E501 + :rtype: int + """ + return self._fw_patch + + @fw_patch.setter + def fw_patch(self, fw_patch): + """Sets the fw_patch of this FeaturesResponseData. + + + :param fw_patch: The fw_patch of this FeaturesResponseData. # noqa: E501 + :type: int + """ + if fw_patch is None: + raise ValueError("Invalid value for `fw_patch`, must not be `None`") # noqa: E501 + + self._fw_patch = fw_patch + + @property + def fw_major(self): + """Gets the fw_major of this FeaturesResponseData. # noqa: E501 + + + :return: The fw_major of this FeaturesResponseData. # noqa: E501 + :rtype: int + """ + return self._fw_major + + @fw_major.setter + def fw_major(self, fw_major): + """Sets the fw_major of this FeaturesResponseData. + + + :param fw_major: The fw_major of this FeaturesResponseData. # noqa: E501 + :type: int + """ + if fw_major is None: + raise ValueError("Invalid value for `fw_major`, must not be `None`") # noqa: E501 + + self._fw_major = fw_major + + @property + def fw_minor(self): + """Gets the fw_minor of this FeaturesResponseData. # noqa: E501 + + + :return: The fw_minor of this FeaturesResponseData. # noqa: E501 + :rtype: int + """ + return self._fw_minor + + @fw_minor.setter + def fw_minor(self, fw_minor): + """Sets the fw_minor of this FeaturesResponseData. + + + :param fw_minor: The fw_minor of this FeaturesResponseData. # noqa: E501 + :type: int + """ + if fw_minor is None: + raise ValueError("Invalid value for `fw_minor`, must not be `None`") # noqa: E501 + + self._fw_minor = fw_minor + + @property + def minor_version(self): + """Gets the minor_version of this FeaturesResponseData. # noqa: E501 + + + :return: The minor_version of this FeaturesResponseData. # noqa: E501 + :rtype: int + """ + return self._minor_version + + @minor_version.setter + def minor_version(self, minor_version): + """Sets the minor_version of this FeaturesResponseData. + + + :param minor_version: The minor_version of this FeaturesResponseData. # noqa: E501 + :type: int + """ + + self._minor_version = minor_version + + @property + def pin_protection(self): + """Gets the pin_protection of this FeaturesResponseData. # noqa: E501 + + + :return: The pin_protection of this FeaturesResponseData. # noqa: E501 + :rtype: bool + """ + return self._pin_protection + + @pin_protection.setter + def pin_protection(self, pin_protection): + """Sets the pin_protection of this FeaturesResponseData. + + + :param pin_protection: The pin_protection of this FeaturesResponseData. # noqa: E501 + :type: bool + """ + if pin_protection is None: + raise ValueError("Invalid value for `pin_protection`, must not be `None`") # noqa: E501 + + self._pin_protection = pin_protection + + @property + def bootloader_hash(self): + """Gets the bootloader_hash of this FeaturesResponseData. # noqa: E501 + + + :return: The bootloader_hash of this FeaturesResponseData. # noqa: E501 + :rtype: str + """ + return self._bootloader_hash + + @bootloader_hash.setter + def bootloader_hash(self, bootloader_hash): + """Sets the bootloader_hash of this FeaturesResponseData. + + + :param bootloader_hash: The bootloader_hash of this FeaturesResponseData. # noqa: E501 + :type: str + """ + + self._bootloader_hash = bootloader_hash + + @property + def major_version(self): + """Gets the major_version of this FeaturesResponseData. # noqa: E501 + + + :return: The major_version of this FeaturesResponseData. # noqa: E501 + :rtype: int + """ + return self._major_version + + @major_version.setter + def major_version(self, major_version): + """Sets the major_version of this FeaturesResponseData. + + + :param major_version: The major_version of this FeaturesResponseData. # noqa: E501 + :type: int + """ + + self._major_version = major_version + + @property + def pin_cached(self): + """Gets the pin_cached of this FeaturesResponseData. # noqa: E501 + + + :return: The pin_cached of this FeaturesResponseData. # noqa: E501 + :rtype: bool + """ + return self._pin_cached + + @pin_cached.setter + def pin_cached(self, pin_cached): + """Sets the pin_cached of this FeaturesResponseData. + + + :param pin_cached: The pin_cached of this FeaturesResponseData. # noqa: E501 + :type: bool + """ + if pin_cached is None: + raise ValueError("Invalid value for `pin_cached`, must not be `None`") # noqa: E501 + + self._pin_cached = pin_cached + + @property + def vendor(self): + """Gets the vendor of this FeaturesResponseData. # noqa: E501 + + + :return: The vendor of this FeaturesResponseData. # noqa: E501 + :rtype: str + """ + return self._vendor + + @vendor.setter + def vendor(self, vendor): + """Sets the vendor of this FeaturesResponseData. + + + :param vendor: The vendor of this FeaturesResponseData. # noqa: E501 + :type: str + """ + if vendor is None: + raise ValueError("Invalid value for `vendor`, must not be `None`") # noqa: E501 + + self._vendor = vendor + + @property + def needs_backup(self): + """Gets the needs_backup of this FeaturesResponseData. # noqa: E501 + + + :return: The needs_backup of this FeaturesResponseData. # noqa: E501 + :rtype: bool + """ + return self._needs_backup + + @needs_backup.setter + def needs_backup(self, needs_backup): + """Sets the needs_backup of this FeaturesResponseData. + + + :param needs_backup: The needs_backup of this FeaturesResponseData. # noqa: E501 + :type: bool + """ + if needs_backup is None: + raise ValueError("Invalid value for `needs_backup`, must not be `None`") # noqa: E501 + + self._needs_backup = needs_backup + + @property + def initialized(self): + """Gets the initialized of this FeaturesResponseData. # noqa: E501 + + + :return: The initialized of this FeaturesResponseData. # noqa: E501 + :rtype: bool + """ + return self._initialized + + @initialized.setter + def initialized(self, initialized): + """Sets the initialized of this FeaturesResponseData. + + + :param initialized: The initialized of this FeaturesResponseData. # noqa: E501 + :type: bool + """ + if initialized is None: + raise ValueError("Invalid value for `initialized`, must not be `None`") # noqa: E501 + + self._initialized = initialized + + @property + def model(self): + """Gets the model of this FeaturesResponseData. # noqa: E501 + + + :return: The model of this FeaturesResponseData. # noqa: E501 + :rtype: str + """ + return self._model + + @model.setter + def model(self, model): + """Sets the model of this FeaturesResponseData. + + + :param model: The model of this FeaturesResponseData. # noqa: E501 + :type: str + """ + + self._model = model + + @property + def passphrase_cached(self): + """Gets the passphrase_cached of this FeaturesResponseData. # noqa: E501 + + + :return: The passphrase_cached of this FeaturesResponseData. # noqa: E501 + :rtype: bool + """ + return self._passphrase_cached + + @passphrase_cached.setter + def passphrase_cached(self, passphrase_cached): + """Sets the passphrase_cached of this FeaturesResponseData. + + + :param passphrase_cached: The passphrase_cached of this FeaturesResponseData. # noqa: E501 + :type: bool + """ + if passphrase_cached is None: + raise ValueError("Invalid value for `passphrase_cached`, must not be `None`") # noqa: E501 + + self._passphrase_cached = passphrase_cached + + @property + def patch_version(self): + """Gets the patch_version of this FeaturesResponseData. # noqa: E501 + + + :return: The patch_version of this FeaturesResponseData. # noqa: E501 + :rtype: int + """ + return self._patch_version + + @patch_version.setter + def patch_version(self, patch_version): + """Sets the patch_version of this FeaturesResponseData. + + + :param patch_version: The patch_version of this FeaturesResponseData. # noqa: E501 + :type: int + """ + + self._patch_version = patch_version + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FeaturesResponseData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/generate_addresses_request.py b/lib/skyhwd/skyhwd/models/generate_addresses_request.py new file mode 100644 index 00000000..83cdded6 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/generate_addresses_request.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class GenerateAddressesRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'address_n': 'int', + 'start_index': 'int', + 'confirm_address': 'bool' + } + + attribute_map = { + 'address_n': 'address_n', + 'start_index': 'start_index', + 'confirm_address': 'confirm_address' + } + + def __init__(self, address_n=None, start_index=None, confirm_address=None): # noqa: E501 + """GenerateAddressesRequest - a model defined in OpenAPI""" # noqa: E501 + + self._address_n = None + self._start_index = None + self._confirm_address = None + self.discriminator = None + + self.address_n = address_n + if start_index is not None: + self.start_index = start_index + if confirm_address is not None: + self.confirm_address = confirm_address + + @property + def address_n(self): + """Gets the address_n of this GenerateAddressesRequest. # noqa: E501 + + + :return: The address_n of this GenerateAddressesRequest. # noqa: E501 + :rtype: int + """ + return self._address_n + + @address_n.setter + def address_n(self, address_n): + """Sets the address_n of this GenerateAddressesRequest. + + + :param address_n: The address_n of this GenerateAddressesRequest. # noqa: E501 + :type: int + """ + if address_n is None: + raise ValueError("Invalid value for `address_n`, must not be `None`") # noqa: E501 + + self._address_n = address_n + + @property + def start_index(self): + """Gets the start_index of this GenerateAddressesRequest. # noqa: E501 + + + :return: The start_index of this GenerateAddressesRequest. # noqa: E501 + :rtype: int + """ + return self._start_index + + @start_index.setter + def start_index(self, start_index): + """Sets the start_index of this GenerateAddressesRequest. + + + :param start_index: The start_index of this GenerateAddressesRequest. # noqa: E501 + :type: int + """ + + self._start_index = start_index + + @property + def confirm_address(self): + """Gets the confirm_address of this GenerateAddressesRequest. # noqa: E501 + + + :return: The confirm_address of this GenerateAddressesRequest. # noqa: E501 + :rtype: bool + """ + return self._confirm_address + + @confirm_address.setter + def confirm_address(self, confirm_address): + """Sets the confirm_address of this GenerateAddressesRequest. + + + :param confirm_address: The confirm_address of this GenerateAddressesRequest. # noqa: E501 + :type: bool + """ + + self._confirm_address = confirm_address + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GenerateAddressesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/generate_addresses_response.py b/lib/skyhwd/skyhwd/models/generate_addresses_response.py new file mode 100644 index 00000000..bda0c1c3 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/generate_addresses_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class GenerateAddressesResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[str]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """GenerateAddressesResponse - a model defined in OpenAPI""" # noqa: E501 + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this GenerateAddressesResponse. # noqa: E501 + + + :return: The data of this GenerateAddressesResponse. # noqa: E501 + :rtype: list[str] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this GenerateAddressesResponse. + + + :param data: The data of this GenerateAddressesResponse. # noqa: E501 + :type: list[str] + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GenerateAddressesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/generate_mnemonic_request.py b/lib/skyhwd/skyhwd/models/generate_mnemonic_request.py new file mode 100644 index 00000000..a397169b --- /dev/null +++ b/lib/skyhwd/skyhwd/models/generate_mnemonic_request.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class GenerateMnemonicRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'word_count': 'int', + 'use_passphrase': 'bool' + } + + attribute_map = { + 'word_count': 'word_count', + 'use_passphrase': 'use_passphrase' + } + + def __init__(self, word_count=None, use_passphrase=None): # noqa: E501 + """GenerateMnemonicRequest - a model defined in OpenAPI""" # noqa: E501 + + self._word_count = None + self._use_passphrase = None + self.discriminator = None + + self.word_count = word_count + if use_passphrase is not None: + self.use_passphrase = use_passphrase + + @property + def word_count(self): + """Gets the word_count of this GenerateMnemonicRequest. # noqa: E501 + + + :return: The word_count of this GenerateMnemonicRequest. # noqa: E501 + :rtype: int + """ + return self._word_count + + @word_count.setter + def word_count(self, word_count): + """Sets the word_count of this GenerateMnemonicRequest. + + + :param word_count: The word_count of this GenerateMnemonicRequest. # noqa: E501 + :type: int + """ + if word_count is None: + raise ValueError("Invalid value for `word_count`, must not be `None`") # noqa: E501 + + self._word_count = word_count + + @property + def use_passphrase(self): + """Gets the use_passphrase of this GenerateMnemonicRequest. # noqa: E501 + + + :return: The use_passphrase of this GenerateMnemonicRequest. # noqa: E501 + :rtype: bool + """ + return self._use_passphrase + + @use_passphrase.setter + def use_passphrase(self, use_passphrase): + """Sets the use_passphrase of this GenerateMnemonicRequest. + + + :param use_passphrase: The use_passphrase of this GenerateMnemonicRequest. # noqa: E501 + :type: bool + """ + + self._use_passphrase = use_passphrase + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GenerateMnemonicRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/http_error_response.py b/lib/skyhwd/skyhwd/models/http_error_response.py new file mode 100644 index 00000000..78e2b2c4 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/http_error_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class HTTPErrorResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'error': 'HTTPErrorResponseError' + } + + attribute_map = { + 'error': 'error' + } + + def __init__(self, error=None): # noqa: E501 + """HTTPErrorResponse - a model defined in OpenAPI""" # noqa: E501 + + self._error = None + self.discriminator = None + + if error is not None: + self.error = error + + @property + def error(self): + """Gets the error of this HTTPErrorResponse. # noqa: E501 + + + :return: The error of this HTTPErrorResponse. # noqa: E501 + :rtype: HTTPErrorResponseError + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this HTTPErrorResponse. + + + :param error: The error of this HTTPErrorResponse. # noqa: E501 + :type: HTTPErrorResponseError + """ + + self._error = error + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HTTPErrorResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/http_error_response_error.py b/lib/skyhwd/skyhwd/models/http_error_response_error.py new file mode 100644 index 00000000..b8d6e406 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/http_error_response_error.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class HTTPErrorResponseError(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'code': 'int', + 'message': 'str' + } + + attribute_map = { + 'code': 'code', + 'message': 'message' + } + + def __init__(self, code=None, message=None): # noqa: E501 + """HTTPErrorResponseError - a model defined in OpenAPI""" # noqa: E501 + + self._code = None + self._message = None + self.discriminator = None + + if code is not None: + self.code = code + if message is not None: + self.message = message + + @property + def code(self): + """Gets the code of this HTTPErrorResponseError. # noqa: E501 + + + :return: The code of this HTTPErrorResponseError. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this HTTPErrorResponseError. + + + :param code: The code of this HTTPErrorResponseError. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this HTTPErrorResponseError. # noqa: E501 + + + :return: The message of this HTTPErrorResponseError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this HTTPErrorResponseError. + + + :param message: The message of this HTTPErrorResponseError. # noqa: E501 + :type: str + """ + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HTTPErrorResponseError): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/http_success_response.py b/lib/skyhwd/skyhwd/models/http_success_response.py new file mode 100644 index 00000000..9910e0ca --- /dev/null +++ b/lib/skyhwd/skyhwd/models/http_success_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class HTTPSuccessResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'str' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """HTTPSuccessResponse - a model defined in OpenAPI""" # noqa: E501 + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this HTTPSuccessResponse. # noqa: E501 + + + :return: The data of this HTTPSuccessResponse. # noqa: E501 + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this HTTPSuccessResponse. + + + :param data: The data of this HTTPSuccessResponse. # noqa: E501 + :type: str + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HTTPSuccessResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/inline_response200.py b/lib/skyhwd/skyhwd/models/inline_response200.py new file mode 100644 index 00000000..86debfef --- /dev/null +++ b/lib/skyhwd/skyhwd/models/inline_response200.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class InlineResponse200(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'bool' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """InlineResponse200 - a model defined in OpenAPI""" # noqa: E501 + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this InlineResponse200. # noqa: E501 + + + :return: The data of this InlineResponse200. # noqa: E501 + :rtype: bool + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this InlineResponse200. + + + :param data: The data of this InlineResponse200. # noqa: E501 + :type: bool + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse200): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/passphrase_request.py b/lib/skyhwd/skyhwd/models/passphrase_request.py new file mode 100644 index 00000000..ce054536 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/passphrase_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PassphraseRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'passphrase': 'str' + } + + attribute_map = { + 'passphrase': 'passphrase' + } + + def __init__(self, passphrase=None): # noqa: E501 + """PassphraseRequest - a model defined in OpenAPI""" # noqa: E501 + + self._passphrase = None + self.discriminator = None + + self.passphrase = passphrase + + @property + def passphrase(self): + """Gets the passphrase of this PassphraseRequest. # noqa: E501 + + + :return: The passphrase of this PassphraseRequest. # noqa: E501 + :rtype: str + """ + return self._passphrase + + @passphrase.setter + def passphrase(self, passphrase): + """Sets the passphrase of this PassphraseRequest. + + + :param passphrase: The passphrase of this PassphraseRequest. # noqa: E501 + :type: str + """ + if passphrase is None: + raise ValueError("Invalid value for `passphrase`, must not be `None`") # noqa: E501 + + self._passphrase = passphrase + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PassphraseRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/pin_matrix_request.py b/lib/skyhwd/skyhwd/models/pin_matrix_request.py new file mode 100644 index 00000000..f857e265 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/pin_matrix_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PinMatrixRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'pin': 'str' + } + + attribute_map = { + 'pin': 'pin' + } + + def __init__(self, pin=None): # noqa: E501 + """PinMatrixRequest - a model defined in OpenAPI""" # noqa: E501 + + self._pin = None + self.discriminator = None + + self.pin = pin + + @property + def pin(self): + """Gets the pin of this PinMatrixRequest. # noqa: E501 + + + :return: The pin of this PinMatrixRequest. # noqa: E501 + :rtype: str + """ + return self._pin + + @pin.setter + def pin(self, pin): + """Sets the pin of this PinMatrixRequest. + + + :param pin: The pin of this PinMatrixRequest. # noqa: E501 + :type: str + """ + if pin is None: + raise ValueError("Invalid value for `pin`, must not be `None`") # noqa: E501 + + self._pin = pin + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PinMatrixRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/recovery_request.py b/lib/skyhwd/skyhwd/models/recovery_request.py new file mode 100644 index 00000000..c3e7ff7c --- /dev/null +++ b/lib/skyhwd/skyhwd/models/recovery_request.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class RecoveryRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'word_count': 'int', + 'use_passphrase': 'bool', + 'dry_run': 'bool' + } + + attribute_map = { + 'word_count': 'word_count', + 'use_passphrase': 'use_passphrase', + 'dry_run': 'dry_run' + } + + def __init__(self, word_count=None, use_passphrase=None, dry_run=None): # noqa: E501 + """RecoveryRequest - a model defined in OpenAPI""" # noqa: E501 + + self._word_count = None + self._use_passphrase = None + self._dry_run = None + self.discriminator = None + + self.word_count = word_count + if use_passphrase is not None: + self.use_passphrase = use_passphrase + if dry_run is not None: + self.dry_run = dry_run + + @property + def word_count(self): + """Gets the word_count of this RecoveryRequest. # noqa: E501 + + + :return: The word_count of this RecoveryRequest. # noqa: E501 + :rtype: int + """ + return self._word_count + + @word_count.setter + def word_count(self, word_count): + """Sets the word_count of this RecoveryRequest. + + + :param word_count: The word_count of this RecoveryRequest. # noqa: E501 + :type: int + """ + if word_count is None: + raise ValueError("Invalid value for `word_count`, must not be `None`") # noqa: E501 + + self._word_count = word_count + + @property + def use_passphrase(self): + """Gets the use_passphrase of this RecoveryRequest. # noqa: E501 + + + :return: The use_passphrase of this RecoveryRequest. # noqa: E501 + :rtype: bool + """ + return self._use_passphrase + + @use_passphrase.setter + def use_passphrase(self, use_passphrase): + """Sets the use_passphrase of this RecoveryRequest. + + + :param use_passphrase: The use_passphrase of this RecoveryRequest. # noqa: E501 + :type: bool + """ + + self._use_passphrase = use_passphrase + + @property + def dry_run(self): + """Gets the dry_run of this RecoveryRequest. # noqa: E501 + + + :return: The dry_run of this RecoveryRequest. # noqa: E501 + :rtype: bool + """ + return self._dry_run + + @dry_run.setter + def dry_run(self, dry_run): + """Sets the dry_run of this RecoveryRequest. + + + :param dry_run: The dry_run of this RecoveryRequest. # noqa: E501 + :type: bool + """ + + self._dry_run = dry_run + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RecoveryRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/set_mnemonic_request.py b/lib/skyhwd/skyhwd/models/set_mnemonic_request.py new file mode 100644 index 00000000..477cfbd0 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/set_mnemonic_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class SetMnemonicRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'mnemonic': 'str' + } + + attribute_map = { + 'mnemonic': 'mnemonic' + } + + def __init__(self, mnemonic=None): # noqa: E501 + """SetMnemonicRequest - a model defined in OpenAPI""" # noqa: E501 + + self._mnemonic = None + self.discriminator = None + + self.mnemonic = mnemonic + + @property + def mnemonic(self): + """Gets the mnemonic of this SetMnemonicRequest. # noqa: E501 + + + :return: The mnemonic of this SetMnemonicRequest. # noqa: E501 + :rtype: str + """ + return self._mnemonic + + @mnemonic.setter + def mnemonic(self, mnemonic): + """Sets the mnemonic of this SetMnemonicRequest. + + + :param mnemonic: The mnemonic of this SetMnemonicRequest. # noqa: E501 + :type: str + """ + if mnemonic is None: + raise ValueError("Invalid value for `mnemonic`, must not be `None`") # noqa: E501 + + self._mnemonic = mnemonic + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SetMnemonicRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/sign_message_request.py b/lib/skyhwd/skyhwd/models/sign_message_request.py new file mode 100644 index 00000000..ec9eb36f --- /dev/null +++ b/lib/skyhwd/skyhwd/models/sign_message_request.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class SignMessageRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'address_n': 'int', + 'message': 'str' + } + + attribute_map = { + 'address_n': 'address_n', + 'message': 'message' + } + + def __init__(self, address_n=None, message=None): # noqa: E501 + """SignMessageRequest - a model defined in OpenAPI""" # noqa: E501 + + self._address_n = None + self._message = None + self.discriminator = None + + self.address_n = address_n + self.message = message + + @property + def address_n(self): + """Gets the address_n of this SignMessageRequest. # noqa: E501 + + + :return: The address_n of this SignMessageRequest. # noqa: E501 + :rtype: int + """ + return self._address_n + + @address_n.setter + def address_n(self, address_n): + """Sets the address_n of this SignMessageRequest. + + + :param address_n: The address_n of this SignMessageRequest. # noqa: E501 + :type: int + """ + if address_n is None: + raise ValueError("Invalid value for `address_n`, must not be `None`") # noqa: E501 + + self._address_n = address_n + + @property + def message(self): + """Gets the message of this SignMessageRequest. # noqa: E501 + + + :return: The message of this SignMessageRequest. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this SignMessageRequest. + + + :param message: The message of this SignMessageRequest. # noqa: E501 + :type: str + """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SignMessageRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/sign_message_response.py b/lib/skyhwd/skyhwd/models/sign_message_response.py new file mode 100644 index 00000000..c09540d0 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/sign_message_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class SignMessageResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'str' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """SignMessageResponse - a model defined in OpenAPI""" # noqa: E501 + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this SignMessageResponse. # noqa: E501 + + + :return: The data of this SignMessageResponse. # noqa: E501 + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this SignMessageResponse. + + + :param data: The data of this SignMessageResponse. # noqa: E501 + :type: str + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SignMessageResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/transaction_input.py b/lib/skyhwd/skyhwd/models/transaction_input.py new file mode 100644 index 00000000..15755006 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/transaction_input.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TransactionInput(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'index': 'int', + 'hash': 'str' + } + + attribute_map = { + 'index': 'index', + 'hash': 'hash' + } + + def __init__(self, index=None, hash=None): # noqa: E501 + """TransactionInput - a model defined in OpenAPI""" # noqa: E501 + + self._index = None + self._hash = None + self.discriminator = None + + self.index = index + self.hash = hash + + @property + def index(self): + """Gets the index of this TransactionInput. # noqa: E501 + + + :return: The index of this TransactionInput. # noqa: E501 + :rtype: int + """ + return self._index + + @index.setter + def index(self, index): + """Sets the index of this TransactionInput. + + + :param index: The index of this TransactionInput. # noqa: E501 + :type: int + """ + if index is None: + raise ValueError("Invalid value for `index`, must not be `None`") # noqa: E501 + + self._index = index + + @property + def hash(self): + """Gets the hash of this TransactionInput. # noqa: E501 + + + :return: The hash of this TransactionInput. # noqa: E501 + :rtype: str + """ + return self._hash + + @hash.setter + def hash(self, hash): + """Sets the hash of this TransactionInput. + + + :param hash: The hash of this TransactionInput. # noqa: E501 + :type: str + """ + if hash is None: + raise ValueError("Invalid value for `hash`, must not be `None`") # noqa: E501 + + self._hash = hash + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionInput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/transaction_output.py b/lib/skyhwd/skyhwd/models/transaction_output.py new file mode 100644 index 00000000..286d5b2a --- /dev/null +++ b/lib/skyhwd/skyhwd/models/transaction_output.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TransactionOutput(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'address_index': 'int', + 'address': 'str', + 'coins': 'str', + 'hours': 'str' + } + + attribute_map = { + 'address_index': 'address_index', + 'address': 'address', + 'coins': 'coins', + 'hours': 'hours' + } + + def __init__(self, address_index=None, address=None, coins=None, hours=None): # noqa: E501 + """TransactionOutput - a model defined in OpenAPI""" # noqa: E501 + + self._address_index = None + self._address = None + self._coins = None + self._hours = None + self.discriminator = None + + self.address_index = address_index + self.address = address + self.coins = coins + self.hours = hours + + @property + def address_index(self): + """Gets the address_index of this TransactionOutput. # noqa: E501 + + + :return: The address_index of this TransactionOutput. # noqa: E501 + :rtype: int + """ + return self._address_index + + @address_index.setter + def address_index(self, address_index): + """Sets the address_index of this TransactionOutput. + + + :param address_index: The address_index of this TransactionOutput. # noqa: E501 + :type: int + """ + if address_index is None: + raise ValueError("Invalid value for `address_index`, must not be `None`") # noqa: E501 + + self._address_index = address_index + + @property + def address(self): + """Gets the address of this TransactionOutput. # noqa: E501 + + + :return: The address of this TransactionOutput. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this TransactionOutput. + + + :param address: The address of this TransactionOutput. # noqa: E501 + :type: str + """ + if address is None: + raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501 + + self._address = address + + @property + def coins(self): + """Gets the coins of this TransactionOutput. # noqa: E501 + + + :return: The coins of this TransactionOutput. # noqa: E501 + :rtype: str + """ + return self._coins + + @coins.setter + def coins(self, coins): + """Sets the coins of this TransactionOutput. + + + :param coins: The coins of this TransactionOutput. # noqa: E501 + :type: str + """ + if coins is None: + raise ValueError("Invalid value for `coins`, must not be `None`") # noqa: E501 + + self._coins = coins + + @property + def hours(self): + """Gets the hours of this TransactionOutput. # noqa: E501 + + + :return: The hours of this TransactionOutput. # noqa: E501 + :rtype: str + """ + return self._hours + + @hours.setter + def hours(self, hours): + """Sets the hours of this TransactionOutput. + + + :param hours: The hours of this TransactionOutput. # noqa: E501 + :type: str + """ + if hours is None: + raise ValueError("Invalid value for `hours`, must not be `None`") # noqa: E501 + + self._hours = hours + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionOutput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/transaction_sign_request.py b/lib/skyhwd/skyhwd/models/transaction_sign_request.py new file mode 100644 index 00000000..4ed0558d --- /dev/null +++ b/lib/skyhwd/skyhwd/models/transaction_sign_request.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TransactionSignRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'transaction_inputs': 'list[TransactionInput]', + 'transaction_outputs': 'list[TransactionOutput]' + } + + attribute_map = { + 'transaction_inputs': 'transaction_inputs', + 'transaction_outputs': 'transaction_outputs' + } + + def __init__(self, transaction_inputs=None, transaction_outputs=None): # noqa: E501 + """TransactionSignRequest - a model defined in OpenAPI""" # noqa: E501 + + self._transaction_inputs = None + self._transaction_outputs = None + self.discriminator = None + + self.transaction_inputs = transaction_inputs + self.transaction_outputs = transaction_outputs + + @property + def transaction_inputs(self): + """Gets the transaction_inputs of this TransactionSignRequest. # noqa: E501 + + + :return: The transaction_inputs of this TransactionSignRequest. # noqa: E501 + :rtype: list[TransactionInput] + """ + return self._transaction_inputs + + @transaction_inputs.setter + def transaction_inputs(self, transaction_inputs): + """Sets the transaction_inputs of this TransactionSignRequest. + + + :param transaction_inputs: The transaction_inputs of this TransactionSignRequest. # noqa: E501 + :type: list[TransactionInput] + """ + if transaction_inputs is None: + raise ValueError("Invalid value for `transaction_inputs`, must not be `None`") # noqa: E501 + + self._transaction_inputs = transaction_inputs + + @property + def transaction_outputs(self): + """Gets the transaction_outputs of this TransactionSignRequest. # noqa: E501 + + + :return: The transaction_outputs of this TransactionSignRequest. # noqa: E501 + :rtype: list[TransactionOutput] + """ + return self._transaction_outputs + + @transaction_outputs.setter + def transaction_outputs(self, transaction_outputs): + """Sets the transaction_outputs of this TransactionSignRequest. + + + :param transaction_outputs: The transaction_outputs of this TransactionSignRequest. # noqa: E501 + :type: list[TransactionOutput] + """ + if transaction_outputs is None: + raise ValueError("Invalid value for `transaction_outputs`, must not be `None`") # noqa: E501 + + self._transaction_outputs = transaction_outputs + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionSignRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/transaction_sign_response.py b/lib/skyhwd/skyhwd/models/transaction_sign_response.py new file mode 100644 index 00000000..a9c23a98 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/transaction_sign_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TransactionSignResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'list[str]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """TransactionSignResponse - a model defined in OpenAPI""" # noqa: E501 + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this TransactionSignResponse. # noqa: E501 + + + :return: The data of this TransactionSignResponse. # noqa: E501 + :rtype: list[str] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this TransactionSignResponse. + + + :param data: The data of this TransactionSignResponse. # noqa: E501 + :type: list[str] + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionSignResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/models/word_request.py b/lib/skyhwd/skyhwd/models/word_request.py new file mode 100644 index 00000000..a603cb65 --- /dev/null +++ b/lib/skyhwd/skyhwd/models/word_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class WordRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'word': 'str' + } + + attribute_map = { + 'word': 'word' + } + + def __init__(self, word=None): # noqa: E501 + """WordRequest - a model defined in OpenAPI""" # noqa: E501 + + self._word = None + self.discriminator = None + + self.word = word + + @property + def word(self): + """Gets the word of this WordRequest. # noqa: E501 + + + :return: The word of this WordRequest. # noqa: E501 + :rtype: str + """ + return self._word + + @word.setter + def word(self, word): + """Sets the word of this WordRequest. + + + :param word: The word of this WordRequest. # noqa: E501 + :type: str + """ + if word is None: + raise ValueError("Invalid value for `word`, must not be `None`") # noqa: E501 + + self._word = word + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WordRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/lib/skyhwd/skyhwd/rest.py b/lib/skyhwd/skyhwd/rest.py new file mode 100644 index 00000000..3c790875 --- /dev/null +++ b/lib/skyhwd/skyhwd/rest.py @@ -0,0 +1,323 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import io +import json +import logging +import re +import ssl + +import certifi +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import urlencode + +try: + import urllib3 +except ImportError: + raise ImportError('OpenAPI Python client requires urllib3.') + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # In the python 3, the response.data is bytes. + # we need to decode it to string. + if six.PY3: + r.data = r.data.decode('utf8') + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + +class ApiException(Exception): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message diff --git a/lib/skyhwd/test-requirements.txt b/lib/skyhwd/test-requirements.txt new file mode 100644 index 00000000..2702246c --- /dev/null +++ b/lib/skyhwd/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/lib/skyhwd/test/__init__.py b/lib/skyhwd/test/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/lib/skyhwd/test/test_apply_settings_request.py b/lib/skyhwd/test/test_apply_settings_request.py new file mode 100644 index 00000000..25db1788 --- /dev/null +++ b/lib/skyhwd/test/test_apply_settings_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.apply_settings_request import ApplySettingsRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestApplySettingsRequest(unittest.TestCase): + """ApplySettingsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplySettingsRequest(self): + """Test ApplySettingsRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.apply_settings_request.ApplySettingsRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_check_message_signature_request.py b/lib/skyhwd/test/test_check_message_signature_request.py new file mode 100644 index 00000000..6a9a5fd8 --- /dev/null +++ b/lib/skyhwd/test/test_check_message_signature_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.check_message_signature_request import CheckMessageSignatureRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestCheckMessageSignatureRequest(unittest.TestCase): + """CheckMessageSignatureRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCheckMessageSignatureRequest(self): + """Test CheckMessageSignatureRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.check_message_signature_request.CheckMessageSignatureRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_csrf_response.py b/lib/skyhwd/test/test_csrf_response.py new file mode 100644 index 00000000..a7f4722f --- /dev/null +++ b/lib/skyhwd/test/test_csrf_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.csrf_response import CSRFResponse # noqa: E501 +from skyhwd.rest import ApiException + + +class TestCSRFResponse(unittest.TestCase): + """CSRFResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCSRFResponse(self): + """Test CSRFResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.csrf_response.CSRFResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_default_api.py b/lib/skyhwd/test/test_default_api.py new file mode 100644 index 00000000..721cc3f0 --- /dev/null +++ b/lib/skyhwd/test/test_default_api.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.api.default_api import DefaultApi # noqa: E501 +from skyhwd.rest import ApiException + + +class TestDefaultApi(unittest.TestCase): + """DefaultApi unit test stubs""" + + def setUp(self): + self.api = skyhwd.api.default_api.DefaultApi() # noqa: E501 + + def tearDown(self): + pass + + def test_apply_settings_post(self): + """Test case for apply_settings_post + + """ + pass + + def test_backup_post(self): + """Test case for backup_post + + """ + pass + + def test_cancel_put(self): + """Test case for cancel_put + + """ + pass + + def test_check_message_signature_post(self): + """Test case for check_message_signature_post + + """ + pass + + def test_connected_get(self): + """Test case for connected_get + + """ + pass + + def test_csrf_get(self): + """Test case for csrf_get + + """ + pass + + def test_features_get(self): + """Test case for features_get + + """ + pass + + def test_firmware_update_put(self): + """Test case for firmware_update_put + + """ + pass + + def test_generate_addresses_post(self): + """Test case for generate_addresses_post + + """ + pass + + def test_generate_mnemonic_post(self): + """Test case for generate_mnemonic_post + + """ + pass + + def test_intermediate_passphrase_post(self): + """Test case for intermediate_passphrase_post + + """ + pass + + def test_intermediate_pin_matrix_post(self): + """Test case for intermediate_pin_matrix_post + + """ + pass + + def test_intermediate_word_post(self): + """Test case for intermediate_word_post + + """ + pass + + def test_recovery_post(self): + """Test case for recovery_post + + """ + pass + + def test_set_mnemonic_post(self): + """Test case for set_mnemonic_post + + """ + pass + + def test_set_pin_code_post(self): + """Test case for set_pin_code_post + + """ + pass + + def test_sign_message_post(self): + """Test case for sign_message_post + + """ + pass + + def test_transaction_sign_post(self): + """Test case for transaction_sign_post + + """ + pass + + def test_wipe_delete(self): + """Test case for wipe_delete + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_features_response.py b/lib/skyhwd/test/test_features_response.py new file mode 100644 index 00000000..0d8b573a --- /dev/null +++ b/lib/skyhwd/test/test_features_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.features_response import FeaturesResponse # noqa: E501 +from skyhwd.rest import ApiException + + +class TestFeaturesResponse(unittest.TestCase): + """FeaturesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFeaturesResponse(self): + """Test FeaturesResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.features_response.FeaturesResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_features_response_data.py b/lib/skyhwd/test/test_features_response_data.py new file mode 100644 index 00000000..865d70c2 --- /dev/null +++ b/lib/skyhwd/test/test_features_response_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.features_response_data import FeaturesResponseData # noqa: E501 +from skyhwd.rest import ApiException + + +class TestFeaturesResponseData(unittest.TestCase): + """FeaturesResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFeaturesResponseData(self): + """Test FeaturesResponseData""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.features_response_data.FeaturesResponseData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_generate_addresses_request.py b/lib/skyhwd/test/test_generate_addresses_request.py new file mode 100644 index 00000000..b0bb2993 --- /dev/null +++ b/lib/skyhwd/test/test_generate_addresses_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.generate_addresses_request import GenerateAddressesRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestGenerateAddressesRequest(unittest.TestCase): + """GenerateAddressesRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGenerateAddressesRequest(self): + """Test GenerateAddressesRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.generate_addresses_request.GenerateAddressesRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_generate_addresses_response.py b/lib/skyhwd/test/test_generate_addresses_response.py new file mode 100644 index 00000000..d2f6f85c --- /dev/null +++ b/lib/skyhwd/test/test_generate_addresses_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.generate_addresses_response import GenerateAddressesResponse # noqa: E501 +from skyhwd.rest import ApiException + + +class TestGenerateAddressesResponse(unittest.TestCase): + """GenerateAddressesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGenerateAddressesResponse(self): + """Test GenerateAddressesResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.generate_addresses_response.GenerateAddressesResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_generate_mnemonic_request.py b/lib/skyhwd/test/test_generate_mnemonic_request.py new file mode 100644 index 00000000..8d9359a5 --- /dev/null +++ b/lib/skyhwd/test/test_generate_mnemonic_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.generate_mnemonic_request import GenerateMnemonicRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestGenerateMnemonicRequest(unittest.TestCase): + """GenerateMnemonicRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGenerateMnemonicRequest(self): + """Test GenerateMnemonicRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.generate_mnemonic_request.GenerateMnemonicRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_http_error_response.py b/lib/skyhwd/test/test_http_error_response.py new file mode 100644 index 00000000..2094cfce --- /dev/null +++ b/lib/skyhwd/test/test_http_error_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.http_error_response import HTTPErrorResponse # noqa: E501 +from skyhwd.rest import ApiException + + +class TestHTTPErrorResponse(unittest.TestCase): + """HTTPErrorResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHTTPErrorResponse(self): + """Test HTTPErrorResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.http_error_response.HTTPErrorResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_http_error_response_error.py b/lib/skyhwd/test/test_http_error_response_error.py new file mode 100644 index 00000000..187cac3e --- /dev/null +++ b/lib/skyhwd/test/test_http_error_response_error.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.http_error_response_error import HTTPErrorResponseError # noqa: E501 +from skyhwd.rest import ApiException + + +class TestHTTPErrorResponseError(unittest.TestCase): + """HTTPErrorResponseError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHTTPErrorResponseError(self): + """Test HTTPErrorResponseError""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.http_error_response_error.HTTPErrorResponseError() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_http_success_response.py b/lib/skyhwd/test/test_http_success_response.py new file mode 100644 index 00000000..d21ea147 --- /dev/null +++ b/lib/skyhwd/test/test_http_success_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.http_success_response import HTTPSuccessResponse # noqa: E501 +from skyhwd.rest import ApiException + + +class TestHTTPSuccessResponse(unittest.TestCase): + """HTTPSuccessResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHTTPSuccessResponse(self): + """Test HTTPSuccessResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.http_success_response.HTTPSuccessResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_inline_response200.py b/lib/skyhwd/test/test_inline_response200.py new file mode 100644 index 00000000..eb367708 --- /dev/null +++ b/lib/skyhwd/test/test_inline_response200.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.inline_response200 import InlineResponse200 # noqa: E501 +from skyhwd.rest import ApiException + + +class TestInlineResponse200(unittest.TestCase): + """InlineResponse200 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse200(self): + """Test InlineResponse200""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.inline_response200.InlineResponse200() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_passphrase_request.py b/lib/skyhwd/test/test_passphrase_request.py new file mode 100644 index 00000000..792357a0 --- /dev/null +++ b/lib/skyhwd/test/test_passphrase_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.passphrase_request import PassphraseRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestPassphraseRequest(unittest.TestCase): + """PassphraseRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPassphraseRequest(self): + """Test PassphraseRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.passphrase_request.PassphraseRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_pin_matrix_request.py b/lib/skyhwd/test/test_pin_matrix_request.py new file mode 100644 index 00000000..f1424159 --- /dev/null +++ b/lib/skyhwd/test/test_pin_matrix_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.pin_matrix_request import PinMatrixRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestPinMatrixRequest(unittest.TestCase): + """PinMatrixRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPinMatrixRequest(self): + """Test PinMatrixRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.pin_matrix_request.PinMatrixRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_recovery_request.py b/lib/skyhwd/test/test_recovery_request.py new file mode 100644 index 00000000..d033e794 --- /dev/null +++ b/lib/skyhwd/test/test_recovery_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.recovery_request import RecoveryRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestRecoveryRequest(unittest.TestCase): + """RecoveryRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRecoveryRequest(self): + """Test RecoveryRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.recovery_request.RecoveryRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_set_mnemonic_request.py b/lib/skyhwd/test/test_set_mnemonic_request.py new file mode 100644 index 00000000..a3efe2ab --- /dev/null +++ b/lib/skyhwd/test/test_set_mnemonic_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.set_mnemonic_request import SetMnemonicRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestSetMnemonicRequest(unittest.TestCase): + """SetMnemonicRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSetMnemonicRequest(self): + """Test SetMnemonicRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.set_mnemonic_request.SetMnemonicRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_sign_message_request.py b/lib/skyhwd/test/test_sign_message_request.py new file mode 100644 index 00000000..9490d1d8 --- /dev/null +++ b/lib/skyhwd/test/test_sign_message_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.sign_message_request import SignMessageRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestSignMessageRequest(unittest.TestCase): + """SignMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSignMessageRequest(self): + """Test SignMessageRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.sign_message_request.SignMessageRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_sign_message_response.py b/lib/skyhwd/test/test_sign_message_response.py new file mode 100644 index 00000000..54fa95ac --- /dev/null +++ b/lib/skyhwd/test/test_sign_message_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.sign_message_response import SignMessageResponse # noqa: E501 +from skyhwd.rest import ApiException + + +class TestSignMessageResponse(unittest.TestCase): + """SignMessageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSignMessageResponse(self): + """Test SignMessageResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.sign_message_response.SignMessageResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_transaction_input.py b/lib/skyhwd/test/test_transaction_input.py new file mode 100644 index 00000000..eed62214 --- /dev/null +++ b/lib/skyhwd/test/test_transaction_input.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.transaction_input import TransactionInput # noqa: E501 +from skyhwd.rest import ApiException + + +class TestTransactionInput(unittest.TestCase): + """TransactionInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionInput(self): + """Test TransactionInput""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.transaction_input.TransactionInput() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_transaction_output.py b/lib/skyhwd/test/test_transaction_output.py new file mode 100644 index 00000000..a818f8a2 --- /dev/null +++ b/lib/skyhwd/test/test_transaction_output.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.transaction_output import TransactionOutput # noqa: E501 +from skyhwd.rest import ApiException + + +class TestTransactionOutput(unittest.TestCase): + """TransactionOutput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionOutput(self): + """Test TransactionOutput""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.transaction_output.TransactionOutput() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_transaction_sign_request.py b/lib/skyhwd/test/test_transaction_sign_request.py new file mode 100644 index 00000000..ee7279c0 --- /dev/null +++ b/lib/skyhwd/test/test_transaction_sign_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.transaction_sign_request import TransactionSignRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestTransactionSignRequest(unittest.TestCase): + """TransactionSignRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionSignRequest(self): + """Test TransactionSignRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.transaction_sign_request.TransactionSignRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_transaction_sign_response.py b/lib/skyhwd/test/test_transaction_sign_response.py new file mode 100644 index 00000000..f214c317 --- /dev/null +++ b/lib/skyhwd/test/test_transaction_sign_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.transaction_sign_response import TransactionSignResponse # noqa: E501 +from skyhwd.rest import ApiException + + +class TestTransactionSignResponse(unittest.TestCase): + """TransactionSignResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionSignResponse(self): + """Test TransactionSignResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.transaction_sign_response.TransactionSignResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/test/test_word_request.py b/lib/skyhwd/test/test_word_request.py new file mode 100644 index 00000000..4d1da541 --- /dev/null +++ b/lib/skyhwd/test/test_word_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Hardware Wallet Daemon API + + This is the hardware-wallet-daemon API # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: steve@skycoin.net + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import skyhwd +from skyhwd.models.word_request import WordRequest # noqa: E501 +from skyhwd.rest import ApiException + + +class TestWordRequest(unittest.TestCase): + """WordRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWordRequest(self): + """Test WordRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = skyhwd.models.word_request.WordRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/skyhwd/tox.ini b/lib/skyhwd/tox.ini new file mode 100644 index 00000000..3d0be613 --- /dev/null +++ b/lib/skyhwd/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py27, py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + nosetests \ + []