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.4.tar.gz (5.8 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.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for trontxsize-1.0.4.tar.gz
Algorithm Hash digest
SHA256 f9e85ee05243e8946a8b911ff13416f985a8e923c9c1604afaaa3b5086352944
MD5 54b291d611b68b367e081b3466545785
BLAKE2b-256 12a82caafcd049a186a34068e8b6f49345bdecb4f30953ae4b1e5c28056508e5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for trontxsize-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 76129d51a2039f47c4f6bdbe725abfebcebe8a08813a2cfb9dda139d7bddaa4c
MD5 8caedd04f81ce745eecfc71fda9dad17
BLAKE2b-256 61b35068e46e096233e8e5c35578a79c88160dbbc0d2e403e17fa1c9203cd08c

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