Skip to content
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

Closed
waliguder opened this issue Aug 8, 2018 · 4 comments
Closed

can you add bitpay address to cashaddress? #10

waliguder opened this issue Aug 8, 2018 · 4 comments

Comments

@waliguder
Copy link

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 !

@ghost
Copy link

ghost commented Aug 14, 2018

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

@oskyk
Copy link
Owner

oskyk commented Aug 14, 2018

@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

@waliguder
Copy link
Author

@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.

@waliguder
Copy link
Author

@oskyk Thank you very much, it will help people who are as confused as me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants