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.5.tar.gz (5.9 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.5-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trontxsize-1.0.5.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.17

File hashes

Hashes for trontxsize-1.0.5.tar.gz
Algorithm Hash digest
SHA256 bf9a3abf649d264a6ec01bd401a3c6ce251a2d38d6c7cc52a262887529367560
MD5 62fa1a486fcbc9aef2e18527127b3b3d
BLAKE2b-256 d09efc41366ab84ae8984c57b89bdcd051b04e62df0506b918432ef2c981c4ed

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trontxsize-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.17

File hashes

Hashes for trontxsize-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e9fe3ff36f1e1f1b1bf5cc24f336317ceabf7e194fbf0122b908a27dc616051f
MD5 faeaa3cb362183033b3f88cefdd2e4b5
BLAKE2b-256 a3f379e2b1bb5cda8b460f501aeb491bcaf127cceada5b391f66944382608d61

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