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.1.1.tar.gz (69.1 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.1.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trontxsize-1.1.1.tar.gz
  • Upload date:
  • Size: 69.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.9

File hashes

Hashes for trontxsize-1.1.1.tar.gz
Algorithm Hash digest
SHA256 52e8aa559185e81779906fe333cb56f950a87c21901a21c9623ecf57ed3ff8da
MD5 495e1b0baffc005f46eea7cff6903a42
BLAKE2b-256 89f174c3c4f9a9141795384dd26ea188e96b286804dfb545181cc42bf759c02d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for trontxsize-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7337fcf8f81315e15b5385dd2aafd5eb98a34e9ca207efd630a4623c1422b154
MD5 9a9f831cd72819bc8c6cf4923c745dbf
BLAKE2b-256 233c5f8a0f7e47a24b821fb103d73ade2f9c6c1ce509a7edd4b01f9b70516d1b

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