Files
LedgerLive/step-03-coin-module/README.md

20 lines
1.2 KiB
Markdown
Raw Normal View History

# Step 3 — Create coin module
For Chain 138 we **extend the Ethereum family** in ledger-live (no new coin-module). Use:
**Note:** `network-explorer.ts` uses Blockscout REST v2 API (`GET /api/v2/addresses/{address}/transactions`) with `next_page_params` pagination. Do not use Etherscan-style `module=account&action=txlist` — Blockscout uses a different API.
- **config.chain138.ts** — Chain 138 RPC and explorer config; plug into Ethereum family config or currency config.
- **network-explorer.ts** — Example network layer (getLastBlock, getBalance, getTransactionCount, getAddressTransactions). Adapt to the Ethereum coin-modules network/bridge API (e.g. wrap in the same interface as other EVM chains).
If Ledger requests a **dedicated** coin-module, create `libs/coin-modules/coin-defi_oracle_meta/` with:
- `bridge/` — sync, buildTransaction, signOperation, broadcast, getFeesForTransaction, getTransactionStatus
- `logic/` — core logic (no bridge imports)
- `network/` — this explorer + RPC wrapper
- `signer/` — Step 4 getAddress + sign
- `types/` — bridge, signer, errors
- `config.ts`, `index.ts`
Dependency rule: `logic``network` only; `bridge``logic`, `network`, `signer`.