---
agent_config:
  entry_point:
    label: Agent Instructions
    url: https://raw.githubusercontent.com/LedgerHQ/ledger-app-ai-instructions/master/CLAUDE.md
    role: orchestrator
  instruction_files:
    - label: Embedded Constraints
      url: https://raw.githubusercontent.com/LedgerHQ/ledger-app-ai-instructions/master/instructions/EMBEDDED.instructions.md
      scope: "*.c, *.h, *.rs"
    - label: C Rules
      url: https://raw.githubusercontent.com/LedgerHQ/ledger-app-ai-instructions/master/instructions/C.instructions.md
      scope: "*.c, *.h"
    - label: Rust Rules
      url: https://raw.githubusercontent.com/LedgerHQ/ledger-app-ai-instructions/master/instructions/RUST.instructions.md
      scope: "*.rs"
    - label: Test Rules
      url: https://raw.githubusercontent.com/LedgerHQ/ledger-app-ai-instructions/master/instructions/TEST.instructions.md
      scope: "*.py"
    - label: Review Checklist
      url: https://raw.githubusercontent.com/LedgerHQ/ledger-app-ai-instructions/master/instructions/REVIEW.instructions.md
      scope: "*"
---

## Agent Instructions

**Entry point:** [Agent Instructions](https://raw.githubusercontent.com/LedgerHQ/ledger-app-ai-instructions/master/CLAUDE.md) (orchestrator)

### Instruction Files

- [Embedded Constraints](https://raw.githubusercontent.com/LedgerHQ/ledger-app-ai-instructions/master/instructions/EMBEDDED.instructions.md) — scope: `*.c, *.h, *.rs`
- [C Rules](https://raw.githubusercontent.com/LedgerHQ/ledger-app-ai-instructions/master/instructions/C.instructions.md) — scope: `*.c, *.h`
- [Rust Rules](https://raw.githubusercontent.com/LedgerHQ/ledger-app-ai-instructions/master/instructions/RUST.instructions.md) — scope: `*.rs`
- [Test Rules](https://raw.githubusercontent.com/LedgerHQ/ledger-app-ai-instructions/master/instructions/TEST.instructions.md) — scope: `*.py`
- [Review Checklist](https://raw.githubusercontent.com/LedgerHQ/ledger-app-ai-instructions/master/instructions/REVIEW.instructions.md) — scope: `*`

# Clone Applications

Use this guide to create and publish a clone (variant) of an existing Bitcoin or Ethereum device application. It focuses on the minimal steps required to complete the task.

## Prerequisites

- Understanding of the device app development framework (learn more [here](../../references/framework))
- Ledger VS Code extension installed and configured (learn more [here](../../beginner/vscode-extension))
- Icons templates [here](../../submission-process/deliverables/icons)
- Signed commits enabled: `git commit -S -m "message"`

## Bitcoin

If you are building a Layer 2 Bitcoin application :

### Fork \[app-btcext-boilerplate]\(https\://github.com/LedgerHQ/app-btcext-boilerplate)

### Customize it

- Add icons
- Customize Makefile and hooks
- Implement validation logic and UX
- Update the README

### Build and test

- Build with the Ledger VS Code extension
- Add tests and ensure CI passes

## Ethereum clones

### 44/60 path

Adding a 44/60 EVM network is straightforward: you submit icons to the [ledger-network-icons](https://github.com/LedgerHQ/ledger-network-icons) repository, and Ledger takes care of adding your network to the Crypto Asset List (CAL).

Follow the [procedure in the repository README](https://github.com/LedgerHQ/ledger-network-icons/blob/main/README.md#procedure-to-add-a-new-network-icon).

> **Warning:** The repository requires signed commits. Use the `-S` flag: `git commit -S -m "your commit message"`

### Other paths

> **Warning:** If your chain does not use the `44/60` path, you won't be able to use Metamask with your device app.

> **Warning:** Make your changes to the `develop` branch only.

> **Warning:** For security reasons, the repository is set up to accept only pull requests with signed commits. To sign your commits, use the -S flag : $ git commit -S -m your commit message

The following page uses the Walton Chain as an example, please replace every `WaltonChain` occurence with the name of your coin and chain.

### Create a file in app-ethereum/makefile\_conf/chain

Following the next example, add a `.mk` file in `app-ethereum/makefile_conf/chain`

```c copy
APP_LOAD_PARAMS += --path "44'/999999'"
TICKER = "WTC"
CHAIN_ID = 15
APPNAME = "WaltonChain"
```

> **Caution:** It is necessary to choose a Derivation Path and a Chain ID specific to your network to prevent the risk of replay attack (Introduced by EIP155) that can happen when using the same Derivation Path ( m/44'/60'/0') and Chain ID as Ethereum. This could expose your users to loss of funds.\
> You can either use the same Derivation Path but define a new chain ID (make sure this is not used by another network) or use slip44/BIP44 standard to reserve a dedicated coin type that will allow you to define a new derivation path.

### Upload your app's icons

- Add your 16x16px Nanos , 14x14px Nano S Plus / Nano X and 32x32 Stax gif icons in the `icons` folder following these naming conventions: `nanos_app_chain_yourchainid.gif`, `nanox_app_chain_yourchainid.gif`, `stax_app_chain_yourchainid.gif`
- Add your 64x64px gif icon in the `icons` folder following this naming convention: `stax_yourchainid_64px.gif`.
  Use the template provided [here](../../submission-process/deliverables/icons).

### Build the application

To build the clone application, use the Ledger VSCode extension. [Follow the beginners' guide if you need help](../../beginner/vscode-extension).

### Add your Network to SLIP-0044

Open a PR to add your network [in this file](https://github.com/satoshilabs/slips/blob/master/slip-0044.md)

### Open a pull request

When your application is ready, open a pull request on the Ethereum application repository and follow the process in [Publishing an application](../../submission-process/process).
