Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
ledger_account.h File Reference
#include "os_types.h"
#include "address_book.h"
#include "bip32.h"
#include "identity.h"
Include dependency graph for ledger_account.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ledger_account_t
 Data extracted from a Register Ledger Account TLV payload. More...
struct  edit_ledger_account_t
 Data extracted from a Rename Ledger Account TLV payload. More...

Macros

#define TYPE_REGISTER_LEDGER_ACCOUNT   0x2f
#define TYPE_EDIT_LEDGER_ACCOUNT   0x30
#define TYPE_PROVIDE_LEDGER_ACCOUNT_CONTACT   0x34
#define ACCOUNT_NAME_LENGTH   33
 max 32 printable chars + null terminator

Functions

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.
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.

Macro Definition Documentation

◆ ACCOUNT_NAME_LENGTH

#define ACCOUNT_NAME_LENGTH   33

max 32 printable chars + null terminator

Definition at line 29 of file ledger_account.h.

◆ TYPE_EDIT_LEDGER_ACCOUNT

#define TYPE_EDIT_LEDGER_ACCOUNT   0x30

Definition at line 27 of file ledger_account.h.

◆ TYPE_PROVIDE_LEDGER_ACCOUNT_CONTACT

#define TYPE_PROVIDE_LEDGER_ACCOUNT_CONTACT   0x34

Definition at line 28 of file ledger_account.h.

◆ TYPE_REGISTER_LEDGER_ACCOUNT

#define TYPE_REGISTER_LEDGER_ACCOUNT   0x2f

Definition at line 26 of file ledger_account.h.

Function Documentation

◆ edit_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.

Parameters
[in]buffer_inthe input buffer containing the account data
[in]buffer_in_lengththe length of the input buffer
Returns
bolos_err_t the result of the edit

Definition at line 344 of file ledger_account_edit.c.

◆ provide_ledger_account_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.

Parses, verifies the HMAC Proof of Registration, and passes the account to the coin app callback. Returns SWO_SUCCESS (9000) with no response data.

Parameters
[in]buffer_inthe fully assembled TLV payload
[in]buffer_in_lengththe length of the payload
Returns
bolos_err_t the result of the command

Definition at line 276 of file ledger_account_provide_contact.c.

◆ register_ledger_account()

bolos_err_t register_ledger_account ( uint8_t * buffer_in,
size_t buffer_in_length )

Register a new Ledger Account.

Parameters
[in]buffer_inthe input buffer containing the account data
[in]buffer_in_lengththe length of the input buffer
Returns
bolos_err_t the result of the registration

Definition at line 293 of file ledger_account_register.c.