|
Embedded SDK
Embedded SDK
|
#include <stdint.h>#include <stdbool.h>#include "tlv_library.h"#include "bip32.h"#include "lcx_sha256.h"#include "address_book.h"#include "identity.h"#include "ledger_account.h"#include "nbgl_use_case.h"

Go to the source code of this file.
Classes | |
| struct | s_register_state_t |
| union | ab_payload_u |
| struct | ab_ui_t |
Functions | |
| bool | address_book_handle_derivation_path (const tlv_data_t *data, path_bip32_t *bip32_path) |
| Generic handler for BIP32 derivation path. | |
| bool | address_book_handle_chain_id (const tlv_data_t *data, uint64_t *chain_id) |
| Generic handler for chain ID. | |
| bool | address_book_handle_blockchain_family (const tlv_data_t *data, blockchain_family_e *family) |
| Generic handler for blockchain family. | |
| bool | address_book_handle_printable_string (const tlv_data_t *data, char *output_buffer, size_t buffer_size) |
| Generic handler for printable string extraction. | |
| void | address_book_display_review (const nbgl_icon_details_t *icon, const char *reviewTitle, const char *confirmText, nbgl_choiceCallback_t choiceCallback) |
| Display a confirmation review for an Address Book operation. | |
| void | address_book_handle_review_rejected (nbgl_callback_t finalize) |
| Common handling of a rejected Address Book review. | |
| void | address_book_finalize_review (bool success, const char *successMsg, const char *errorMsg, nbgl_callback_t finalize) |
| Common handling of a confirmed Address Book review's outcome. | |
Variables | |
| ab_payload_u | g_ab_payload |
| ab_ui_t | g_ab_ui |
| void address_book_display_review | ( | const nbgl_icon_details_t * | icon, |
| const char * | reviewTitle, | ||
| const char * | confirmText, | ||
| nbgl_choiceCallback_t | choiceCallback ) |
Display a confirmation review for an Address Book operation.
Uses ab_ui_t::list as the tag/value list (already populated by the caller). Sets wrapping = true and delegates to nbgl_useCaseReviewLight().
| [in] | icon | Icon shown on the title page (typically &LARGE_ADDRESS_BOOK_ICON, may be NULL) |
| [in] | reviewTitle | Title of the review |
| [in] | confirmText | Text shown on the confirmation page |
| [in] | choiceCallback | Callback invoked with the user's choice |
Definition at line 149 of file address_book_common.c.
| void address_book_finalize_review | ( | bool | success, |
| const char * | successMsg, | ||
| const char * | errorMsg, | ||
| nbgl_callback_t | finalize ) |
Common handling of a confirmed Address Book review's outcome.
On success, displays a success status with successMsg. On failure, sends SWO_INCORRECT_DATA and displays an error status with errorMsg. In both cases finalize is invoked once the status screen is dismissed.
| [in] | success | Result of the operation (e.g. HMAC build & send) |
| [in] | successMsg | Status message to display on success |
| [in] | errorMsg | Status message to display on failure |
| [in] | finalize | Callback invoked once the status screen is dismissed |
Definition at line 193 of file address_book_common.c.
| bool address_book_handle_blockchain_family | ( | const tlv_data_t * | data, |
| blockchain_family_e * | family ) |
Generic handler for blockchain family.
| [in] | data | TLV data |
| [out] | family | Pointer to blockchain family enum to fill |
Definition at line 94 of file address_book_common.c.
| bool address_book_handle_chain_id | ( | const tlv_data_t * | data, |
| uint64_t * | chain_id ) |
Generic handler for chain ID.
| [in] | data | TLV data |
| [out] | chain_id | Pointer to chain ID variable to fill |
Definition at line 78 of file address_book_common.c.
| bool address_book_handle_derivation_path | ( | const tlv_data_t * | data, |
| path_bip32_t * | bip32_path ) |
Generic handler for BIP32 derivation path.
| [in] | data | TLV data |
| [out] | bip32_path | Pointer to BIP32 path structure to fill |
Definition at line 53 of file address_book_common.c.
| bool address_book_handle_printable_string | ( | const tlv_data_t * | data, |
| char * | output_buffer, | ||
| size_t | buffer_size ) |
Generic handler for printable string extraction.
Extracts a string from TLV data and verifies it contains only printable characters, with at least one visible character: a string made only of spaces is refused, as it would show as blank on screen.
| [in] | data | TLV data |
| [out] | output_buffer | Buffer to store the extracted string |
| [in] | buffer_size | Maximum size of the output buffer (including null terminator) |
Definition at line 121 of file address_book_common.c.
| void address_book_handle_review_rejected | ( | nbgl_callback_t | finalize | ) |
Common handling of a rejected Address Book review.
Sends SWO_INCORRECT_DATA and displays the standard STATUS_TYPE_OPERATION_REJECTED status, then invokes finalize.
| [in] | finalize | Callback invoked once the status screen is dismissed |
Definition at line 174 of file address_book_common.c.
|
extern |
Definition at line 43 of file address_book_common.c.
|
extern |
Definition at line 44 of file address_book_common.c.