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.2.tar.gz (8.6 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.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trontxsize-1.0.2.tar.gz
  • Upload date:
  • Size: 8.6 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.2.tar.gz
Algorithm Hash digest
SHA256 2f98bcf0501412856f83350167697c60f496d7620c6d2b566b2d191d562142f4
MD5 7094dafbfbbc19a902351d1e0e2e2675
BLAKE2b-256 aaae82b2743fef726e69455c74ecb4b3f7707933b7a87f5128b1dfa009287efa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trontxsize-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 20372ca0e0f7ce152bde3797423859c1aa543893ea7ec09f936dfb0694822d9b
MD5 38595a10f89f7ad87549872882cf59d5
BLAKE2b-256 1eb173b1f25a2c4e7aee367c6cd35c471bad802e57afa33293a9cae677202ca4

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