Official ProximaX Sirius Blockchain SDK Library in Python.
The ProximaX Sirius Blockchain Python SDK is a Python library for interacting with the Sirius Blockchain.
Install the SDK library.
pip install xpx-chain
You can now start using the SDK.
from xpxchain import client
# Get the current chain height of the Sirius test net
with client.BlockchainHTTP('bctestnet1.brimstone.xpxsirius.io:3000') as http:
reply = http.get_blockchain_height()
print(reply)
For further examples please refer to examples directory or E2E tests
The SDK makes copious use of assertions to ensure functionality is correct during debugging, and during use of the client, it may be preferable to disable these assertions. This may be done by either setting the environment variable PYTHONOPTIMIZE=TRUE
, or through the command-line flag -O
.
In addition, installing uvloop may further improve asynchronous code performance.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in lexical by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.
git clone [email protected]:proximax-storage/python-xpx-chain-sdk.git
cd python-xpx-chain-sdk/
Try to run tox then build and install the repo to ensure that everything works on your platform before making any changes.
tox
python setup.py install
SecretsWarning: Security warning: signing message using insecure ed25519 implementation, secrets may be leaked.
SDK includes fallback ed25519 implementation in python when C implementation is not present. Python ed25519 implementation may lead to the disclosure of the secrets due to python's arbitrary-precision integer arithmetic. To get ed25519 C implementation please refer to https://pypi.org/project/ed25519sha3/
The SDK uses numerous tools to ensure type correctness, robust testing, and style conventions are preserved over multiple configurations. Before submitting any contributions, please resolve any issues that result from the following commands before committing:
# Run tox, which invokes numerous virtual envs to validate all configurations
# Invokes the unittest suite.
# Invokes the randomly-generated unittest suite.
# Invokes the linter, flake8.
# Invokes bandit, a which checks for possible security risks.
# Invokes the type-checker, mypy.
# Invokes the complexity and maintainability checker, radon.
# Invokes the code coverage generator, coverage.
tox