Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.1] - 2026-03-23

### Added

- Apex P poring (Ledger Nano Gen 5)
- Derivation Path Hardening:
- New master key fingerprint syscall use, `HAVE_APPLICATION_FLAG_DERIVE_MASTER` is removed
- BIP-32 derivation paths is reinforced using wildcard syntax (`m/*/<COIN_TYPE>`)

## [0.1.0] - 2025-03-13

### Added
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Application version
APPVERSION_M = 0
APPVERSION_N = 1
APPVERSION_P = 0
APPVERSION_P = 1
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)"

APPDEVELOPPER="Ledger"
Expand Down Expand Up @@ -63,5 +63,6 @@ ICON_NANOX = icons/nanox_app_core.gif
ICON_NANOSP = icons/nanox_app_core.gif
ICON_STAX = icons/stax_app_core.gif
ICON_FLEX = icons/flex_app_core.gif
ICON_APEX_P = icons/apex_p_app_core.png

include bitcoin_app_base/Makefile
2 changes: 1 addition & 1 deletion bitcoin_app_base
Submodule bitcoin_app_base updated 3210 files
Binary file added glyphs/App_48px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/apex_p_app_core.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ledger_app.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[app]
build_directory = "./"
sdk = "C"
devices = ["nanox", "nanos+", "flex", "stax"]
devices = ["nanox", "nanos+", "flex", "stax", "apex_p"]

[tests]
pytest_directory = "./tests/"
23 changes: 13 additions & 10 deletions src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,28 @@
#include <stdint.h>
#include <string.h>

/* Local headers */
#include "core.h"
#include "debug.h"

#include "../bitcoin_app_base/src/crypto.h"
#include "../bitcoin_app_base/src/common/script.h"
#include "../bitcoin_app_base/src/common/read.h"
#include "../bitcoin_app_base/src/common/write.h"

/* SDK headers */
#include "cx.h"
#include "ledger_assert.h"
#include "read.h"
#include "write.h"

/* Baseapp branch headers */
#include "../bitcoin_app_base/src/crypto.h"
#include "../bitcoin_app_base/src/common/script.h"

#define EXPECTED_PAYLOAD_LEN \
80 // SAT+(4)+ VERSION(1) + CHAIN_ID(2) + DELEGATOR(20) + VALIDATOR(20) + FEE(1) + REDEEM(32)

#define SUPPORTED_VERSION 1

static bool get_core_compressed_pubkey(const uint32_t bip32_path[],
uint8_t bip32_path_len,
uint8_t out_pubkey[static 33]) {
static cx_err_t get_core_compressed_pubkey(const uint32_t bip32_path[],
uint8_t bip32_path_len,
uint8_t out_pubkey[static 33]) {
uint8_t chaincode[32];

return crypto_get_compressed_pubkey_at_path(bip32_path, bip32_path_len, out_pubkey, chaincode);
Expand All @@ -31,7 +34,7 @@ static bool get_core_pubkey_hash160(const uint32_t bip32_path[],
uint8_t bip32_path_len,
uint8_t out_hash160[static 20]) {
uint8_t pubkey[33];
if (!get_core_compressed_pubkey(bip32_path, bip32_path_len, pubkey)) {
if (CX_OK != get_core_compressed_pubkey(bip32_path, bip32_path_len, pubkey)) {
return false;
}
crypto_hash160(pubkey, 33, out_hash160);
Expand Down Expand Up @@ -201,4 +204,4 @@ void format_address(const uint8_t *buffer, size_t buffer_len, char *out, size_t
out_len -= 2;

buffer_to_hex(buffer, buffer_len, out, out_len);
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_sign_restake_tx_0_0/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_sign_restake_tx_0_1/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_sign_restake_tx_0_1/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_sign_restake_tx_0_1/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_sign_restake_tx_0_1/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_sign_stake_tx_0_0/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_sign_stake_tx_0_1/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_sign_stake_tx_0_1/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_sign_stake_tx_0_1/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_sign_stake_tx_0_1/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/flex/test_sign_unstake_tx_0_0/00000.png
Binary file modified tests/snapshots/flex/test_sign_unstake_tx_0_1/00000.png
Binary file modified tests/snapshots/flex/test_sign_unstake_tx_0_1/00001.png
Binary file modified tests/snapshots/stax/test_sign_restake_tx_0_1/00003.png
Binary file modified tests/snapshots/stax/test_sign_stake_tx_0_1/00003.png
Binary file modified tests/snapshots/stax/test_sign_unstake_tx_0_1/00001.png
Loading