2 releases

✓ Uses Rust 2018 edition

0.1.1 Aug 12, 2019
0.1.0 Aug 8, 2019

#114 in Cryptocurrencies


Used in 1 crate

MIT/Apache

8KB
129 lines

basex-rs Build Status crate

Base58 implement in Rust.

Usage

Add dependencies

[dependencies]
basex-rs = "0.1.1"
//decode
extern crate basex_rs;
use basex_rs::{BaseX, Decode, BITCOIN};

let src = "jkuzA".to_string();
let decoded = BaseX::new(BITCOIN).decode(src);
assert_eq!(decoded, Some(vec![28, 215, 33, 155]));
//encode
extern crate basex_rs;
use basex_rs::{BaseX, Encode, BITCOIN};

let src = vec![28, 215, 33, 155];
let encoded = BaseX::new(BITCOIN).encode(&src);
assert_eq!(encoded, "jkuzA".to_string());

No runtime deps