#cash #bitcoin #bch

bch_addr

cash_addr format implementation inspired by bchaddrjs

1 unstable release

0.1.0 Mar 9, 2019

#9 in #bch

Download history 363/week @ 2024-11-15 526/week @ 2024-11-22 277/week @ 2024-11-29 313/week @ 2024-12-06 359/week @ 2024-12-13 324/week @ 2024-12-20 420/week @ 2024-12-27 526/week @ 2025-01-03 336/week @ 2025-01-10 430/week @ 2025-01-17 577/week @ 2025-01-24 272/week @ 2025-01-31 150/week @ 2025-02-07 185/week @ 2025-02-14 319/week @ 2025-02-21 186/week @ 2025-02-28

935 downloads per month
Used in cash_tx_builder

MIT license

45KB
696 lines

bch_addr

CircleCI codecov

cash_addr format implementation inspired by bchaddrjs.

Usage

use bch_addr::Converter;
let converter = Converter::new();
let cash_addr = converter.to_cash_addr("1B9UNtBfkkpgt8kVbwLN9ktE62QKnMbDzR").unwrap();
assert_eq!(cash_addr, "bitcoincash:qph5kuz78czq00e3t85ugpgd7xmer5kr7c5f6jdpwk");

let legacy_addr = converter.to_legacy_addr(&cash_addr).unwrap();
assert_eq!(legacy_addr, "1B9UNtBfkkpgt8kVbwLN9ktE62QKnMbDzR");

lib.rs:

cash_addr format implementation inspired by bchaddrjs.

Example

use bch_addr::Converter;
let converter = Converter::new();
let cash_addr = converter.to_cash_addr("1B9UNtBfkkpgt8kVbwLN9ktE62QKnMbDzR").unwrap();
assert_eq!(cash_addr, "bitcoincash:qph5kuz78czq00e3t85ugpgd7xmer5kr7c5f6jdpwk");

let legacy_addr = converter.to_legacy_addr(&cash_addr).unwrap();
assert_eq!(legacy_addr, "1B9UNtBfkkpgt8kVbwLN9ktE62QKnMbDzR");

Dependencies

~1MB
~26K SLoC