{"id":13560578,"url":"https://github.com/cosmos/ledger-cosmos","last_synced_at":"2026-01-26T12:26:25.881Z","repository":{"id":38206085,"uuid":"151255331","full_name":"cosmos/ledger-cosmos","owner":"cosmos","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-25T13:14:29.000Z","size":21023,"stargazers_count":53,"open_issues_count":0,"forks_count":111,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-03-28T14:07:01.567Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cosmos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-02T13:02:03.000Z","updated_at":"2025-02-25T13:05:27.000Z","dependencies_parsed_at":"2023-02-15T10:16:35.126Z","dependency_job_id":"5fc73cc0-63ff-493e-aa9e-e6a5befa000b","html_url":"https://github.com/cosmos/ledger-cosmos","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmos%2Fledger-cosmos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmos%2Fledger-cosmos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmos%2Fledger-cosmos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmos%2Fledger-cosmos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cosmos","download_url":"https://codeload.github.com/cosmos/ledger-cosmos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247198460,"owners_count":20900080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:00:46.854Z","updated_at":"2026-01-26T12:26:25.870Z","avatar_url":"https://github.com/cosmos.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Ledger Cosmos app\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![GithubActions](https://github.com/cosmos/ledger-cosmos/actions/workflows/main.yml/badge.svg)](https://github.com/cosmos/ledger-cosmos/blob/main/.github/workflows/main.yaml)\n\n---\n\n![zondax_light](docs/zondax_light.png#gh-light-mode-only)\n![zondax_dark](docs/zondax_dark.png#gh-dark-mode-only)\n\n_Please visit our website at [zondax.ch](zondax.ch)_\n\nYou can also visit [Zondax Hub](https://hub.zondax.ch/cosmos) to test any of the versions of the app\n\n---\n\nThis project contains the Cosmos app for Ledger Nano S+, X, Stax, Flex and Apex P.\n\n- Ledger Nano S+/X/Stax/Flex Apex P Cosmos app\n- Specs / Documentation\n- C++ unit tests\n- Zemu tests\n\n## ATTENTION\n\nPlease:\n\n- **Do not use in production**\n- **Do not use a Ledger device with funds for development purposes.**\n- **Have a separate and marked device that is used ONLY for development and testing**\n\nTip:\n\n- In releases, you will find a precompiled test app. If you are just curious, you can run `zxtool.sh` and avoid building.\n\n## Download and install a prerelease\n\n*Once the app is approved by Ledger, it will be available in their app store (Ledger Live).\nYou can get builds generated by CircleCI from the release tab. THESE ARE UNVETTED DEVELOPMENT RELEASES*\n\nDownload a release from here (https://github.com/Zondax/ledger-cosmos/releases). You only need `zxtool.sh`\n\nIf the file is not executable, run\n```sh\nchmod +x ./zxtool.sh\n```\n\nthen run:\n\n```sh\n./installer_s.sh load\n```\n\n# Development\n\n## Preconditions\n\n- Be sure you checkout submodules too:\n\n    ```\n    git submodule update --init --recursive\n    ```\n\n- Install Docker CE\n    - Instructions can be found here: https://docs.docker.com/install/\n\n- We only officially support Ubuntu. Install the following packages:\n   ```\n   sudo apt update \u0026\u0026 apt-get -y install build-essential git wget cmake \\\n  libssl-dev libgmp-dev autoconf libtool\n   ```\n\n- Install `node \u003e v13.0`. We typically recommend using `n`\n\n- You will need python 3 and then run\n    - `make deps`\n\n- This project requires Ledger firmware 2.0\n    - The current repository keeps track of Ledger's SDK but it is possible to override it by changing the git submodule.\n\n*Warning*: Some IDEs may not use the same python interpreter or virtual environment as the one you used when running `pip`.\nIf you see conan is not found, check that you installed the package in the same interpreter as the one that launches `cmake`.\n\n## How to build ?\n\n\u003e We like clion or vscode but let's have some reproducible command line steps\n\u003e\n\n- Building the app itself\n\n    If you installed the what is described above, just run:\n    ```bash\n    make\n    ```\n\n## Running tests\n\n- Running rust tests (x64)\n\n    If you installed the what is described above, just run:\n    ```bash\n    make rust_test\n    ```\n\n- Running C/C++ tests (x64)\n\n    If you installed the what is described above, just run:\n    ```bash\n    make cpp_test\n    ```\n\n- Running device emulation+integration tests!!\n\n   ```bash\n    Use Zemu! Explained below!\n    ```\n\n## How to test with Zemu?\n\n\u003e What is Zemu?? Great you asked!!\n\u003e As part of this project, we are making public a beta version of our internal testing+emulation framework for Ledger apps.\n\u003e\n\u003e Npm Package here: https://www.npmjs.com/package/@zondax/zemu\n\u003e\n\u003e Repo here: https://github.com/Zondax/zemu\n\nLet's go! First install everything:\n\u003e At this moment, if you change the app you will need to run `make` before running the test again.\n\n```bash\nmake zemu_install\n```\n\nThen you can run JS tests:\n\n```bash\nmake zemu_test\n```\n\nTo run a single specific test:\n\n\u003e At the moment, the recommendation is to run from the IDE. Remember to run `make` if you change the app.\n\n## Using a real device\n\n### How to prepare your DEVELOPMENT! device:\n\n\u003e  You can use an emulated device for development. This is only required if you are using a physical device\n\u003e\n\u003e    **Please do not use a Ledger device with funds for development purposes.**\n\u003e\u003e\n\u003e    **Have a separate and marked device that is used ONLY for development and testing**\n\n   There are a few additional steps that increase reproducibility and simplify development:\n\n**1 - Ensure your device works in your OS**\n- In Linux hosts it might be necessary to adjust udev rules, etc.\n\n  Refer to Ledger documentation: https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues\n\n**2 - Set a test mnemonic**\n\nMany of our integration tests expect the device to be configured with a known test mnemonic.\n\n- Plug your device while pressing the right button\n\n- Your device will show \"Recovery\" in the screen\n\n- Double click\n\n- Run `make dev_init`. This will take about 2 minutes. The device will be initialized to:\n\n   ```\n   PIN: 5555\n   Mnemonic: equip will roof matter pink blind book anxiety banner elbow sun young\n   ```\n\n**3 - Add a development certificate**\n\n- Plug your device while pressing the right button\n\n- Your device will show \"Recovery\" in the screen\n\n- Click both buttons at the same time\n\n- Enter your pin if necessary\n\n- Run `make dev_ca`. The device will receive a development certificate to avoid constant manual confirmations.\n\n\n### Loading into your development device\n\nThe Makefile will build the firmware in a docker container and leave the binary in the correct directory.\n\n- Build\n\n   ```\n   make                # Builds the app\n   ```\n\n- Upload to a device\n   The following command will upload the application to the ledger. _Warning: The application will be deleted before uploading._\n   ```\n   make loadS2        # Builds and loads the app to the device (Nano S+)\n   make loadST        # Builds and loads the app to the device (Nano Stax)\n   make loadFL        # Builds and loads the app to the device (Nano Flex)\n   make loadAP        # Builds and loads the app to the device (Nano Apex P)\n   ```\n\n## APDU Specifications\n\n### DISCLAIMER\nLedger NanoS does not support Cosmos Textual Mode due to memory restriction\n\n- [APDU Protocol](docs/APDUSPEC.md)\n- [Transaction format](docs/TXSPEC.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmos%2Fledger-cosmos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcosmos%2Fledger-cosmos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmos%2Fledger-cosmos/lists"}