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
50bool handle_check_register_identity(identity_t *params);
51
59void finalize_ui_register_identity(void);
60
71nbgl_contentTagValue_t *get_register_identity_tagValue(uint8_t pairIndex);
72
73/*************** Exported functions prototypes: Edit Contact Name **************/
74
82void finalize_ui_edit_contact_name(void);
83
94void on_edit_contact_name_applied(const edit_contact_name_t *edit);
95
96/*************** Exported functions prototypes: Edit Identifier ***************/
97
109bool handle_check_edit_identifier(const edit_identifier_t *params);
110
125nbgl_contentTagValue_t *get_edit_identifier_tagValue(uint8_t pairIndex);
126
134void finalize_ui_edit_identifier(void);
135
147void on_edit_identifier_applied(const edit_identifier_t *edit);
148
149/*************** Exported functions prototypes: Edit Scope ****************/
150
158void finalize_ui_edit_scope(void);
159
171void on_edit_scope_applied(const edit_scope_t *edit);
172
173/*************** Exported functions prototypes: Provide Contact ***********/
174
187bool handle_provide_identity(const identity_t *contact);
188
189#ifdef HAVE_ADDRESS_BOOK_LEDGER_ACCOUNT
190
191/*************** Exported functions prototypes: Ledger Account *****************/
192
205bool handle_check_register_ledger_account(ledger_account_t *params);
206
215void display_register_ledger_account_review(nbgl_choiceCallback_t choice_callback);
216
224void finalize_ui_register_ledger_account(void);
225
226/*************** Exported functions prototypes: Edit Ledger Account **********/
227
240bool handle_check_edit_ledger_account(edit_ledger_account_t *params);
241
249void finalize_ui_edit_ledger_account(void);
250
262void on_edit_ledger_account_applied(const edit_ledger_account_t *edit);
263
264/*************** Exported functions prototypes: Provide Ledger Account Contact */
265
278bool handle_provide_ledger_account(const ledger_account_t *account);
279
280#endif // HAVE_ADDRESS_BOOK_LEDGER_ACCOUNT
281
282#endif // HAVE_ADDRESS_BOOK
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 a Rename Ledger Account TLV payload.
Data extracted from a Register Ledger Account TLV payload.
This structure contains a [tag,value] pair and possible extensions.