Git Product home page Git Product logo

cashaddress's People

Contributors

hukkinj1 avatar oskyk avatar rooterkyberian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cashaddress's Issues

Not available for Python 3?

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?

MIT license possible?

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?

Add testnet support

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!

Can't handle None address

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.

Library does not contain any code to correctly validate cashaddr with length greater than 160

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.

Convertbits needs to refuse to pad on decode

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

Support a different prefix

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.