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.5.tar.gz
(18.7 kB
view details)
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
tronpy-0.1.5-py3-none-any.whl
(19.6 kB
view details)
File details
Details for the file tronpy-0.1.5.tar.gz.
File metadata
- Download URL: tronpy-0.1.5.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.8.3 Darwin/19.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aff4dd4c4caf0d927932b4fef61be06092a078c4157a428a7ac7847138445af0
|
|
| MD5 |
f7a73e70f8ac972ea792813d6618e3ea
|
|
| BLAKE2b-256 |
842c89867654f280585f3839696090e8edccf8a98dc88cc945bebde5683590c5
|
File details
Details for the file tronpy-0.1.5-py3-none-any.whl.
File metadata
- Download URL: tronpy-0.1.5-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.8.3 Darwin/19.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9df5888752bcefb4148b3af7b84ebdcb342836a127a1d8c8332a376898420f09
|
|
| MD5 |
9908f04e6a4f84161cbaa84bc5178125
|
|
| BLAKE2b-256 |
880de0f83b39ee08212575ede65406233b38e577b54ff012e21860d30c70a9b7
|