Crates.io | wif |
lib.rs | wif |
version | 0.1.0 |
source | src |
created_at | 2022-11-03 03:23:46.109893 |
updated_at | 2022-11-03 03:23:46.109893 |
description | Bitcoin Wallet Import Format written in Rust, for encoding/decoding WIF |
homepage | |
repository | |
max_upload_size | |
id | 703929 |
size | 7,052 |
Wallet import format decoder and encoder for bitcoin written in RUST.
This crate only supports the current stable version of Rust, patch releases may use new features at any time.
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 }