@lifi/data-types 6.0.0-beta.0 → 6.0.0-beta.3

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 (87) hide show
  1. package/README.md +1 -1
  2. package/package.json +3 -3
  3. package/src/_cjs/chains/index.js +25 -10
  4. package/src/_cjs/chains/index.js.map +1 -1
  5. package/src/_cjs/chains/supportedChains.evm.int.spec.js +3 -3
  6. package/src/_cjs/chains/supportedChains.evm.int.spec.js.map +1 -1
  7. package/src/_cjs/chains/supportedChains.evm.js +165 -79
  8. package/src/_cjs/chains/supportedChains.evm.js.map +1 -1
  9. package/src/_cjs/chains/supportedChains.js +8 -6
  10. package/src/_cjs/chains/supportedChains.js.map +1 -1
  11. package/src/_cjs/chains/supportedChains.mvm.int.spec.js +45 -0
  12. package/src/_cjs/chains/supportedChains.mvm.int.spec.js.map +1 -0
  13. package/src/_cjs/chains/supportedChains.mvm.js +28 -0
  14. package/src/_cjs/chains/supportedChains.mvm.js.map +1 -0
  15. package/src/_cjs/chains/supportedChains.svm.int.spec.js +3 -3
  16. package/src/_cjs/chains/supportedChains.svm.int.spec.js.map +1 -1
  17. package/src/_cjs/chains/supportedChains.unit.spec.js +14 -14
  18. package/src/_cjs/chains/supportedChains.unit.spec.js.map +1 -1
  19. package/src/_cjs/chains/supportedChains.utxo.int.spec.js +3 -3
  20. package/src/_cjs/chains/supportedChains.utxo.int.spec.js.map +1 -1
  21. package/src/_cjs/coins/coins.int.spec.js +3 -3
  22. package/src/_cjs/coins/coins.int.spec.js.map +1 -1
  23. package/src/_cjs/coins/coins.js +232 -1
  24. package/src/_cjs/coins/coins.js.map +1 -1
  25. package/src/_cjs/coins/index.js +15 -2
  26. package/src/_cjs/coins/index.js.map +1 -1
  27. package/src/_cjs/index.js +17 -4
  28. package/src/_cjs/index.js.map +1 -1
  29. package/src/_cjs/multicall.js +4 -0
  30. package/src/_cjs/multicall.js.map +1 -1
  31. package/src/_esm/chains/index.js +6 -5
  32. package/src/_esm/chains/index.js.map +1 -1
  33. package/src/_esm/chains/supportedChains.evm.int.spec.js +1 -1
  34. package/src/_esm/chains/supportedChains.evm.int.spec.js.map +1 -1
  35. package/src/_esm/chains/supportedChains.evm.js +92 -3
  36. package/src/_esm/chains/supportedChains.evm.js.map +1 -1
  37. package/src/_esm/chains/supportedChains.js +5 -3
  38. package/src/_esm/chains/supportedChains.js.map +1 -1
  39. package/src/_esm/chains/supportedChains.mvm.int.spec.js +43 -0
  40. package/src/_esm/chains/supportedChains.mvm.int.spec.js.map +1 -0
  41. package/src/_esm/chains/supportedChains.mvm.js +25 -0
  42. package/src/_esm/chains/supportedChains.mvm.js.map +1 -0
  43. package/src/_esm/chains/supportedChains.svm.int.spec.js +1 -1
  44. package/src/_esm/chains/supportedChains.svm.int.spec.js.map +1 -1
  45. package/src/_esm/chains/supportedChains.unit.spec.js +4 -4
  46. package/src/_esm/chains/supportedChains.unit.spec.js.map +1 -1
  47. package/src/_esm/chains/supportedChains.utxo.int.spec.js +1 -1
  48. package/src/_esm/chains/supportedChains.utxo.int.spec.js.map +1 -1
  49. package/src/_esm/coins/coins.int.spec.js +1 -1
  50. package/src/_esm/coins/coins.int.spec.js.map +1 -1
  51. package/src/_esm/coins/coins.js +242 -1
  52. package/src/_esm/coins/coins.js.map +1 -1
  53. package/src/_esm/coins/index.js +1 -1
  54. package/src/_esm/coins/index.js.map +1 -1
  55. package/src/_esm/index.js +3 -3
  56. package/src/_esm/index.js.map +1 -1
  57. package/src/_esm/multicall.js +5 -0
  58. package/src/_esm/multicall.js.map +1 -1
  59. package/src/_types/chains/index.d.ts +6 -5
  60. package/src/_types/chains/index.d.ts.map +1 -1
  61. package/src/_types/chains/supportedChains.d.ts +1 -1
  62. package/src/_types/chains/supportedChains.d.ts.map +1 -1
  63. package/src/_types/chains/supportedChains.evm.d.ts.map +1 -1
  64. package/src/_types/chains/supportedChains.mvm.d.ts +3 -0
  65. package/src/_types/chains/supportedChains.mvm.d.ts.map +1 -0
  66. package/src/_types/chains/supportedChains.mvm.int.spec.d.ts +2 -0
  67. package/src/_types/chains/supportedChains.mvm.int.spec.d.ts.map +1 -0
  68. package/src/_types/coins/coins.d.ts.map +1 -1
  69. package/src/_types/coins/index.d.ts +1 -1
  70. package/src/_types/coins/index.d.ts.map +1 -1
  71. package/src/_types/index.d.ts +3 -3
  72. package/src/_types/index.d.ts.map +1 -1
  73. package/src/_types/multicall.d.ts.map +1 -1
  74. package/src/chains/index.ts +6 -5
  75. package/src/chains/supportedChains.evm.int.spec.ts +1 -1
  76. package/src/chains/supportedChains.evm.ts +104 -3
  77. package/src/chains/supportedChains.mvm.int.spec.ts +71 -0
  78. package/src/chains/supportedChains.mvm.ts +27 -0
  79. package/src/chains/supportedChains.svm.int.spec.ts +1 -1
  80. package/src/chains/supportedChains.ts +5 -3
  81. package/src/chains/supportedChains.unit.spec.ts +8 -4
  82. package/src/chains/supportedChains.utxo.int.spec.ts +1 -1
  83. package/src/coins/coins.int.spec.ts +1 -1
  84. package/src/coins/coins.ts +263 -1
  85. package/src/coins/index.ts +1 -1
  86. package/src/index.ts +3 -3
  87. package/src/multicall.ts +5 -0
@@ -1,5 +1,5 @@
1
1
  import type { Chain, ChainKey } from '@lifi/types';
2
- export declare const supportedChains: import("@lifi/types").UTXOChain[];
2
+ export declare const supportedChains: import("@lifi/types").MVMChain[];
3
3
  export declare const getChainByKey: (chainKey: ChainKey) => Chain;
4
4
  export declare const getChainById: (chainId: number) => Chain;
5
5
  //# sourceMappingURL=supportedChains.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"supportedChains.d.ts","sourceRoot":"","sources":["../../chains/supportedChains.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAQlD,eAAO,MAAM,eAAe,mCAI3B,CAAA;AAED,eAAO,MAAM,aAAa,aAAc,QAAQ,KAAG,KAMlD,CAAA;AAED,eAAO,MAAM,YAAY,YAAa,MAAM,KAAG,KAM9C,CAAA"}
1
+ {"version":3,"file":"supportedChains.d.ts","sourceRoot":"","sources":["../../chains/supportedChains.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AASlD,eAAO,MAAM,eAAe,kCAK3B,CAAA;AAED,eAAO,MAAM,aAAa,aAAc,QAAQ,KAAG,KAMlD,CAAA;AAED,eAAO,MAAM,YAAY,YAAa,MAAM,KAAG,KAM9C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"supportedChains.evm.d.ts","sourceRoot":"","sources":["../../chains/supportedChains.evm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAK3C;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,EAmiCxC,CAAA"}
1
+ {"version":3,"file":"supportedChains.evm.d.ts","sourceRoot":"","sources":["../../chains/supportedChains.evm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAK3C;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,EAwoCxC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { MVMChain } from '@lifi/types';
2
+ export declare const supportedMVMChains: MVMChain[];
3
+ //# sourceMappingURL=supportedChains.mvm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supportedChains.mvm.d.ts","sourceRoot":"","sources":["../../chains/supportedChains.mvm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAG3C,eAAO,MAAM,kBAAkB,EAAE,QAAQ,EAuBxC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=supportedChains.mvm.int.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supportedChains.mvm.int.spec.d.ts","sourceRoot":"","sources":["../../chains/supportedChains.mvm.int.spec.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"coins.d.ts","sourceRoot":"","sources":["../../coins/coins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE9C,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;KAC1B,CAAA;CACF,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,SAAS,EA8yDjC,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,IAAI,CAsBnC,CAAA;AAGF,eAAO,MAAM,aAAa,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAAA;CAoY3D,CAAA;AACD,eAAO,MAAM,eAAe,YAAa,OAAO,KAAG,IAMlD,CAAA;AACD,eAAO,MAAM,gBAAgB,YAClB,OAAO,WACP,OAAO,KACf,WAOF,CAAA;AAED,eAAO,MAAM,qBAAqB,YAAa,OAAO,KAAG,WAMxD,CAAA;AAED,eAAO,MAAM,4BAA4B,YAC9B,MAAM,gBACD,MAAM,KACnB,WAAW,GAAG,IAUhB,CAAA"}
1
+ {"version":3,"file":"coins.d.ts","sourceRoot":"","sources":["../../coins/coins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE9C,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;KAC1B,CAAA;CACF,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,SAAS,EAwgEjC,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,IAAI,CAsBnC,CAAA;AAGF,eAAO,MAAM,aAAa,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAAA;CAgb3D,CAAA;AACD,eAAO,MAAM,eAAe,YAAa,OAAO,KAAG,IAMlD,CAAA;AACD,eAAO,MAAM,gBAAgB,YAClB,OAAO,WACP,OAAO,KACf,WAOF,CAAA;AAED,eAAO,MAAM,qBAAqB,YAAa,OAAO,KAAG,WAMxD,CAAA;AAED,eAAO,MAAM,4BAA4B,YAC9B,MAAM,gBACD,MAAM,KACnB,WAAW,GAAG,IAUhB,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './coins';
1
+ export * from './coins.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../coins/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../coins/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
@@ -1,4 +1,4 @@
1
- export * from './chains';
2
- export * from './coins';
3
- export * from './multicall';
1
+ export * from './chains/index.js';
2
+ export * from './coins/index.js';
3
+ export * from './multicall.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"multicall.d.ts","sourceRoot":"","sources":["../multicall.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CA4D3D,CAAA"}
1
+ {"version":3,"file":"multicall.d.ts","sourceRoot":"","sources":["../multicall.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAiE3D,CAAA"}
@@ -1,5 +1,6 @@
1
- export { supportedEVMChains } from './supportedChains.evm'
2
- export { supportedSolanaChains } from './supportedChains.svm'
3
- export { supportedUXTOChains } from './supportedChains.utxo'
4
- export * from './supportedChains'
5
- export * from './utils'
1
+ export { supportedEVMChains } from './supportedChains.evm.js'
2
+ export * from './supportedChains.js'
3
+ export { supportedMVMChains } from './supportedChains.mvm.js'
4
+ export { supportedSolanaChains } from './supportedChains.svm.js'
5
+ export { supportedUXTOChains } from './supportedChains.utxo.js'
6
+ export * from './utils.js'
@@ -1,6 +1,6 @@
1
1
  import { createPublicClient, http } from 'viem'
2
2
  import { describe, expect, test } from 'vitest'
3
- import { supportedEVMChains } from './supportedChains.evm'
3
+ import { supportedEVMChains } from './supportedChains.evm.js'
4
4
 
5
5
  describe.concurrent('EVM chains RPC check', () => {
6
6
  const rpcUrls = supportedEVMChains.flatMap((chain) =>
@@ -1,7 +1,7 @@
1
1
  import type { EVMChain } from '@lifi/types'
2
2
  import { ChainId, ChainKey, ChainType, CoinKey } from '@lifi/types'
3
- import { multicallAddresses } from '../multicall'
4
- import { prefixChainId } from './utils'
3
+ import { multicallAddresses } from '../multicall.js'
4
+ import { prefixChainId } from './utils.js'
5
5
 
6
6
  /**
7
7
  * ChainNames aligned with https://github.com/ethereum-lists/chains/tree/master/_data/chains
@@ -35,7 +35,6 @@ export const supportedEVMChains: EVMChain[] = [
35
35
  'https://ethereum-rpc.publicnode.com',
36
36
  'https://eth.drpc.org',
37
37
  'https://eth.public-rpc.com',
38
- 'https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
39
38
  'https://rpc.ankr.com/eth',
40
39
  ],
41
40
  },
@@ -1068,4 +1067,106 @@ export const supportedEVMChains: EVMChain[] = [
1068
1067
  ],
1069
1068
  },
1070
1069
  },
1070
+
1071
+ // 480 - WCC
1072
+ {
1073
+ key: ChainKey.WCC,
1074
+ chainType: ChainType.EVM,
1075
+ name: 'World Chain',
1076
+ coin: CoinKey.ETH,
1077
+ id: ChainId.WCC,
1078
+ mainnet: true,
1079
+ logoURI:
1080
+ 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/world.svg',
1081
+ multicallAddress: multicallAddresses[ChainId.WCC],
1082
+
1083
+ metamask: {
1084
+ chainId: prefixChainId(480),
1085
+ blockExplorerUrls: ['https://worldscan.org/'],
1086
+ chainName: 'Worldchain Mainnet',
1087
+ nativeCurrency: {
1088
+ name: 'Ethereum',
1089
+ symbol: 'ETH',
1090
+ decimals: 18,
1091
+ },
1092
+ rpcUrls: [
1093
+ 'https://worldchain-mainnet.g.alchemy.com/public',
1094
+ 'https://worldchain-mainnet.gateway.tenderly.co',
1095
+ ],
1096
+ },
1097
+ },
1098
+
1099
+ // 1135 - LSK
1100
+ {
1101
+ key: ChainKey.LSK,
1102
+ chainType: ChainType.EVM,
1103
+ name: 'Lisk',
1104
+ coin: CoinKey.ETH,
1105
+ id: ChainId.LSK,
1106
+ mainnet: true,
1107
+ logoURI:
1108
+ 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/lisk.svg',
1109
+ multicallAddress: multicallAddresses[ChainId.LSK],
1110
+
1111
+ metamask: {
1112
+ chainId: prefixChainId(1135),
1113
+ blockExplorerUrls: ['https://blockscout.lisk.com/'],
1114
+ chainName: 'Lisk',
1115
+ nativeCurrency: {
1116
+ name: 'Ethereum',
1117
+ symbol: 'ETH',
1118
+ decimals: 18,
1119
+ },
1120
+ rpcUrls: ['https://rpc.api.lisk.com', 'https://lisk.drpc.org'],
1121
+ },
1122
+ },
1123
+
1124
+ // 2741 - Abstract
1125
+ {
1126
+ key: ChainKey.ABS,
1127
+ chainType: ChainType.EVM,
1128
+ name: 'Abstract',
1129
+ coin: CoinKey.ETH,
1130
+ id: ChainId.ABS,
1131
+ mainnet: true,
1132
+ logoURI:
1133
+ 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/abstract.svg',
1134
+ multicallAddress: multicallAddresses[ChainId.ABS],
1135
+
1136
+ metamask: {
1137
+ chainId: prefixChainId(2741),
1138
+ blockExplorerUrls: ['https://abscan.org/'],
1139
+ chainName: 'Abstract',
1140
+ nativeCurrency: {
1141
+ name: 'Ethereum',
1142
+ symbol: 'ETH',
1143
+ decimals: 18,
1144
+ },
1145
+ rpcUrls: ['https://rpc.fsd.adfasd32442ds.com'],
1146
+ },
1147
+ },
1148
+
1149
+ {
1150
+ key: ChainKey.BER,
1151
+ chainType: ChainType.EVM,
1152
+ name: 'Berachain',
1153
+ coin: CoinKey.BERA,
1154
+ id: ChainId.BER,
1155
+ mainnet: true,
1156
+ logoURI:
1157
+ 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/bera.svg',
1158
+ multicallAddress: multicallAddresses[ChainId.BER],
1159
+
1160
+ metamask: {
1161
+ chainId: prefixChainId(80094),
1162
+ blockExplorerUrls: ['https://berascan.com/', 'https://beratrail.io/'],
1163
+ chainName: 'Berachain',
1164
+ nativeCurrency: {
1165
+ name: 'Bera',
1166
+ symbol: 'BERA',
1167
+ decimals: 18,
1168
+ },
1169
+ rpcUrls: ['https://rpc.berachain.com'],
1170
+ },
1171
+ },
1071
1172
  ]
@@ -0,0 +1,71 @@
1
+ import type { CoinSupply } from '@mysten/sui/client'
2
+ import { SuiClient } from '@mysten/sui/client'
3
+ import { describe, expect, test } from 'vitest'
4
+
5
+ import { supportedMVMChains } from './supportedChains.mvm.js'
6
+
7
+ const WalletAddress =
8
+ '0xcc2bd176a478baea9a0de7a24cd927661cc6e860d5bacecb9a138ef20dbab231'
9
+
10
+ const SuiTypeName =
11
+ '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI'
12
+
13
+ const SuiTotalSupply = '10000000000000000000' // 1B tokens
14
+
15
+ describe.concurrent('MVM chains RPC check', () => {
16
+ const rpcUrls = supportedMVMChains.flatMap((chain) =>
17
+ chain.metamask.rpcUrls.map((rpcUrl) => ({
18
+ rpcUrl: rpcUrl,
19
+ chainId: chain.id,
20
+ chainName: chain.name,
21
+ }))
22
+ )
23
+
24
+ test.for(rpcUrls)(
25
+ `should successfully get chain ID from $chainName - $chainId RPC: $rpcUrl`,
26
+ { timeout: 10_000, retry: 3 },
27
+ async ({ rpcUrl }) => {
28
+ const client = new SuiClient({ url: rpcUrl })
29
+
30
+ const [coins, balance, ownedObjects, suiSupply] =
31
+ await Promise.allSettled([
32
+ client.getCoins({
33
+ owner: WalletAddress,
34
+ }),
35
+ client.getBalance({ owner: WalletAddress }),
36
+ client.getOwnedObjects({ owner: WalletAddress }),
37
+ client.getTotalSupply({ coinType: SuiTypeName }),
38
+ ])
39
+
40
+ expect(coins.status).toBe('fulfilled')
41
+ expect(balance.status).toBe('fulfilled')
42
+ expect(ownedObjects.status).toBe('fulfilled')
43
+ expect(suiSupply.status).toBe('fulfilled')
44
+
45
+ expect(
46
+ (suiSupply as PromiseFulfilledResult<CoinSupply>).value.value
47
+ ).toBe(SuiTotalSupply)
48
+ }
49
+ )
50
+ })
51
+
52
+ describe.concurrent('MVM chains block explorer check', () => {
53
+ const blockExplorerUrls = supportedMVMChains.flatMap((chain) =>
54
+ chain.metamask.blockExplorerUrls.map((blockExplorerUrl) => ({
55
+ blockExplorerUrl: blockExplorerUrl,
56
+ chainId: chain.id,
57
+ chainName: chain.name,
58
+ }))
59
+ )
60
+
61
+ test.for(blockExplorerUrls)(
62
+ `block explorer should be alive $chainName - $chainId - $blockExplorerUrl`,
63
+ { timeout: 10_000, retry: 3 },
64
+ async ({ blockExplorerUrl }) => {
65
+ const response = await fetch(blockExplorerUrl)
66
+ expect(response.url).toBe(blockExplorerUrl)
67
+ expect(response.ok).toBe(true)
68
+ expect(response.status).toBe(200)
69
+ }
70
+ )
71
+ })
@@ -0,0 +1,27 @@
1
+ import type { MVMChain } from '@lifi/types'
2
+ import { ChainId, ChainKey, ChainType, CoinKey } from '@lifi/types'
3
+
4
+ export const supportedMVMChains: MVMChain[] = [
5
+ {
6
+ key: ChainKey.SUI,
7
+ chainType: ChainType.MVM,
8
+ name: 'Sui',
9
+ coin: CoinKey.SUI,
10
+ id: ChainId.SUI,
11
+ mainnet: true,
12
+ logoURI:
13
+ 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/sui.svg',
14
+ faucetUrls: ['https://stakely.io/faucet/sui-sui'],
15
+ metamask: {
16
+ chainId: ChainId.SUI.toString(),
17
+ blockExplorerUrls: ['https://www.suiscan.xyz/', 'https://suivision.xyz/'],
18
+ chainName: 'Sui',
19
+ nativeCurrency: {
20
+ name: 'Sui',
21
+ symbol: 'SUI',
22
+ decimals: 9,
23
+ },
24
+ rpcUrls: ['https://fullnode.mainnet.sui.io:443'],
25
+ },
26
+ },
27
+ ]
@@ -1,6 +1,6 @@
1
1
  import { Connection, PublicKey } from '@solana/web3.js'
2
2
  import { describe, expect, test } from 'vitest'
3
- import { supportedSolanaChains } from './supportedChains.svm'
3
+ import { supportedSolanaChains } from './supportedChains.svm.js'
4
4
 
5
5
  const TokenProgramAddress = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'
6
6
  const WalletAddress = '6AUWsSCRFSCbrHKH9s84wfzJXtD6mNzAHs11x6pGEcmJ'
@@ -1,7 +1,8 @@
1
1
  import type { Chain, ChainKey } from '@lifi/types'
2
- import { supportedEVMChains } from './supportedChains.evm'
3
- import { supportedSolanaChains } from './supportedChains.svm'
4
- import { supportedUXTOChains } from './supportedChains.utxo'
2
+ import { supportedEVMChains } from './supportedChains.evm.js'
3
+ import { supportedMVMChains } from './supportedChains.mvm.js'
4
+ import { supportedSolanaChains } from './supportedChains.svm.js'
5
+ import { supportedUXTOChains } from './supportedChains.utxo.js'
5
6
 
6
7
  // This assignment is required to avoid breaking
7
8
  // changes with the new non EVM support types release
@@ -9,6 +10,7 @@ import { supportedUXTOChains } from './supportedChains.utxo'
9
10
  export const supportedChains = [
10
11
  ...supportedEVMChains,
11
12
  ...supportedSolanaChains,
13
+ ...supportedMVMChains,
12
14
  ...supportedUXTOChains,
13
15
  ]
14
16
 
@@ -4,10 +4,14 @@ import {
4
4
  findDefaultToken,
5
5
  findTokenByChainIdAndAddress,
6
6
  findWrappedGasOnChain,
7
- } from '../coins'
8
- import { getChainById, getChainByKey, supportedChains } from './supportedChains'
9
- import { supportedEVMChains } from './supportedChains.evm'
10
- import { prefixChainId } from './utils'
7
+ } from '../coins/index.js'
8
+ import {
9
+ getChainById,
10
+ getChainByKey,
11
+ supportedChains,
12
+ } from './supportedChains.js'
13
+ import { supportedEVMChains } from './supportedChains.evm.js'
14
+ import { prefixChainId } from './utils.js'
11
15
 
12
16
  test('getChainById', () => {
13
17
  expect(getChainById(ChainId.ETH)).toBeDefined()
@@ -1,5 +1,5 @@
1
1
  import { describe, expect, test } from 'vitest'
2
- import { supportedUXTOChains } from './supportedChains.utxo'
2
+ import { supportedUXTOChains } from './supportedChains.utxo.js'
3
3
 
4
4
  describe.concurrent('UTXO chains RPC check', () => {
5
5
  const rpcUrls = supportedUXTOChains.flatMap((chain) =>
@@ -1,6 +1,6 @@
1
1
  import type { StaticToken } from '@lifi/types'
2
2
  import { describe, expect, test } from 'vitest'
3
- import { defaultCoins, wrappedTokens } from './coins'
3
+ import { defaultCoins, wrappedTokens } from './coins.js'
4
4
 
5
5
  describe.concurrent('Coin logo test', { timeout: 30_000 }, () => {
6
6
  const allImages: string[] = []