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 details)
Built Distribution
File details
Details for the file nobi-tronpy-0.2.7.tar.gz
.
File metadata
- Download URL: nobi-tronpy-0.2.7.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 664e79e3e285f717cb1d5e56a2dafe4cc396414c3ae88345165051bb6cdb6b87 |
|
MD5 | ab8623a7c9238dc3bd2cafa230253af9 |
|
BLAKE2b-256 | a34e28d9dd1ad1b06dd9de4946d09c8b310d69a6bf08d5ec13cc2a3d817bbdaf |
File details
Details for the file nobi_tronpy-0.2.7-py3-none-any.whl
.
File metadata
- Download URL: nobi_tronpy-0.2.7-py3-none-any.whl
- Upload date:
- Size: 34.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c92950be0be8b10f5ae6c807f83ef9f810ff374d168c5d7e1da3cd44ee6ad35 |
|
MD5 | 1ce8fc50bc0e6a49cbe4138d97745f01 |
|
BLAKE2b-256 | 340df72a7e0f0df2936016560615a64c7303a0b1f920822478444d8c35a3a869 |