-
Notifications
You must be signed in to change notification settings - Fork 39
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
Wrong address from PrivateKeyTestnet #7
Comments
Hi Anastasia! I'm sorry for the wait. Have been out for a few days. I'll take a look into this and get back to you shortly. I do have some test cases with testnet, but my use has all been mainnet, so the odds of a bug with testnet are fairly high. -Teran |
Okay, turns out this isn't a bitcash bug afterall. ccoin.cash is using the old Bitcoin address format and hasn't updated to cashaddr. If you want to use bitcash with ccoin, you'll need to convert the cashaddr to the legacy address. One site you can do this with is: https://cashaddr.bitcoincash.org If you want to keep this within Python, you can do so with cashaddress: https://github.com/oskyk/cashaddress cashaddress is already used inside this repository. You can send to legacy addresses, but the .address property will always return the cashaddr format. I hope this helps! Let me know if you have any questions. |
Oh, about raw transactions, just use https://github.com/sporestack/bitcash/blob/master/bitcash/wallet.py#L208 |
Teran, thank you so much for your reply! You helped me a lot, with new converted BCH address everything works! And thank you for your cool library! |
anastasia-bilova - I found a great library for converting between BCH and legacy addresses natively in python - https://github.com/oskyk/cashaddress - super handy little one to have in your tool belt :) |
You're welcome! Glad I could help. Though most of the credit goes to @ofek, he wrote the bit library for Bitcoin which I ported this from. He did 99% of the legwork. |
I would also like to thank you for this library. Absolutely amazing. You have made a huge difference to the BCH ecosystem with this, regardless of who did the original core work. Still takes effort to connect all the ports, add extra features, taylor it to BCH and make it work right out of the box. |
Thank you! I really appreciate that. I needed it myself and I'm glad you've been able to find it useful as well. Will close this out for now. |
Hello! Thanks a lot for your library!
I have the following problem, when I generate the instance of the
PrivateKeyTestnet
and get the public address I got the address I cannot send money to:Even if I compress it, I get the same error called
One or more input or output is invalid
:When I send money (through ccoin-cash web-site) from my own
test-net
addressmntaWjMep9AVmssAg7bd9hEHmNsuLtZDSS
to another also mine, all goes fine.Can you help me with this question or even with all process to create signed offline raw transaction through your library? Thanks a lot!
The text was updated successfully, but these errors were encountered: