-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathmessages-nano.proto
63 lines (56 loc) · 1.82 KB
/
messages-nano.proto
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
* Messages (Nano specific) for KeepKey Communication
*
*/
syntax = "proto2";
// Sugar for easier handling in Java
option java_package = "com.keepkey.deviceprotocol";
option java_outer_classname = "KeepKeyMessageNano";
/**
* Request: Ask device for Nano address corresponding to address_n path
* @next PassphraseRequest
* @next NanoAddress
* @next Failure
*/
message NanoGetAddress {
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
optional string coin_name = 2 [default='Nano'];
optional bool show_display = 3; // optionally show on display before sending the result
}
/**
* Response: Contains a Nano address derived from device private seed
* @prev NanoGetAddress
*/
message NanoAddress {
optional string address = 1; // Coin address in Base58 encoding
}
/**
* Request: ask device to sign Nano transaction
* @start
* @next NanoSignedTx
*/
message NanoSignTx {
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
optional string coin_name = 2 [default='Nano'];
optional ParentBlock parent_block = 3;
optional bytes link_hash = 4;
optional string link_recipient = 5;
repeated uint32 link_recipient_n = 6; // BIP-32 path to derive address for recipient
optional string representative = 7;
optional bytes balance = 8; // uint128 (big-endian encoded)
reserved 9;
message ParentBlock {
optional bytes parent_hash = 1;
optional bytes link = 2;
optional string representative = 4;
optional bytes balance = 5; // uint128 (big-endian encoded)
}
}
/**
* Response: signature for transaction
* @end
*/
message NanoSignedTx {
optional bytes signature = 1;
optional bytes block_hash = 2;
}