Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/viraptor/coinaddress
Rust library for bitcoin / litecoin / generic base58 addresses checksum validation
https://github.com/viraptor/coinaddress
Last synced: about 1 month ago
JSON representation
Rust library for bitcoin / litecoin / generic base58 addresses checksum validation
- Host: GitHub
- URL: https://github.com/viraptor/coinaddress
- Owner: viraptor
- License: mit
- Created: 2014-11-25T05:24:11.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-05T03:48:51.000Z (over 7 years ago)
- Last Synced: 2024-10-31T12:12:55.922Z (about 2 months ago)
- Language: Rust
- Size: 13.7 KB
- Stars: 1
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Coinaddress
===========Master: [![Master Build Status](https://travis-ci.org/viraptor/coinaddress.svg?branch=master)](https://travis-ci.org/viraptor/coinaddress)
Rust library for bitcoin / litecoin / generic base58 addresses checksum validation.
The actual check is validating the trailing checksum against the pubkey hash. All
addresses using the bitcoin format can be verified.To validate bitcoin/litecoin address, check that:
```
validate_btc_address("1theaddress") == Ok(0) // (or 5, or 111 for testnet)
validate_ltc_address("Ltheaddress") == Ok(48)
```Any other address may be checked using:
```
validate_base58_hash("...") == Ok(...)
```The value returned in `Ok(...)` is the address version/type.
To use the package add it to cargo dependencies:
```
[dependencies]
coinaddress = "1.*"
```