#![warn(missing_docs)]
pub(crate) mod bip39;
pub(crate) mod bip85;
pub(crate) mod bits;
pub(crate) mod complex;
pub(crate) mod derive;
pub(crate) mod generic;
pub(crate) mod macros;
pub(crate) mod matrix;
pub(crate) mod password;
pub(crate) mod simple;
pub(crate) mod words;
#[doc(no_inline)]
pub use bitcoin::{self, bip32::Xpriv};
pub use bip39::Derivation as BIP39;
pub use bip85::{Derivation as BIP85, Language, Password, Wif};
pub use complex::ComplexDiagram;
pub use derive::{Bip44 as BIP44, Bip49 as BIP49, Bip84 as BIP84};
pub use generic::GenericDiagram;
pub use matrix::{Matrix, ToMatrix};
pub use simple::SimpleDiagram;
pub mod error {
use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("invalid parameter: {0}")]
InvalidParameter(&'static str),
#[error("bip32 error")]
Bip32Error(#[from] bitcoin::bip32::Error),
#[error("runtime error")]
SecpError(#[from] bitcoin::secp256k1::Error),
#[error("hex error")]
HexError(#[from] bitcoin::hex::HexToArrayError),
#[error("address error")]
AddressError(#[from] bitcoin::key::UncompressedPublicKeyError),
#[error("p2sh error")]
P2shError(#[from] bitcoin::address::P2shError),
#[cfg(feature = "serde")]
#[error("serialize error")]
Serialize(#[from] rmp_serde::encode::Error),
#[cfg(feature = "serde")]
#[error("deserialize error")]
Deserialize(#[from] rmp_serde::decode::Error),
}
}
pub use error::Error;
#[cfg(not(feature = "testnet"))]
pub const NETWORK: bitcoin::NetworkKind = bitcoin::NetworkKind::Main;
#[cfg(feature = "testnet")]
pub const NETWORK: bitcoin::NetworkKind = bitcoin::NetworkKind::Test;