47#include "os_helpers.h"
52#include "status_words.h"
54#ifdef HAVE_ADDRESS_BOOK_LEDGER_ACCOUNT
58#if defined(HAVE_ADDRESS_BOOK)
61#define P1_REGISTER_IDENTITY 0x01
62#define P1_EDIT_CONTACT_NAME 0x02
63#define P1_EDIT_IDENTIFIER 0x03
64#define P1_EDIT_SCOPE 0x04
65#define P1_PROVIDE_CONTACT 0x20
67#ifdef HAVE_ADDRESS_BOOK_LEDGER_ACCOUNT
68#define P1_REGISTER_LEDGER_ACCOUNT 0x11
69#define P1_EDIT_LEDGER_ACCOUNT 0x12
70#define P1_PROVIDE_LEDGER_ACCOUNT_CONTACT 0x21
76 bolos_err_t err = SWO_CONDITIONS_NOT_SATISFIED;
77 uint8_t *payload = NULL;
78 size_t payload_len = 0;
86 return SWO_INCORRECT_DATA;
114#ifdef HAVE_ADDRESS_BOOK_LEDGER_ACCOUNT
#define P1_PROVIDE_CONTACT
#define P1_PROVIDE_LEDGER_ACCOUNT_CONTACT
#define P1_REGISTER_IDENTITY
#define P1_EDIT_IDENTIFIER
#define P1_EDIT_LEDGER_ACCOUNT
bolos_err_t addr_book_handle_apdu(uint8_t *buffer, size_t buffer_len, uint8_t p1, uint8_t p2)
#define P1_EDIT_CONTACT_NAME
#define P1_REGISTER_LEDGER_ACCOUNT
Chunked APDU payload reassembly shared by the SDK app features.
@ APDU_CHUNKS_OWNER_ADDRESS_BOOK
@ APDU_CHUNKS_ERROR
Protocol error; the payload in progress is dropped.
@ APDU_CHUNKS_PENDING
More chunks needed.
@ APDU_CHUNKS_COMPLETE
Full payload assembled; out_buf/out_len are valid.
apdu_chunks_status_t apdu_chunks_reassemble(apdu_chunks_owner_t owner, const uint8_t *data, size_t len, uint8_t p2, uint8_t **out_buf, size_t *out_len)
Reassemble a multi-chunk APDU payload.
Register / Edit Contact Name / Edit Scope / Edit Identifier.
bolos_err_t provide_contact(uint8_t *buffer_in, size_t buffer_in_length)
Deliver a verified contact to the coin application.
bolos_err_t register_identity(uint8_t *buffer_in, size_t buffer_in_length)
Register a new identity.
bolos_err_t edit_scope(uint8_t *buffer_in, size_t buffer_in_length)
Edit the SCOPE of an existing Identity contact.
bolos_err_t edit_identifier(uint8_t *buffer_in, size_t buffer_in_length)
Edit the IDENTIFIER of an existing Identity contact.
bolos_err_t edit_contact_name(uint8_t *buffer_in, size_t buffer_in_length)
Edit the CONTACT_NAME of an existing Identity contact.
bolos_err_t provide_ledger_account_contact(uint8_t *buffer_in, size_t buffer_in_length)
Deliver a verified Ledger Account contact to the coin application.
bolos_err_t register_ledger_account(uint8_t *buffer_in, size_t buffer_in_length)
Register a new Ledger Account.
bolos_err_t edit_ledger_account(uint8_t *buffer_in, size_t buffer_in_length)
Edit the name of an existing Ledger Account.