Skip to content

Commit

Permalink
[skyhwd] refs #126 Added Python Wrapper for HWallet Deamon
Browse files Browse the repository at this point in the history
  • Loading branch information
stdevMac committed Apr 11, 2019
1 parent 21c7b83 commit 1683150
Show file tree
Hide file tree
Showing 178 changed files with 18,466 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .lib/skyhwd/.gitignore
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions .lib/skyhwd/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .lib/skyhwd/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.4
14 changes: 14 additions & 0 deletions .lib/skyhwd/.travis.yml
Original file line number Diff line number Diff line change
@@ -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
140 changes: 140 additions & 0 deletions .lib/skyhwd/README.md
Original file line number Diff line number Diff line change
@@ -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

[email protected]


11 changes: 11 additions & 0 deletions .lib/skyhwd/docs/ApplySettingsRequest.md
Original file line number Diff line number Diff line change
@@ -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)


10 changes: 10 additions & 0 deletions .lib/skyhwd/docs/CSRFResponse.md
Original file line number Diff line number Diff line change
@@ -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)


12 changes: 12 additions & 0 deletions .lib/skyhwd/docs/CheckMessageSignatureRequest.md
Original file line number Diff line number Diff line change
@@ -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)


Loading

0 comments on commit 1683150

Please sign in to comment.