#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "transaction_check.h"
Go to the source code of this file.
◆ finalize_ui_tx_check_opt_in()
| void finalize_ui_tx_check_opt_in |
( |
bool | response_expected | ) |
|
Leave the opt-in flow.
Called once the user has chosen; the APDU reply, if any, has already been sent.
- Parameters
-
| [in] | response_expected | Whether the flow was started by an APDU (else from the settings) |
◆ handle_check_tx_report()
Validate the chain-specific fields of a received descriptor.
Called after the TLV parsing and the signature verification, before the descriptor is stored. Typically checks the address size and the supported check types.
- Parameters
-
| [in] | descriptor | Parsed descriptor (zero-copy buffers valid only during the call) |
- Returns
- true to store the descriptor, false to reject it
◆ handle_check_tx_report_chain_id()
| bool handle_check_tx_report_chain_id |
( |
bool | chain_id_received, |
|
|
uint64_t | chain_id, |
|
|
const tx_check_context_t * | ctx ) |
Check the report chain ID against the operation being signed.
- Parameters
-
| [in] | chain_id_received | Whether the descriptor holds a chain ID |
| [in] | chain_id | Chain ID of the descriptor |
| [in] | ctx | Operation being signed |
- Returns
- true if the report applies to this chain
◆ handle_check_tx_report_signer()
| bool handle_check_tx_report_signer |
( |
const uint8_t * | address, |
|
|
size_t | address_len, |
|
|
const tx_check_context_t * | ctx ) |
Check that the report address is the signer of the operation.
- Parameters
-
| [in] | address | Address received in the descriptor, in the chain format |
| [in] | address_len | Address length |
| [in] | ctx | Operation being signed |
- Returns
- true if the address is the signer
◆ handle_tx_check_get_setting()
Read a persistent Transaction Check setting.
- Parameters
-
| [in] | setting | Setting to read |
- Returns
- Setting value
◆ handle_tx_check_is_idle()
| bool handle_tx_check_is_idle |
( |
void | | ) |
|
Tell whether the app is idle, so that the opt-in screen can be displayed.
- Returns
- true if no flow is on screen
◆ handle_tx_check_opt_in_response()
| void handle_tx_check_opt_in_response |
( |
bool | enabled | ) |
|
Reply to an opt-in request received on the app APDU.
Called once the user has chosen, before finalize_ui_tx_check_opt_in(), when tx_check_opt_in() was called with a pending reply. Optional: the SDK default sends the 1-byte enable state with SWO_SUCCESS.
- Parameters
-
| [in] | enabled | Transaction Check enable state, to send as the 1-byte reply |
Reply to an opt-in request received on the app APDU.
- Parameters
-
| [in] | enabled | Transaction Check enable state |
Definition at line 151 of file transaction_check_ui.c.
◆ handle_tx_check_set_setting()
Write a persistent Transaction Check setting.
- Parameters
-
| [in] | setting | Setting to write |
| [in] | value | New value |