Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
ledger_account.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 "os_types.h"
21#include "address_book.h"
22#include "bip32.h"
23#include "identity.h" // IDENTIFIER_MAX_LENGTH
24
25/* Exported defines --------------------------------------------------------*/
26#define TYPE_REGISTER_LEDGER_ACCOUNT 0x2f
27#define TYPE_EDIT_LEDGER_ACCOUNT 0x30
28#define TYPE_PROVIDE_LEDGER_ACCOUNT_CONTACT 0x34
29#define ACCOUNT_NAME_LENGTH 33
30
31/* Exported types, structures, unions ----------------------------------------*/
32
42
46typedef struct {
48 char old_account_name[ACCOUNT_NAME_LENGTH];
49 uint8_t address[IDENTIFIER_MAX_LENGTH];
51 uint8_t address_len;
53
54/* Exported macros------------------------------------------------------------*/
55
56/* Exported variables --------------------------------------------------------*/
57
58/* Exported functions prototypes--------------------------------------------- */
59bolos_err_t register_ledger_account(uint8_t *buffer_in, size_t buffer_in_length);
60bolos_err_t edit_ledger_account(uint8_t *buffer_in, size_t buffer_in_length);
61bolos_err_t provide_ledger_account_contact(uint8_t *buffer_in, size_t buffer_in_length);
blockchain_family_e
Register / Edit Contact Name / Edit Scope / Edit Identifier.
bolos_err_t provide_ledger_account_contact(uint8_t *buffer_in, size_t buffer_in_length)
bolos_err_t register_ledger_account(uint8_t *buffer_in, size_t buffer_in_length)
bolos_err_t edit_ledger_account(uint8_t *buffer_in, size_t buffer_in_length)
#define ACCOUNT_NAME_LENGTH
max 32 printable chars + null terminator
Data extracted from a Rename Ledger Account TLV payload.
uint8_t address_len
Length of address in bytes.
ledger_account_t ledger_account
New account (account_name = new name)
Data extracted from a Register Ledger Account TLV payload.
path_bip32_t bip32_path
blockchain_family_e blockchain_family