TRON Python client library
Project description
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")
.fee_limit(100_000_000)
.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
nobi-tronpy-0.2.7.tar.gz
(36.0 kB
view hashes)
Built Distribution
Close
Hashes for nobi_tronpy-0.2.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c92950be0be8b10f5ae6c807f83ef9f810ff374d168c5d7e1da3cd44ee6ad35 |
|
MD5 | 1ce8fc50bc0e6a49cbe4138d97745f01 |
|
BLAKE2b-256 | 340df72a7e0f0df2936016560615a64c7303a0b1f920822478444d8c35a3a869 |