Skip to content

Rust library for bitcoin / litecoin / generic base58 addresses checksum validation

License

Notifications You must be signed in to change notification settings

viraptor/coinaddress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7fb54cb · May 5, 2017

History

39 Commits
May 5, 2017
May 5, 2017
May 5, 2017
Nov 25, 2014
May 5, 2017
May 5, 2017
Nov 25, 2014
Nov 25, 2014

Repository files navigation

Coinaddress

Master: Master Build Status

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.*"

About

Rust library for bitcoin / litecoin / generic base58 addresses checksum validation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages