-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can you add bitpay address to cashaddress? #10
Comments
Bitpay addresses were kind of an awkward time for Bitcoin Cash and should be dying off entirely. Personally, I think this would not be a good feature. I'd rather see your suggestion of switching pywallet to cashaddr go through: ranaroussi/pywallet#22 |
@ztlovemst11 I also believe that bitpay should die but if you have to theese few lines will convert bitpay addr to legacy addr bitpay_addr = 'CcNTLZejsi5ahwP2srWCtgm4JrYeCEhqcB'
from base58 import b58decode_check, b58encode_check
legacy = b58encode_check(b'\x00' + b58decode_check(bitpay_addr)[1:])
print(legacy) Note: This will only work for p2pkh addresses for p2sh you have to use different version byte |
@teran-mckinney Yes, I first used pywallet to generate the BCH address, but it gave me the address of the bitpay type. This type of address is not accepted by most people, so I need to convert it, but every time I request API to translate address, that takes a long time to return the cashaddress, I am very upset. Fortunately, I found your bitcash, it solved a lot of problems for me, thank you very much for your contribution. |
@oskyk Thank you very much, it will help people who are as confused as me. |
I use the tool https://github.com/ranaroussi/pywallet to generate my BCH address ,but it is bitpay address
,I don't want to ust the web tool to transform,it's so troubleful
thank !
The text was updated successfully, but these errors were encountered: