oskyk / cashaddress Goto Github PK
View Code? Open in Web Editor NEWPython tool for convert bitcoin cash legacy addresses
License: MIT License
Python tool for convert bitcoin cash legacy addresses
License: MIT License
Hi oskyk
Thanks for this library!
However, I get:
pip install cashaddress
Collecting cashaddress
Downloading cashaddress-1.0.0.tar.gz
cashaddress requires Python '>=2.7,<3' but the running Python is 3.6.1
Is it not available for Python 3?
We'd like to use this in the bitcoin cash client interop testing framework. But we would like to minimize dependencies so would like to use your files directly, with attribution of course. Since you have used the GPL V3 license we can't incorporate it. Are you willing to also license this code using the standard MIT license that Bitcoin Cash currently uses?
Hi,
I'm looking to add cashaddress support into bitcash. Your library looks to be the easiest way to do that.
However, it doesn't seem to support testnet addresses. Is this something you can add in, or would you be interested in a patch for testnet support?
Thank you!
Hello. Can make a converter for regtest? prefix = 'bchreg'
It does throw a custom InvalidAddress exception for strings that are not addresses, but if called with None
or similar things for address it fails with a TypeError.
As seen in the cashaddr spec, cashaddr is supposed to have the bottom 3 bits of the version byte be an indicator of the size of the address. This means that valid version bytes can be like, 0x04 (indicating a 320 bit hash, for example).
This means if someone tries to use your lib to parse avalid larger cashaddress with lower version bits set, the lib will silently and strangely fail.
The line
payload=converted[1:-6]
is wrong, because the checksum is defined to be exactly 40 bits long. 40 bits is 5 bytes, so the correct line is
payload=conveted[1:-5]
However, this line also breaks the code because of the fact that there is another bug. If you look at https://github.com/simon-v/minipos/blob/master/cashaddr.py , you can see that convertbits
is supposed to avoid padding on the decode stage. This is why your payload is longer than necessary by one bit.
I have an implementation that is something like a mixture of your implementation and their implementation that fixes these bugs and correctly implements >160 bit lengths at https://github.com/Steve132/wallet_standard/blob/master/python/coffer/coins/_cashaddr.py
Hi, i work with Bitcoin ABC. We plan to keep using the CashAddr format, but obviously we will change the prefix after the recent fork.
Would you accept a pull request to support our new prefix in addition to bitcoincash:
? I can do it in such a way that none of the existing API is modified, I would only add a few attributes, methods and functions.
This would avoid duplication of the whole codebase in a new fork, and allow three way conversion (legacy, bitcoincash, new prefix).
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 !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.