parity-zcash/src/keys/mod.rs

35 lines
856 B
Rust
Raw Normal View History

//! Bitcoin keys.
//!
//! `Secret` - 32 bytes
//! `Public` - 65 bytes (TODO: make it optionally compressed)
//! `Private` - secret with additional network identifier (and compressed flag?)
//! `AddressHash` - 20 bytes derived from public
//! `Address` - address_hash with network identifier and format type
2016-08-18 03:56:18 -07:00
mod address;
mod checksum;
pub mod display;
pub mod generator;
pub mod keypair;
mod error;
2016-08-18 03:56:18 -07:00
mod private;
2016-08-20 09:06:04 -07:00
mod public;
2016-08-18 03:56:18 -07:00
pub use self::address::{Type, Address};
pub use self::checksum::checksum;
pub use self::display::DisplayLayout;
pub use self::keypair::KeyPair;
pub use self::error::Error;
2016-08-18 03:56:18 -07:00
pub use self::private::Private;
2016-08-20 09:06:04 -07:00
pub use self::public::Public;
use hash::{H160, H256, H520};
2016-08-18 05:39:00 -07:00
pub type AddressHash = H160;
pub type Secret = H256;
use secp256k1;
lazy_static! {
pub static ref SECP256K1: secp256k1::Secp256k1 = secp256k1::Secp256k1::new();
}