Thanks for the code,but when i try to run your code i get an error: ValueError: Traceback (most recent call last):
File "/Users/bane/allhex/bech32.py", line 1, in <module>
from bitcoinaddress import Wallet
File "/usr/local/lib/python3.11/site-packages/bitcoinaddress/__init__.py", line 7, in <module>
from .key.key import Key
File "/usr/local/lib/python3.11/site-packages/bitcoinaddress/key/key.py", line 9, in <module>
import base58
File "/Users/bane/allhex/base58.py", line 15, in <module>
key = CBitcoinSecret.from_secret_bytes(x(key_hex))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/bitcoin/wallet.py", line 364, in from_secret_bytes
self.__init__(None)
File "/usr/local/lib/python3.11/site-packages/bitcoin/wallet.py", line 372, in __init__
CKey.__init__(self, self[0:32], len(self) > 32 and self[32] == 1)
File "/usr/local/lib/python3.11/site-packages/bitcoin/wallet.py", line 338, in __init__
self._cec_key.set_secretbytes(secret)
File "/usr/local/lib/python3.11/site-packages/bitcoin/core/key.py", line 261, in set_secretbytes
raise ValueError("Secret bytes must be exactly 32 bytes")
ValueError: Secret bytes must be exactly 32 bytes
Didn't change anything just copy/paste it, and i m running it on python 3.11?