joeblackwaslike / coinaddr Goto Github PK
View Code? Open in Web Editor NEWCryptocurrency address inspection/validation library for python
License: MIT License
Cryptocurrency address inspection/validation library for python
License: MIT License
Hi, thanks for useful library.
One issue, when checking address with wrong currency, we have exception due to strong typing. Here:
@property
def network(self):
"""Return network derived from network version bytes."""
abytes = base58check.b58decode(
self.request.address, **self.request.extras)
nbyte = abytes[0]
for name, networks in self.request.currency.networks.items():
if nbyte in networks:
return name
In case of wrong networks you return None, but expecting string. So we have valid=False and exception.
P.S. more currency structures you can find here: https://github.com/ognus/wallet-address-validator/blob/master/src/currencies.js
Coinaddr can't validate this address: 0x0783b48c3e64c12b8ed55ccd409e46e9c0399e74
EOS is the same as ETH and USDT is the same as BTC, so it should be an easy fix to support those two assets.
Coinaddr incorrectly reports bech32 addresses (starting with bc1) as invalid.
coinaddr.validate('ltc', b'1111')
TypeError: ("'network' must be <class 'str'> (got None that is a <class 'NoneType'>).",
print(coinaddr.validate('eth', '111'))
ValidationResult(name='ethereum', ticker='eth', address=b'111', valid=True, network='both')
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.