DocumentationDevice AppIntegration walkthroughsHow-toClone Coin Application

Clone Applications

What is a clone?

A variant, or clone, device app is developed when all the logic for signing transactions can be contained in the parent coin Device Application.

As for any Device Application, you must follow our guidelines to comply with Ledger publication requirements.

On this page you will find the information for Bitcoin and Ethereum clones.

Bitcoin clones

If you want to create a new bitcoin clone, instead of forking the boilerplate app you should fork app-bitcoin-clone-boilerplate.

If your Bitcoin clone was included in the Bitcoin Device App and you need to update it, you should create a new application by forking app-bitcoin-clone-boilerplate.

You can then add your icon, customize the makefile, update the README, add your tests, make sure your CI is green and you should be good to go !

Note that all APDU handlers have been defined with WEAK attribute, so they can be overwritten if your app requires you to do so.

Ethereum clones

Depending on your derivation path, the process will vary.

A - Using the 44/60 path

Prerequisites

Follow this process if your chain uses the 44/60 path.

Start here

Instead of building your application in a separate repository, you will make changes to the Ethereum app.

  • Fork the Ethereum app
  • Before committing your changes remember to sign your commits.
  • Please make your changes to the develop branch
⚠️

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

1. Modify app-ethereum/src_common/network.c

Add your chain ID, chain name and Ticker to network.c following this example:

{.chain_id = 592, .name = "Astar", .ticker = "ASTR"},

2. Add an icon for Ledger Stax

Add your 64x64px gif icon in the glyphs folder following this naming convention: chain_yourchainid_64px.gif. Use the template provided here.

3. Add your Network to Chainlist.org

Click “Add Your Network +” on the Chainlist homepage and follow the ReadMe to add your Network.

4. Open a pull request

When your application is ready, open a pull request on the Ethereum application repository.

Please get in touch with our team on the Ledger’s Discord server to get your PR reviewed.

B - All other paths

Follow this process if your chain uses another path than 44/60.

⚠️

If your chain does not use the 44/60 path, you won’t be able to use Metamask with your device app.

Start here

Instead of building your application in a separate repository, you will make changes to the Ethereum app.

  • Fork the Ethereum app
  • Before committing your changes remember to sign your commits.
  • Please make your changes to the develop branch

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

⚠️

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

1. Create a file in app-ethereum/makefile_conf/chain

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

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

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.

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

3. Build the application

To build the clone application, use the Ledger VSCode extension. Follow the beginners’ guide if you need help.

4. Add your Network to SLIP-0044

Open a PR to add your network in this file

5. Open a pull request

When your application is ready, open a pull request on the Ethereum application repository.

Please get in touch with our team on the Ledger’s Discord server to get your PR reviewed.

Publishing the application

If you want to publish a clone application, follow the process in Publishing an application.

Ledger
Copyright © Ledger SAS. All rights reserved. Ledger, Ledger Nano S, Ledger Vault, Ledger OS are registered trademarks of Ledger SAS