Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [1.1.0] - 2022-01-07
### Added
- LTC segwit address support

### Fixed
- Fix wheel build by replacing crc16 with fastcrc

## [1.0.1] - 2018-04-16
### Added
- Start using zope.interfaces for all objects.
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ all: help

help:
@echo 'NAME'
@echo ' Makefile for coinaddrng'
@echo ' Makefile for coinaddrvalidor'
@echo ''
@echo 'SYNOPSIS'
@echo ' make [options]'
Expand All @@ -12,16 +12,16 @@ help:
@echo ''
@echo ' dist builds both binary and source distribution'
@echo ''
@echo ' install installs blockapi library'
@echo ' install installs coinaddrvalidor library'
@echo ''
@echo ' uninstall uninstalls blockapi library'
@echo ' uninstall uninstalls coinaddrvalidor library'

install:
pip3 install --upgrade .


uninstall:
pip3 uninstall -y coinaddrng
pip3 uninstall -y coinaddrvalidor


dist:
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# CoinAddrNG
[![Github Repo](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/crypkit/coinaddrng) [![Pypi Version](https://img.shields.io/pypi/v/coinaddrng.svg)](https://pypi.python.org/pypi/coinaddrng) [![Pypi License](https://img.shields.io/pypi/l/coinaddrng.svg)](https://pypi.python.org/pypi/coinaddrng) [![Pypi Wheel](https://img.shields.io/pypi/wheel/coinaddrng.svg)](https://pypi.python.org/pypi/coinaddrng) [![Pypi Versions](https://img.shields.io/pypi/pyversions/coinaddrng.svg)](https://pypi.python.org/pypi/coinaddrng)

# CoinAddrValidator
[![Github Repo](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/nobitex/coinaddrvalidator) [![Pypi Version](https://img.shields.io/pypi/v/coinaddrvalidator.svg)](https://pypi.python.org/pypi/coinaddrvalidator) [![Pypi License](https://img.shields.io/pypi/l/coinaddrvalidator.svg)](https://pypi.python.org/pypi/coinaddrvalidator) [![Pypi Wheel](https://img.shields.io/pypi/wheel/coinaddrvalidator.svg)](https://pypi.python.org/pypi/coinaddrvalidator) [![Pypi Versions](https://img.shields.io/pypi/pyversions/coinaddrvalidator.svg)](https://pypi.python.org/pypi/coinaddrvalidator)

## Maintainer
Mohammad Aghamir - *Maintainer of this repository* - [coinaddrvalidator](https://github.com/nobitex/coinaddrvalidator)

## Fork Maintainer
Devmons s.r.o. - *Maintainer of this fork* - [coinaddrng](https://github.com/crypkit/coinaddrng)

See also the list of [contributors](https://github.com/crypkit/coinaddrng/contributors) who participated in this project.
Expand Down Expand Up @@ -46,13 +48,13 @@ A cryptocurrency address inspection/validation library for python.

## Installation
```shell
pip3 install coinaddrng
pip3 install coinaddrvalidator
```

## Usage
```python
>>> import coinaddrng
>>> coinaddrng.validate('btc', b'1BoatSLRHtKNngkdXEeobR76b53LETtpyT')
>>> import coinaddrvalidator
>>> coinaddrvalidator.validate('btc', b'1BoatSLRHtKNngkdXEeobR76b53LETtpyT')
ValidationResult(name='bitcoin', ticker='btc', address=b'1BoatSLRHtKNngkdXEeobR76b53LETtpyT', valid=True, network='main', is_extended=False, address_type='address')
```

Expand All @@ -64,7 +66,7 @@ format, which is returned as address_type. If there's none, 'address' is being r
#### Currencies
To add a new currency, simply instantiate a new `coinaddr.currency.Currency` class. It will be automatically registered.
```python
from coinaddrng import Currency
from coinaddrvalidator import Currency
Currency('decred', ticker='dcr', validator='DecredCheck',
networks=dict(
main=(0x073f,0x071a,0x02fda926), test=(0x0f21,0x0efc,0x043587d1)),
Expand Down
2 changes: 1 addition & 1 deletion coinaddrng/__init__.py → coinaddrvalidator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
:license: MIT, see LICENSE for more details.
"""

__version__ = '1.0.30'
__version__ = '1.1.3'

from . import interfaces, currency, validation
from .validation import validate
Expand Down
File renamed without changes.
7 changes: 4 additions & 3 deletions coinaddrng/currency.py → coinaddrvalidator/currency.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ class Currency(metaclass=CurrencyMeta):
Currency('bitcoin-cash', ticker='bch', validator='Base58Check',
networks=dict(
main=(0x00, 0x05), test=(0x6f, 0xc4)))
Currency('litecoin', ticker='ltc', validator='Base58Check',
Currency('litecoin', ticker='ltc', validator='BitcoinBasedCheck',
networks=dict(
main=(0x30, 0x05, 0x32, 0x019da462, 0x01b26ef6,
0x488B21E, 0x49D7CB2, 0x4B24746, 0x295B43F, 0x2AA7ED3),
test=(0x6f, 0xc4, 0x0436f6e1)))
0x488B21E, 0x49D7CB2, 0x4B24746, 0x295B43F,
0x2AA7ED3, 'ltc'),
test=(0x6f, 0xc4, 0x0436f6e1, 'tltc')))
Currency('dogecoin', ticker='doge', validator='Base58Check',
networks=dict(
main=(0x1e, 0x16), test=(0x71, 0xc4)))
Expand Down
2 changes: 2 additions & 0 deletions coinaddrvalidator/encoding/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@


Loading