Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
address_book.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
17#pragma once
18
19/* Includes ------------------------------------------------------------------*/
20#include <stddef.h>
21#include "os_types.h"
22
23/* Exported enumerations -----------------------------------------------------*/
33
34#define FAMILY_AS_STR(x) \
35 (x == FAMILY_BITCOIN ? "Bitcoin" \
36 : x == FAMILY_ETHEREUM ? "Ethereum" \
37 : x == FAMILY_SOLANA ? "Solana" \
38 : x == FAMILY_POLKADOT ? "Polkadot" \
39 : x == FAMILY_COSMOS ? "Cosmos" \
40 : x == FAMILY_CARDANO ? "Cardano" \
41 : "Unknown")
42
43/* Exported types, structures, unions ----------------------------------------*/
44
45/* Exported defines --------------------------------------------------------*/
46
68#ifdef CUSTOM_IO_APDU_BUFFER_SIZE
69_Static_assert(CUSTOM_IO_APDU_BUFFER_SIZE >= OS_IO_SEPH_BUFFER_SIZE,
70 "CUSTOM_IO_APDU_BUFFER_SIZE is too small for HAVE_ADDRESS_BOOK: "
71 "CMD_EDIT_IDENTIFIER requires up to 448 bytes (SEPH buffer).");
72#endif // CUSTOM_IO_APDU_BUFFER_SIZE
73
74/* Exported macros------------------------------------------------------------*/
75
76/* Exported variables --------------------------------------------------------*/
77
78/* Exported functions prototypes--------------------------------------------- */
79bolos_err_t addr_book_handle_apdu(uint8_t *buffer, size_t buffer_len, uint8_t p1, uint8_t p2);
blockchain_family_e
@ FAMILY_COUNT
@ FAMILY_COSMOS
@ FAMILY_SOLANA
@ FAMILY_CARDANO
@ FAMILY_BITCOIN
@ FAMILY_ETHEREUM
@ FAMILY_POLKADOT
bolos_err_t addr_book_handle_apdu(uint8_t *buffer, size_t buffer_len, uint8_t p1, uint8_t p2)