1 unstable release
0.1.0 | Nov 3, 2022 |
---|
#159 in #import
8KB
114 lines
Wallet import format decoder and encoder for bitcoin written in RUST.
Rust Version Policy
This crate only supports the current stable version of Rust, patch releases may use new features at any time.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
##Usage
use wif::{encode, decode};
println!("{:?}",decode("93SewNjbsxJLEgRmF6QYvhtMbztGeUjmr3ng6yVrD47r6E8bUvi","testnet")); // DecodedWif { network: "testnet", private_key: "F4A194DF2E1442B8F82B8D762BF8EC1C7E7E054798A5162F99CEB7DF4683B1FB", compressed: false }
println!("{:?}",encode("a70253dbfc1540647bd27626706c60c9745a0f1948ff07463a1505d9f0ba35ec","testnet",true,)); // EncodedWif { network: "testnet", wif: "cTBLzVDsLsNRxhyngnYMyaFVw9CiipCnnJSQ6cgW9NYr6Hkt1Gjm", compressed: true }
Dependencies
~2–3MB
~67K SLoC