DocumentationLedger LiveAccountsReferencesCoin folder structre

Coin folder structure

Your whole implementation of MyCoin must reside in a mycoin folder in libs/coin-modules/coin-mycoin. You will also need some code in libs/ledger-live-common/src/families/mycoin, for injection, setup and UI specific requirements.

Here is a typical family folder structure (TS integration):

./libs
β”œβ”€β”€ coin-modules/coin-mycoin/src
β”‚   β”œβ”€β”€ api
β”‚   β”‚   └── index.ts
β”‚   β”œβ”€β”€ bridge
β”‚   β”‚   β”œβ”€β”€ broadcast.ts
β”‚   β”‚   β”œβ”€β”€ buildTransaction.ts
β”‚   β”‚   β”œβ”€β”€ createTransaction.ts
β”‚   β”‚   β”œβ”€β”€ estimateMaxSpendable.ts
β”‚   β”‚   β”œβ”€β”€ formatters.ts
β”‚   β”‚   β”œβ”€β”€ getFeesForTransaction.ts
β”‚   β”‚   β”œβ”€β”€ getTransactionStatus.ts
β”‚   β”‚   β”œβ”€β”€ prepareTransaction.ts
β”‚   β”‚   β”œβ”€β”€ signOperation.ts
β”‚   β”‚   β”œβ”€β”€ synchronization.ts
β”‚   β”‚   └── index.ts
β”‚   β”œβ”€β”€ logic
β”‚   β”‚   β”œβ”€β”€ broadcast.ts
β”‚   β”‚   β”œβ”€β”€ craftTransaction.ts
β”‚   β”‚   β”œβ”€β”€ estimateFees.ts
β”‚   β”‚   β”œβ”€β”€ getBalance.ts
β”‚   β”‚   β”œβ”€β”€ lastBlock.ts
β”‚   β”‚   β”œβ”€β”€ listOperations.ts
β”‚   β”‚   β”œβ”€β”€ signTransaction.ts
β”‚   β”‚   └── index.ts
β”‚   β”œβ”€β”€ network
β”‚   β”‚   β”œβ”€β”€ explorer.ts
β”‚   β”‚   └── index.ts
β”‚   β”œβ”€β”€ signer
β”‚   β”‚   β”œβ”€β”€ getAddress.ts
β”‚   β”‚   └── index.ts
β”‚   β”œβ”€β”€ test
β”‚   β”‚   β”œβ”€β”€ bot-deviceActions.ts
β”‚   β”‚   β”œβ”€β”€ bot-specs.ts
β”‚   β”‚   β”œβ”€β”€ bridgeDatasetTest.ts
β”‚   β”‚   β”œβ”€β”€ cli.ts
β”‚   β”‚   └── index.ts
β”‚   β”œβ”€β”€ types
β”‚   β”‚   β”œβ”€β”€ bridge.ts
β”‚   β”‚   β”œβ”€β”€ errors.ts
β”‚   β”‚   β”œβ”€β”€ model.ts
β”‚   β”‚   β”œβ”€β”€ signer.ts
β”‚   β”‚   └── index.ts
β”‚   β”œβ”€β”€ config.ts
β”‚   └── index.ts
β”œβ”€β”€ ledger-live-common/src/families/mycoin
β”‚   β”œβ”€β”€ bridge.integration.test.ts
β”‚   β”œβ”€β”€ config.ts
β”‚   β”œβ”€β”€ logic.ts
β”‚   β”œβ”€β”€ react.ts
β”‚   β”œβ”€β”€ setup.ts
β”‚   β”œβ”€β”€ types.ts
β”‚   └── walletApiAdapter.ts
└── ledgerjs/packages/hw-app-mycoin/src
β”‚   β”œβ”€β”€ MyCoin.ts
β”‚   └── index.ts
ℹ️

You can refer to existing implementations to complete given examples, like Polkadot integration.

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