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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tron-address-converter-1.0.tar.gz.
File metadata
- Download URL: tron-address-converter-1.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbc333bc7620446657ad929ea7552744ae080280dc90eaefda96f97ff4ee9ac2
|
|
| MD5 |
bc64a68a262f96faa07d903a628b2bfd
|
|
| BLAKE2b-256 |
ac75f0af9a4a74875a05c28a918fc984242202396b069a09060538781fae69eb
|
File details
Details for the file tron_address_converter-1.0-py3-none-any.whl.
File metadata
- Download URL: tron_address_converter-1.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c28a7a1927744601b59623d8fe28888eed64aaa0743f4352c93310327900fa2
|
|
| MD5 |
f87585d604bbbb8ee6053e8823ec9623
|
|
| BLAKE2b-256 |
f84bf4f3472f00db048d2c467a15335fde6e78d8cd15df3e8acb6f2446d70267
|