#import #wallet #format #codec #bitcoin

wif

Bitcoin Wallet Import Format written in Rust, for encoding/decoding WIF

1 unstable release

0.1.0 Nov 3, 2022

#159 in #import

MIT/Apache

8KB
114 lines

version-badge license-badge rust-version-badge

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

##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