Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
address_book_entrypoints.h
Go to the documentation of this file.
1/*******************************************************************************
2 * (c) 2026 Ledger SAS
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 ********************************************************************************/
16#pragma once
17
18#include <stddef.h>
19#include <stdbool.h>
20#include <stdint.h>
21#include "identity.h"
22#include "nbgl_use_case.h"
23
24#ifdef HAVE_ADDRESS_BOOK_LEDGER_ACCOUNT
25#include "ledger_account.h"
26#endif
27
28/*
29The handle functions must be defined by each Coin application implementing the Address Book feature.
30
31These functions will be called by the common code of the Address Book application
32in order to validate the content of the payload, or finalize/cleanup the UI flow.
33*/
34
35#ifdef HAVE_ADDRESS_BOOK
36
37/*************** Exported functions prototypes: Register Identity **************/
38
51
60
72
73/*************** Exported functions prototypes: Edit Contact Name **************/
74
83
95
96/*************** Exported functions prototypes: Edit Identifier ***************/
97
110
127
136
149
150/*************** Exported functions prototypes: Edit Scope ****************/
151
160
173
174/*************** Exported functions prototypes: Provide Contact ***********/
175
189
190#ifdef HAVE_ADDRESS_BOOK_LEDGER_ACCOUNT
191
192/*************** Exported functions prototypes: Ledger Account *****************/
193
207
217
227
228/*************** Exported functions prototypes: Edit Ledger Account **********/
229
243
256
257/*************** Exported functions prototypes: Provide Ledger Account Contact */
258
272
273#endif // HAVE_ADDRESS_BOOK_LEDGER_ACCOUNT
274
275#endif // HAVE_ADDRESS_BOOK
void finalize_ui_register_identity(void)
Handle called to finalize the UI flow for registering an Identity.
bool handle_check_edit_identifier(const edit_identifier_t *params)
Handle called to validate and store the Edit Identifier parameters.
void finalize_ui_edit_contact_name(void)
Handle called to finalize the UI flow for editing a contact name.
nbgl_contentTagValue_t * get_edit_identifier_tagValue(uint8_t pairIndex)
Callback to retrieve a tag-value pair for the Edit Identifier UI.
bool handle_provide_identity(const identity_t *contact)
Handle called to store a verified contact.
bool handle_check_register_identity(identity_t *params)
Handle called to validate the received Identity.
void on_edit_identifier_applied(const edit_identifier_t *edit)
Notification that an identifier edit was successfully applied.
nbgl_contentTagValue_t * get_register_identity_tagValue(uint8_t pairIndex)
Callback to retrieve a tag-value pair for the Register Identity UI.
void on_edit_contact_name_applied(const edit_contact_name_t *edit)
Notification that a contact name edit was successfully applied.
void finalize_ui_edit_scope(void)
Handle called to finalize the UI flow for editing a scope.
void on_edit_ledger_account_applied(const edit_ledger_account_t *edit)
Notification that a Ledger Account edit was successfully applied.
void finalize_ui_edit_identifier(void)
Handle called to finalize the UI flow for editing an Identifier.
bool handle_provide_ledger_account(const ledger_account_t *account)
Handle called to store a verified Ledger Account contact.
void on_edit_scope_applied(const edit_scope_t *edit)
Notification that a scope edit was successfully applied.
bool handle_check_edit_ledger_account(edit_ledger_account_t *params)
Handle called to validate the Edit Ledger Account parameters.
bool handle_check_register_ledger_account(ledger_account_t *params)
Handle called to validate the received Ledger Account.
void display_register_ledger_account_review(nbgl_choiceCallback_t choice_callback)
Handle called to display the Ledger Account registration review screen.
void finalize_ui_ledger_account(void)
Handle called to finalize the UI flow for a Ledger Account operation.
Register / Edit Contact Name / Edit Scope / Edit Identifier.
API of the Advanced BOLOS Graphical Library, for typical application use-cases.
void(* nbgl_choiceCallback_t)(bool confirm)
prototype of choice callback function
Data extracted from an Edit Contact Name TLV payload.
Definition identity.h:84
Data extracted from an Edit Identifier TLV payload.
Definition identity.h:75
Data extracted from a Rename Ledger Account TLV payload.
Data extracted from an Edit Scope Name TLV payload.
Definition identity.h:96
Data extracted from a Register Identity TLV payload.
Definition identity.h:62
Data extracted from a Register Ledger Account TLV payload.
This structure contains a [tag,value] pair and possible extensions.