Skip to main content

Calculate tron transaction size (bandwidth)

Project description

trontxsize - Calculate tron transaction size in bytes

CI 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.2.0.tar.gz (108.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.2.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trontxsize-1.2.0.tar.gz
  • Upload date:
  • Size: 108.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for trontxsize-1.2.0.tar.gz
Algorithm Hash digest
SHA256 3bb1308e0b78e29bb131c69e1860341dede24cf7211f52cc08d1786d1a495113
MD5 31ca84e720cecf1fc14d62e46651b560
BLAKE2b-256 323185757f10e525f39239343a514081b0a085c83492c66b4e26576ec9f77827

See more details on using hashes here.

Provenance

The following attestation bundles were made for trontxsize-1.2.0.tar.gz:

Publisher: release.yml on bitcart/trontxsize

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: trontxsize-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for trontxsize-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6dcd33407397029c1c3ce62b3d9b43bdb972d5046163458a81dcac122e51653b
MD5 351b11222276e69ae25cbcd9174df7a1
BLAKE2b-256 49869bf87ad3f84761b38075e6cc1236478cf95d633afd7a39333f0cc6f2a9cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for trontxsize-1.2.0-py3-none-any.whl:

Publisher: release.yml on bitcart/trontxsize

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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