Skip to main content

Calculate tron transaction size (bandwidth)

Project description

trontxsize - Calculate tron transaction size in bytes

CircleCI Codecov PyPI version

In Tron (TRX) network, fee calculation algorithm is complex. And the most complex part of it is that it depends on transaction size.

But there's no method existing to calculate it

This library does just this:

import trontxsize

print(trontxsize.get_tx_size({"raw_data": ..., "signatures": [...])) # matches bandwidth you see in block explorer

How does it work? The library pre-compiled a trimmed-down version of Tron protobuf and uses it directly to calculate transaction size

Copyright and License

Copyright (C) 2022 MrNaif2018

Licensed under the MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trontxsize-1.0.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trontxsize-1.0.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file trontxsize-1.0.0.tar.gz.

File metadata

  • Download URL: trontxsize-1.0.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.14

File hashes

Hashes for trontxsize-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a20a46866c21671c5953c1f2424b20c348232e7e00873aa57045336d9f9eb0ca
MD5 7fc46b1ccb874885a5e9248b7715544d
BLAKE2b-256 1977bbdf58992ad2ffd598214a309e945eafa0f9331b3e8b59c03acd40ffcde0

See more details on using hashes here.

File details

Details for the file trontxsize-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: trontxsize-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.14

File hashes

Hashes for trontxsize-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7053d1ea7470683fdeac5fe0f6f1b435df7c8798dc6655bd4e35e78af3711b7
MD5 d3c4624edf36d8492e5985f59639ba84
BLAKE2b-256 a3e5e6ea09c4414b5b66194afa2ff7805f49ffc8afd379aeda638fbc688e9e52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page