Skip to content

Commit

Permalink
Merge pull request #168 from simelo/release-0.26.0
Browse files Browse the repository at this point in the history
Release 0.26.0
  • Loading branch information
olemis authored Sep 9, 2019
2 parents 66be956 + 9b27bd4 commit 8851c3b
Show file tree
Hide file tree
Showing 167 changed files with 8,893 additions and 4,217 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
version: 18.06.0-ce
docker_layer_caching: true
- run: docker build --build-arg URL_DEPLOY=https://test.pypi.org/legacy/ --build-arg PYPI_USER=pyskycoin --build-arg PYPI_PASSWD="prerelease_0.X" --build-arg GO_ARCH=386 --build-arg ARCH=i686 --file $GOPATH/src/github.com/skycoin/pyskycoin/docker/images/deploy/Dockerfile $GOPATH/src/github.com/skycoin/pyskycoin -t skydev-test

manylinuxarmv7:
docker:
- image: circleci/golang:1.12
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
version: 18.06.0-ce
docker_layer_caching: true
- run: cd $GOPATH/src/github.com/skycoin/pyskycoin/.circleci && bash deploy.sh

workflows:
version: 2
arm_test:
Expand Down
1 change: 1 addition & 0 deletions .travis/install-osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ export PYCMD_PATH="$(pyenv which python${PYCMD_VERSION})"
export PYCMD_DIRPATH="$( dirname ${PYCMD_PATH} )"
export PATH="${PYCMD_DIRPATH}:/Users/travis/.pyenv/shims:${PATH}"

eval "python${PYCMD_VERSION} -m pip install setuptools_scm"
eval "python${PYCMD_VERSION} -m pip install --upgrade pip setuptools wheel tox tox-pyenv pytest pytest-runner pylint autopep8"

13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## PySkycoin 0.26.0 - 2019/09/06

### Added

- Updated `skyapi`, a wrapper for Skycoin node REST API at version 0.26.0
- Export functions in Skycoin 0.26.0 core API's

### Fixed

### Removed

### Known issues

## PySkycoin 0.25.1 - 2019/06/15

### Added
Expand Down
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ else ifeq ($(shell uname -s),Darwin)
endif

configure: ## Configure build environment
echo "Configure build environment"
mkdir -p $(BUILD_DIR)/usr/tmp $(BUILD_DIR)/usr/lib $(BUILD_DIR)/usr/include
mkdir -p $(BUILDLIBC_DIR) $(BIN_DIR) $(INCLUDE_DIR)
mkdir -p $(DIST_DIR)


build-libc: configure ## Build libskycoin C client library
echo "Build libskycoin C client library"
GOPATH="$(REPO_ROOT)/$(GOPATH_DIR)" make -C $(SKYLIBC_DIR) clean-libc
GOPATH="$(REPO_ROOT)/$(GOPATH_DIR)" make -C $(SKYLIBC_DIR) build-libc
rm -f swig/include/libskycoin.h
Expand All @@ -53,6 +55,7 @@ build-libc: configure ## Build libskycoin C client library
grep -v _Complex $(SKYLIBC_DIR)/include/libskycoin.h > swig/include/libskycoin.h

build-swig: ## Generate Python C module from SWIG interfaces
echo "Generate Python C module from SWIG interfaces"
#Generate structs.i from skytypes.gen.h
rm -f $(LIBSWIG_DIR)/structs.i
cp $(INCLUDE_DIR)/skytypes.gen.h $(LIBSWIG_DIR)/structs.i
Expand All @@ -63,7 +66,7 @@ build-swig: ## Generate Python C module from SWIG interfaces
sed -i 's/#/%/g' $(LIBSWIG_DIR)/structs.i ;\
fi \
}
rm -f ./skycoin/skycoin.py
rm -fv skycoin/skycoin.py
rm -f swig/pyskycoin_wrap.c
rm -f swig/include/swig.h
swig -python -w501,505,401,302,509,451 -Iswig/include -I$(INCLUDE_DIR) -outdir ./skycoin/ -o swig/pyskycoin_wrap.c $(LIBSWIG_DIR)/pyskycoin.i
Expand All @@ -82,10 +85,15 @@ test-ci: build-libc build-swig develop ## Run tests on (Travis) CI build
tox
(cd $(PYTHON_CLIENT_DIR) && tox)

test: build-libc build-swig develop ## Run project test suite
$(PYTHON_BIN) setup.py test
test-skyapi: build-libc build-swig develop ## Run project test suite by skyapi
(cd $(PYTHON_CLIENT_DIR) && $(PYTHON_BIN) setup.py test)

test-libsky: build-libc build-swig develop ## Run project test suite by pyskycoin
echo "Run project test suite by pyskycoin"
$(PYTHON_BIN) setup.py test

test: test-skyapi test-libsky ## Run project test suite

sdist: ## Create source distribution archive
$(PYTHON_BIN) setup.py sdist --formats=gztar
(cd $(PYTHON_CLIENT_DIR) && $(PYTHON_BIN) setup.py sdist --formats=gztar)
Expand Down Expand Up @@ -134,10 +142,8 @@ lint: ## Linter to pylint

clean: #Clean all
make -C $(SKYLIBC_DIR) clean-libc
python -m pip uninstall pyskycoin
python3 -m pip uninstall pyskycoin
python -m pip uninstall skyapi
python3 -m pip uninstall skyapi
$(PYTHON_BIN) -m pip uninstall pyskycoin
$(PYTHON_BIN) -m pip uninstall skyapi
rm -rfv tests/__pycache__
rm -rfv skycoin/__pycache__
rm -rfv skycoin/*.pyc
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PySkycoin

[![Build Status](https://travis-ci.org/skycoin/pyskycoin.svg?branch=develop)](https://travis-ci.org/skycoin/pyskycoin)
[![Build Status](https://travis-ci.com/skycoin/pyskycoin.svg?branch=develop)](https://travis-ci.com/skycoin/pyskycoin)

Python extension for Skycoin API.
A Python extension generated with SWIG to access Skycoin API from Python.
Expand Down Expand Up @@ -165,6 +165,16 @@ for seckey in seckeys:
assert err == skycoin.SKY_OK
```

## Example of how to verify address

```python
def addressIsValid(addr):
addres = skycoin.cipher__Address()
err = skycoin.SKY_cipher_DecodeBase58Address(addr, addres)
return err != skycoin.SKY_OK
```


### Memory Management

Memory management is transparent to the user. Any object allocated inside the library is left to be managed by Python garbage collector.
Expand Down
38 changes: 6 additions & 32 deletions docker/images/deploy/Dockerfile-arm
Original file line number Diff line number Diff line change
@@ -1,56 +1,31 @@
ARG ARCH
FROM balenalib/${ARCH}-debian-golang
ARG URL_DEPLOY
ARG PYPI_USER
ARG PYPI_PASSWD

ARG GITHUB_OAUTH_TOKEN
ARG PROJECT_USERNAME
ARG PROJECT_REPONAME
ARG SHA1
ARG VERSION
RUN [ "cross-build-start" ]
FROM balenalib/armv7hf-debian-golang

RUN [ "cross-build-start" ]
RUN mkdir -p /io

ADD . /io

# Install Python 2.7/3.5 runtime and development tools
RUN set -ex \
&& apt update \
&& apt install -y --force-yes \
python3 \
python3-dev \
python-dev \
wget \
curl \
libpcre3-dev \
python-pip \
python3-pip \
python-setuptools \
python3-setuptools \
python3-venv \
python-wheel \
python3-wheel \
make \
cmake \
ca-certificates \
libexpat1 \
libffi6 \
libreadline7 \
libsqlite3-0 \
libssl1.1 \
netbase \
swig

# Install packages in PIP_PACKAGES

# Python 2.7
RUN pip install --upgrade setuptools tox-travis wheel

# Python 3.5
RUN pip3 install --upgrade setuptools tox-travis wheel



ENV CGO_ENABLE=1

RUN go version
Expand All @@ -60,14 +35,13 @@ RUN cd /io && git submodule update --init --recursive
RUN make -C /io/gopath/src/github.com/skycoin/libskycoin dep
RUN make -C /io build-libc
RUN make -C /io build-swig
RUN mkdir -p /io/wheelhouse
RUN sh /io/.circleci/circle_wheels_arm.sh

RUN ls /io/wheelhouse
RUN mkdir -p /io/dist
RUN cp -v /io/wheelhouse/* /io/dist
RUN pip install twine
ENV TWINE_PATH=twine
RUN bash /io/.circleci/upload_pypi.sh
RUN twine upload -u pyskycoin -p "prerelease_0.X" --skip-existing --repository-url https://test.pypi.org/legacy/ /io/dist/*

RUN [ "cross-build-end" ]

Expand Down
2 changes: 1 addition & 1 deletion gopath/src/github.com/skycoin/libskycoin
Submodule libskycoin updated 1072 files
14 changes: 0 additions & 14 deletions lib/skyapi/.travis.yml

This file was deleted.

65 changes: 45 additions & 20 deletions lib/skyapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Skycoin is a next-generation cryptocurrency.

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 0.25.1
- API version: 0.26.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [http://127.0.0.1:6420](http://127.0.0.1:6420)
For more information, please visit [https://skycoin.net](https://skycoin.net)

## Requirements.

Expand Down Expand Up @@ -73,17 +73,20 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**address_count**](docs/DefaultApi.md#address_count) | **GET** /api/v1/addresscount | Returns the total number of unique address that have coins.
*DefaultApi* | [**address_uxouts**](docs/DefaultApi.md#address_uxouts) | **GET** /api/v1/address_uxouts |
*DefaultApi* | [**api_v1_rawtx_get**](docs/DefaultApi.md#api_v1_rawtx_get) | **GET** /api/v1/rawtx |
*DefaultApi* | [**api_v2_metrics_get**](docs/DefaultApi.md#api_v2_metrics_get) | **GET** /api/v2/metrics |
*DefaultApi* | [**balance_get**](docs/DefaultApi.md#balance_get) | **GET** /api/v1/balance | Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
*DefaultApi* | [**balance_post**](docs/DefaultApi.md#balance_post) | **POST** /api/v1/balance | Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
*DefaultApi* | [**block**](docs/DefaultApi.md#block) | **GET** /api/v1/block |
*DefaultApi* | [**block**](docs/DefaultApi.md#block) | **GET** /api/v1/block | Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
*DefaultApi* | [**blockchain_metadata**](docs/DefaultApi.md#blockchain_metadata) | **GET** /api/v1/blockchain/metadata | Returns the blockchain metadata.
*DefaultApi* | [**blockchain_progress**](docs/DefaultApi.md#blockchain_progress) | **GET** /api/v1/blockchain/progress | Returns the blockchain sync progress.
*DefaultApi* | [**blocks_get**](docs/DefaultApi.md#blocks_get) | **GET** /api/v1/blocks | blocksHandler returns blocks between a start and end point,
*DefaultApi* | [**blocks_post**](docs/DefaultApi.md#blocks_post) | **POST** /api/v1/blocks | blocksHandler returns blocks between a start and end point,
*DefaultApi* | [**blocks**](docs/DefaultApi.md#blocks) | **GET** /api/v1/blocks | Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
*DefaultApi* | [**coin_supply**](docs/DefaultApi.md#coin_supply) | **GET** /api/v1/coinSupply |
*DefaultApi* | [**csrf**](docs/DefaultApi.md#csrf) | **GET** /api/v1/csrf | Creates a new CSRF token. Previous CSRF tokens are invalidated by this call.
*DefaultApi* | [**data_delete**](docs/DefaultApi.md#data_delete) | **DELETE** /api/v2/data |
*DefaultApi* | [**data_get**](docs/DefaultApi.md#data_get) | **GET** /api/v2/data |
*DefaultApi* | [**data_post**](docs/DefaultApi.md#data_post) | **POST** /api/v2/data |
*DefaultApi* | [**default_connections**](docs/DefaultApi.md#default_connections) | **GET** /api/v1/network/defaultConnections | defaultConnectionsHandler returns the list of default hardcoded bootstrap addresses.\\n They are not necessarily connected to.
*DefaultApi* | [**explorer_address**](docs/DefaultApi.md#explorer_address) | **GET** /api/v1/explorer/address |
*DefaultApi* | [**health**](docs/DefaultApi.md#health) | **GET** /api/v1/health | Returns node health data.
*DefaultApi* | [**last_blocks**](docs/DefaultApi.md#last_blocks) | **GET** /api/v1/last_blocks |
*DefaultApi* | [**network_connection**](docs/DefaultApi.md#network_connection) | **GET** /api/v1/network/connection | This endpoint returns a specific connection.
Expand All @@ -97,7 +100,9 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**resend_unconfirmed_txns**](docs/DefaultApi.md#resend_unconfirmed_txns) | **POST** /api/v1/resendUnconfirmedTxns |
*DefaultApi* | [**richlist**](docs/DefaultApi.md#richlist) | **GET** /api/v1/richlist | Returns the top skycoin holders.
*DefaultApi* | [**transaction**](docs/DefaultApi.md#transaction) | **GET** /api/v1/transaction |
*DefaultApi* | [**transaction_inject**](docs/DefaultApi.md#transaction_inject) | **POST** /api/v2/transaction/inject | Broadcast a hex-encoded, serialized transaction to the network.
*DefaultApi* | [**transaction_inject**](docs/DefaultApi.md#transaction_inject) | **POST** /api/v1/injectTransaction | Broadcast a hex-encoded, serialized transaction to the network.
*DefaultApi* | [**transaction_post**](docs/DefaultApi.md#transaction_post) | **POST** /api/v2/transaction |
*DefaultApi* | [**transaction_post_unspent**](docs/DefaultApi.md#transaction_post_unspent) | **POST** /api/v2/transaction/unspent |
*DefaultApi* | [**transaction_raw**](docs/DefaultApi.md#transaction_raw) | **GET** /api/v2/transaction/raw | Returns the hex-encoded byte serialization of a transaction. The transaction may be confirmed or unconfirmed.
*DefaultApi* | [**transaction_verify**](docs/DefaultApi.md#transaction_verify) | **POST** /api/v2/transaction/verify |
*DefaultApi* | [**transactions_get**](docs/DefaultApi.md#transactions_get) | **GET** /api/v1/transactions | Returns transactions that match the filters.
Expand All @@ -116,8 +121,8 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**wallet_recover**](docs/DefaultApi.md#wallet_recover) | **POST** /api/v2/wallet/recover | Recovers an encrypted wallet by providing the seed. The first address will be generated from seed and compared to the first address of the specified wallet. If they match, the wallet will be regenerated with an optional password. If the wallet is not encrypted, an error is returned.
*DefaultApi* | [**wallet_seed**](docs/DefaultApi.md#wallet_seed) | **POST** /api/v1/wallet/seed | This endpoint only works for encrypted wallets. If the wallet is unencrypted, The seed will be not returned.
*DefaultApi* | [**wallet_seed_verify**](docs/DefaultApi.md#wallet_seed_verify) | **POST** /api/v2/wallet/seed/verify | Verifies a wallet seed.
*DefaultApi* | [**wallet_spent**](docs/DefaultApi.md#wallet_spent) | **POST** /api/v1/wallet/spend |
*DefaultApi* | [**wallet_transaction**](docs/DefaultApi.md#wallet_transaction) | **POST** /api/v1/wallet/transaction |
*DefaultApi* | [**wallet_transaction**](docs/DefaultApi.md#wallet_transaction) | **POST** /api/v1/wallet/transaction | Creates a signed transaction
*DefaultApi* | [**wallet_transaction_sign**](docs/DefaultApi.md#wallet_transaction_sign) | **POST** /api/v2/wallet/transaction/sign | Creates a signed transaction
*DefaultApi* | [**wallet_transactions**](docs/DefaultApi.md#wallet_transactions) | **GET** /api/v1/wallet/transactions |
*DefaultApi* | [**wallet_unload**](docs/DefaultApi.md#wallet_unload) | **POST** /api/v1/wallet/unload | Unloads wallet from the wallet service.
*DefaultApi* | [**wallet_update**](docs/DefaultApi.md#wallet_update) | **POST** /api/v1/wallet/update | Update the wallet.
Expand All @@ -126,27 +131,47 @@ Class | Method | HTTP request | Description

## Documentation For Models

- [ApiV1ExplorerAddressInputs](docs/ApiV1ExplorerAddressInputs.md)
- [ApiV1ExplorerAddressOutputs](docs/ApiV1ExplorerAddressOutputs.md)
- [ApiV1ExplorerAddressStatus](docs/ApiV1ExplorerAddressStatus.md)
- [Address](docs/Address.md)
- [ApiV1PendingTxsTransaction](docs/ApiV1PendingTxsTransaction.md)
- [ApiV1WalletTransactionHoursSelection](docs/ApiV1WalletTransactionHoursSelection.md)
- [ApiV1WalletTransactionTo](docs/ApiV1WalletTransactionTo.md)
- [ApiV1WalletTransactionWallet](docs/ApiV1WalletTransactionWallet.md)
- [ApiV1WalletsEntries](docs/ApiV1WalletsEntries.md)
- [ApiV1WalletsMeta](docs/ApiV1WalletsMeta.md)
- [InlineObject](docs/InlineObject.md)
- [ApiV1PendingTxsTransactionOutputs](docs/ApiV1PendingTxsTransactionOutputs.md)
- [BlockSchema](docs/BlockSchema.md)
- [BlockSchemaBody](docs/BlockSchemaBody.md)
- [BlockVerboseSchema](docs/BlockVerboseSchema.md)
- [BlockVerboseSchemaBody](docs/BlockVerboseSchemaBody.md)
- [BlockVerboseSchemaHeader](docs/BlockVerboseSchemaHeader.md)
- [InlineResponse200](docs/InlineResponse200.md)
- [InlineResponse2001](docs/InlineResponse2001.md)
- [InlineResponse20010](docs/InlineResponse20010.md)
- [InlineResponse2002](docs/InlineResponse2002.md)
- [InlineResponse2003](docs/InlineResponse2003.md)
- [InlineResponse2003UnconfirmedVerifyTransaction](docs/InlineResponse2003UnconfirmedVerifyTransaction.md)
- [InlineResponse2004](docs/InlineResponse2004.md)
- [InlineResponse2005](docs/InlineResponse2005.md)
- [InlineResponse2006](docs/InlineResponse2006.md)
- [InlineResponse2007](docs/InlineResponse2007.md)
- [InlineResponse2007Data](docs/InlineResponse2007Data.md)
- [InlineResponse2008](docs/InlineResponse2008.md)
- [InlineResponse2008Data](docs/InlineResponse2008Data.md)
- [InlineResponse2009](docs/InlineResponse2009.md)
- [InlineResponseDefault](docs/InlineResponseDefault.md)
- [NetworkConnectionSchema](docs/NetworkConnectionSchema.md)
- [NetworkConnectionSchemaUnconfirmedVerifyTransaction](docs/NetworkConnectionSchemaUnconfirmedVerifyTransaction.md)
- [Transaction](docs/Transaction.md)
- [TransactionEncoded](docs/TransactionEncoded.md)
- [TransactionEncodedS](docs/TransactionEncodedS.md)
- [TransactionStatus](docs/TransactionStatus.md)
- [TransactionTxn](docs/TransactionTxn.md)
- [TransactionV2ParamsAddress](docs/TransactionV2ParamsAddress.md)
- [TransactionV2ParamsAddressHoursSelection](docs/TransactionV2ParamsAddressHoursSelection.md)
- [TransactionV2ParamsUnspent](docs/TransactionV2ParamsUnspent.md)
- [TransactionV2ParamsUnspentHoursSelection](docs/TransactionV2ParamsUnspentHoursSelection.md)
- [TransactionV2ParamsUnspentTo](docs/TransactionV2ParamsUnspentTo.md)
- [TransactionVerbose](docs/TransactionVerbose.md)
- [TransactionVerboseTxn](docs/TransactionVerboseTxn.md)
- [TransactionVerboseTxnInputs](docs/TransactionVerboseTxnInputs.md)
- [TransactionVerifyRequest](docs/TransactionVerifyRequest.md)
- [WalletTransactionRequest](docs/WalletTransactionRequest.md)
- [WalletTransactionRequestHoursSelection](docs/WalletTransactionRequestHoursSelection.md)
- [WalletTransactionRequestWallet](docs/WalletTransactionRequestWallet.md)
- [WalletTransactionSignRequest](docs/WalletTransactionSignRequest.md)


## Documentation For Authorization
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# InlineResponse2007Data
# Address

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**version** | **int** | | [optional]
**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)

Expand Down
11 changes: 5 additions & 6 deletions lib/skyapi/docs/ApiV1PendingTxsTransaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**outputs** | [**list[ApiV1ExplorerAddressOutputs]**](ApiV1ExplorerAddressOutputs.md) | | [optional]
**inner_hash** | **str** | | [optional]
**inputs** | **list[str]** | | [optional]
**sigs** | **list[str]** | | [optional]
**length** | **int** | | [optional]
**txid** | **str** | | [optional]
**type** | **int** | | [optional]
**timestamp** | **int** | | [optional]
**txid** | **str** | | [optional]
**inner_hash** | **str** | | [optional]
**sigs** | **list[str]** | | [optional]
**inputs** | **list[str]** | | [optional]
**outputs** | [**list[ApiV1PendingTxsTransactionOutputs]**](ApiV1PendingTxsTransactionOutputs.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)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# ApiV1ExplorerAddressOutputs
# ApiV1PendingTxsTransactionOutputs

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**hours** | **int** | | [optional]
**uxid** | **str** | | [optional]
**dst** | **str** | | [optional]
**coins** | **str** | | [optional]
**uxid** | **str** | | [optional]
**hours** | **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)

Expand Down
Loading

0 comments on commit 8851c3b

Please sign in to comment.