Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
app_features
address_book
include
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 -----------------------------------------------------*/
24
typedef
enum
{
25
FAMILY_BITCOIN
= 0x00,
26
FAMILY_ETHEREUM
= 0x01,
27
FAMILY_SOLANA
= 0x02,
28
FAMILY_POLKADOT
= 0x03,
29
FAMILY_COSMOS
= 0x04,
30
FAMILY_CARDANO
= 0x05,
31
FAMILY_COUNT
32
}
blockchain_family_e
;
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--------------------------------------------- */
79
bolos_err_t
addr_book_handle_apdu
(uint8_t *buffer,
size_t
buffer_len, uint8_t p1, uint8_t p2);
blockchain_family_e
blockchain_family_e
Definition
address_book.h:24
FAMILY_COUNT
@ FAMILY_COUNT
Definition
address_book.h:31
FAMILY_COSMOS
@ FAMILY_COSMOS
Definition
address_book.h:29
FAMILY_SOLANA
@ FAMILY_SOLANA
Definition
address_book.h:27
FAMILY_CARDANO
@ FAMILY_CARDANO
Definition
address_book.h:30
FAMILY_BITCOIN
@ FAMILY_BITCOIN
Definition
address_book.h:25
FAMILY_ETHEREUM
@ FAMILY_ETHEREUM
Definition
address_book.h:26
FAMILY_POLKADOT
@ FAMILY_POLKADOT
Definition
address_book.h:28
addr_book_handle_apdu
bolos_err_t addr_book_handle_apdu(uint8_t *buffer, size_t buffer_len, uint8_t p1, uint8_t p2)
Generated by
1.9.8