Skip to main content

Easy convert TRON address (base58) to EVM address (hex) [such as https://tronscan.org/#/tools/code-converter/tron-ethereum-address]

Project description

tron-address-converter

Package for converting TRON address <-> EVM address Based on https://tronscan.org/#/tools/code-converter/tron-ethereum-address and https://github.com/wemaketech/tron-format-address/blob/master/lib/crypto.ts

Installation

pip install tron-address-converter

Usage

import tron_address_converter

evm_wallet = tron_address_converter.to_hex("TXXmULCEzRo6JfxUP1LYfmzbiKUezUvUNj")
# 0xec830e98468d23f54c58174bb9a3671fcc440ff2
tron_wallet = tron_address_converter.from_hex("0xec830e98468d23f54c58174bb9a3671fcc440ff2")
# TXXmULCEzRo6JfxUP1LYfmzbiKUezUvUNj

print(evm_wallet) # 0xec830e98468d23f54c58174bb9a3671fcc440ff2
print(tron_wallet) # TXXmULCEzRo6JfxUP1LYfmzbiKUezUvUNj

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tron-address-converter-1.0.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

tron_address_converter-1.0-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page