Skip to content

Commit

Permalink
Merge pull request #86 from Zondax/dev
Browse files Browse the repository at this point in the history
Updates
  • Loading branch information
ftheirs committed Dec 11, 2023
2 parents 9792438 + 2583789 commit 75a5d21
Show file tree
Hide file tree
Showing 33 changed files with 731 additions and 788 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/guidelines_enforcer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@ jobs:
guidelines_enforcer:
name: Call Ledger guidelines_enforcer
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_guidelines_enforcer.yml@v1
with:
relative_app_directory: app
37 changes: 27 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ _Please visit our website at [zondax.ch](https://www.zondax.ch)_

**This app is still work in progress!**

This project contains the Zcash app for Ledger Nano S, S+ and X.

- Ledger BOLOS app
- Specs / Documentation
- C++ unit tests
- Rust unit tests
- Zemu tests
## Description of the Project
Welcome to the Ledger Zcash app repository developed by Zondax. This project contains the Zcash application for Ledger Nano S+ and X, providing users with the ability to securely manage their ZEC assets.
This application supports sapling, enabling transfers between shielded and non shielded addresses.

## ATTENTION

Expand All @@ -30,16 +26,28 @@ Please:
- **Do not use a Ledger device with funds for development purposes.**
- **Have a separate and marked device that is used ONLY for development and testing**

Tip:
This repository contains

- Ledger BOLOS app
- Specs / Documentation
- C++ unit tests
- Rust unit tests
- Zemu tests

Tip:
- In releases, you will find a precompiled test app. If you are just curious, you can run `installer_s.sh` and avoid building.

## Download and install

*Once the app is approved by Ledger, it will be available in their app store (Ledger Live).
You can get builds generated by CircleCI from the release tab. THESE ARE UNVETTED DEVELOPMENT RELEASES*

Download a release from here (https://github.com/Zondax/ledger-zcash/releases). You only need `zxtool.sh`
With our Zondax Hub you can install asset apps to your Ledger device and test them. This can be done with both released and unreleased versions developed by the zondax team. To install the Ledger Zcash App on your Ledger device, you can simply:
1. Go to http://hub.zondax.ch/
2. Connect your wallet
3. Install the app

Another way to install the app is by downloading the installer script from the release page (https://github.com/Zondax/ledger-zcash/releases) and follow these commands. You only need `zxtool.sh`

If the file is not executable, run
```sh
Expand All @@ -52,8 +60,14 @@ then run:
./installer_s.sh load
```

# Development
## Troubleshooting
If you encounter any issues while using the Ledger Zcash App, please create and issue in this repository and the team will review it. You can also send an email to ledger@zondax.ch

## Contact Information/Support
For support, feedback, or inquiries, please reach out to us at: ledger@zondax.ch


# Development
## Preconditions

- Be sure you checkout submodules too:
Expand Down Expand Up @@ -212,3 +226,6 @@ The Makefile will build the firmware in a docker container and leave the binary
## APDU Specifications

- [APDU Protocol](docs/APDUSPEC.md)
```
make load # Builds and loads the app to the device
```
1 change: 0 additions & 1 deletion app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ endif

APP_LOAD_PARAMS = --curve secp256k1 --curve ed25519 $(COMMON_LOAD_PARAMS) --path $(APPPATH)

NANOS_STACK_SIZE := 3216
include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.devices

$(info TARGET_NAME = [$(TARGET_NAME)])
Expand Down
2 changes: 1 addition & 1 deletion app/Makefile.version
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ APPVERSION_M=3
# This is the minor version of this release
APPVERSION_N=3
# This is the patch version of this release
APPVERSION_P=0
APPVERSION_P=1
170 changes: 0 additions & 170 deletions app/script_s2.ld

This file was deleted.

10 changes: 7 additions & 3 deletions app/src/apdu_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,13 +758,17 @@ void handleTest(volatile uint32_t *tx) {

jubjub_extendedpoint p;
jubjub_fq scal;
jubjub_field_frombytes(scal, scalar);
if (jubjub_field_frombytes(scal, scalar) != zxerr_ok) {
*tx = 0;
MEMZERO(point, sizeof(point));
THROW(APDU_CODE_OK);
}

jubjub_extendedpoint_tobytes(point, JUBJUB_GEN);
zxerr_t err = jubjub_extendedpoint_frombytes(&p, point);
const zxerr_t err = jubjub_extendedpoint_frombytes(&p, point);
if (err != zxerr_ok) {
*tx = 0;
MEMZERO(point, 32);
MEMZERO(point, sizeof(point));
THROW(APDU_CODE_OK);
}
// MEMCPY(&p, &JUBJUB_GEN, 32);
Expand Down

0 comments on commit 75a5d21

Please sign in to comment.