Files
LedgerLive/step-01-currency/currencies.chain138.ts

63 lines
2.0 KiB
TypeScript

/**
* Step 1 — Currency (Cryptoassets library)
* Target: ledger-live libs/ledgerjs/packages/cryptoassets/src/currencies.ts
* Add this entry to the cryptoassets map (merge with existing ethereum or add as new key).
*
* Chain 138: Defi Oracle Meta Mainnet
* @see https://developers.ledger.com/docs/ledger-live/accounts/integration/blockchain/cryptoassets-library
*/
export const defiOracleMetaMainnetCurrency = {
type: "CryptoCurrency",
id: "defi_oracle_meta_mainnet",
coinType: 60, // SLIP-44 Ethereum
name: "Defi Oracle Meta Mainnet",
managerAppName: "Ethereum",
ticker: "ETH",
countervalueTicker: "ETH",
scheme: "defi-oracle-meta",
color: "#627EEA",
family: "ethereum",
units: [
{ name: "ETH", code: "ETH", magnitude: 18 },
{ name: "wei", code: "wei", magnitude: 0 },
],
ethereumLikeInfo: { chainId: 138 },
blockAvgTime: 2, // Chain 138 ~2s block time (Besu QBFT)
// disableCountervalue: true, // uncomment if fiat should not be shown
explorerViews: [
{
address: "https://explorer.d-bis.org/address/$address",
tx: "https://explorer.d-bis.org/tx/$hash",
token: "https://explorer.d-bis.org/token/$contractAddress?a=$address",
},
],
} as const;
// Plain object form for JSON/currencies.js style (if repo uses .js)
export const defiOracleMetaMainnetCurrencyRaw = {
type: "CryptoCurrency",
id: "defi_oracle_meta_mainnet",
coinType: 60,
name: "Defi Oracle Meta Mainnet",
managerAppName: "Ethereum",
ticker: "ETH",
countervalueTicker: "ETH",
scheme: "defi-oracle-meta",
color: "#627EEA",
family: "ethereum",
units: [
{ name: "ETH", code: "ETH", magnitude: 18 },
{ name: "wei", code: "wei", magnitude: 0 },
],
ethereumLikeInfo: { chainId: 138 },
blockAvgTime: 2,
explorerViews: [
{
address: "https://explorer.d-bis.org/address/$address",
tx: "https://explorer.d-bis.org/tx/$hash",
token: "https://explorer.d-bis.org/token/$contractAddress?a=$address",
},
],
} as const;