@@ -41,6 +41,7 @@ The general structure of a request and response is as followed:
41
41
| 0xE005 | Failed to derive pub key |
42
42
| 0xE006 | Invalid token size |
43
43
| 0xE007 | Invalid metadata version |
44
+ | 0xE008 | Invalid token proof size |
44
45
| 0xEF00 | Internal error |
45
46
46
47
## Commands definitions
@@ -131,11 +132,42 @@ This command returns a signature of the passed transaction
131
132
| -------| ----------| -----------------------------| -------------------|
132
133
| CLA | byte (1) | Application Identifier | 0x80 |
133
134
| INS | byte (1) | Instruction ID | 0x03 |
134
- | P1 | byte (1) | Payload desc | 0x00: first transaction data block < br > 0x01: subsequent transaction data block |
135
- | P2 | byte (1) | ignored | |
135
+ | P1 | byte (1) | Payload desc | 0x00, 0x01, 0x02 |
136
+ | P2 | byte (1) | ignored | 0x00, 0x01 |
136
137
| L | byte (1) | Bytes in payload | (depends) |
137
138
138
- Input data (first transaction data block):
139
+ We use ` P1 ` and ` P2 ` to distinguish between different data frames:
140
+
141
+ * ` P1 ` = 0 and ` P2 ` = 0 indicates the first token metadata data frame
142
+ * ` P1 ` = 1 and ` P2 ` = 1 indicates a token proof data frame
143
+ * ` P1 ` = 1 and ` P2 ` = 0 indicates subsequent metadata data frames
144
+ * ` P1 ` = 2 and ` P2 ` = 0 indicates the first tx data frame
145
+ * ` P1 ` = 2 and ` P2 ` = 1 indicates subsequent tx data frames
146
+
147
+ Input data (first token metadata frame):
148
+
149
+ | Field | Type | Content | Expected |
150
+ | ----------------| ------------------------| ----------------------| -------------------|
151
+ | Token Size | byte (1) | Token Size | Any value between 0 and 5, inclusive |
152
+ | Token Metadata | 46 | Token Metadata | ? |
153
+ | Token Proof Size | 2 | Token Proof Size | ? |
154
+ | Token Proof | byte (?) | Token Proof | ? |
155
+
156
+ Input data (token proof frame):
157
+
158
+ | Field | Type | Content | Expected |
159
+ | ----------------| ------------------------| ----------------------| -------------------|
160
+ | Token Proof | byte (?) | Token Proof | ? |
161
+
162
+ Input data (subsequent token metadata frame):
163
+
164
+ | Field | Type | Content | Expected |
165
+ | ----------------| ------------------------| ----------------------| -------------------|
166
+ | Token Metadata | 46 | Token Metadata | ? |
167
+ | Token Proof Size | 2 | Token Proof Size | ? |
168
+ | Token Proof | byte (?) | Token Proof | ? |
169
+
170
+ Input data (first transaction data frame):
139
171
140
172
| Field | Type | Content | Expected |
141
173
| ----------------| ------------------------| ----------------------| -------------------|
@@ -144,11 +176,9 @@ Input data (first transaction data block):
144
176
| Path[ 2] | byte (4) | Derivation Path Data | ? |
145
177
| Path[ 3] | byte (4) | Derivation Path Data | ? |
146
178
| Path[ 4] | byte (4) | Derivation Path Data | ? |
147
- | Token Size | byte (1) | Token Size | Any value between 0 and 5, inclusive |
148
- | Token Metadata | byte (Token Size * 46) | Token Metadata | ? |
149
179
| Payload | byte (?) | Transaction Payload | ? |
150
180
151
- Input data (subsequent transaction data block ):
181
+ Input data (subsequent transaction data frame ):
152
182
153
183
| Field | Type | Content | Expected |
154
184
| ---------| ----------| ---------------------------| -------------------|
0 commit comments