39#if defined(HAVE_TX_CHECK)
77#define TRANSACTION_CHECK_MAX_PAYLOAD_SIZE \
80 + (1 + 1 + TRANSACTION_CHECK_MAX_ADDRESS_SIZE) \
82 + (1 + 1 + TRANSACTION_CHECK_HASH_SIZE) \
83 + (1 + 1 + TRANSACTION_CHECK_HASH_SIZE) \
86 + (2 + 1 + TRANSACTION_CHECK_MSG_SIZE) \
87 + (2 + 1 + TRANSACTION_CHECK_URL_SIZE) \
89 + (1 + 1 + CX_ECDSA_SHA256_SIG_MAX_ASN1_LENGTH))
94#if defined(HAVE_TX_CHECK_APDU)
115 size_t *buffer_out_length);
ECDSA (Elliptic Curve Digital Signature Algorithm).
SHA-3 (Secure Hash Algorithm 3).
API of the Advanced BOLOS Graphical Library, for typical application use-cases.
The necessary parameters to build a warning page preceding a review. One can either use predefinedSet...
transaction_check_type_t type
const uint8_t * domain_hash
enum transaction_check_type_e transaction_check_type_t
tx_check_status_t tx_check_provide_descriptor(const buffer_t *payload)
Parse, verify and store a Transaction Check descriptor.
uint16_t tx_check_status_to_sw(tx_check_status_t status)
Standard status word of a Transaction Check status.
void tx_check_apply_report(nbgl_warning_t *warning, const tx_check_context_t *ctx)
Bind the stored report to the operation being signed and fill the review warning.
void tx_check_clear(void)
Erase the stored report.
bolos_err_t tx_check_handle_apdu(const uint8_t *buffer, size_t buffer_len, uint8_t p1, uint8_t p2, uint8_t *buffer_out, size_t *buffer_out_length)
Handle the SDK default APDU (CLA 0xB0, INS DEFAULT_APDU_INS_TRANSACTION_CHECK).
@ TX_CHECK_SETTING_OPT_IN
The user has seen the opt-in screen.
@ TX_CHECK_SETTING_ENABLE
Transaction Check is enabled.
tx_check_status_t tx_check_opt_in(bool response_expected)
Display the opt-in screen if the user has not seen it yet.
@ TX_CHECK_PENDING
Opt-in screen displayed, the choice comes later.
@ TX_CHECK_NOT_ALLOWED
Report bound to the review in progress, swap, or app busy.
@ TX_CHECK_DISABLED
Transaction Check disabled by the user.
@ TX_CHECK_INVALID_DESCRIPTOR
Descriptor malformed or rejected by the app.
@ TX_CHECK_SUCCESS
Descriptor stored, or opt-in already done.
@ TX_CHECK_INVALID_SIGNATURE
Descriptor signature rejected.