-
-
Notifications
You must be signed in to change notification settings - Fork 663
/
messages-solana.proto
78 lines (70 loc) · 1.9 KB
/
messages-solana.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
syntax = "proto2";
package hw.trezor.messages.solana;
/**
* Request: Ask device for public key corresponding to address_n path
* @start
* @next SolanaPublicKey
* @next Failure
*/
message SolanaGetPublicKey {
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
optional bool show_display = 2; // optionally show on display before sending the result
}
/**
* Response: Contains public key derived from device private seed
* @end
*/
message SolanaPublicKey {
required bytes public_key = 1;
}
/**
* Request: Ask device for Solana address
* @start
* @next SolanaAddress
* @next Failure
*/
message SolanaGetAddress {
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
optional bool show_display = 2; // optionally show on display before sending the result
optional bool chunkify = 3; // display the address in chunks of 4 characters
}
/**
* Response: Contains a Solana address derived from device private seed
* @end
*/
message SolanaAddress {
required string address = 1; // Solana address as Base58 encoded string
}
/**
* @embed
*/
message SolanaTxTokenAccountInfo {
required string base_address = 1;
required string token_program = 2;
required string token_mint = 3;
required string token_account = 4;
}
/**
* @embed
*/
message SolanaTxAdditionalInfo {
repeated SolanaTxTokenAccountInfo token_accounts_infos = 1;
}
/**
* Request: Ask device to sign a Solana transaction
* @start
* @next SolanaTxSignature
* @next Failure
*/
message SolanaSignTx {
repeated uint32 address_n = 1; // BIP-32 path to derive the key to sign with
required bytes serialized_tx = 2; // serialized tx to be signed
optional SolanaTxAdditionalInfo additional_info = 3;
}
/**
* Response: Contains the transaction signature
* @end
*/
message SolanaTxSignature {
required bytes signature = 1; // tx signature
}