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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for trontxsize-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5bc9bc5821c4ca80a0255ef7c4ecb64949b61415e91ef6a8d13963722269f9ae
MD5 36c69a8a52efd2045640bb5cecea3ba8
BLAKE2b-256 06f0a3949b7f90f831a7739c13249d4cd52aa30f5fc18ea0c9088e833c87778f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for trontxsize-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b57cc50ff9ea110e132cee77d19283af35e61f342f3fd4127f4eff6abd60c5b
MD5 cd3247ab1deac63509a50f187cfd35b5
BLAKE2b-256 79bca751220389f2dc9a07f3dd50cbe516e4b9cf6bb81b67b9c477a3193701f0

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