#![warn(missing_docs)]
#![warn(unused_extern_crates)]
pub(crate) mod utils;
pub mod app;
pub use app::{SigningInfo, LedgerBTC};
use thiserror::Error;
#[derive(Error, Debug)]
pub enum LedgerBTCError {
#[error(transparent)]
Bip32Error(#[from] coins_bip32::Bip32Error),
#[error("Derivation Path is too long. Only 10 derivations allowed.")]
DerivationTooLong,
#[error(transparent)]
LedgerError(#[from] coins_ledger::errors::LedgerError),
#[error("Received unexpected response from device. Expected data in response, found none.")]
UnexpectedNullResponse,
#[error(
"Received the wrong number of prevouts/key derivtions while signing. Need 1 per witness."
)]
SigningInfoLengthMismatch,
}