TRON Python client library
Project description
tronpy
TRON Python Client Library. Documentation
How to use
from tronpy import Tron
client = Tron(network='nile')
# Private key of TJzXt1sZautjqXnpjQT4xSCBHNSYgBkDr3
priv_key = PrivateKey(bytes.fromhex("8888888888888888888888888888888888888888888888888888888888888888"))
txn = (
client.trx.transfer("TJzXt1sZautjqXnpjQT4xSCBHNSYgBkDr3", "TVjsyZ7fYF3qLF6BQgPmTEZy1xrNNyVAAA", 1_000)
.memo("test memo")
.build()
.inspect()
.sign(priv_key)
.broadcast()
)
print(txn)
# > {'result': True, 'txid': '5182b96bc0d74f416d6ba8e22380e5920d8627f8fb5ef5a6a11d4df030459132'}
print(txn.wait())
# > {'id': '5182b96bc0d74f416d6ba8e22380e5920d8627f8fb5ef5a6a11d4df030459132', 'blockNumber': 6415370, 'blockTimeStamp': 1591951155000, 'contractResult': [''], 'receipt': {'net_usage': 283}}
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 Distribution
tronpy-0.1.6.tar.gz
(18.8 kB
view details)
Built Distribution
tronpy-0.1.6-py3-none-any.whl
(19.8 kB
view details)
File details
Details for the file tronpy-0.1.6.tar.gz
.
File metadata
- Download URL: tronpy-0.1.6.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.8.6 Darwin/19.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7c02cddabe7c40be80a47be58994ab71c1817b8beef7f731fb81409139b592d5
|
|
MD5 |
16e949bba29c01f8ef8ec6db448b261e
|
|
BLAKE2b-256 |
5c22cdf3eb27a09215746a6d298882bc9838193ba7f8b17c21a9d041b638d38e
|
File details
Details for the file tronpy-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: tronpy-0.1.6-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.8.6 Darwin/19.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
9169b39af9c8c6b5fb1c1b8ef5acf8a313f30f4deabdef66ae62ab7703563ee3
|
|
MD5 |
b869956e84128c2c7284962e423fe837
|
|
BLAKE2b-256 |
70679c5763989edbb72aca79b0e1bc2033b41995ad6b7df515fde6ab7197609f
|