BoltzExchange / boltz-client-python

Boltz Reference Client in Python
MIT License
4 stars 3 forks source link

Liquid address validation #28

Open pirinskodxb opened 8 months ago

pirinskodxb commented 8 months ago

Traceback (most recent call last): File "/tmp/test.py", line 36, in validate_address('GpijgBhNkKDR1wtwqd3x3gPo8XcEWJcSr4', 'liquidv1', 'L-BTC/BTC') File "/tmp/test.py", line 29, in validate_address print(addr.address(net)) File "/usr/local/lib/python3.9/dist-packages/embit/script.py", line 25, in address raise ValueError("This type of script doesn't have address representation") ValueError: This type of script doesn't have address representation

Testing BoltzClient's validate_address with a test script. I get the same error when attempting a reverse swap.

Seems embit/script.py:from_address() defaults to BTC. Maybe I missed something in my setup or config?

temp fix for me is modifying embit/script.py:

from .networks import NETWORKS

from embit.liquid.networks import NETWORK

kilrau commented 5 months ago

That's an issue with several liquid adress types like legacy addresses, see https://github.com/lnbits/boltz/issues/25 which is an issue of boltz-python and due to embit.