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
use bitcoin::util::address::Address;
use bitcoin::util::bip32::ExtendedPubKey;
use serde::Deserialize;
#[derive(Deserialize)]
pub struct HWIExtendedPubKey {
pub xpub: ExtendedPubKey,
}
#[derive(Deserialize)]
pub struct HWISignature {
pub signature: String,
}
#[derive(Deserialize)]
pub struct HWIAddress {
pub address: Address,
}
#[derive(Deserialize)]
pub struct HWIPartiallySignedTransaction {
pub psbt: String,
}
#[derive(Deserialize)]
pub struct HWIDescriptor {
pub internal: Vec<String>,
pub receive: Vec<String>,
}
#[derive(Deserialize)]
pub struct HWIKeyPoolElement {
pub desc: String,
pub range: Vec<u32>,
pub timestamp: String,
pub internal: bool,
pub keypool: bool,
pub watchonly: bool,
}
#[derive(Clone)]
pub enum HWIAddressType {
Pkh,
ShWpkh,
Wpkh,
}