Skip to content

Commit 9a13852

Browse files
Merge pull request #758 from LedgerHQ/feat/apa/gcs_doc
GCS documentation
2 parents 381a06a + b5ae9ba commit 9a13852

File tree

3 files changed

+373
-36
lines changed

3 files changed

+373
-36
lines changed

doc/ethapp.adoc

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,19 +1101,19 @@ _Input data_
11011101
##### If P1 == first chunk
11021102
11031103
[width="80%"]
1104-
|==========================================
1105-
| *Description* | *Length (byte)*
1106-
| Payload length | 2
1107-
| TLV payload | variable
1108-
|==========================================
1104+
|====================================================================
1105+
| *Description* | *Length (byte)*
1106+
| struct size (BE) | 2
1107+
| link:tlv_structs.md#enum_value[ENUM_VALUE struct] | variable
1108+
|====================================================================
11091109
11101110
##### If P1 == following chunk
11111111
11121112
[width="80%"]
1113-
|==========================================
1114-
| *Description* | *Length (byte)*
1115-
| TLV payload | variable
1116-
|==========================================
1113+
|====================================================================
1114+
| *Description* | *Length (byte)*
1115+
| link:tlv_structs.md#enum_value[ENUM_VALUE struct] | variable
1116+
|====================================================================
11171117
11181118
_Output data_
11191119
@@ -1141,19 +1141,19 @@ _Input data_
11411141
##### If P1 == first chunk
11421142
11431143
[width="80%"]
1144-
|==========================================
1145-
| *Description* | *Length (byte)*
1146-
| Payload length | 2
1147-
| TLV payload | variable
1148-
|==========================================
1144+
|================================================================================
1145+
| *Description* | *Length (byte)*
1146+
| struct size (BE) | 2
1147+
| link:tlv_structs.md#transaction_info[TRANSACTION_INFO struct] | variable
1148+
|================================================================================
11491149
11501150
##### If P1 == following chunk
11511151
11521152
[width="80%"]
1153-
|==========================================
1154-
| *Description* | *Length (byte)*
1155-
| TLV payload | variable
1156-
|==========================================
1153+
|================================================================================
1154+
| *Description* | *Length (byte)*
1155+
| link:tlv_structs.md#transaction_info[TRANSACTION_INFO struct] | variable
1156+
|================================================================================
11571157
11581158
_Output data_
11591159
@@ -1181,19 +1181,19 @@ _Input data_
11811181
##### If P1 == first chunk
11821182
11831183
[width="80%"]
1184-
|==========================================
1185-
| *Description* | *Length (byte)*
1186-
| Payload length | 2
1187-
| TLV payload | variable
1188-
|==========================================
1184+
|===========================================================
1185+
| *Description* | *Length (byte)*
1186+
| struct size (BE) | 2
1187+
| link:tlv_structs.md#field[FIELD struct] | variable
1188+
|===========================================================
11891189
11901190
##### If P1 == following chunk
11911191
11921192
[width="80%"]
1193-
|==========================================
1194-
| *Description* | *Length (byte)*
1195-
| TLV payload | variable
1196-
|==========================================
1193+
|===========================================================
1194+
| *Description* | *Length (byte)*
1195+
| link:tlv_structs.md#field[FIELD struct] | variable
1196+
|===========================================================
11971197
11981198
_Output data_
11991199
@@ -1225,19 +1225,19 @@ _Input data_
12251225
##### If P1 == first chunk
12261226
12271227
[width="80%"]
1228-
|==========================================
1229-
| *Description* | *Length (byte)*
1230-
| Payload length | 2
1231-
| TLV payload | variable
1232-
|==========================================
1228+
|====================================================================
1229+
| *Description* | *Length (byte)*
1230+
| struct size (BE) | 2
1231+
| link:tlv_structs.md#proxy_info[PROXY_INFO struct] | variable
1232+
|====================================================================
12331233
12341234
##### If P1 == following chunk
12351235
12361236
[width="80%"]
1237-
|==========================================
1238-
| *Description* | *Length (byte)*
1239-
| TLV payload | variable
1240-
|==========================================
1237+
|====================================================================
1238+
| *Description* | *Length (byte)*
1239+
| link:tlv_structs.md#proxy_info[PROXY_INFO struct] | variable
1240+
|====================================================================
12411241
12421242
_Output data_
12431243

doc/gcs.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generic Clear-Signing
2+
3+
```mermaid
4+
sequenceDiagram
5+
participant HW as Hardware Wallet
6+
participant SW as Software Wallet
7+
8+
SW ->> HW: SIGN, store only
9+
note over HW: store compressed<br/>calldata in RAM
10+
HW ->> SW: OK / KO
11+
SW ->> HW: TRANSACTION INFO
12+
HW ->> SW: OK / KO
13+
loop N times for N fields
14+
SW ->> HW: token / NFT / enum / trusted name metadatas
15+
HW ->> SW: OK / KO
16+
SW ->> HW: TX FIELD DESCRIPTION
17+
HW ->> SW: OK / KO
18+
end
19+
SW ->> HW: SIGN, start flow
20+
note left of HW: check computed fields hash
21+
note over HW: display all the<br/>formatted fields
22+
HW ->> SW: OK (with r,s,v) / KO
23+
```

0 commit comments

Comments
 (0)