@ledgerhq/cryptoassets 6.14.0 → 6.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/currencies.ts CHANGED
@@ -241,7 +241,7 @@ const cryptocurrenciesById: Record<string, CryptoCurrency> = {
241
241
  ticker: "AVAX",
242
242
  scheme: "avalanche",
243
243
  color: "#E84142",
244
- family: "ethereum",
244
+ family: "avalanche",
245
245
  units: [
246
246
  {
247
247
  name: "AVAX",
@@ -525,6 +525,35 @@ const cryptocurrenciesById: Record<string, CryptoCurrency> = {
525
525
  },
526
526
  ],
527
527
  },
528
+ celo: {
529
+ type: "CryptoCurrency",
530
+ id: "celo",
531
+ coinType: 52752,
532
+ name: "Celo",
533
+ managerAppName: "Celo",
534
+ blockAvgTime: 5,
535
+ ticker: "CELO",
536
+ scheme: "celo",
537
+ color: "#35D07F",
538
+ family: "celo",
539
+ units: [
540
+ {
541
+ name: "CELO",
542
+ code: "CELO",
543
+ magnitude: 18,
544
+ },
545
+ ],
546
+ explorerViews: [
547
+ {
548
+ tx: "http://hubble.figment.io/celo/chains/celo/transactions/$hash",
549
+ address: "https://hubble.figment.io/celo/chains/celo/accounts/$address",
550
+ },
551
+ {
552
+ tx: "https://explorer.celo.org/tx/$hash",
553
+ address: "https://explorer.celo.org/address/$address",
554
+ },
555
+ ],
556
+ },
528
557
  clubcoin: {
529
558
  terminated: {
530
559
  link: "https://support.ledger.com/",
@@ -1524,6 +1553,35 @@ const cryptocurrenciesById: Record<string, CryptoCurrency> = {
1524
1553
  },
1525
1554
  ],
1526
1555
  },
1556
+ moonriver: {
1557
+ type: "CryptoCurrency",
1558
+ id: "moonriver",
1559
+ coinType: 60,
1560
+ name: "Moonriver",
1561
+ managerAppName: "Moonriver",
1562
+ ticker: "MOVR",
1563
+ scheme: "moonriver",
1564
+ color: "#F2A007",
1565
+ family: "ethereum",
1566
+ units: [
1567
+ {
1568
+ name: "MOVR",
1569
+ code: "MOVR",
1570
+ magnitude: 18,
1571
+ },
1572
+ ],
1573
+ ethereumLikeInfo: {
1574
+ chainId: 1285,
1575
+ },
1576
+ explorerViews: [
1577
+ {
1578
+ tx: "https://moonriver.moonscan.io/tx/$hash",
1579
+ address: "https://moonriver.moonscan.io/address/$address",
1580
+ token:
1581
+ "https://moonriver.moonscan.io/token/$contractAddress?a=$address",
1582
+ },
1583
+ ],
1584
+ },
1527
1585
  musicoin: {
1528
1586
  type: "CryptoCurrency",
1529
1587
  id: "musicoin",
@@ -2184,9 +2242,11 @@ const cryptocurrenciesById: Record<string, CryptoCurrency> = {
2184
2242
  explorerViews: [
2185
2243
  {
2186
2244
  address: "https://explorer.solana.com/",
2245
+ tx: "https://explorer.solana.com/tx/$hash",
2187
2246
  },
2188
2247
  {
2189
2248
  address: "https://solanabeach.io/",
2249
+ tx: "https://solanabeach.io/transaction/$hash",
2190
2250
  },
2191
2251
  ],
2192
2252
  },
@@ -2765,7 +2825,7 @@ const cryptocurrenciesById: Record<string, CryptoCurrency> = {
2765
2825
  type: "CryptoCurrency",
2766
2826
  id: "crypto_org",
2767
2827
  coinType: 394,
2768
- name: "Crypto.org Coin",
2828
+ name: "Crypto.org",
2769
2829
  managerAppName: "Crypto.org Chain",
2770
2830
  ticker: "CRO",
2771
2831
  scheme: "crypto_org",
@@ -2879,7 +2939,7 @@ const cryptocurrenciesById: Record<string, CryptoCurrency> = {
2879
2939
  type: "CryptoCurrency",
2880
2940
  id: "crypto_org_croeseid",
2881
2941
  coinType: 394,
2882
- name: "Crypto.org Croeseid Coin",
2942
+ name: "Crypto.org Croeseid",
2883
2943
  managerAppName: "Crypto.org Chain",
2884
2944
  ticker: "CRO",
2885
2945
  scheme: "crypto_org_croeseid",
@@ -2905,6 +2965,74 @@ const cryptocurrenciesById: Record<string, CryptoCurrency> = {
2905
2965
  },
2906
2966
  ],
2907
2967
  },
2968
+ solana_testnet: {
2969
+ type: "CryptoCurrency",
2970
+ id: "solana_testnet",
2971
+ coinType: 501,
2972
+ name: "Solana testnet",
2973
+ managerAppName: "Solana",
2974
+ ticker: "SOL",
2975
+ scheme: "solana_testnet",
2976
+ color: "#000",
2977
+ family: "solana",
2978
+ isTestnetFor: "solana",
2979
+ units: [
2980
+ {
2981
+ name: "SOL",
2982
+ code: "SOL",
2983
+ magnitude: 9,
2984
+ },
2985
+ {
2986
+ name: "lamports",
2987
+ code: "lamports",
2988
+ magnitude: 0,
2989
+ },
2990
+ ].map(makeTestnetUnit),
2991
+ explorerViews: [
2992
+ {
2993
+ address: "https://explorer.solana.com/?cluster=testnet",
2994
+ tx: "https://explorer.solana.com/tx/$hash?cluster=testnet",
2995
+ },
2996
+ {
2997
+ address: "https://solanabeach.io/?cluster=testnet",
2998
+ tx: "https://solanabeach.io/transaction/$hash?cluster=testnet",
2999
+ },
3000
+ ],
3001
+ },
3002
+ solana_devnet: {
3003
+ type: "CryptoCurrency",
3004
+ id: "solana_devnet",
3005
+ coinType: 501,
3006
+ name: "Solana devnet",
3007
+ managerAppName: "Solana",
3008
+ ticker: "SOL",
3009
+ scheme: "solana_devnet",
3010
+ color: "#000",
3011
+ family: "solana",
3012
+ isTestnetFor: "solana",
3013
+ units: [
3014
+ {
3015
+ name: "SOL",
3016
+ code: "SOL",
3017
+ magnitude: 9,
3018
+ },
3019
+ {
3020
+ name: "lamports",
3021
+ code: "lamports",
3022
+ magnitude: 0,
3023
+ },
3024
+ ].map(makeTestnetUnit),
3025
+ explorerViews: [
3026
+ {
3027
+ address: "https://explorer.solana.com/?cluster=devnet",
3028
+ tx: "https://explorer.solana.com/tx/$hash?cluster=devnet",
3029
+ },
3030
+ {
3031
+ address: "https://solanabeach.io/?cluster=devnet",
3032
+ tx: "https://solanabeach.io/transaction/$hash?cluster=devnet",
3033
+ },
3034
+ ],
3035
+ },
2908
3036
  filecoin: {
2909
3037
  type: "CryptoCurrency",
2910
3038
  id: "filecoin",
package/src/tokens.ts CHANGED
@@ -308,15 +308,22 @@ function convertTRONTokens(type: "trc10" | "trc20") {
308
308
  }
309
309
 
310
310
  function convertSplTokens([
311
+ chainId,
311
312
  name,
312
313
  symbol,
313
314
  address,
314
315
  decimals,
315
316
  enableCountervalues,
316
317
  ]): TokenCurrency {
318
+ const chainIdToCurrencyId = {
319
+ 101: "solana",
320
+ 102: "solana_testnet",
321
+ 103: "solana_devnet",
322
+ };
323
+ const currencyId = chainIdToCurrencyId[chainId];
317
324
  return {
318
325
  contractAddress: address,
319
- parentCurrency: getCryptoCurrencyById("solana"),
326
+ parentCurrency: getCryptoCurrencyById(currencyId),
320
327
  id: `solana/spl/${address}`,
321
328
  name,
322
329
  tokenType: "spl",