@metamask/assets-controllers 104.0.0 → 104.2.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +61 -53
  2. package/dist/AccountTrackerController.cjs +5 -3
  3. package/dist/AccountTrackerController.cjs.map +1 -1
  4. package/dist/AccountTrackerController.d.cts.map +1 -1
  5. package/dist/AccountTrackerController.d.mts.map +1 -1
  6. package/dist/AccountTrackerController.mjs +5 -3
  7. package/dist/AccountTrackerController.mjs.map +1 -1
  8. package/dist/MultichainAssetsController/MultichainAssetsController.cjs +150 -58
  9. package/dist/MultichainAssetsController/MultichainAssetsController.cjs.map +1 -1
  10. package/dist/MultichainAssetsController/MultichainAssetsController.d.cts +20 -3
  11. package/dist/MultichainAssetsController/MultichainAssetsController.d.cts.map +1 -1
  12. package/dist/MultichainAssetsController/MultichainAssetsController.d.mts +20 -3
  13. package/dist/MultichainAssetsController/MultichainAssetsController.d.mts.map +1 -1
  14. package/dist/MultichainAssetsController/MultichainAssetsController.mjs +150 -58
  15. package/dist/MultichainAssetsController/MultichainAssetsController.mjs.map +1 -1
  16. package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController.cjs +46 -12
  17. package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController.cjs.map +1 -1
  18. package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController.d.cts.map +1 -1
  19. package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController.d.mts.map +1 -1
  20. package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController.mjs +46 -12
  21. package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController.mjs.map +1 -1
  22. package/dist/MultichainBalancesController/MultichainBalancesController.cjs +38 -29
  23. package/dist/MultichainBalancesController/MultichainBalancesController.cjs.map +1 -1
  24. package/dist/MultichainBalancesController/MultichainBalancesController.d.cts.map +1 -1
  25. package/dist/MultichainBalancesController/MultichainBalancesController.d.mts.map +1 -1
  26. package/dist/MultichainBalancesController/MultichainBalancesController.mjs +38 -29
  27. package/dist/MultichainBalancesController/MultichainBalancesController.mjs.map +1 -1
  28. package/dist/multicall.cjs +2 -0
  29. package/dist/multicall.cjs.map +1 -1
  30. package/dist/multicall.d.cts.map +1 -1
  31. package/dist/multicall.d.mts.map +1 -1
  32. package/dist/multicall.mjs +2 -0
  33. package/dist/multicall.mjs.map +1 -1
  34. package/dist/selectors/token-selectors.d.cts +18 -18
  35. package/dist/selectors/token-selectors.d.mts +18 -18
  36. package/dist/token-prices-service/codefi-v2.cjs +2 -0
  37. package/dist/token-prices-service/codefi-v2.cjs.map +1 -1
  38. package/dist/token-prices-service/codefi-v2.d.cts +3 -1
  39. package/dist/token-prices-service/codefi-v2.d.cts.map +1 -1
  40. package/dist/token-prices-service/codefi-v2.d.mts +3 -1
  41. package/dist/token-prices-service/codefi-v2.d.mts.map +1 -1
  42. package/dist/token-prices-service/codefi-v2.mjs +2 -0
  43. package/dist/token-prices-service/codefi-v2.mjs.map +1 -1
  44. package/package.json +10 -10
@@ -153,7 +153,7 @@ export declare const selectAllAssets: ((state: AssetListState) => AssetsByAccoun
153
153
  };
154
154
  }, resultFuncArgs_1: {
155
155
  accounts: Record<string, {
156
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
156
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
157
157
  id: string;
158
158
  options: Record<string, import("@metamask/utils").Json> & {
159
159
  entropy?: {
@@ -200,7 +200,7 @@ export declare const selectAllAssets: ((state: AssetListState) => AssetsByAccoun
200
200
  };
201
201
  }, resultFuncArgs_1: {
202
202
  accounts: Record<string, {
203
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
203
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
204
204
  id: string;
205
205
  options: Record<string, import("@metamask/utils").Json> & {
206
206
  entropy?: {
@@ -256,7 +256,7 @@ export declare const selectAllAssets: ((state: AssetListState) => AssetsByAccoun
256
256
  };
257
257
  }, (state: AssetListState) => {
258
258
  accounts: Record<string, {
259
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
259
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
260
260
  id: string;
261
261
  options: Record<string, import("@metamask/utils").Json> & {
262
262
  entropy?: {
@@ -405,7 +405,7 @@ export declare const selectAllAssets: ((state: AssetListState) => AssetsByAccoun
405
405
  };
406
406
  }, resultFuncArgs_1: {
407
407
  accounts: Record<string, {
408
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
408
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
409
409
  id: string;
410
410
  options: Record<string, import("@metamask/utils").Json> & {
411
411
  entropy?: {
@@ -452,7 +452,7 @@ export declare const selectAllAssets: ((state: AssetListState) => AssetsByAccoun
452
452
  };
453
453
  }, resultFuncArgs_1: {
454
454
  accounts: Record<string, {
455
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
455
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
456
456
  id: string;
457
457
  options: Record<string, import("@metamask/utils").Json> & {
458
458
  entropy?: {
@@ -508,7 +508,7 @@ export declare const selectAllAssets: ((state: AssetListState) => AssetsByAccoun
508
508
  };
509
509
  }, (state: AssetListState) => {
510
510
  accounts: Record<string, {
511
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
511
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
512
512
  id: string;
513
513
  options: Record<string, import("@metamask/utils").Json> & {
514
514
  entropy?: {
@@ -632,7 +632,7 @@ export declare const selectAllAssets: ((state: AssetListState) => AssetsByAccoun
632
632
  };
633
633
  }, resultFuncArgs_1: {
634
634
  accounts: Record<string, {
635
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
635
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
636
636
  id: string;
637
637
  options: Record<string, import("@metamask/utils").Json> & {
638
638
  entropy?: {
@@ -679,7 +679,7 @@ export declare const selectAllAssets: ((state: AssetListState) => AssetsByAccoun
679
679
  };
680
680
  }, resultFuncArgs_1: {
681
681
  accounts: Record<string, {
682
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
682
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
683
683
  id: string;
684
684
  options: Record<string, import("@metamask/utils").Json> & {
685
685
  entropy?: {
@@ -735,7 +735,7 @@ export declare const selectAllAssets: ((state: AssetListState) => AssetsByAccoun
735
735
  };
736
736
  }, (state: AssetListState) => {
737
737
  accounts: Record<string, {
738
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
738
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
739
739
  id: string;
740
740
  options: Record<string, import("@metamask/utils").Json> & {
741
741
  entropy?: {
@@ -888,7 +888,7 @@ export declare const selectAssetsBySelectedAccountGroup: ((state: AssetListState
888
888
  };
889
889
  }, resultFuncArgs_1: {
890
890
  accounts: Record<string, {
891
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
891
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
892
892
  id: string;
893
893
  options: Record<string, import("@metamask/utils").Json> & {
894
894
  entropy?: {
@@ -935,7 +935,7 @@ export declare const selectAssetsBySelectedAccountGroup: ((state: AssetListState
935
935
  };
936
936
  }, resultFuncArgs_1: {
937
937
  accounts: Record<string, {
938
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
938
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
939
939
  id: string;
940
940
  options: Record<string, import("@metamask/utils").Json> & {
941
941
  entropy?: {
@@ -991,7 +991,7 @@ export declare const selectAssetsBySelectedAccountGroup: ((state: AssetListState
991
991
  };
992
992
  }, (state: AssetListState) => {
993
993
  accounts: Record<string, {
994
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
994
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
995
995
  id: string;
996
996
  options: Record<string, import("@metamask/utils").Json> & {
997
997
  entropy?: {
@@ -1140,7 +1140,7 @@ export declare const selectAssetsBySelectedAccountGroup: ((state: AssetListState
1140
1140
  };
1141
1141
  }, resultFuncArgs_1: {
1142
1142
  accounts: Record<string, {
1143
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
1143
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
1144
1144
  id: string;
1145
1145
  options: Record<string, import("@metamask/utils").Json> & {
1146
1146
  entropy?: {
@@ -1187,7 +1187,7 @@ export declare const selectAssetsBySelectedAccountGroup: ((state: AssetListState
1187
1187
  };
1188
1188
  }, resultFuncArgs_1: {
1189
1189
  accounts: Record<string, {
1190
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
1190
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
1191
1191
  id: string;
1192
1192
  options: Record<string, import("@metamask/utils").Json> & {
1193
1193
  entropy?: {
@@ -1243,7 +1243,7 @@ export declare const selectAssetsBySelectedAccountGroup: ((state: AssetListState
1243
1243
  };
1244
1244
  }, (state: AssetListState) => {
1245
1245
  accounts: Record<string, {
1246
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
1246
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
1247
1247
  id: string;
1248
1248
  options: Record<string, import("@metamask/utils").Json> & {
1249
1249
  entropy?: {
@@ -1367,7 +1367,7 @@ export declare const selectAssetsBySelectedAccountGroup: ((state: AssetListState
1367
1367
  };
1368
1368
  }, resultFuncArgs_1: {
1369
1369
  accounts: Record<string, {
1370
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
1370
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
1371
1371
  id: string;
1372
1372
  options: Record<string, import("@metamask/utils").Json> & {
1373
1373
  entropy?: {
@@ -1414,7 +1414,7 @@ export declare const selectAssetsBySelectedAccountGroup: ((state: AssetListState
1414
1414
  };
1415
1415
  }, resultFuncArgs_1: {
1416
1416
  accounts: Record<string, {
1417
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
1417
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
1418
1418
  id: string;
1419
1419
  options: Record<string, import("@metamask/utils").Json> & {
1420
1420
  entropy?: {
@@ -1470,7 +1470,7 @@ export declare const selectAssetsBySelectedAccountGroup: ((state: AssetListState
1470
1470
  };
1471
1471
  }, (state: AssetListState) => {
1472
1472
  accounts: Record<string, {
1473
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
1473
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
1474
1474
  id: string;
1475
1475
  options: Record<string, import("@metamask/utils").Json> & {
1476
1476
  entropy?: {
@@ -269,6 +269,7 @@ exports.SPOT_PRICES_SUPPORT_INFO = {
269
269
  '0x504': 'eip155:1284/slip44:1284', // Moonbeam - Native symbol: GLMR
270
270
  '0x505': 'eip155:1285/slip44:1285', // Moonriver - Native symbol: MOVR
271
271
  '0x531': 'eip155:1329/slip44:19000118', // Sei Mainnet - Native symbol: SEI
272
+ '0x6f0': 'eip155:1776/slip44:22000119', // Injective Mainnet - Native symbol: INJ
272
273
  '0x74c': 'eip155:1868/erc20:0x0000000000000000000000000000000000000000', // Soneium - Native symbol: ETH
273
274
  '0xa729': 'eip155:42793/erc20:0x0000000000000000000000000000000000000000', // Etherlink - Native symbol: XTZ (Tezos L2)
274
275
  '0xab5': 'eip155:2741/erc20:0x0000000000000000000000000000000000000000', // Abstract - Native symbol: ETH
@@ -302,6 +303,7 @@ exports.SPOT_PRICES_SUPPORT_INFO = {
302
303
  '0x63564c40': 'eip155:1666600000/slip44:1023', // Harmony Mainnet Shard 0 - Native symbol: ONE
303
304
  '0xdef1': 'eip155:57073/slip44:60', // Ink Mainnet - Native symbol: ETH
304
305
  '0x3dc': 'eip155:988/erc20:0x779ded0c9e1022225f8e0630b35a9b54be713736', // Stable - Native symbol: USDT0
306
+ '0xf043a': 'eip155:984122/slip44:984122', // Forma - Native symbol: TIA (Celestia)
305
307
  };
306
308
  /**
307
309
  * The list of chain IDs that can be supplied in the URL for the `/spot-prices`
@@ -1 +1 @@
1
- {"version":3,"file":"codefi-v2.cjs","sourceRoot":"","sources":["../../src/token-prices-service/codefi-v2.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iEAOoC;AAGpC,2CAKyB;AAYzB;;;;GAIG;AACU,QAAA,6BAA6B,GAAG;IAC3C,UAAU;IACV,KAAK;IACL,QAAQ;IACR,KAAK;IACL,WAAW;IACX,KAAK;IACL,eAAe;IACf,KAAK;IACL,eAAe;IACf,KAAK;IACL,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;IACL,SAAS;IACT,KAAK;IACL,YAAY;IACZ,MAAM;IACN,WAAW;IACX,KAAK;IACL,gBAAgB;IAChB,KAAK;IACL,YAAY;IACZ,KAAK;IACL,8BAA8B;IAC9B,KAAK;IACL,iBAAiB;IACjB,KAAK;IACL,oBAAoB;IACpB,KAAK;IACL,mBAAmB;IACnB,KAAK;IACL,iBAAiB;IACjB,KAAK;IACL,mBAAmB;IACnB,KAAK;IACL,cAAc;IACd,KAAK;IACL,kBAAkB;IAClB,KAAK;IACL,cAAc;IACd,KAAK;IACL,eAAe;IACf,KAAK;IACL,eAAe;IACf,KAAK;IACL,eAAe;IACf,KAAK;IACL,eAAe;IACf,KAAK;IACL,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ATION,\n DEFAULT_DEGRADED_THRESHOLD,\n DEFAULT_MAX_CONSECUTIVE_FAILURES,\n DEFAULT_MAX_RETRIES,\n handleFetch,\n} from '@metamask/controller-utils';\nimport type { ServicePolicy } from '@metamask/controller-utils';\nimport type { CaipAssetType, Hex } from '@metamask/utils';\nimport {\n hexToNumber,\n KnownCaipNamespace,\n numberToHex,\n toCaipChainId,\n} from '@metamask/utils';\n\nimport type { MarketDataDetails } from '../TokenRatesController';\nimport type {\n AbstractTokenPricesService,\n EvmAssetAddressWithChain,\n EvmAssetWithId,\n EvmAssetWithMarketData,\n ExchangeRatesByCurrency,\n NativeAssetIdentifiersMap,\n} from './abstract-token-prices-service';\n\n/**\n * The list of currencies that can be supplied as the `vsCurrency` parameter to\n * the `/spot-prices` endpoint, in lowercase form.\n * This is the fallback list used when the API is unavailable.\n */\nexport const SUPPORTED_CURRENCIES_FALLBACK = [\n // Bitcoin\n 'btc',\n // Ether\n 'eth',\n // Litecoin\n 'ltc',\n // Bitcoin Cash\n 'bch',\n // Binance Coin\n 'bnb',\n // EOS\n 'eos',\n // XRP\n 'xrp',\n // Lumens\n 'xlm',\n // Chainlink\n 'link',\n // Polkadot\n 'dot',\n // Yearn.finance\n 'yfi',\n // US Dollar\n 'usd',\n // United Arab Emirates Dirham\n 'aed',\n // Argentine Peso\n 'ars',\n // Australian Dollar\n 'aud',\n // Bangladeshi Taka\n 'bdt',\n // Bahraini Dinar\n 'bhd',\n // Bermudian Dollar\n 'bmd',\n // Brazil Real\n 'brl',\n // Canadian Dollar\n 'cad',\n // Swiss Franc\n 'chf',\n // Chilean Peso\n 'clp',\n // Chinese Yuan\n 'cny',\n // Czech Koruna\n 'czk',\n // Danish Krone\n 'dkk',\n // Euro\n 'eur',\n // British Pound Sterling\n 'gbp',\n // Georgian Lari\n 'gel',\n // Hong Kong Dollar\n 'hkd',\n // Hungarian Forint\n 'huf',\n // Indonesian Rupiah\n 'idr',\n // Israeli New Shekel\n 'ils',\n // Indian Rupee\n 'inr',\n // Japanese Yen\n 'jpy',\n // South Korean Won\n 'krw',\n // Kuwaiti Dinar\n 'kwd',\n // Sri Lankan Rupee\n 'lkr',\n // Burmese Kyat\n 'mmk',\n // Mexican Peso\n 'mxn',\n // Malaysian Ringgit\n 'myr',\n // Monad\n 'mon',\n // Nigerian Naira\n 'ngn',\n // Norwegian Krone\n 'nok',\n // New Zealand Dollar\n 'nzd',\n // Philippine Peso\n 'php',\n // Pakistani Rupee\n 'pkr',\n // Polish Zloty\n 'pln',\n // Russian Ruble\n 'rub',\n // Saudi Riyal\n 'sar',\n // Swedish Krona\n 'sek',\n // Singapore Dollar\n 'sgd',\n // Thai Baht\n 'thb',\n // Turkish Lira\n 'try',\n // New Taiwan Dollar\n 'twd',\n // Ukrainian hryvnia\n 'uah',\n // Venezuelan bolívar fuerte\n 'vef',\n // Vietnamese đồng\n 'vnd',\n // South African Rand\n 'zar',\n // IMF Special Drawing Rights\n 'xdr',\n // Silver - Troy Ounce\n 'xag',\n // Gold - Troy Ounce\n 'xau',\n // Bits\n 'bits',\n // Satoshi\n 'sats',\n // Colombian Peso\n 'cop',\n // Kenyan Shilling\n 'kes',\n // Romanian Leu\n 'ron',\n // Dominican Peso\n 'dop',\n // Costa Rican Colón\n 'crc',\n // Honduran Lempira\n 'hnl',\n // Zambian Kwacha\n 'zmw',\n // Salvadoran Colón\n 'svc',\n // Bosnia-Herzegovina Convertible Mark\n 'bam',\n // Peruvian Sol\n 'pen',\n // Guatemalan Quetzal\n 'gtq',\n // Lebanese Pound\n 'lbp',\n // Armenian Dram\n 'amd',\n // Solana\n 'sol',\n // Sei\n 'sei',\n // Sonic\n 'sonic',\n // Tron\n 'trx',\n // Taiko\n 'taiko',\n // Pepu\n 'pepu',\n // Polygon\n 'pol',\n // Mantle\n 'mnt',\n // Onomy\n 'nom',\n // Avalanche\n 'avax',\n // Apechain\n 'ape',\n] as const;\n\n/**\n * @deprecated Use `getSupportedCurrencies()` or `fetchSupportedCurrencies()` instead.\n * This is an alias for backward compatibility.\n */\nexport const SUPPORTED_CURRENCIES = SUPPORTED_CURRENCIES_FALLBACK;\n\n/**\n * Represents the zero address, commonly used as a placeholder in blockchain transactions.\n * In the context of fetching market data, the zero address is utilized to retrieve information\n * specifically for native currencies. This allows for a standardized approach to query market\n * data for blockchain-native assets without a specific contract address.\n */\nexport const ZERO_ADDRESS: Hex =\n '0x0000000000000000000000000000000000000000' as const;\n\n/**\n * A mapping from chain id to the address of the chain's native token.\n * Only for chains whose native tokens have a specific address.\n */\nconst chainIdToNativeTokenAddress: Record<Hex, Hex> = {\n '0x89': '0x0000000000000000000000000000000000001010', // Polygon\n '0x440': '0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000', // Metis Andromeda\n '0x1388': '0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000', // Mantle\n '0x64': '0xe91d153e0b41518a2ce8dd3d7944fa863463a97d', // Gnosis\n '0x1e': '0x542fda317318ebf1d3deaf76e0b632741a7e677d', // Rootstock Mainnet - Native symbol: RBTC\n '0x3dc': '0x779ded0c9e1022225f8e0630b35a9b54be713736', // Stable - Native symbol: USDT0\n '0x1079': '0x20c0000000000000000000000000000000000000', // Tempo Mainnet - Pseudo-Native symbol: pathUSD\n '0xa5bf': '0x20c0000000000000000000000000000000000000', // Tempo Moderato Testnet - Pseudo-Native symbol: pathUSD\n};\n\n/**\n * Returns the address that should be used to query the price api for the\n * chain's native token. On most chains, this is signified by the zero address.\n * But on some chains, the native token has a specific address.\n *\n * @param chainId - The hexadecimal chain id.\n * @returns The address of the chain's native token.\n */\nexport const getNativeTokenAddress = (chainId: Hex): Hex =>\n chainIdToNativeTokenAddress[chainId] ?? ZERO_ADDRESS;\n\n// Source: https://github.com/consensys-vertical-apps/va-mmcx-price-api/blob/main/src/constants/slip44.ts\n// We can only support PricesAPI V3 for EVM chains that have a CAIP-19 native asset mapping.\nexport const SPOT_PRICES_SUPPORT_INFO = {\n '0x1': 'eip155:1/slip44:60', // Ethereum Mainnet - Native symbol: ETH\n '0xa': 'eip155:10/slip44:60', // OP Mainnet - Native symbol: ETH\n '0x19': 'eip155:25/slip44:394', // Cronos Mainnet - Native symbol: CRO\n '0x1e': 'eip155:30/slip44:137', // Rootstock Mainnet - Native symbol: RBTC\n '0x2a': 'eip155:42/erc20:0x0000000000000000000000000000000000000000', // Lukso - native symbol: LYX\n '0x32': 'eip155:50/erc20:0x0000000000000000000000000000000000000000', // xdc-network - native symbol: XDC\n '0x38': 'eip155:56/slip44:714', // BNB Smart Chain Mainnet - Native symbol: BNB\n '0x39': 'eip155:57/slip44:57', // Syscoin Mainnet - Native symbol: SYS\n '0x52': 'eip155:82/slip44:18000', // Meter Mainnet - Native symbol: MTR\n '0x58': 'eip155:88/slip44:889', // TomoChain - Native symbol: TOMO\n '0x64': 'eip155:100/slip44:700', // Gnosis (formerly xDAI Chain) - Native symbol: xDAI\n '0x6a': 'eip155:106/slip44:5655640', // Velas EVM Mainnet - Native symbol: VLX\n '0x7a': 'eip155:122/erc20:0x0000000000000000000000000000000000000000', // Fuse Mainnet - Native symbol: FUSE\n '0x80': 'eip155:128/slip44:1010', // Huobi ECO Chain Mainnet - Native symbol: HT\n '0x89': 'eip155:137/slip44:966', // Polygon Mainnet - Native symbol: POL\n '0x8f': 'eip155:143/slip44:268435779', // Monad Mainnet - Native symbol: MON\n '0x92': 'eip155:146/slip44:10007', // Sonic Mainnet - Native symbol: S\n '0xc4': 'eip155:196/erc20:0x0000000000000000000000000000000000000000', // X Layer Mainnet - Native symbol: OKB\n '0xe8': 'eip155:232/erc20:0x0000000000000000000000000000000000000000', // Lens Mainnet - Native symbol: GHO\n '0xfa': 'eip155:250/slip44:1007', // Fantom Opera - Native symbol: FTM\n '0xfc': 'eip155:252/erc20:0x0000000000000000000000000000000000000000', // Fraxtal - native symbol: FRAX\n '0x10b3e': 'eip155:68414/erc20:0x0000000000000000000000000000000000000000', // MapleStory Universe - no slip44\n '0x120': 'eip155:288/slip44:60', // Boba Network (Ethereum L2) - Native symbol: ETH\n '0x141': 'eip155:321/slip44:641', // KCC Mainnet - Native symbol: KCS\n '0x144': 'eip155:324/slip44:60', // zkSync Era Mainnet (Ethereum L2) - Native symbol: ETH\n '0x150': 'eip155:336/slip44:809', // Shiden - Native symbol: SDN\n '0x169': 'eip155:361/slip44:589', // Theta Mainnet - Native symbol: TFUEL\n '0x2eb': 'eip155:747/slip44:539', // Flow evm - Native symbol: Flow\n '0x3e7': 'eip155:999/slip44:2457', // HyperEVM - Native symbol: HYPE\n '0x440': 'eip155:1088/erc20:0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000', // Metis Andromeda Mainnet (Ethereum L2) - Native symbol: METIS\n '0x44d': 'eip155:1101/slip44:60', // Polygon zkEVM mainnet - Native symbol: ETH\n '0x504': 'eip155:1284/slip44:1284', // Moonbeam - Native symbol: GLMR\n '0x505': 'eip155:1285/slip44:1285', // Moonriver - Native symbol: MOVR\n '0x531': 'eip155:1329/slip44:19000118', // Sei Mainnet - Native symbol: SEI\n '0x74c': 'eip155:1868/erc20:0x0000000000000000000000000000000000000000', // Soneium - Native symbol: ETH\n '0xa729': 'eip155:42793/erc20:0x0000000000000000000000000000000000000000', // Etherlink - Native symbol: XTZ (Tezos L2)\n '0xab5': 'eip155:2741/erc20:0x0000000000000000000000000000000000000000', // Abstract - Native symbol: ETH\n '0x1079': 'eip155:4217/erc20:0x20c0000000000000000000000000000000000000', // Tempo Mainnet - Pseudo-Native symbol: pathUSD\n '0x10e6': 'eip155:4326/erc20:0x0000000000000000000000000000000000000000', // MegaETH Mainnet - Native symbol: ETH\n '0x1388': 'eip155:5000/erc20:0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000', // Mantle - Native symbol: MNT\n '0x2105': 'eip155:8453/slip44:60', // Base - Native symbol: ETH\n '0x2611': 'eip155:9745/erc20:0x0000000000000000000000000000000000000000', // Plasma mainnet - native symbol: XPL\n '0x2710': 'eip155:10000/slip44:145', // Smart Bitcoin Cash - Native symbol: BCH\n '0x8173': 'eip155:33139/erc20:0x0000000000000000000000000000000000000000', // Apechain Mainnet - Native symbol: APE\n '0xa3c3': 'eip155:41923/erc20:0x0000000000000000000000000000000000000000', // EDU Chain - Native symbol: EDU\n '0xa4b1': 'eip155:42161/slip44:60', // Arbitrum One - Native symbol: ETH\n '0xa4ec': 'eip155:42220/slip44:52752', // Celo Mainnet - Native symbol: CELO\n '0xa516': 'eip155:42262/slip44:474', // Oasis Emerald - Native symbol: ROSE\n '0xa867': 'eip155:43111/erc20:0x0000000000000000000000000000000000000000', // Hemi - Native symbol: ETH\n '0xa86a': 'eip155:43114/slip44:9005', // Avalanche C-Chain - Native symbol: AVAX\n '0xa5bf': 'eip155:42431/erc20:0x20c0000000000000000000000000000000000000', // Tempo Testnet Moderato - Pseudo-Native symbol: pathUSD\n '0xe708': 'eip155:59144/slip44:60', // Linea Mainnet - Native symbol: ETH\n '0xed88': 'eip155:60808/erc20:0x0000000000000000000000000000000000000000', // BOB - Native symbol: ETH\n '0x138de': 'eip155:80094/erc20:0x0000000000000000000000000000000000000000', // Berachain - Native symbol: Bera',\n '0x13c31': 'eip155:81457/slip44:60', // Blast Mainnet - Native symbol: ETH\n '0x15b38': 'eip155:88888/erc20:0x0000000000000000000000000000000000000000', // Chiliz Chain - Native symbol: CHZ\n '0x17dcd': 'eip155:97741/erc20:0x0000000000000000000000000000000000000000', // Pepe Unchained Mainnet - Native symbol: PEPU\n '0x18232': 'eip155:98866/erc20:0x0000000000000000000000000000000000000000', // Plume Mainnet - Narive symbol: Plume\n '0x28c58': 'eip155:167000/slip44:60', // Taiko Mainnet - Native symbol: ETH\n '0x518af': 'eip155:333999/slip44:1997', // Polis Mainnet - Native symbol: POLIS\n '0x82750': 'eip155:534352/slip44:60', // Scroll Mainnet - Native symbol: ETH\n '0xb67d2': 'eip155:747474/erc20:0x0000000000000000000000000000000000000000', // katana - Native symbol: ETH\n '0x15f900': 'eip155:1440000/erc20:0x0000000000000000000000000000000000000000', // xrpl-evm - native symbol: XRP\n '0x4e454152': 'eip155:1313161554/slip44:60', // Aurora Mainnet (Ethereum L2 on NEAR) - Native symbol: ETH\n '0x63564c40': 'eip155:1666600000/slip44:1023', // Harmony Mainnet Shard 0 - Native symbol: ONE\n '0xdef1': 'eip155:57073/slip44:60', // Ink Mainnet - Native symbol: ETH\n '0x3dc': 'eip155:988/erc20:0x779ded0c9e1022225f8e0630b35a9b54be713736', // Stable - Native symbol: USDT0\n} as const;\n\n// MISSING CHAINS WITH NO NATIVE ASSET PRICES\n// '0x42': 'eip155:66/slip44:996', // OKXChain Mainnet - Native symbol: OKT\n// '0x46': 'eip155:70/slip44:1170', // Hoo Smart Chain - Native symbol: HOO\n// '0x926': 'eip155:2342/erc20:0x0000000000000000000000000000000000000000', // Omnia Chain - Native symbol: OMNIA\n// '0x407b': 'eip155:16507/erc20:0x0000000000000000000000000000000000000000', // Genesys Mainnet - Native symbol: GSYS\n\n/**\n * A currency that can be supplied as the `vsCurrency` parameter to\n * the `/spot-prices` endpoint. Covers both uppercase and lowercase versions.\n */\ntype SupportedCurrency =\n | (typeof SUPPORTED_CURRENCIES_FALLBACK)[number]\n | Uppercase<(typeof SUPPORTED_CURRENCIES_FALLBACK)[number]>;\n\n/**\n * The list of chain IDs that can be supplied in the URL for the `/spot-prices`\n * endpoint, but in hexadecimal form (for consistency with how we represent\n * chain IDs in other places).\n *\n * @see Used by {@link CodefiTokenPricesServiceV2} to validate that a given chain ID is supported by V2 of the Codefi Price API.\n */\nexport const SUPPORTED_CHAIN_IDS = Object.keys(\n SPOT_PRICES_SUPPORT_INFO,\n) as (keyof typeof SPOT_PRICES_SUPPORT_INFO)[];\n\n/**\n * A chain ID that can be supplied in the URL for the `/spot-prices` endpoint,\n * but in hexadecimal form (for consistency with how we represent chain IDs in\n * other places).\n */\ntype SupportedChainId = (typeof SUPPORTED_CHAIN_IDS)[number];\n\nconst BASE_URL_V1 = 'https://price.api.cx.metamask.io/v1';\n\nconst BASE_URL_V2 = 'https://price.api.cx.metamask.io/v2';\n\nconst BASE_URL_V3 = 'https://price.api.cx.metamask.io/v3';\n\n/**\n * Response type for the /v2/supportedNetworks endpoint.\n */\ntype SupportedNetworksResponse = {\n fullSupport: string[];\n partialSupport: {\n spotPricesV2: string[];\n spotPricesV3: string[];\n };\n};\n\n/**\n * In-memory store for the last successfully fetched supported networks.\n */\nlet lastFetchedSupportedNetworks: SupportedNetworksResponse | null = null;\n\n/**\n * In-flight promise to prevent concurrent requests to the supported networks endpoint.\n */\nlet runningSupportedNetworksRequest: Promise<SupportedNetworksResponse> | null =\n null;\n\n/**\n * Converts a CAIP-2 chain ID (e.g., 'eip155:1') to a hex chain ID (e.g., '0x1').\n *\n * @param caipChainId - The CAIP-2 chain ID string.\n * @returns The hex chain ID or null if not an EIP-155 chain.\n */\nfunction caipChainIdToHex(caipChainId: string): Hex | null {\n const match = caipChainId.match(/^eip155:(\\d+)$/u);\n if (!match) {\n return null;\n }\n return numberToHex(parseInt(match[1], 10));\n}\n\n/**\n * Executes the actual fetch to the supported networks endpoint.\n * Handles errors internally by falling back to the hardcoded list,\n * and clears the in-flight promise when done.\n *\n * @returns The supported networks response.\n */\nasync function executeSupportedNetworksFetch(): Promise<SupportedNetworksResponse> {\n try {\n const url = `${BASE_URL_V2}/supportedNetworks`;\n const response = await handleFetch(url, {\n headers: { 'Cache-Control': 'no-cache' },\n });\n\n if (\n response &&\n typeof response === 'object' &&\n 'fullSupport' in response &&\n 'partialSupport' in response\n ) {\n lastFetchedSupportedNetworks = response as SupportedNetworksResponse;\n return lastFetchedSupportedNetworks;\n }\n\n // Invalid response format, fall back to hardcoded list\n return getSupportedNetworksFallback();\n } catch {\n // On any error, fall back to the hardcoded list\n return getSupportedNetworksFallback();\n } finally {\n // Clear the in-flight promise once the request completes\n runningSupportedNetworksRequest = null;\n }\n}\n\n/**\n * Fetches the list of supported networks from the API.\n * Falls back to the hardcoded list if the fetch fails.\n * Deduplicates concurrent requests by returning the same promise if a fetch is already in progress.\n *\n * @returns The supported networks response.\n */\nexport async function fetchSupportedNetworks(): Promise<SupportedNetworksResponse> {\n // If a fetch is already in progress, return the same promise\n if (runningSupportedNetworksRequest) {\n return runningSupportedNetworksRequest;\n }\n\n // Start a new fetch and cache the promise\n runningSupportedNetworksRequest = executeSupportedNetworksFetch();\n\n return runningSupportedNetworksRequest;\n}\n\n/**\n * Synchronously gets the list of supported networks.\n * Returns the last fetched value if available, otherwise returns the fallback list.\n *\n * @returns The supported networks response.\n */\nexport function getSupportedNetworks(): SupportedNetworksResponse {\n if (lastFetchedSupportedNetworks !== null) {\n return lastFetchedSupportedNetworks;\n }\n return getSupportedNetworksFallback();\n}\n\n/**\n * Generates a fallback supported networks response from the hardcoded SPOT_PRICES_SUPPORT_INFO.\n *\n * @returns A SupportedNetworksResponse derived from hardcoded data.\n */\nfunction getSupportedNetworksFallback(): SupportedNetworksResponse {\n const caipChainIds = Object.keys(SPOT_PRICES_SUPPORT_INFO).map((hexChainId) =>\n toCaipChainId(\n KnownCaipNamespace.Eip155,\n hexToNumber(hexChainId as Hex).toString(),\n ),\n );\n\n return {\n fullSupport: caipChainIds.slice(0, 11), // First 11 chains as \"full support\"\n partialSupport: {\n spotPricesV2: caipChainIds,\n spotPricesV3: caipChainIds,\n },\n };\n}\n\n/**\n * Resets the supported networks cache.\n * This is primarily intended for testing purposes.\n */\nexport function resetSupportedNetworksCache(): void {\n lastFetchedSupportedNetworks = null;\n runningSupportedNetworksRequest = null;\n}\n\n/**\n * Gets the list of supported chain IDs for spot prices v3 as hex values.\n *\n * @returns Array of hex chain IDs supported by spot prices v3.\n */\nfunction getSupportedChainIdsV3AsHex(): Hex[] {\n const supportedNetworks = getSupportedNetworks();\n const allV3Chains = [\n ...supportedNetworks.fullSupport,\n ...supportedNetworks.partialSupport.spotPricesV3,\n ];\n\n return allV3Chains\n .map(caipChainIdToHex)\n .filter((hexChainId): hexChainId is Hex => hexChainId !== null);\n}\n\n/**\n * In-memory store for the last successfully fetched supported currencies.\n */\nlet lastFetchedCurrencies: string[] | null = null;\n\n/**\n * Fetches the list of supported currencies from the API.\n * Falls back to the hardcoded list if the fetch fails.\n *\n * @returns The list of supported currencies in lowercase.\n */\nexport async function fetchSupportedCurrencies(): Promise<string[]> {\n try {\n const url = `${BASE_URL_V1}/supportedVsCurrencies`;\n const response = await handleFetch(url, {\n headers: { 'Cache-Control': 'no-cache' },\n });\n\n if (Array.isArray(response)) {\n const currencies = response.map((currency: string) =>\n currency.toLowerCase(),\n );\n lastFetchedCurrencies = currencies;\n return currencies;\n }\n\n // Invalid response format, fall back to hardcoded list\n return [...SUPPORTED_CURRENCIES_FALLBACK];\n } catch {\n // On any error, fall back to the hardcoded list\n return [...SUPPORTED_CURRENCIES_FALLBACK];\n }\n}\n\n/**\n * Synchronously gets the list of supported currencies.\n * Returns the last fetched value if available, otherwise returns the fallback list.\n *\n * @returns The list of supported currencies in lowercase.\n */\nexport function getSupportedCurrencies(): readonly string[] {\n if (lastFetchedCurrencies !== null) {\n return lastFetchedCurrencies;\n }\n return SUPPORTED_CURRENCIES_FALLBACK;\n}\n\n/**\n * Resets the supported currencies cache.\n * This is primarily intended for testing purposes.\n */\nexport function resetSupportedCurrenciesCache(): void {\n lastFetchedCurrencies = null;\n}\n\n/**\n * This version of the token prices service uses V2 of the Codefi Price API to\n * fetch token prices.\n */\nexport class CodefiTokenPricesServiceV2 implements AbstractTokenPricesService<\n SupportedChainId,\n SupportedCurrency\n> {\n readonly #policy: ServicePolicy;\n\n /**\n * Map of CAIP-2 chain IDs to their native asset identifiers.\n * Updated via setNativeAssetIdentifiers().\n */\n #nativeAssetIdentifiers: NativeAssetIdentifiersMap = {};\n\n /**\n * Construct a Codefi Token Price Service.\n *\n * @param args - The arguments.\n * @param args.degradedThreshold - The length of time (in milliseconds)\n * that governs when the service is regarded as degraded (affecting when\n * `onDegraded` is called). Defaults to 5 seconds.\n * @param args.retries - Number of retry attempts for each fetch request.\n * @param args.maximumConsecutiveFailures - The maximum number of consecutive\n * failures allowed before breaking the circuit and pausing further updates.\n * @param args.circuitBreakDuration - The amount of time to wait when the\n * circuit breaks from too many consecutive failures.\n */\n constructor(args?: {\n degradedThreshold?: number;\n retries?: number;\n maximumConsecutiveFailures?: number;\n circuitBreakDuration?: number;\n });\n\n /**\n * Construct a Codefi Token Price Service.\n *\n * @deprecated This signature is deprecated; please use the `onBreak` and\n * `onDegraded` methods instead.\n * @param args - The arguments.\n * @param args.degradedThreshold - The length of time (in milliseconds)\n * that governs when the service is regarded as degraded (affecting when\n * `onDegraded` is called). Defaults to 5 seconds.\n * @param args.retries - Number of retry attempts for each fetch request.\n * @param args.maximumConsecutiveFailures - The maximum number of consecutive\n * failures allowed before breaking the circuit and pausing further updates.\n * @param args.onBreak - Callback for when the circuit breaks, useful\n * for capturing metrics about network failures.\n * @param args.onDegraded - Callback for when the API responds successfully\n * but takes too long to respond (5 seconds or more).\n * @param args.circuitBreakDuration - The amount of time to wait when the\n * circuit breaks from too many consecutive failures.\n */\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n constructor(args?: {\n degradedThreshold?: number;\n retries?: number;\n maximumConsecutiveFailures?: number;\n onBreak?: () => void;\n onDegraded?: () => void;\n circuitBreakDuration?: number;\n });\n\n constructor({\n degradedThreshold = DEFAULT_DEGRADED_THRESHOLD,\n retries = DEFAULT_MAX_RETRIES,\n maximumConsecutiveFailures = DEFAULT_MAX_CONSECUTIVE_FAILURES,\n onBreak,\n onDegraded,\n circuitBreakDuration = DEFAULT_CIRCUIT_BREAK_DURATION,\n }: {\n degradedThreshold?: number;\n retries?: number;\n maximumConsecutiveFailures?: number;\n onBreak?: () => void;\n onDegraded?: () => void;\n circuitBreakDuration?: number;\n } = {}) {\n this.#policy = createServicePolicy({\n maxRetries: retries,\n maxConsecutiveFailures: maximumConsecutiveFailures,\n circuitBreakDuration,\n degradedThreshold,\n });\n if (onBreak) {\n this.#policy.onBreak(onBreak);\n }\n if (onDegraded) {\n this.#policy.onDegraded(onDegraded);\n }\n }\n\n /**\n * Listens for when the request to the API fails too many times in a row.\n *\n * @param args - The same arguments that {@link ServicePolicy.onBreak}\n * takes.\n * @returns What {@link ServicePolicy.onBreak} returns.\n */\n onBreak(\n ...args: Parameters<ServicePolicy['onBreak']>\n ): ReturnType<ServicePolicy['onBreak']> {\n return this.#policy.onBreak(...args);\n }\n\n /**\n * Listens for when the API is degraded.\n *\n * @param args - The same arguments that {@link ServicePolicy.onDegraded}\n * takes.\n * @returns What {@link ServicePolicy.onDegraded} returns.\n */\n onDegraded(\n ...args: Parameters<ServicePolicy['onDegraded']>\n ): ReturnType<ServicePolicy['onDegraded']> {\n return this.#policy.onDegraded(...args);\n }\n\n /**\n * Sets the native asset identifiers map for resolving native token CAIP-19 IDs.\n * This should be called with data from NetworkEnablementController.state.nativeAssetIdentifiers.\n *\n * @param nativeAssetIdentifiers - Map of CAIP-2 chain IDs to native asset identifiers.\n */\n setNativeAssetIdentifiers(\n nativeAssetIdentifiers: NativeAssetIdentifiersMap,\n ): void {\n this.#nativeAssetIdentifiers = nativeAssetIdentifiers;\n }\n\n /**\n * Updates the supported networks cache by fetching from the API.\n * This should be called periodically to keep the supported networks list fresh.\n *\n * @returns The updated supported networks response.\n */\n async updateSupportedNetworks(): Promise<SupportedNetworksResponse> {\n return fetchSupportedNetworks();\n }\n\n /**\n * Retrieves prices in the given currency for the tokens identified by the\n * given addresses which are expected to live on the given chain.\n *\n * @param args - The arguments to function.\n * @param args.assets - The assets to get prices for.\n * @param args.currency - The desired currency of the token prices.\n * @returns The prices for the requested tokens.\n */\n async fetchTokenPrices({\n assets,\n currency,\n }: {\n assets: EvmAssetAddressWithChain<SupportedChainId>[];\n currency: SupportedCurrency;\n }): Promise<EvmAssetWithMarketData<SupportedChainId, SupportedCurrency>[]> {\n // Refresh supported networks in background (non-blocking)\n // This ensures the list stays fresh during normal polling\n // Note: fetchSupportedNetworks handles errors internally and always resolves\n if (!lastFetchedSupportedNetworks) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n fetchSupportedNetworks();\n }\n\n // Get dynamically fetched supported chain IDs for V3\n const supportedChainIdsV3 = getSupportedChainIdsV3AsHex();\n\n const assetsWithIds: EvmAssetWithId<SupportedChainId>[] = assets\n // Filter out assets that are not supported by V3 of the Price API.\n .filter((asset) => supportedChainIdsV3.includes(asset.chainId))\n .map((asset) => {\n const caipChainId = toCaipChainId(\n KnownCaipNamespace.Eip155,\n hexToNumber(asset.chainId).toString(),\n );\n\n const nativeAddress = getNativeTokenAddress(asset.chainId);\n const isNativeToken =\n nativeAddress.toLowerCase() === asset.tokenAddress.toLowerCase();\n\n let assetId: string | undefined;\n if (isNativeToken) {\n // For native tokens, use hardcoded SPOT_PRICES_SUPPORT_INFO when defined,\n // otherwise use nativeAssetIdentifiers from NetworkEnablementController by default.\n assetId =\n SPOT_PRICES_SUPPORT_INFO[asset.chainId] ??\n this.#nativeAssetIdentifiers[caipChainId];\n } else {\n // For ERC20 tokens, construct the CAIP-19 ID dynamically\n assetId = `${caipChainId}/erc20:${asset.tokenAddress.toLowerCase()}`;\n }\n\n if (!assetId) {\n return undefined;\n }\n\n return {\n ...asset,\n assetId: assetId as CaipAssetType,\n };\n })\n .filter(\n (asset): asset is EvmAssetWithId<SupportedChainId> =>\n asset !== undefined,\n );\n\n if (assetsWithIds.length === 0) {\n return [];\n }\n\n const url = new URL(`${BASE_URL_V3}/spot-prices`);\n url.searchParams.append(\n 'assetIds',\n assetsWithIds.map((asset) => asset.assetId).join(','),\n );\n url.searchParams.append('vsCurrency', currency);\n url.searchParams.append('includeMarketData', 'true');\n\n const addressCryptoDataMap: {\n [assetId: CaipAssetType]: Omit<\n MarketDataDetails,\n 'currency' | 'tokenAddress'\n >;\n } = await this.#policy.execute(() =>\n handleFetch(url, { headers: { 'Cache-Control': 'no-cache' } }),\n );\n\n return assetsWithIds\n .map((assetWithId) => {\n const marketData = addressCryptoDataMap[assetWithId.assetId];\n\n if (!marketData) {\n return undefined;\n }\n\n return {\n ...marketData,\n ...assetWithId,\n currency,\n };\n })\n .filter((entry): entry is NonNullable<typeof entry> => Boolean(entry));\n }\n\n /**\n * Retrieves exchange rates in the given base currency.\n *\n * @param args - The arguments to this function.\n * @param args.baseCurrency - The desired base currency of the exchange rates.\n * @param args.includeUsdRate - Whether to include the USD rate in the response.\n * @param args.cryptocurrencies - The cryptocurrencies to get exchange rates for.\n * @returns The exchange rates for the requested base currency.\n */\n async fetchExchangeRates({\n baseCurrency,\n includeUsdRate,\n cryptocurrencies,\n }: {\n baseCurrency: SupportedCurrency;\n includeUsdRate: boolean;\n cryptocurrencies: string[];\n }): Promise<ExchangeRatesByCurrency<SupportedCurrency>> {\n // Refresh supported currencies in background (non-blocking)\n // This ensures the list stays fresh during normal polling\n // Note: fetchSupportedCurrencies handles errors internally and always resolves\n if (!lastFetchedCurrencies) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n fetchSupportedCurrencies();\n }\n\n const url = new URL(`${BASE_URL_V1}/exchange-rates`);\n url.searchParams.append('baseCurrency', baseCurrency);\n\n const urlUsd = new URL(`${BASE_URL_V1}/exchange-rates`);\n urlUsd.searchParams.append('baseCurrency', 'usd');\n\n const [exchangeRatesResult, exchangeRatesResultUsd] =\n await Promise.allSettled([\n this.#policy.execute(() =>\n handleFetch(url, { headers: { 'Cache-Control': 'no-cache' } }),\n ),\n ...(includeUsdRate && baseCurrency.toLowerCase() !== 'usd'\n ? [\n this.#policy.execute(() =>\n handleFetch(urlUsd, {\n headers: { 'Cache-Control': 'no-cache' },\n }),\n ),\n ]\n : []),\n ]);\n\n // Handle resolved/rejected\n const exchangeRates =\n exchangeRatesResult.status === 'fulfilled'\n ? exchangeRatesResult.value\n : {};\n const exchangeRatesUsd =\n exchangeRatesResultUsd?.status === 'fulfilled'\n ? exchangeRatesResultUsd.value\n : {};\n\n if (exchangeRatesResult.status === 'rejected') {\n throw new Error('Failed to fetch');\n }\n\n const filteredExchangeRates = cryptocurrencies.reduce((acc, key) => {\n if (exchangeRates[key.toLowerCase() as SupportedCurrency]) {\n acc[key.toLowerCase() as SupportedCurrency] =\n exchangeRates[key.toLowerCase() as SupportedCurrency];\n }\n return acc;\n }, {} as ExchangeRatesByCurrency<SupportedCurrency>);\n\n if (Object.keys(filteredExchangeRates).length === 0) {\n throw new Error(\n 'None of the cryptocurrencies are supported by price api',\n );\n }\n\n const filteredUsdExchangeRates = cryptocurrencies.reduce((acc, key) => {\n if (exchangeRatesUsd[key.toLowerCase() as SupportedCurrency]) {\n acc[key.toLowerCase() as SupportedCurrency] =\n exchangeRatesUsd[key.toLowerCase() as SupportedCurrency];\n }\n return acc;\n }, {} as ExchangeRatesByCurrency<SupportedCurrency>);\n\n if (baseCurrency.toLowerCase() === 'usd') {\n Object.keys(filteredExchangeRates).forEach((key) => {\n filteredExchangeRates[key as SupportedCurrency] = {\n ...filteredExchangeRates[key as SupportedCurrency],\n usd: filteredExchangeRates[key as SupportedCurrency]?.value,\n };\n });\n return filteredExchangeRates;\n }\n if (!includeUsdRate) {\n return filteredExchangeRates;\n }\n\n const merged = Object.keys(filteredExchangeRates).reduce((acc, key) => {\n acc[key as SupportedCurrency] = {\n ...filteredExchangeRates[key as SupportedCurrency],\n ...(filteredUsdExchangeRates[key as SupportedCurrency]?.value\n ? { usd: filteredUsdExchangeRates[key as SupportedCurrency]?.value }\n : {}),\n };\n return acc;\n }, {} as ExchangeRatesByCurrency<SupportedCurrency>);\n\n return merged;\n }\n\n /**\n * Type guard for whether the API can return token prices for the given chain\n * ID.\n *\n * @param chainId - The chain ID to check.\n * @returns True if the API supports the chain ID, false otherwise.\n */\n validateChainIdSupported(chainId: unknown): chainId is SupportedChainId {\n // Use dynamically fetched supported networks\n const supportedChainIds = getSupportedChainIdsV3AsHex();\n // Also include the hardcoded fallback list for backwards compatibility\n const allSupportedChainIds: readonly string[] = [\n ...new Set([...supportedChainIds, ...SUPPORTED_CHAIN_IDS]),\n ];\n return (\n typeof chainId === 'string' && allSupportedChainIds.includes(chainId)\n );\n }\n\n /**\n * Type guard for whether the API can return token prices in the given\n * currency.\n *\n * @param currency - The currency to check. If a string, can be either\n * lowercase or uppercase.\n * @returns True if the API supports the currency, false otherwise.\n */\n validateCurrencySupported(currency: unknown): currency is SupportedCurrency {\n const supportedCurrencies = getSupportedCurrencies();\n return (\n typeof currency === 'string' &&\n supportedCurrencies.includes(currency.toLowerCase())\n );\n }\n\n /**\n * Fetches the list of supported currencies from the API.\n *\n * @returns The list of supported currencies.\n */\n async updateSupportedCurrencies(): Promise<string[]> {\n return fetchSupportedCurrencies();\n }\n}\n"]}
1
+ {"version":3,"file":"codefi-v2.cjs","sourceRoot":"","sources":["../../src/token-prices-service/codefi-v2.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iEAOoC;AAGpC,2CAKyB;AAYzB;;;;GAIG;AACU,QAAA,6BAA6B,GAAG;IAC3C,UAAU;IACV,KAAK;IACL,QAAQ;IACR,KAAK;IACL,WAAW;IACX,KAAK;IACL,eAAe;IACf,KAAK;IACL,eAAe;IACf,KAAK;IACL,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;IACL,SAAS;IACT,KAAK;IACL,YAAY;IACZ,MAAM;IACN,WAAW;IACX,KAAK;IACL,gBAAgB;IAChB,KAAK;IACL,YAAY;IACZ,KAAK;IACL,8BAA8B;IAC9B,KAAK;IACL,iBAAiB;IACjB,KAAK;IACL,oBAAoB;IACpB,KAAK;IACL,mBAAmB;IACnB,KAAK;IACL,iBAAiB;IACjB,KAAK;IACL,mBAAmB;IACnB,KAAK;IACL,cAAc;IACd,KAAK;IACL,kBAAkB;IAClB,KAAK;IACL,cAAc;IACd,KAAK;IACL,eAAe;IACf,KAAK;IACL,eAAe;IACf,KAAK;IACL,eAAe;IACf,KAAK;IACL,eAAe;IACf,KAAK;IACL,OAAO;IACP,KAAK;IACL,yBAAyB;IACzB,KAAK;IACL,gBAAgB;IAChB,KAAK;IACL,mBAAmB;IACnB,KAAK;IACL,mBAAmB;IACnB,KAAK;IACL,oBAAoB;IACpB,KAAK;IACL,qBA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n DEFAULT_MAX_RETRIES,\n handleFetch,\n} from '@metamask/controller-utils';\nimport type { ServicePolicy } from '@metamask/controller-utils';\nimport type { CaipAssetType, Hex } from '@metamask/utils';\nimport {\n hexToNumber,\n KnownCaipNamespace,\n numberToHex,\n toCaipChainId,\n} from '@metamask/utils';\n\nimport type { MarketDataDetails } from '../TokenRatesController';\nimport type {\n AbstractTokenPricesService,\n EvmAssetAddressWithChain,\n EvmAssetWithId,\n EvmAssetWithMarketData,\n ExchangeRatesByCurrency,\n NativeAssetIdentifiersMap,\n} from './abstract-token-prices-service';\n\n/**\n * The list of currencies that can be supplied as the `vsCurrency` parameter to\n * the `/spot-prices` endpoint, in lowercase form.\n * This is the fallback list used when the API is unavailable.\n */\nexport const SUPPORTED_CURRENCIES_FALLBACK = [\n // Bitcoin\n 'btc',\n // Ether\n 'eth',\n // Litecoin\n 'ltc',\n // Bitcoin Cash\n 'bch',\n // Binance Coin\n 'bnb',\n // EOS\n 'eos',\n // XRP\n 'xrp',\n // Lumens\n 'xlm',\n // Chainlink\n 'link',\n // Polkadot\n 'dot',\n // Yearn.finance\n 'yfi',\n // US Dollar\n 'usd',\n // United Arab Emirates Dirham\n 'aed',\n // Argentine Peso\n 'ars',\n // Australian Dollar\n 'aud',\n // Bangladeshi Taka\n 'bdt',\n // Bahraini Dinar\n 'bhd',\n // Bermudian Dollar\n 'bmd',\n // Brazil Real\n 'brl',\n // Canadian Dollar\n 'cad',\n // Swiss Franc\n 'chf',\n // Chilean Peso\n 'clp',\n // Chinese Yuan\n 'cny',\n // Czech Koruna\n 'czk',\n // Danish Krone\n 'dkk',\n // Euro\n 'eur',\n // British Pound Sterling\n 'gbp',\n // Georgian Lari\n 'gel',\n // Hong Kong Dollar\n 'hkd',\n // Hungarian Forint\n 'huf',\n // Indonesian Rupiah\n 'idr',\n // Israeli New Shekel\n 'ils',\n // Indian Rupee\n 'inr',\n // Japanese Yen\n 'jpy',\n // South Korean Won\n 'krw',\n // Kuwaiti Dinar\n 'kwd',\n // Sri Lankan Rupee\n 'lkr',\n // Burmese Kyat\n 'mmk',\n // Mexican Peso\n 'mxn',\n // Malaysian Ringgit\n 'myr',\n // Monad\n 'mon',\n // Nigerian Naira\n 'ngn',\n // Norwegian Krone\n 'nok',\n // New Zealand Dollar\n 'nzd',\n // Philippine Peso\n 'php',\n // Pakistani Rupee\n 'pkr',\n // Polish Zloty\n 'pln',\n // Russian Ruble\n 'rub',\n // Saudi Riyal\n 'sar',\n // Swedish Krona\n 'sek',\n // Singapore Dollar\n 'sgd',\n // Thai Baht\n 'thb',\n // Turkish Lira\n 'try',\n // New Taiwan Dollar\n 'twd',\n // Ukrainian hryvnia\n 'uah',\n // Venezuelan bolívar fuerte\n 'vef',\n // Vietnamese đồng\n 'vnd',\n // South African Rand\n 'zar',\n // IMF Special Drawing Rights\n 'xdr',\n // Silver - Troy Ounce\n 'xag',\n // Gold - Troy Ounce\n 'xau',\n // Bits\n 'bits',\n // Satoshi\n 'sats',\n // Colombian Peso\n 'cop',\n // Kenyan Shilling\n 'kes',\n // Romanian Leu\n 'ron',\n // Dominican Peso\n 'dop',\n // Costa Rican Colón\n 'crc',\n // Honduran Lempira\n 'hnl',\n // Zambian Kwacha\n 'zmw',\n // Salvadoran Colón\n 'svc',\n // Bosnia-Herzegovina Convertible Mark\n 'bam',\n // Peruvian Sol\n 'pen',\n // Guatemalan Quetzal\n 'gtq',\n // Lebanese Pound\n 'lbp',\n // Armenian Dram\n 'amd',\n // Solana\n 'sol',\n // Sei\n 'sei',\n // Sonic\n 'sonic',\n // Tron\n 'trx',\n // Taiko\n 'taiko',\n // Pepu\n 'pepu',\n // Polygon\n 'pol',\n // Mantle\n 'mnt',\n // Onomy\n 'nom',\n // Avalanche\n 'avax',\n // Apechain\n 'ape',\n] as const;\n\n/**\n * @deprecated Use `getSupportedCurrencies()` or `fetchSupportedCurrencies()` instead.\n * This is an alias for backward compatibility.\n */\nexport const SUPPORTED_CURRENCIES = SUPPORTED_CURRENCIES_FALLBACK;\n\n/**\n * Represents the zero address, commonly used as a placeholder in blockchain transactions.\n * In the context of fetching market data, the zero address is utilized to retrieve information\n * specifically for native currencies. This allows for a standardized approach to query market\n * data for blockchain-native assets without a specific contract address.\n */\nexport const ZERO_ADDRESS: Hex =\n '0x0000000000000000000000000000000000000000' as const;\n\n/**\n * A mapping from chain id to the address of the chain's native token.\n * Only for chains whose native tokens have a specific address.\n */\nconst chainIdToNativeTokenAddress: Record<Hex, Hex> = {\n '0x89': '0x0000000000000000000000000000000000001010', // Polygon\n '0x440': '0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000', // Metis Andromeda\n '0x1388': '0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000', // Mantle\n '0x64': '0xe91d153e0b41518a2ce8dd3d7944fa863463a97d', // Gnosis\n '0x1e': '0x542fda317318ebf1d3deaf76e0b632741a7e677d', // Rootstock Mainnet - Native symbol: RBTC\n '0x3dc': '0x779ded0c9e1022225f8e0630b35a9b54be713736', // Stable - Native symbol: USDT0\n '0x1079': '0x20c0000000000000000000000000000000000000', // Tempo Mainnet - Pseudo-Native symbol: pathUSD\n '0xa5bf': '0x20c0000000000000000000000000000000000000', // Tempo Moderato Testnet - Pseudo-Native symbol: pathUSD\n};\n\n/**\n * Returns the address that should be used to query the price api for the\n * chain's native token. On most chains, this is signified by the zero address.\n * But on some chains, the native token has a specific address.\n *\n * @param chainId - The hexadecimal chain id.\n * @returns The address of the chain's native token.\n */\nexport const getNativeTokenAddress = (chainId: Hex): Hex =>\n chainIdToNativeTokenAddress[chainId] ?? ZERO_ADDRESS;\n\n// Source: https://github.com/consensys-vertical-apps/va-mmcx-price-api/blob/main/src/constants/slip44.ts\n// We can only support PricesAPI V3 for EVM chains that have a CAIP-19 native asset mapping.\nexport const SPOT_PRICES_SUPPORT_INFO = {\n '0x1': 'eip155:1/slip44:60', // Ethereum Mainnet - Native symbol: ETH\n '0xa': 'eip155:10/slip44:60', // OP Mainnet - Native symbol: ETH\n '0x19': 'eip155:25/slip44:394', // Cronos Mainnet - Native symbol: CRO\n '0x1e': 'eip155:30/slip44:137', // Rootstock Mainnet - Native symbol: RBTC\n '0x2a': 'eip155:42/erc20:0x0000000000000000000000000000000000000000', // Lukso - native symbol: LYX\n '0x32': 'eip155:50/erc20:0x0000000000000000000000000000000000000000', // xdc-network - native symbol: XDC\n '0x38': 'eip155:56/slip44:714', // BNB Smart Chain Mainnet - Native symbol: BNB\n '0x39': 'eip155:57/slip44:57', // Syscoin Mainnet - Native symbol: SYS\n '0x52': 'eip155:82/slip44:18000', // Meter Mainnet - Native symbol: MTR\n '0x58': 'eip155:88/slip44:889', // TomoChain - Native symbol: TOMO\n '0x64': 'eip155:100/slip44:700', // Gnosis (formerly xDAI Chain) - Native symbol: xDAI\n '0x6a': 'eip155:106/slip44:5655640', // Velas EVM Mainnet - Native symbol: VLX\n '0x7a': 'eip155:122/erc20:0x0000000000000000000000000000000000000000', // Fuse Mainnet - Native symbol: FUSE\n '0x80': 'eip155:128/slip44:1010', // Huobi ECO Chain Mainnet - Native symbol: HT\n '0x89': 'eip155:137/slip44:966', // Polygon Mainnet - Native symbol: POL\n '0x8f': 'eip155:143/slip44:268435779', // Monad Mainnet - Native symbol: MON\n '0x92': 'eip155:146/slip44:10007', // Sonic Mainnet - Native symbol: S\n '0xc4': 'eip155:196/erc20:0x0000000000000000000000000000000000000000', // X Layer Mainnet - Native symbol: OKB\n '0xe8': 'eip155:232/erc20:0x0000000000000000000000000000000000000000', // Lens Mainnet - Native symbol: GHO\n '0xfa': 'eip155:250/slip44:1007', // Fantom Opera - Native symbol: FTM\n '0xfc': 'eip155:252/erc20:0x0000000000000000000000000000000000000000', // Fraxtal - native symbol: FRAX\n '0x10b3e': 'eip155:68414/erc20:0x0000000000000000000000000000000000000000', // MapleStory Universe - no slip44\n '0x120': 'eip155:288/slip44:60', // Boba Network (Ethereum L2) - Native symbol: ETH\n '0x141': 'eip155:321/slip44:641', // KCC Mainnet - Native symbol: KCS\n '0x144': 'eip155:324/slip44:60', // zkSync Era Mainnet (Ethereum L2) - Native symbol: ETH\n '0x150': 'eip155:336/slip44:809', // Shiden - Native symbol: SDN\n '0x169': 'eip155:361/slip44:589', // Theta Mainnet - Native symbol: TFUEL\n '0x2eb': 'eip155:747/slip44:539', // Flow evm - Native symbol: Flow\n '0x3e7': 'eip155:999/slip44:2457', // HyperEVM - Native symbol: HYPE\n '0x440': 'eip155:1088/erc20:0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000', // Metis Andromeda Mainnet (Ethereum L2) - Native symbol: METIS\n '0x44d': 'eip155:1101/slip44:60', // Polygon zkEVM mainnet - Native symbol: ETH\n '0x504': 'eip155:1284/slip44:1284', // Moonbeam - Native symbol: GLMR\n '0x505': 'eip155:1285/slip44:1285', // Moonriver - Native symbol: MOVR\n '0x531': 'eip155:1329/slip44:19000118', // Sei Mainnet - Native symbol: SEI\n '0x6f0': 'eip155:1776/slip44:22000119', // Injective Mainnet - Native symbol: INJ\n '0x74c': 'eip155:1868/erc20:0x0000000000000000000000000000000000000000', // Soneium - Native symbol: ETH\n '0xa729': 'eip155:42793/erc20:0x0000000000000000000000000000000000000000', // Etherlink - Native symbol: XTZ (Tezos L2)\n '0xab5': 'eip155:2741/erc20:0x0000000000000000000000000000000000000000', // Abstract - Native symbol: ETH\n '0x1079': 'eip155:4217/erc20:0x20c0000000000000000000000000000000000000', // Tempo Mainnet - Pseudo-Native symbol: pathUSD\n '0x10e6': 'eip155:4326/erc20:0x0000000000000000000000000000000000000000', // MegaETH Mainnet - Native symbol: ETH\n '0x1388': 'eip155:5000/erc20:0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000', // Mantle - Native symbol: MNT\n '0x2105': 'eip155:8453/slip44:60', // Base - Native symbol: ETH\n '0x2611': 'eip155:9745/erc20:0x0000000000000000000000000000000000000000', // Plasma mainnet - native symbol: XPL\n '0x2710': 'eip155:10000/slip44:145', // Smart Bitcoin Cash - Native symbol: BCH\n '0x8173': 'eip155:33139/erc20:0x0000000000000000000000000000000000000000', // Apechain Mainnet - Native symbol: APE\n '0xa3c3': 'eip155:41923/erc20:0x0000000000000000000000000000000000000000', // EDU Chain - Native symbol: EDU\n '0xa4b1': 'eip155:42161/slip44:60', // Arbitrum One - Native symbol: ETH\n '0xa4ec': 'eip155:42220/slip44:52752', // Celo Mainnet - Native symbol: CELO\n '0xa516': 'eip155:42262/slip44:474', // Oasis Emerald - Native symbol: ROSE\n '0xa867': 'eip155:43111/erc20:0x0000000000000000000000000000000000000000', // Hemi - Native symbol: ETH\n '0xa86a': 'eip155:43114/slip44:9005', // Avalanche C-Chain - Native symbol: AVAX\n '0xa5bf': 'eip155:42431/erc20:0x20c0000000000000000000000000000000000000', // Tempo Testnet Moderato - Pseudo-Native symbol: pathUSD\n '0xe708': 'eip155:59144/slip44:60', // Linea Mainnet - Native symbol: ETH\n '0xed88': 'eip155:60808/erc20:0x0000000000000000000000000000000000000000', // BOB - Native symbol: ETH\n '0x138de': 'eip155:80094/erc20:0x0000000000000000000000000000000000000000', // Berachain - Native symbol: Bera',\n '0x13c31': 'eip155:81457/slip44:60', // Blast Mainnet - Native symbol: ETH\n '0x15b38': 'eip155:88888/erc20:0x0000000000000000000000000000000000000000', // Chiliz Chain - Native symbol: CHZ\n '0x17dcd': 'eip155:97741/erc20:0x0000000000000000000000000000000000000000', // Pepe Unchained Mainnet - Native symbol: PEPU\n '0x18232': 'eip155:98866/erc20:0x0000000000000000000000000000000000000000', // Plume Mainnet - Narive symbol: Plume\n '0x28c58': 'eip155:167000/slip44:60', // Taiko Mainnet - Native symbol: ETH\n '0x518af': 'eip155:333999/slip44:1997', // Polis Mainnet - Native symbol: POLIS\n '0x82750': 'eip155:534352/slip44:60', // Scroll Mainnet - Native symbol: ETH\n '0xb67d2': 'eip155:747474/erc20:0x0000000000000000000000000000000000000000', // katana - Native symbol: ETH\n '0x15f900': 'eip155:1440000/erc20:0x0000000000000000000000000000000000000000', // xrpl-evm - native symbol: XRP\n '0x4e454152': 'eip155:1313161554/slip44:60', // Aurora Mainnet (Ethereum L2 on NEAR) - Native symbol: ETH\n '0x63564c40': 'eip155:1666600000/slip44:1023', // Harmony Mainnet Shard 0 - Native symbol: ONE\n '0xdef1': 'eip155:57073/slip44:60', // Ink Mainnet - Native symbol: ETH\n '0x3dc': 'eip155:988/erc20:0x779ded0c9e1022225f8e0630b35a9b54be713736', // Stable - Native symbol: USDT0\n '0xf043a': 'eip155:984122/slip44:984122', // Forma - Native symbol: TIA (Celestia)\n} as const;\n\n// MISSING CHAINS WITH NO NATIVE ASSET PRICES\n// '0x42': 'eip155:66/slip44:996', // OKXChain Mainnet - Native symbol: OKT\n// '0x46': 'eip155:70/slip44:1170', // Hoo Smart Chain - Native symbol: HOO\n// '0x926': 'eip155:2342/erc20:0x0000000000000000000000000000000000000000', // Omnia Chain - Native symbol: OMNIA\n// '0x407b': 'eip155:16507/erc20:0x0000000000000000000000000000000000000000', // Genesys Mainnet - Native symbol: GSYS\n\n/**\n * A currency that can be supplied as the `vsCurrency` parameter to\n * the `/spot-prices` endpoint. Covers both uppercase and lowercase versions.\n */\ntype SupportedCurrency =\n | (typeof SUPPORTED_CURRENCIES_FALLBACK)[number]\n | Uppercase<(typeof SUPPORTED_CURRENCIES_FALLBACK)[number]>;\n\n/**\n * The list of chain IDs that can be supplied in the URL for the `/spot-prices`\n * endpoint, but in hexadecimal form (for consistency with how we represent\n * chain IDs in other places).\n *\n * @see Used by {@link CodefiTokenPricesServiceV2} to validate that a given chain ID is supported by V2 of the Codefi Price API.\n */\nexport const SUPPORTED_CHAIN_IDS = Object.keys(\n SPOT_PRICES_SUPPORT_INFO,\n) as (keyof typeof SPOT_PRICES_SUPPORT_INFO)[];\n\n/**\n * A chain ID that can be supplied in the URL for the `/spot-prices` endpoint,\n * but in hexadecimal form (for consistency with how we represent chain IDs in\n * other places).\n */\ntype SupportedChainId = (typeof SUPPORTED_CHAIN_IDS)[number];\n\nconst BASE_URL_V1 = 'https://price.api.cx.metamask.io/v1';\n\nconst BASE_URL_V2 = 'https://price.api.cx.metamask.io/v2';\n\nconst BASE_URL_V3 = 'https://price.api.cx.metamask.io/v3';\n\n/**\n * Response type for the /v2/supportedNetworks endpoint.\n */\ntype SupportedNetworksResponse = {\n fullSupport: string[];\n partialSupport: {\n spotPricesV2: string[];\n spotPricesV3: string[];\n };\n};\n\n/**\n * In-memory store for the last successfully fetched supported networks.\n */\nlet lastFetchedSupportedNetworks: SupportedNetworksResponse | null = null;\n\n/**\n * In-flight promise to prevent concurrent requests to the supported networks endpoint.\n */\nlet runningSupportedNetworksRequest: Promise<SupportedNetworksResponse> | null =\n null;\n\n/**\n * Converts a CAIP-2 chain ID (e.g., 'eip155:1') to a hex chain ID (e.g., '0x1').\n *\n * @param caipChainId - The CAIP-2 chain ID string.\n * @returns The hex chain ID or null if not an EIP-155 chain.\n */\nfunction caipChainIdToHex(caipChainId: string): Hex | null {\n const match = caipChainId.match(/^eip155:(\\d+)$/u);\n if (!match) {\n return null;\n }\n return numberToHex(parseInt(match[1], 10));\n}\n\n/**\n * Executes the actual fetch to the supported networks endpoint.\n * Handles errors internally by falling back to the hardcoded list,\n * and clears the in-flight promise when done.\n *\n * @returns The supported networks response.\n */\nasync function executeSupportedNetworksFetch(): Promise<SupportedNetworksResponse> {\n try {\n const url = `${BASE_URL_V2}/supportedNetworks`;\n const response = await handleFetch(url, {\n headers: { 'Cache-Control': 'no-cache' },\n });\n\n if (\n response &&\n typeof response === 'object' &&\n 'fullSupport' in response &&\n 'partialSupport' in response\n ) {\n lastFetchedSupportedNetworks = response as SupportedNetworksResponse;\n return lastFetchedSupportedNetworks;\n }\n\n // Invalid response format, fall back to hardcoded list\n return getSupportedNetworksFallback();\n } catch {\n // On any error, fall back to the hardcoded list\n return getSupportedNetworksFallback();\n } finally {\n // Clear the in-flight promise once the request completes\n runningSupportedNetworksRequest = null;\n }\n}\n\n/**\n * Fetches the list of supported networks from the API.\n * Falls back to the hardcoded list if the fetch fails.\n * Deduplicates concurrent requests by returning the same promise if a fetch is already in progress.\n *\n * @returns The supported networks response.\n */\nexport async function fetchSupportedNetworks(): Promise<SupportedNetworksResponse> {\n // If a fetch is already in progress, return the same promise\n if (runningSupportedNetworksRequest) {\n return runningSupportedNetworksRequest;\n }\n\n // Start a new fetch and cache the promise\n runningSupportedNetworksRequest = executeSupportedNetworksFetch();\n\n return runningSupportedNetworksRequest;\n}\n\n/**\n * Synchronously gets the list of supported networks.\n * Returns the last fetched value if available, otherwise returns the fallback list.\n *\n * @returns The supported networks response.\n */\nexport function getSupportedNetworks(): SupportedNetworksResponse {\n if (lastFetchedSupportedNetworks !== null) {\n return lastFetchedSupportedNetworks;\n }\n return getSupportedNetworksFallback();\n}\n\n/**\n * Generates a fallback supported networks response from the hardcoded SPOT_PRICES_SUPPORT_INFO.\n *\n * @returns A SupportedNetworksResponse derived from hardcoded data.\n */\nfunction getSupportedNetworksFallback(): SupportedNetworksResponse {\n const caipChainIds = Object.keys(SPOT_PRICES_SUPPORT_INFO).map((hexChainId) =>\n toCaipChainId(\n KnownCaipNamespace.Eip155,\n hexToNumber(hexChainId as Hex).toString(),\n ),\n );\n\n return {\n fullSupport: caipChainIds.slice(0, 11), // First 11 chains as \"full support\"\n partialSupport: {\n spotPricesV2: caipChainIds,\n spotPricesV3: caipChainIds,\n },\n };\n}\n\n/**\n * Resets the supported networks cache.\n * This is primarily intended for testing purposes.\n */\nexport function resetSupportedNetworksCache(): void {\n lastFetchedSupportedNetworks = null;\n runningSupportedNetworksRequest = null;\n}\n\n/**\n * Gets the list of supported chain IDs for spot prices v3 as hex values.\n *\n * @returns Array of hex chain IDs supported by spot prices v3.\n */\nfunction getSupportedChainIdsV3AsHex(): Hex[] {\n const supportedNetworks = getSupportedNetworks();\n const allV3Chains = [\n ...supportedNetworks.fullSupport,\n ...supportedNetworks.partialSupport.spotPricesV3,\n ];\n\n return allV3Chains\n .map(caipChainIdToHex)\n .filter((hexChainId): hexChainId is Hex => hexChainId !== null);\n}\n\n/**\n * In-memory store for the last successfully fetched supported currencies.\n */\nlet lastFetchedCurrencies: string[] | null = null;\n\n/**\n * Fetches the list of supported currencies from the API.\n * Falls back to the hardcoded list if the fetch fails.\n *\n * @returns The list of supported currencies in lowercase.\n */\nexport async function fetchSupportedCurrencies(): Promise<string[]> {\n try {\n const url = `${BASE_URL_V1}/supportedVsCurrencies`;\n const response = await handleFetch(url, {\n headers: { 'Cache-Control': 'no-cache' },\n });\n\n if (Array.isArray(response)) {\n const currencies = response.map((currency: string) =>\n currency.toLowerCase(),\n );\n lastFetchedCurrencies = currencies;\n return currencies;\n }\n\n // Invalid response format, fall back to hardcoded list\n return [...SUPPORTED_CURRENCIES_FALLBACK];\n } catch {\n // On any error, fall back to the hardcoded list\n return [...SUPPORTED_CURRENCIES_FALLBACK];\n }\n}\n\n/**\n * Synchronously gets the list of supported currencies.\n * Returns the last fetched value if available, otherwise returns the fallback list.\n *\n * @returns The list of supported currencies in lowercase.\n */\nexport function getSupportedCurrencies(): readonly string[] {\n if (lastFetchedCurrencies !== null) {\n return lastFetchedCurrencies;\n }\n return SUPPORTED_CURRENCIES_FALLBACK;\n}\n\n/**\n * Resets the supported currencies cache.\n * This is primarily intended for testing purposes.\n */\nexport function resetSupportedCurrenciesCache(): void {\n lastFetchedCurrencies = null;\n}\n\n/**\n * This version of the token prices service uses V2 of the Codefi Price API to\n * fetch token prices.\n */\nexport class CodefiTokenPricesServiceV2 implements AbstractTokenPricesService<\n SupportedChainId,\n SupportedCurrency\n> {\n readonly #policy: ServicePolicy;\n\n /**\n * Map of CAIP-2 chain IDs to their native asset identifiers.\n * Updated via setNativeAssetIdentifiers().\n */\n #nativeAssetIdentifiers: NativeAssetIdentifiersMap = {};\n\n /**\n * Construct a Codefi Token Price Service.\n *\n * @param args - The arguments.\n * @param args.degradedThreshold - The length of time (in milliseconds)\n * that governs when the service is regarded as degraded (affecting when\n * `onDegraded` is called). Defaults to 5 seconds.\n * @param args.retries - Number of retry attempts for each fetch request.\n * @param args.maximumConsecutiveFailures - The maximum number of consecutive\n * failures allowed before breaking the circuit and pausing further updates.\n * @param args.circuitBreakDuration - The amount of time to wait when the\n * circuit breaks from too many consecutive failures.\n */\n constructor(args?: {\n degradedThreshold?: number;\n retries?: number;\n maximumConsecutiveFailures?: number;\n circuitBreakDuration?: number;\n });\n\n /**\n * Construct a Codefi Token Price Service.\n *\n * @deprecated This signature is deprecated; please use the `onBreak` and\n * `onDegraded` methods instead.\n * @param args - The arguments.\n * @param args.degradedThreshold - The length of time (in milliseconds)\n * that governs when the service is regarded as degraded (affecting when\n * `onDegraded` is called). Defaults to 5 seconds.\n * @param args.retries - Number of retry attempts for each fetch request.\n * @param args.maximumConsecutiveFailures - The maximum number of consecutive\n * failures allowed before breaking the circuit and pausing further updates.\n * @param args.onBreak - Callback for when the circuit breaks, useful\n * for capturing metrics about network failures.\n * @param args.onDegraded - Callback for when the API responds successfully\n * but takes too long to respond (5 seconds or more).\n * @param args.circuitBreakDuration - The amount of time to wait when the\n * circuit breaks from too many consecutive failures.\n */\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n constructor(args?: {\n degradedThreshold?: number;\n retries?: number;\n maximumConsecutiveFailures?: number;\n onBreak?: () => void;\n onDegraded?: () => void;\n circuitBreakDuration?: number;\n });\n\n constructor({\n degradedThreshold = DEFAULT_DEGRADED_THRESHOLD,\n retries = DEFAULT_MAX_RETRIES,\n maximumConsecutiveFailures = DEFAULT_MAX_CONSECUTIVE_FAILURES,\n onBreak,\n onDegraded,\n circuitBreakDuration = DEFAULT_CIRCUIT_BREAK_DURATION,\n }: {\n degradedThreshold?: number;\n retries?: number;\n maximumConsecutiveFailures?: number;\n onBreak?: () => void;\n onDegraded?: () => void;\n circuitBreakDuration?: number;\n } = {}) {\n this.#policy = createServicePolicy({\n maxRetries: retries,\n maxConsecutiveFailures: maximumConsecutiveFailures,\n circuitBreakDuration,\n degradedThreshold,\n });\n if (onBreak) {\n this.#policy.onBreak(onBreak);\n }\n if (onDegraded) {\n this.#policy.onDegraded(onDegraded);\n }\n }\n\n /**\n * Listens for when the request to the API fails too many times in a row.\n *\n * @param args - The same arguments that {@link ServicePolicy.onBreak}\n * takes.\n * @returns What {@link ServicePolicy.onBreak} returns.\n */\n onBreak(\n ...args: Parameters<ServicePolicy['onBreak']>\n ): ReturnType<ServicePolicy['onBreak']> {\n return this.#policy.onBreak(...args);\n }\n\n /**\n * Listens for when the API is degraded.\n *\n * @param args - The same arguments that {@link ServicePolicy.onDegraded}\n * takes.\n * @returns What {@link ServicePolicy.onDegraded} returns.\n */\n onDegraded(\n ...args: Parameters<ServicePolicy['onDegraded']>\n ): ReturnType<ServicePolicy['onDegraded']> {\n return this.#policy.onDegraded(...args);\n }\n\n /**\n * Sets the native asset identifiers map for resolving native token CAIP-19 IDs.\n * This should be called with data from NetworkEnablementController.state.nativeAssetIdentifiers.\n *\n * @param nativeAssetIdentifiers - Map of CAIP-2 chain IDs to native asset identifiers.\n */\n setNativeAssetIdentifiers(\n nativeAssetIdentifiers: NativeAssetIdentifiersMap,\n ): void {\n this.#nativeAssetIdentifiers = nativeAssetIdentifiers;\n }\n\n /**\n * Updates the supported networks cache by fetching from the API.\n * This should be called periodically to keep the supported networks list fresh.\n *\n * @returns The updated supported networks response.\n */\n async updateSupportedNetworks(): Promise<SupportedNetworksResponse> {\n return fetchSupportedNetworks();\n }\n\n /**\n * Retrieves prices in the given currency for the tokens identified by the\n * given addresses which are expected to live on the given chain.\n *\n * @param args - The arguments to function.\n * @param args.assets - The assets to get prices for.\n * @param args.currency - The desired currency of the token prices.\n * @returns The prices for the requested tokens.\n */\n async fetchTokenPrices({\n assets,\n currency,\n }: {\n assets: EvmAssetAddressWithChain<SupportedChainId>[];\n currency: SupportedCurrency;\n }): Promise<EvmAssetWithMarketData<SupportedChainId, SupportedCurrency>[]> {\n // Refresh supported networks in background (non-blocking)\n // This ensures the list stays fresh during normal polling\n // Note: fetchSupportedNetworks handles errors internally and always resolves\n if (!lastFetchedSupportedNetworks) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n fetchSupportedNetworks();\n }\n\n // Get dynamically fetched supported chain IDs for V3\n const supportedChainIdsV3 = getSupportedChainIdsV3AsHex();\n\n const assetsWithIds: EvmAssetWithId<SupportedChainId>[] = assets\n // Filter out assets that are not supported by V3 of the Price API.\n .filter((asset) => supportedChainIdsV3.includes(asset.chainId))\n .map((asset) => {\n const caipChainId = toCaipChainId(\n KnownCaipNamespace.Eip155,\n hexToNumber(asset.chainId).toString(),\n );\n\n const nativeAddress = getNativeTokenAddress(asset.chainId);\n const isNativeToken =\n nativeAddress.toLowerCase() === asset.tokenAddress.toLowerCase();\n\n let assetId: string | undefined;\n if (isNativeToken) {\n // For native tokens, use hardcoded SPOT_PRICES_SUPPORT_INFO when defined,\n // otherwise use nativeAssetIdentifiers from NetworkEnablementController by default.\n assetId =\n SPOT_PRICES_SUPPORT_INFO[asset.chainId] ??\n this.#nativeAssetIdentifiers[caipChainId];\n } else {\n // For ERC20 tokens, construct the CAIP-19 ID dynamically\n assetId = `${caipChainId}/erc20:${asset.tokenAddress.toLowerCase()}`;\n }\n\n if (!assetId) {\n return undefined;\n }\n\n return {\n ...asset,\n assetId: assetId as CaipAssetType,\n };\n })\n .filter(\n (asset): asset is EvmAssetWithId<SupportedChainId> =>\n asset !== undefined,\n );\n\n if (assetsWithIds.length === 0) {\n return [];\n }\n\n const url = new URL(`${BASE_URL_V3}/spot-prices`);\n url.searchParams.append(\n 'assetIds',\n assetsWithIds.map((asset) => asset.assetId).join(','),\n );\n url.searchParams.append('vsCurrency', currency);\n url.searchParams.append('includeMarketData', 'true');\n\n const addressCryptoDataMap: {\n [assetId: CaipAssetType]: Omit<\n MarketDataDetails,\n 'currency' | 'tokenAddress'\n >;\n } = await this.#policy.execute(() =>\n handleFetch(url, { headers: { 'Cache-Control': 'no-cache' } }),\n );\n\n return assetsWithIds\n .map((assetWithId) => {\n const marketData = addressCryptoDataMap[assetWithId.assetId];\n\n if (!marketData) {\n return undefined;\n }\n\n return {\n ...marketData,\n ...assetWithId,\n currency,\n };\n })\n .filter((entry): entry is NonNullable<typeof entry> => Boolean(entry));\n }\n\n /**\n * Retrieves exchange rates in the given base currency.\n *\n * @param args - The arguments to this function.\n * @param args.baseCurrency - The desired base currency of the exchange rates.\n * @param args.includeUsdRate - Whether to include the USD rate in the response.\n * @param args.cryptocurrencies - The cryptocurrencies to get exchange rates for.\n * @returns The exchange rates for the requested base currency.\n */\n async fetchExchangeRates({\n baseCurrency,\n includeUsdRate,\n cryptocurrencies,\n }: {\n baseCurrency: SupportedCurrency;\n includeUsdRate: boolean;\n cryptocurrencies: string[];\n }): Promise<ExchangeRatesByCurrency<SupportedCurrency>> {\n // Refresh supported currencies in background (non-blocking)\n // This ensures the list stays fresh during normal polling\n // Note: fetchSupportedCurrencies handles errors internally and always resolves\n if (!lastFetchedCurrencies) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n fetchSupportedCurrencies();\n }\n\n const url = new URL(`${BASE_URL_V1}/exchange-rates`);\n url.searchParams.append('baseCurrency', baseCurrency);\n\n const urlUsd = new URL(`${BASE_URL_V1}/exchange-rates`);\n urlUsd.searchParams.append('baseCurrency', 'usd');\n\n const [exchangeRatesResult, exchangeRatesResultUsd] =\n await Promise.allSettled([\n this.#policy.execute(() =>\n handleFetch(url, { headers: { 'Cache-Control': 'no-cache' } }),\n ),\n ...(includeUsdRate && baseCurrency.toLowerCase() !== 'usd'\n ? [\n this.#policy.execute(() =>\n handleFetch(urlUsd, {\n headers: { 'Cache-Control': 'no-cache' },\n }),\n ),\n ]\n : []),\n ]);\n\n // Handle resolved/rejected\n const exchangeRates =\n exchangeRatesResult.status === 'fulfilled'\n ? exchangeRatesResult.value\n : {};\n const exchangeRatesUsd =\n exchangeRatesResultUsd?.status === 'fulfilled'\n ? exchangeRatesResultUsd.value\n : {};\n\n if (exchangeRatesResult.status === 'rejected') {\n throw new Error('Failed to fetch');\n }\n\n const filteredExchangeRates = cryptocurrencies.reduce((acc, key) => {\n if (exchangeRates[key.toLowerCase() as SupportedCurrency]) {\n acc[key.toLowerCase() as SupportedCurrency] =\n exchangeRates[key.toLowerCase() as SupportedCurrency];\n }\n return acc;\n }, {} as ExchangeRatesByCurrency<SupportedCurrency>);\n\n if (Object.keys(filteredExchangeRates).length === 0) {\n throw new Error(\n 'None of the cryptocurrencies are supported by price api',\n );\n }\n\n const filteredUsdExchangeRates = cryptocurrencies.reduce((acc, key) => {\n if (exchangeRatesUsd[key.toLowerCase() as SupportedCurrency]) {\n acc[key.toLowerCase() as SupportedCurrency] =\n exchangeRatesUsd[key.toLowerCase() as SupportedCurrency];\n }\n return acc;\n }, {} as ExchangeRatesByCurrency<SupportedCurrency>);\n\n if (baseCurrency.toLowerCase() === 'usd') {\n Object.keys(filteredExchangeRates).forEach((key) => {\n filteredExchangeRates[key as SupportedCurrency] = {\n ...filteredExchangeRates[key as SupportedCurrency],\n usd: filteredExchangeRates[key as SupportedCurrency]?.value,\n };\n });\n return filteredExchangeRates;\n }\n if (!includeUsdRate) {\n return filteredExchangeRates;\n }\n\n const merged = Object.keys(filteredExchangeRates).reduce((acc, key) => {\n acc[key as SupportedCurrency] = {\n ...filteredExchangeRates[key as SupportedCurrency],\n ...(filteredUsdExchangeRates[key as SupportedCurrency]?.value\n ? { usd: filteredUsdExchangeRates[key as SupportedCurrency]?.value }\n : {}),\n };\n return acc;\n }, {} as ExchangeRatesByCurrency<SupportedCurrency>);\n\n return merged;\n }\n\n /**\n * Type guard for whether the API can return token prices for the given chain\n * ID.\n *\n * @param chainId - The chain ID to check.\n * @returns True if the API supports the chain ID, false otherwise.\n */\n validateChainIdSupported(chainId: unknown): chainId is SupportedChainId {\n // Use dynamically fetched supported networks\n const supportedChainIds = getSupportedChainIdsV3AsHex();\n // Also include the hardcoded fallback list for backwards compatibility\n const allSupportedChainIds: readonly string[] = [\n ...new Set([...supportedChainIds, ...SUPPORTED_CHAIN_IDS]),\n ];\n return (\n typeof chainId === 'string' && allSupportedChainIds.includes(chainId)\n );\n }\n\n /**\n * Type guard for whether the API can return token prices in the given\n * currency.\n *\n * @param currency - The currency to check. If a string, can be either\n * lowercase or uppercase.\n * @returns True if the API supports the currency, false otherwise.\n */\n validateCurrencySupported(currency: unknown): currency is SupportedCurrency {\n const supportedCurrencies = getSupportedCurrencies();\n return (\n typeof currency === 'string' &&\n supportedCurrencies.includes(currency.toLowerCase())\n );\n }\n\n /**\n * Fetches the list of supported currencies from the API.\n *\n * @returns The list of supported currencies.\n */\n async updateSupportedCurrencies(): Promise<string[]> {\n return fetchSupportedCurrencies();\n }\n}\n"]}
@@ -63,6 +63,7 @@ export declare const SPOT_PRICES_SUPPORT_INFO: {
63
63
  readonly '0x504': "eip155:1284/slip44:1284";
64
64
  readonly '0x505': "eip155:1285/slip44:1285";
65
65
  readonly '0x531': "eip155:1329/slip44:19000118";
66
+ readonly '0x6f0': "eip155:1776/slip44:22000119";
66
67
  readonly '0x74c': "eip155:1868/erc20:0x0000000000000000000000000000000000000000";
67
68
  readonly '0xa729': "eip155:42793/erc20:0x0000000000000000000000000000000000000000";
68
69
  readonly '0xab5': "eip155:2741/erc20:0x0000000000000000000000000000000000000000";
@@ -96,6 +97,7 @@ export declare const SPOT_PRICES_SUPPORT_INFO: {
96
97
  readonly '0x63564c40': "eip155:1666600000/slip44:1023";
97
98
  readonly '0xdef1': "eip155:57073/slip44:60";
98
99
  readonly '0x3dc': "eip155:988/erc20:0x779ded0c9e1022225f8e0630b35a9b54be713736";
100
+ readonly '0xf043a': "eip155:984122/slip44:984122";
99
101
  };
100
102
  /**
101
103
  * A currency that can be supplied as the `vsCurrency` parameter to
@@ -109,7 +111,7 @@ type SupportedCurrency = (typeof SUPPORTED_CURRENCIES_FALLBACK)[number] | Upperc
109
111
  *
110
112
  * @see Used by {@link CodefiTokenPricesServiceV2} to validate that a given chain ID is supported by V2 of the Codefi Price API.
111
113
  */
112
- export declare const SUPPORTED_CHAIN_IDS: ("0x1" | "0x89" | "0x38" | "0x2105" | "0xa" | "0xa4b1" | "0x82750" | "0x531" | "0x8f" | "0x3e7" | "0x2a" | "0x44d" | "0x64" | "0xa86a" | "0xfa" | "0x504" | "0x505" | "0x63564c40" | "0x19" | "0x7a" | "0x120" | "0x4e454152" | "0x80" | "0x440" | "0x1e" | "0xa516" | "0xa4ec" | "0x141" | "0x6a" | "0x1388" | "0xe708" | "0x39" | "0x52" | "0x15b38" | "0xa729" | "0x144" | "0xfc" | "0x28c58" | "0xc4" | "0xed88" | "0x2eb" | "0xa867" | "0x2611" | "0x15f900" | "0x74c" | "0xa3c3" | "0xab5" | "0x138de" | "0x8173" | "0xb67d2" | "0xe8" | "0x18232" | "0x32" | "0x10e6" | "0x10b3e" | "0xdef1" | "0x3dc" | "0xa5bf" | "0x1079" | "0x58" | "0x92" | "0x150" | "0x169" | "0x2710" | "0x13c31" | "0x17dcd" | "0x518af")[];
114
+ export declare const SUPPORTED_CHAIN_IDS: ("0x1" | "0x89" | "0x38" | "0x2105" | "0xa" | "0xa4b1" | "0x82750" | "0x531" | "0x8f" | "0x3e7" | "0x2a" | "0x44d" | "0x64" | "0xa86a" | "0xfa" | "0x504" | "0x505" | "0x63564c40" | "0x19" | "0x7a" | "0x120" | "0x4e454152" | "0x80" | "0x440" | "0x1e" | "0xa516" | "0xa4ec" | "0x141" | "0x6a" | "0x1388" | "0xe708" | "0x39" | "0x52" | "0x15b38" | "0xa729" | "0x144" | "0xfc" | "0x28c58" | "0xc4" | "0xed88" | "0x2eb" | "0x6f0" | "0xa867" | "0x2611" | "0x15f900" | "0x74c" | "0xa3c3" | "0xab5" | "0x138de" | "0x8173" | "0xb67d2" | "0xe8" | "0x18232" | "0x32" | "0x10e6" | "0x10b3e" | "0xdef1" | "0x3dc" | "0xa5bf" | "0x1079" | "0x58" | "0x92" | "0x150" | "0x169" | "0x2710" | "0x13c31" | "0x17dcd" | "0x518af" | "0xf043a")[];
113
115
  /**
114
116
  * A chain ID that can be supplied in the URL for the `/spot-prices` endpoint,
115
117
  * but in hexadecimal form (for consistency with how we represent chain IDs in
@@ -1 +1 @@
1
- {"version":3,"file":"codefi-v2.d.cts","sourceRoot":"","sources":["../../src/token-prices-service/codefi-v2.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,mCAAmC;AAChE,OAAO,KAAK,EAAiB,GAAG,EAAE,wBAAwB;AAS1D,OAAO,KAAK,EACV,0BAA0B,EAC1B,wBAAwB,EAExB,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EAC1B,4CAAwC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,qnBA+KhC,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,oBAAoB,qnBAAgC,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,GAC4B,CAAC;AAiBxD;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,YAAa,GAAG,KAAG,GACC,CAAC;AAIvD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoE3B,CAAC;AAQX;;;GAGG;AACH,KAAK,iBAAiB,GAClB,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,GAC9C,SAAS,CAAC,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAE9D;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,6rBAEc,CAAC;AAE/C;;;;GAIG;AACH,KAAK,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAQ7D;;GAEG;AACH,KAAK,yBAAyB,GAAG;IAC/B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,cAAc,EAAE;QACd,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,YAAY,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;CACH,CAAC;AA8DF;;;;;;GAMG;AACH,wBAAsB,sBAA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E,iBAAiB,CAAC,EAAE,CAAC;IAyF1E;;;;;;;;OAQG;IACG,kBAAkB,CAAC,EACvB,YAAY,EACZ,cAAc,EACd,gBAAgB,GACjB,EAAE;QACD,YAAY,EAAE,iBAAiB,CAAC;QAChC,cAAc,EAAE,OAAO,CAAC;QACxB,gBAAgB,EAAE,MAAM,EAAE,CAAC;KAC5B,GAAG,OAAO,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,CAAC;IA6FvD;;;;;;OAMG;IACH,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,gBAAgB;IAYvE;;;;;;;OAOG;IACH,yBAAyB,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,iBAAiB;IAQ3E;;;;OAIG;IACG,yBAAyB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAGrD"}
@@ -63,6 +63,7 @@ export declare const SPOT_PRICES_SUPPORT_INFO: {
63
63
  readonly '0x504': "eip155:1284/slip44:1284";
64
64
  readonly '0x505': "eip155:1285/slip44:1285";
65
65
  readonly '0x531': "eip155:1329/slip44:19000118";
66
+ readonly '0x6f0': "eip155:1776/slip44:22000119";
66
67
  readonly '0x74c': "eip155:1868/erc20:0x0000000000000000000000000000000000000000";
67
68
  readonly '0xa729': "eip155:42793/erc20:0x0000000000000000000000000000000000000000";
68
69
  readonly '0xab5': "eip155:2741/erc20:0x0000000000000000000000000000000000000000";
@@ -96,6 +97,7 @@ export declare const SPOT_PRICES_SUPPORT_INFO: {
96
97
  readonly '0x63564c40': "eip155:1666600000/slip44:1023";
97
98
  readonly '0xdef1': "eip155:57073/slip44:60";
98
99
  readonly '0x3dc': "eip155:988/erc20:0x779ded0c9e1022225f8e0630b35a9b54be713736";
100
+ readonly '0xf043a': "eip155:984122/slip44:984122";
99
101
  };
100
102
  /**
101
103
  * A currency that can be supplied as the `vsCurrency` parameter to
@@ -109,7 +111,7 @@ type SupportedCurrency = (typeof SUPPORTED_CURRENCIES_FALLBACK)[number] | Upperc
109
111
  *
110
112
  * @see Used by {@link CodefiTokenPricesServiceV2} to validate that a given chain ID is supported by V2 of the Codefi Price API.
111
113
  */
112
- export declare const SUPPORTED_CHAIN_IDS: ("0x1" | "0x89" | "0x38" | "0x2105" | "0xa" | "0xa4b1" | "0x82750" | "0x531" | "0x8f" | "0x3e7" | "0x2a" | "0x44d" | "0x64" | "0xa86a" | "0xfa" | "0x504" | "0x505" | "0x63564c40" | "0x19" | "0x7a" | "0x120" | "0x4e454152" | "0x80" | "0x440" | "0x1e" | "0xa516" | "0xa4ec" | "0x141" | "0x6a" | "0x1388" | "0xe708" | "0x39" | "0x52" | "0x15b38" | "0xa729" | "0x144" | "0xfc" | "0x28c58" | "0xc4" | "0xed88" | "0x2eb" | "0xa867" | "0x2611" | "0x15f900" | "0x74c" | "0xa3c3" | "0xab5" | "0x138de" | "0x8173" | "0xb67d2" | "0xe8" | "0x18232" | "0x32" | "0x10e6" | "0x10b3e" | "0xdef1" | "0x3dc" | "0xa5bf" | "0x1079" | "0x58" | "0x92" | "0x150" | "0x169" | "0x2710" | "0x13c31" | "0x17dcd" | "0x518af")[];
114
+ export declare const SUPPORTED_CHAIN_IDS: ("0x1" | "0x89" | "0x38" | "0x2105" | "0xa" | "0xa4b1" | "0x82750" | "0x531" | "0x8f" | "0x3e7" | "0x2a" | "0x44d" | "0x64" | "0xa86a" | "0xfa" | "0x504" | "0x505" | "0x63564c40" | "0x19" | "0x7a" | "0x120" | "0x4e454152" | "0x80" | "0x440" | "0x1e" | "0xa516" | "0xa4ec" | "0x141" | "0x6a" | "0x1388" | "0xe708" | "0x39" | "0x52" | "0x15b38" | "0xa729" | "0x144" | "0xfc" | "0x28c58" | "0xc4" | "0xed88" | "0x2eb" | "0x6f0" | "0xa867" | "0x2611" | "0x15f900" | "0x74c" | "0xa3c3" | "0xab5" | "0x138de" | "0x8173" | "0xb67d2" | "0xe8" | "0x18232" | "0x32" | "0x10e6" | "0x10b3e" | "0xdef1" | "0x3dc" | "0xa5bf" | "0x1079" | "0x58" | "0x92" | "0x150" | "0x169" | "0x2710" | "0x13c31" | "0x17dcd" | "0x518af" | "0xf043a")[];
113
115
  /**
114
116
  * A chain ID that can be supplied in the URL for the `/spot-prices` endpoint,
115
117
  * but in hexadecimal form (for consistency with how we represent chain IDs in
@@ -1 +1 @@
1
- {"version":3,"file":"codefi-v2.d.mts","sourceRoot":"","sources":["../../src/token-prices-service/codefi-v2.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,mCAAmC;AAChE,OAAO,KAAK,EAAiB,GAAG,EAAE,wBAAwB;AAS1D,OAAO,KAAK,EACV,0BAA0B,EAC1B,wBAAwB,EAExB,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EAC1B,4CAAwC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,qnBA+KhC,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,oBAAoB,qnBAAgC,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,GAC4B,CAAC;AAiBxD;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,YAAa,GAAG,KAAG,GACC,CAAC;AAIvD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoE3B,CAAC;AAQX;;;GAGG;AACH,KAAK,iBAAiB,GAClB,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,GAC9C,SAAS,CAAC,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAE9D;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,6rBAEc,CAAC;AAE/C;;;;GAIG;AACH,KAAK,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAQ7D;;GAEG;AACH,KAAK,yBAAyB,GAAG;IAC/B,WAAW,EAAE,MA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ACN,QAAQ,GACT,EAAE;QACD,MAAM,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACrD,QAAQ,EAAE,iBAAiB,CAAC;KAC7B,GAAG,OAAO,CAAC,sBAAsB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,EAAE,CAAC;IAyF1E;;;;;;;;OAQG;IACG,kBAAkB,CAAC,EACvB,YAAY,EACZ,cAAc,EACd,gBAAgB,GACjB,EAAE;QACD,YAAY,EAAE,iBAAiB,CAAC;QAChC,cAAc,EAAE,OAAO,CAAC;QACxB,gBAAgB,EAAE,MAAM,EAAE,CAAC;KAC5B,GAAG,OAAO,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,CAAC;IA6FvD;;;;;;OAMG;IACH,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,gBAAgB;IAYvE;;;;;;;OAOG;IACH,yBAAyB,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,iBAAiB;IAQ3E;;;;OAIG;IACG,yBAAyB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAGrD"}
@@ -265,6 +265,7 @@ export const SPOT_PRICES_SUPPORT_INFO = {
265
265
  '0x504': 'eip155:1284/slip44:1284', // Moonbeam - Native symbol: GLMR
266
266
  '0x505': 'eip155:1285/slip44:1285', // Moonriver - Native symbol: MOVR
267
267
  '0x531': 'eip155:1329/slip44:19000118', // Sei Mainnet - Native symbol: SEI
268
+ '0x6f0': 'eip155:1776/slip44:22000119', // Injective Mainnet - Native symbol: INJ
268
269
  '0x74c': 'eip155:1868/erc20:0x0000000000000000000000000000000000000000', // Soneium - Native symbol: ETH
269
270
  '0xa729': 'eip155:42793/erc20:0x0000000000000000000000000000000000000000', // Etherlink - Native symbol: XTZ (Tezos L2)
270
271
  '0xab5': 'eip155:2741/erc20:0x0000000000000000000000000000000000000000', // Abstract - Native symbol: ETH
@@ -298,6 +299,7 @@ export const SPOT_PRICES_SUPPORT_INFO = {
298
299
  '0x63564c40': 'eip155:1666600000/slip44:1023', // Harmony Mainnet Shard 0 - Native symbol: ONE
299
300
  '0xdef1': 'eip155:57073/slip44:60', // Ink Mainnet - Native symbol: ETH
300
301
  '0x3dc': 'eip155:988/erc20:0x779ded0c9e1022225f8e0630b35a9b54be713736', // Stable - Native symbol: USDT0
302
+ '0xf043a': 'eip155:984122/slip44:984122', // Forma - Native symbol: TIA (Celestia)
301
303
  };
302
304
  /**
303
305
  * The list of chain IDs that can be supplied in the URL for the `/spot-prices`