1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#![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,
}