This command signs an Ethereum message following the personal_sign specification (https://github.com/ethereum/go-ethereum/pull/2940) after having the user validate the SHA-256 hash of the message being signed.
This command has been supported since firmware version 1.0.8
The input data is the message to sign, streamed to the device in 255 bytes maximum data chunks
|CLA|INS|P1|P2|Lc|Le|
|---|---|--|--|--|--|
|E0|08|00 : first message data block|00|variable|variable|
|||80 : subsequent message data block||||
|||||||
:inbox_tray: input data (first message data block)
|Description|Length|
|-----------|------|
|Number of BIP 32 derivations to perform (max 10)|1|
|First derivation index (big endian)|4|
|...|4|
|Last derivation index (big endian)|4|
|Message length|4|
|Message chunk|variable|
:inbox_tray: input data (other transaction data block)
|Description|Length|
|-----------|------|
|Message chunk|variable|
:outbox_tray: output data
|Description|Length|
|-----------|------|
|v|1|
|r|32|
|s|32|
</details>
<br/>
### SIGN ETH EIP 712
<details>
<summary>Description </summary>
This command signs an Ethereum message following the EIP 712 specification (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md)
For implementation version 0, the domain hash and message hash are provided to the device, which displays them and returns the signature
This command has been supported since firmware version 1.5.0
|Number of BIP 32 derivations to perform (max 10)|1|
|First derivation index (big endian)|4|
|...|4|
|Last derivation index (big endian)|4|
|Domain hash|32|
|Message hash|32|
:outbox_tray: output data
|Description|Length|
|-----------|------|
|v|1|
|r|32|
|s|32|
</details>
<br/>
<br/>
<br/>
## SET
### SET EXTERNAL PLUGIN
<details>
<summary>Description </summary>
This commands provides the name of a trusted binding of a plugin with a contract address and a supported method selector. This plugin will be called to interpret contract data in the following transaction signing command.
It shall be run immediately before performing a transaction involving a contract supported by this plugin to display the proper information to the user if necessary.
The function returns an error sw (0x6984) if the plugin requested is not installed on the device, 0x9000 otherwise.
signed by the following secp256k1 public key `0482bbf2f34f367b2e5bc21847b6566f21f0976b22d3388a9a5e446ac62d25cf725b62a2555b2dd464a4da0ab2f4d506820543af1d242470b1b1a969a27578f353`
This commands provides the name of a trusted binding of a plugin with a contract address and a supported method selector. This plugin will be called to interpret contract data in the following transaction signing command.
It can be used to set both internal and external plugins.
It shall be run immediately before performing a transaction involving a contract supported by this plugin to display the proper information to the user if necessary.
The function returns an error sw (0x6984) if the plugin requested is not installed on the device, 0x9000 otherwise.
The plugin names `ERC20`, `ERC721` and `ERC1155` are reserved. Additional plugin names might be added to this list in the future.
This command sets the index of the Withdrawal key used as withdrawal credentials in an ETH2 deposit contract call signature. The path of the Withdrawal key is defined as m/12381/3600/index/0 according to EIP 2334 (https://eips.ethereum.org/EIPS/eip-2334)
The default index used is 0 if this method isn’t called before the deposit contract transaction is sent to the device to be signed
This command has been supported since firmware version 1.5.0
|CLA|INS|P1|P2|Lc|Le|
|---|---|--|--|--|--|
|E0|10|00|00|variable|variable|
:inbox_tray: input data
|Description|Length|
|-----------|------|
|Withdrawal key index (big endian)|4|
:outbox_tray: output data
None
</details>
<br/>
<br/>
<br/>
## Provide
### PROVIDE ERC 20 TOKEN INFORMATION
<details>
<summary>Description </summary>
This commands provides a trusted description of an ERC 20 token to associate a contract address with a ticker and number of decimals.
It shall be run immediately before performing a transaction involving a contract calling this contract address to display the proper token information to the user if necessary, as marked in GET APP CONFIGURATION flags.
The signature is computed on
ticker || address || number of decimals (uint4be) || chainId (uint4be)
signed by the following secp256k1 public key 0482bbf2f34f367b2e5bc21847b6566f21f0976b22d3388a9a5e446ac62d25cf725b62a2555b2dd4This command returns an Ethereum 2 BLS12-381 public key derived following EIP 2333 specification (https://eips.ethereum.org/EIPS/eip-2333)
This command has been supported since firmware version 1.6.064a4da0ab2f4d506820543af1d242470b1b1a969a27578f353
|CLA|INS|P1|P2|Lc|Le|
|---|---|--|--|--|--|
|E0|0A|00|00|variable|00|
:inbox_tray: input data
|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|
:outbox_tray: output data
none
</details>
<br/>
### PROVIDE NFT INFORMATION
<details>
<summary>Description </summary>
This commands provides a trusted description of an NFT to associate a contract address with a collectionName.
It shall be run immediately before performing a transaction involving a contract calling this contract address to display the proper nft information to the user if necessary, as marked in GET APP CONFIGURATION flags.
The signature is computed on:
type || version || len(collectionName) || collectionName || address || chainId || keyId || algorithmId