#![warn(missing_docs)]
pub(crate) mod bip39;
pub(crate) mod bip49;
pub(crate) mod bip85;
pub(crate) mod bits;
pub(crate) mod complex;
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 bip49::Derivation as BIP49;
pub use bip85::{Derivation as BIP85, Language, Password, Wif};
pub use complex::ComplexDiagram;
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("serialize error")]
Serialize(#[from] rmp_serde::encode::Error),
#[error("deserialize error")]
Deserialize(#[from] rmp_serde::decode::Error),
}
pub type ArtResult<T = ()> = Result<T, 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;