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.1.tar.gz (8.5 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.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trontxsize-1.0.1.tar.gz
  • Upload date:
  • Size: 8.5 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.1.tar.gz
Algorithm Hash digest
SHA256 89f8a32fcd0ec6673afcad9668620c4b16f64909a3dd5740dab8f51888403701
MD5 b5afe915341745a77d0de4a7ebd71623
BLAKE2b-256 2ad2b4b479c55ca073e5034ec2dc5701c27cf8b61818f586da04c138a89769cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trontxsize-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9afc853cd3e5802f58d708a2e3aa9f39573bcf3ef6ca7ad042efb24c51444b4a
MD5 3bff163aae3e064b6695dd75f13399fb
BLAKE2b-256 0928a3022c7a3a438fe5906089d2929ddc44f3b4a0efe57d30ed955dc74a7699

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