Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
ledger_account_provide_contact.c File Reference

Provide Ledger Account Contact flow (P1=0x21, struct type 0x34) More...

#include <string.h>
#include "os_utils.h"
#include "status_words.h"
#include "tlv_library.h"
#include "buffer.h"
#include "bip32.h"
#include "address_book.h"
#include "address_book_entrypoints.h"
#include "address_book_crypto.h"
#include "address_book_common.h"
#include "ledger_account.h"
Include dependency graph for ledger_account_provide_contact.c:

Go to the source code of this file.

Detailed Description

Provide Ledger Account Contact flow (P1=0x21, struct type 0x34)

Delivers a previously registered Ledger Account to the coin application so that the application can substitute the human-readable account name for the raw derived address during transaction review.

Unlike the Identity Provide Contact flow (P1=0x20), a Ledger Account has no external address, no group_handle, no scope, and no hmac_rest. The only proof required is the HMAC Proof of Registration returned by register_ledger_account (P1=0x11).

Flow:

  1. Receive fully assembled payload (multi-chunk reassembly handled by address_book.c)
  2. Parse TLV payload (contact_name + derivation_path + chain_id + blockchain_family
    • hmac_proof)
  3. Verify HMAC Proof of Registration
  4. Call handle_provide_ledger_account() so the coin app can store the contact
  5. Return SWO_SUCCESS (9000, no data)

Active under HAVE_ADDRESS_BOOK && HAVE_ADDRESS_BOOK_LEDGER_ACCOUNT.

Definition in file ledger_account_provide_contact.c.