Updated APDU documentation
This commit is contained in:
115
doc/ethapp.adoc
115
doc/ethapp.adoc
@@ -41,6 +41,10 @@ Application version 1.9.19 - 2022-05-17
|
||||
### 1.10.2
|
||||
- Add domain names support
|
||||
|
||||
### 1.11.0
|
||||
- Add EIP-712 amount & date/time filtering
|
||||
- PROVIDE ERC 20 TOKEN INFORMATION & PROVIDE NFT INFORMATION now send back the index where the asset has been stored
|
||||
|
||||
## About
|
||||
|
||||
This application describes the APDU messages interface to communicate with the Ethereum application.
|
||||
@@ -274,27 +278,31 @@ signed by the following secp256k1 public key 045e6c1020c14dc46442fe89f97c0b68cdb
|
||||
'Command'
|
||||
|
||||
[width="80%"]
|
||||
|==============================================================================================================================
|
||||
|======================================================================
|
||||
| *CLA* | *INS* | *P1* | *P2* | *Lc* | *Le*
|
||||
| E0 | 0A | 00 | 00 | variable | 00
|
||||
|==============================================================================================================================
|
||||
| E0 | 0A | 00 | 00 | variable | 00
|
||||
|======================================================================
|
||||
|
||||
'Input data'
|
||||
|
||||
[width="80%"]
|
||||
|==============================================================================================================================
|
||||
| *Description* | *Length*
|
||||
| Length of ERC 20 ticker | 1
|
||||
| ERC 20 ticker | variable
|
||||
| ERC 20 contract address | 20
|
||||
| Number of decimals (big endian encoded) | 4
|
||||
| Chain ID (big endian encoded) | 4
|
||||
| Token information signature | variable
|
||||
|==============================================================================================================================
|
||||
|=======================================================================
|
||||
| *Description* | *Length*
|
||||
| Length of ERC 20 ticker | 1
|
||||
| ERC 20 ticker | variable
|
||||
| ERC 20 contract address | 20
|
||||
| Number of decimals (big endian encoded) | 4
|
||||
| Chain ID (big endian encoded) | 4
|
||||
| Token information signature | variable
|
||||
|=======================================================================
|
||||
|
||||
'Output data'
|
||||
|
||||
None
|
||||
[width="80%"]
|
||||
|====================================================================
|
||||
| *Description* | *Length*
|
||||
| Asset index where the information has been stored | 1
|
||||
|====================================================================
|
||||
|
||||
|
||||
### SIGN ETH EIP 712
|
||||
@@ -509,7 +517,11 @@ type || version || len(collectionName) || collectionName || address || chainId |
|
||||
|
||||
'Output data'
|
||||
|
||||
None
|
||||
[width="80%"]
|
||||
|====================================================================
|
||||
| *Description* | *Length*
|
||||
| Asset index where the information has been stored | 1
|
||||
|====================================================================
|
||||
|
||||
|
||||
### SET PLUGIN
|
||||
@@ -825,10 +837,34 @@ The signature is computed on :
|
||||
|
||||
183 || chain ID (BE) || contract address || schema hash || filters count || display name
|
||||
|
||||
##### Amount-join token
|
||||
|
||||
##### Show field
|
||||
This command should come before the corresponding *SEND STRUCT IMPLEMENTATION* and are only usable for message fields (and not domain ones).
|
||||
The first byte is used so that a signature of one type cannot be valid as another type.
|
||||
|
||||
These commands should come before the corresponding *SEND STRUCT IMPLEMENTATION* and are only usable for message fields (and not domain ones).
|
||||
The signature is computed on :
|
||||
|
||||
11 || chain ID (BE) || contract address || schema hash || field path || token index
|
||||
|
||||
##### Amount-join value
|
||||
|
||||
This command should come before the corresponding *SEND STRUCT IMPLEMENTATION* and are only usable for message fields (and not domain ones).
|
||||
|
||||
The signature is computed on :
|
||||
|
||||
22 || chain ID (BE) || contract address || schema hash || field path || display name || token index
|
||||
|
||||
##### Date / Time
|
||||
|
||||
This command should come before the corresponding *SEND STRUCT IMPLEMENTATION* and are only usable for message fields (and not domain ones).
|
||||
|
||||
The signature is computed on :
|
||||
|
||||
33 || chain ID (BE) || contract address || schema hash || field path || display name
|
||||
|
||||
##### Show raw field
|
||||
|
||||
This command should come before the corresponding *SEND STRUCT IMPLEMENTATION* and are only usable for message fields (and not domain ones).
|
||||
The first byte is used so that a signature of one type cannot be valid as another type.
|
||||
|
||||
The signature is computed on :
|
||||
@@ -843,17 +879,23 @@ _Command_
|
||||
|=========================================================================
|
||||
| *CLA* | *INS* | *P1* | *P2* | *LC* | *Le*
|
||||
| E0 | 1E | 00
|
||||
| 00 : activate
|
||||
| 00 : activation
|
||||
|
||||
0F : message info
|
||||
|
||||
FF : show field
|
||||
FC : date/time
|
||||
|
||||
FD : amount-join token
|
||||
|
||||
FE : amount-join value
|
||||
|
||||
FF : raw field
|
||||
| variable | variable
|
||||
|=========================================================================
|
||||
|
||||
_Input data_
|
||||
|
||||
##### If P2 == activate
|
||||
##### If P2 == activation
|
||||
|
||||
None
|
||||
|
||||
@@ -869,7 +911,40 @@ None
|
||||
| Signature | variable
|
||||
|==========================================
|
||||
|
||||
##### If P2 == show field
|
||||
##### If P2 == date / time
|
||||
|
||||
[width="80%"]
|
||||
|==========================================
|
||||
| *Description* | *Length (byte)*
|
||||
| Display name length | 1
|
||||
| Display name | variable
|
||||
| Signature length | 1
|
||||
| Signature | variable
|
||||
|==========================================
|
||||
|
||||
##### If P2 == amount-join token
|
||||
|
||||
[width="80%"]
|
||||
|==========================================
|
||||
| *Description* | *Length (byte)*
|
||||
| Token index | 1
|
||||
| Signature length | 1
|
||||
| Signature | variable
|
||||
|==========================================
|
||||
|
||||
##### If P2 == amount-join value
|
||||
|
||||
[width="80%"]
|
||||
|==========================================
|
||||
| *Description* | *Length (byte)*
|
||||
| Display name length | 1
|
||||
| Display name | variable
|
||||
| Token index | 1
|
||||
| Signature length | 1
|
||||
| Signature | variable
|
||||
|==========================================
|
||||
|
||||
##### If P2 == show raw field
|
||||
|
||||
[width="80%"]
|
||||
|==========================================
|
||||
|
||||
Reference in New Issue
Block a user