Own Blockchain SDK for Python
Project description
OwnBlockchainSdkPython
Own Blockchain SDK for Python
Quick Start
$ git clone https://github.com/OwnMarket/OwnBlockchainSdkPython.git
$ cd own_blockchain_sdk
Run tests:
$ pytest
Usage
Own Blockchain SDK can be used as a pip package.
$ pip install own-blockchain-sdk
or
$ python -m pip install own-blockchain-sdk
Use the package in Python code
from own_blockchain_sdk import Wallet, Tx
# Create a new wallet
wallet = Wallet()
print('PK =', wallet.private_key, ', Address = ', wallet.address)
# Compose a transaction with nonce = 1 and action fee 0.01
tx = Tx(wallet.address, 1, 0.01)
tx.add_transfer_chx_action('CHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 100) # Transfer 100 CHX to CHxxx... address.
# Look at the raw transaction in JSON format
print (tx.to_json())
# Sign the transaction for submission to node API on TestNet
network_code = 'OWN_PUBLIC_BLOCKCHAIN_TESTNET'
print (tx.sign(network_code, wallet.private_key))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file own_blockchain_sdk-1.0.1-py3-none-any.whl.
File metadata
- Download URL: own_blockchain_sdk-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acb586a5dc5ab0239846ea249a567386f40a8be87d359b3c9fd8025754db5e8c
|
|
| MD5 |
78364ddb04f48719431cc3eccfeddcd7
|
|
| BLAKE2b-256 |
41915583e4730527d33f48bf0ed2e3a54965a50bacd15643ae057eacaa536c40
|