@talken/talkenkit 2.4.23 → 2.4.25

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 (267) hide show
  1. package/dist/AbcCredentialManager-DDHLW2IH.js +7 -0
  2. package/dist/AbcCredentialManager-E723A55X.js +7 -0
  3. package/dist/AbcCredentialManager-GUV5JQ2V.js +7 -0
  4. package/dist/AbcCredentialManager-Z7GDJHYR.js +7 -0
  5. package/dist/abcWallet-3PWHJXWR.js +181 -0
  6. package/dist/abcWallet-3XPV7ATY.js +185 -0
  7. package/dist/abcWallet-3XSSUDLJ.js +155 -0
  8. package/dist/abcWallet-53HAU4MH.js +155 -0
  9. package/dist/abcWallet-5B2YHZGY.js +155 -0
  10. package/dist/abcWallet-664AHBNM.js +183 -0
  11. package/dist/abcWallet-BV7HK3OX.js +181 -0
  12. package/dist/abcWallet-CRKQ3O6J.js +155 -0
  13. package/dist/abcWallet-H4JOSC4N.js +155 -0
  14. package/dist/abcWallet-HM7KZIMP.js +155 -0
  15. package/dist/abcWallet-I5DVALAS.js +155 -0
  16. package/dist/abcWallet-IF3EOKHC.js +183 -0
  17. package/dist/abcWallet-IUG22ZE3.js +155 -0
  18. package/dist/abcWallet-IYC3CKEO.js +155 -0
  19. package/dist/abcWallet-JE6UR4QF.js +181 -0
  20. package/dist/abcWallet-KPKVEGNP.js +185 -0
  21. package/dist/abcWallet-MWUFO3JQ.js +161 -0
  22. package/dist/abcWallet-MZAL5NXP.js +181 -0
  23. package/dist/abcWallet-N2UADRNR.js +155 -0
  24. package/dist/abcWallet-OGHORNUW.js +181 -0
  25. package/dist/abcWallet-OL47MLVO.js +161 -0
  26. package/dist/abcWallet-QSK6VJFU.js +181 -0
  27. package/dist/abcWallet-RKT3W3FX.js +155 -0
  28. package/dist/abcWallet-VHXTAARP.js +155 -0
  29. package/dist/abcWallet-VYU3TEGJ.js +161 -0
  30. package/dist/abcWallet-WZGXGXUA.js +161 -0
  31. package/dist/abcWallet-YFYTW2JH.js +155 -0
  32. package/dist/abcWallet-ZPVQY4XE.js +155 -0
  33. package/dist/chunk-2OHX4KTB.js +5382 -0
  34. package/dist/chunk-3VPMUBCL.js +5196 -0
  35. package/dist/chunk-5SDWPKKX.js +5322 -0
  36. package/dist/chunk-6RBGFYAF.js +5076 -0
  37. package/dist/chunk-7L2ANWBB.js +5139 -0
  38. package/dist/chunk-7VIEAJAM.js +5172 -0
  39. package/dist/chunk-ALBABQ53.js +354 -0
  40. package/dist/chunk-BY6GTSWI.js +5059 -0
  41. package/dist/chunk-DWE3CZEL.js +5171 -0
  42. package/dist/chunk-J6P2IT7Z.js +5465 -0
  43. package/dist/chunk-JIRBQUIB.js +5348 -0
  44. package/dist/chunk-K6CLOFGV.js +5129 -0
  45. package/dist/chunk-KYTIQ23P.js +5390 -0
  46. package/dist/chunk-MARFD3QV.js +5164 -0
  47. package/dist/chunk-MRRWKS2W.js +348 -0
  48. package/dist/chunk-NQCUKFAV.js +5381 -0
  49. package/dist/chunk-PILL2YTG.js +5075 -0
  50. package/dist/chunk-QW7D53VM.js +5129 -0
  51. package/dist/chunk-RAWLCGOW.js +5058 -0
  52. package/dist/chunk-RIEG3EJO.js +5385 -0
  53. package/dist/chunk-SHUPSYR2.js +5004 -0
  54. package/dist/chunk-UIGQOSRS.js +5174 -0
  55. package/dist/chunk-UINIIZCG.js +5098 -0
  56. package/dist/chunk-UKIPSWEV.js +5386 -0
  57. package/dist/chunk-VOQSYTG3.js +5419 -0
  58. package/dist/chunk-VT5Q2XKZ.js +5193 -0
  59. package/dist/chunk-VXQYKPGQ.js +5476 -0
  60. package/dist/chunk-VYLJNEKY.js +5129 -0
  61. package/dist/chunk-X24B5DJR.js +323 -0
  62. package/dist/chunk-X3C73JWU.js +5370 -0
  63. package/dist/chunk-XIDK5P36.js +288 -0
  64. package/dist/chunk-ZHRI7SGC.js +5359 -0
  65. package/dist/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthFlow.d.ts +1 -2
  66. package/dist/components/RainbowKitProvider/InternalPinProvider.d.ts +1 -1
  67. package/dist/contexts/MultiChainContext.d.ts +2 -2
  68. package/dist/hooks/internal/abcEmbeddedWallet.d.ts +26 -0
  69. package/dist/hooks/useProfile.d.ts +13 -6
  70. package/dist/hooks/useSolanaWallet.d.ts +13 -8
  71. package/dist/index.d.ts +3 -3
  72. package/dist/index.js +1211 -1158
  73. package/dist/providers/AbcAuthProvider.d.ts +3 -1
  74. package/dist/providers/SignConfirmationProvider/useApiClient.d.ts +3 -0
  75. package/dist/solana/ConfiguredWalletProvider.d.ts +10 -0
  76. package/dist/solana/LegacySolflareWalletAdapter.d.ts +32 -0
  77. package/dist/solana/connectExternalWallet.d.ts +9 -0
  78. package/dist/solana/isWalletReady.d.ts +2 -0
  79. package/dist/transactions/transactionStore.d.ts +2 -5
  80. package/dist/utils/apiClientFactory.d.ts +16 -1
  81. package/dist/utils/encryption.d.ts +0 -4
  82. package/dist/wallets/walletConnectors/abcWallet/AbcCredentialManager.d.ts +49 -0
  83. package/dist/wallets/walletConnectors/abcWallet/AbcCredentialManager.js +8 -0
  84. package/dist/wallets/walletConnectors/abcWallet/AbcEvmAutoConnector.d.ts +4 -0
  85. package/dist/wallets/walletConnectors/abcWallet/AbcEvmAutoConnector.js +12 -15
  86. package/dist/wallets/walletConnectors/abcWallet/abcBitcoinConnector.js +4 -4
  87. package/dist/wallets/walletConnectors/abcWallet/abcBitcoinProvider.d.ts +2 -0
  88. package/dist/wallets/walletConnectors/abcWallet/abcBitcoinProvider.js +3 -1
  89. package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +7 -6
  90. package/dist/wallets/walletConnectors/abcWallet/abcProvider.d.ts +25 -1
  91. package/dist/wallets/walletConnectors/abcWallet/abcProvider.js +5 -4
  92. package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.d.ts +0 -4
  93. package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.js +11 -1
  94. package/dist/wallets/walletConnectors/abcWallet/abcSolanaWalletAdapter.js +14 -9
  95. package/dist/wallets/walletConnectors/abcWallet/abcTronProvider.d.ts +3 -2
  96. package/dist/wallets/walletConnectors/abcWallet/abcTronProvider.js +3 -1
  97. package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +8 -7
  98. package/dist/wallets/walletConnectors/abcWallet/api/ConfigApi.d.ts +21 -0
  99. package/dist/wallets/walletConnectors/abcWallet/api/ConfigApi.js +8 -0
  100. package/dist/wallets/walletConnectors/abcWallet/api/SolanaApi.d.ts +28 -115
  101. package/dist/wallets/walletConnectors/abcWallet/api/SolanaApi.js +1 -6
  102. package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.d.ts +24 -1
  103. package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.js +4 -3
  104. package/dist/wallets/walletConnectors/abcWallet/api/TokenApi.d.ts +14 -0
  105. package/dist/wallets/walletConnectors/abcWallet/api/TokenApi.js +8 -0
  106. package/dist/wallets/walletConnectors/abcWallet/api/WalletscanApi.d.ts +20 -0
  107. package/dist/wallets/walletConnectors/abcWallet/api/WalletscanApi.js +1 -1
  108. package/dist/wallets/walletConnectors/abcWallet/api/index.d.ts +3 -0
  109. package/dist/wallets/walletConnectors/abcWallet/api/index.js +19 -6
  110. package/dist/wallets/walletConnectors/abcWallet/backfillMissingWallets.d.ts +3 -0
  111. package/dist/wallets/walletConnectors/abcWallet/backfillMissingWallets.js +16 -0
  112. package/dist/wallets/walletConnectors/abcWallet/constants.d.ts +4 -0
  113. package/dist/wallets/walletConnectors/abcWallet/constants.js +1 -1
  114. package/dist/wallets/walletConnectors/abcWallet/index.d.ts +3 -2
  115. package/dist/wallets/walletConnectors/abcWallet/index.js +39 -53
  116. package/dist/wallets/walletConnectors/abcWallet/sessionUtils.js +2 -1
  117. package/dist/wallets/walletConnectors/abcWallet/types.d.ts +10 -9
  118. package/dist/wallets/walletConnectors/abcWallet/types.js +1 -1
  119. package/dist/wallets/walletConnectors/abcWallet/utils.d.ts +0 -83
  120. package/dist/wallets/walletConnectors/abcWallet/utils.js +3 -41
  121. package/dist/wallets/walletConnectors/abcWallet/walletGeneration.d.ts +9 -3
  122. package/dist/wallets/walletConnectors/abcWallet/walletGeneration.js +5 -2
  123. package/dist/wallets/walletConnectors/chunk-2XX4LJSQ.js +1387 -0
  124. package/dist/wallets/walletConnectors/chunk-3BUGPUMD.js +151 -0
  125. package/dist/wallets/walletConnectors/chunk-3H7YKUJZ.js +1407 -0
  126. package/dist/wallets/walletConnectors/chunk-3OWQ6MEU.js +54 -0
  127. package/dist/wallets/walletConnectors/chunk-3VDYWOS4.js +300 -0
  128. package/dist/wallets/walletConnectors/chunk-3XOXT4AM.js +314 -0
  129. package/dist/wallets/walletConnectors/chunk-42D2UPKR.js +439 -0
  130. package/dist/wallets/walletConnectors/chunk-42MF6LUP.js +563 -0
  131. package/dist/wallets/walletConnectors/chunk-4LIJB776.js +273 -0
  132. package/dist/wallets/walletConnectors/chunk-4P3SPC44.js +51 -0
  133. package/dist/wallets/walletConnectors/chunk-4RZVAQQ4.js +574 -0
  134. package/dist/wallets/walletConnectors/chunk-53UTBIKF.js +209 -0
  135. package/dist/wallets/walletConnectors/chunk-54KVT46V.js +1477 -0
  136. package/dist/wallets/walletConnectors/chunk-5UBUX5BT.js +440 -0
  137. package/dist/wallets/walletConnectors/chunk-5ZBV5WE2.js +94 -0
  138. package/dist/wallets/walletConnectors/chunk-6EUOVOQK.js +151 -0
  139. package/dist/wallets/walletConnectors/chunk-6WF4SXLB.js +156 -0
  140. package/dist/wallets/walletConnectors/chunk-6YUJPIJ5.js +351 -0
  141. package/dist/wallets/walletConnectors/chunk-77YYMCMD.js +273 -0
  142. package/dist/wallets/walletConnectors/chunk-7DM6H5BJ.js +54 -0
  143. package/dist/wallets/walletConnectors/chunk-7EQNUYV2.js +482 -0
  144. package/dist/wallets/walletConnectors/chunk-7K77YGQN.js +54 -0
  145. package/dist/wallets/walletConnectors/chunk-7MMVOEZF.js +393 -0
  146. package/dist/wallets/walletConnectors/chunk-7ORDZ6EQ.js +1479 -0
  147. package/dist/wallets/walletConnectors/chunk-7RDMH4SD.js +54 -0
  148. package/dist/wallets/walletConnectors/chunk-7S4N4DRT.js +306 -0
  149. package/dist/wallets/walletConnectors/chunk-7SWRH3EI.js +96 -0
  150. package/dist/wallets/walletConnectors/chunk-A3OJZTDV.js +54 -0
  151. package/dist/wallets/walletConnectors/chunk-A66MTFML.js +223 -0
  152. package/dist/wallets/walletConnectors/chunk-ACLPF2UW.js +96 -0
  153. package/dist/wallets/walletConnectors/chunk-AJBRO3VA.js +300 -0
  154. package/dist/wallets/walletConnectors/chunk-BKVGLYLI.js +194 -0
  155. package/dist/wallets/walletConnectors/chunk-BXH3GDX5.js +273 -0
  156. package/dist/wallets/walletConnectors/chunk-C3FPON5L.js +213 -0
  157. package/dist/wallets/walletConnectors/chunk-CABLJOMU.js +194 -0
  158. package/dist/wallets/walletConnectors/chunk-CBIDNYV4.js +1407 -0
  159. package/dist/wallets/walletConnectors/chunk-CE37VZAR.js +300 -0
  160. package/dist/wallets/walletConnectors/chunk-DD6KK4BR.js +54 -0
  161. package/dist/wallets/walletConnectors/chunk-DPTDOCWL.js +205 -0
  162. package/dist/wallets/walletConnectors/chunk-DSNVWCPD.js +131 -0
  163. package/dist/wallets/walletConnectors/chunk-DULGAYBU.js +785 -0
  164. package/dist/wallets/walletConnectors/chunk-DZUXOGSA.js +54 -0
  165. package/dist/wallets/walletConnectors/chunk-E7TDM6P6.js +205 -0
  166. package/dist/wallets/walletConnectors/chunk-EVJIFLSY.js +93 -0
  167. package/dist/wallets/walletConnectors/chunk-EVW3ZB3Q.js +386 -0
  168. package/dist/wallets/walletConnectors/chunk-F2UWSAMX.js +54 -0
  169. package/dist/wallets/walletConnectors/chunk-FBVPR472.js +314 -0
  170. package/dist/wallets/walletConnectors/chunk-FKS2YLVW.js +273 -0
  171. package/dist/wallets/walletConnectors/chunk-FOGNJZPY.js +54 -0
  172. package/dist/wallets/walletConnectors/chunk-FSSV6JY3.js +54 -0
  173. package/dist/wallets/walletConnectors/chunk-GBMOX5JN.js +54 -0
  174. package/dist/wallets/walletConnectors/chunk-GFLJ2MAG.js +54 -0
  175. package/dist/wallets/walletConnectors/chunk-GGPJJ6KS.js +1407 -0
  176. package/dist/wallets/walletConnectors/chunk-GMAYKJEI.js +508 -0
  177. package/dist/wallets/walletConnectors/chunk-GWYZ2IPP.js +1479 -0
  178. package/dist/wallets/walletConnectors/chunk-H3OWNM73.js +300 -0
  179. package/dist/wallets/walletConnectors/chunk-HF6GFAE5.js +54 -0
  180. package/dist/wallets/walletConnectors/chunk-IM7DEERX.js +585 -0
  181. package/dist/wallets/walletConnectors/chunk-INFMRNND.js +300 -0
  182. package/dist/wallets/walletConnectors/chunk-INT6LGH7.js +180 -0
  183. package/dist/wallets/walletConnectors/chunk-ITZ42A33.js +273 -0
  184. package/dist/wallets/walletConnectors/chunk-J4IF6BFF.js +300 -0
  185. package/dist/wallets/walletConnectors/chunk-JADQLTFW.js +194 -0
  186. package/dist/wallets/walletConnectors/chunk-JAMJLNYQ.js +54 -0
  187. package/dist/wallets/walletConnectors/chunk-JDJUIRGF.js +439 -0
  188. package/dist/wallets/walletConnectors/chunk-JEWCPQJZ.js +300 -0
  189. package/dist/wallets/walletConnectors/chunk-JGXJY3SB.js +1 -0
  190. package/dist/wallets/walletConnectors/chunk-JK7LJ4B6.js +1407 -0
  191. package/dist/wallets/walletConnectors/chunk-JPOSJU2D.js +594 -0
  192. package/dist/wallets/walletConnectors/chunk-JUFEPIO4.js +1479 -0
  193. package/dist/wallets/walletConnectors/chunk-JV4IC5Z7.js +54 -0
  194. package/dist/wallets/walletConnectors/chunk-K3VHBOXQ.js +32 -0
  195. package/dist/wallets/walletConnectors/chunk-KZS2C73S.js +814 -0
  196. package/dist/wallets/walletConnectors/chunk-LJNUFDGO.js +205 -0
  197. package/dist/wallets/walletConnectors/chunk-MO2AXXLI.js +30 -0
  198. package/dist/wallets/walletConnectors/chunk-MP3WVXPS.js +273 -0
  199. package/dist/wallets/walletConnectors/chunk-MTC2HJPF.js +96 -0
  200. package/dist/wallets/walletConnectors/chunk-MTJF3SVB.js +1487 -0
  201. package/dist/wallets/walletConnectors/chunk-NBVPVTJZ.js +192 -0
  202. package/dist/wallets/walletConnectors/chunk-NISMGNEE.js +223 -0
  203. package/dist/wallets/walletConnectors/chunk-NY5O2OBG.js +1477 -0
  204. package/dist/wallets/walletConnectors/chunk-NYDDRNUI.js +445 -0
  205. package/dist/wallets/walletConnectors/chunk-O4DNG6JJ.js +54 -0
  206. package/dist/wallets/walletConnectors/chunk-OTLZVWY7.js +39 -0
  207. package/dist/wallets/walletConnectors/chunk-OYF6AQOW.js +194 -0
  208. package/dist/wallets/walletConnectors/chunk-PBOCVGUC.js +782 -0
  209. package/dist/wallets/walletConnectors/chunk-PDXO6AOG.js +300 -0
  210. package/dist/wallets/walletConnectors/chunk-PJSN4YRI.js +1387 -0
  211. package/dist/wallets/walletConnectors/chunk-PVIO7FM7.js +314 -0
  212. package/dist/wallets/walletConnectors/chunk-PWJOXYDF.js +54 -0
  213. package/dist/wallets/walletConnectors/chunk-PYBSONED.js +771 -0
  214. package/dist/wallets/walletConnectors/chunk-PYKECUZ3.js +54 -0
  215. package/dist/wallets/walletConnectors/chunk-Q42NO7WB.js +46 -0
  216. package/dist/wallets/walletConnectors/chunk-Q7XBI5F6.js +300 -0
  217. package/dist/wallets/walletConnectors/chunk-QHUBLT7N.js +156 -0
  218. package/dist/wallets/walletConnectors/chunk-RMV23JXO.js +300 -0
  219. package/dist/wallets/walletConnectors/chunk-S3L2SA4J.js +300 -0
  220. package/dist/wallets/walletConnectors/chunk-S466OQOC.js +393 -0
  221. package/dist/wallets/walletConnectors/chunk-SA7IXAFG.js +54 -0
  222. package/dist/wallets/walletConnectors/chunk-SDB6BBHX.js +585 -0
  223. package/dist/wallets/walletConnectors/chunk-SFGVPX2G.js +351 -0
  224. package/dist/wallets/walletConnectors/chunk-SFQKJ6X6.js +314 -0
  225. package/dist/wallets/walletConnectors/chunk-SKLRJRER.js +1464 -0
  226. package/dist/wallets/walletConnectors/chunk-SQVWIBWR.js +351 -0
  227. package/dist/wallets/walletConnectors/chunk-SSLHXCOX.js +439 -0
  228. package/dist/wallets/walletConnectors/chunk-SU6LV3EO.js +314 -0
  229. package/dist/wallets/walletConnectors/chunk-SU7IEZE2.js +300 -0
  230. package/dist/wallets/walletConnectors/chunk-TMRB5SCL.js +167 -0
  231. package/dist/wallets/walletConnectors/chunk-TMUPUOQR.js +54 -0
  232. package/dist/wallets/walletConnectors/chunk-TNZ7QKXH.js +771 -0
  233. package/dist/wallets/walletConnectors/chunk-TT2NLKIU.js +1465 -0
  234. package/dist/wallets/walletConnectors/chunk-U3WGMWTH.js +585 -0
  235. package/dist/wallets/walletConnectors/chunk-UAV4SI4Y.js +408 -0
  236. package/dist/wallets/walletConnectors/chunk-UAWWPNS7.js +54 -0
  237. package/dist/wallets/walletConnectors/chunk-UXRJASPW.js +785 -0
  238. package/dist/wallets/walletConnectors/chunk-UY5TAYLM.js +54 -0
  239. package/dist/wallets/walletConnectors/chunk-VB5IZDY7.js +300 -0
  240. package/dist/wallets/walletConnectors/chunk-VDWJ3NQ5.js +52 -0
  241. package/dist/wallets/walletConnectors/chunk-VIKJNKJZ.js +219 -0
  242. package/dist/wallets/walletConnectors/chunk-VKOPUEQG.js +445 -0
  243. package/dist/wallets/walletConnectors/chunk-VTOD7PXP.js +817 -0
  244. package/dist/wallets/walletConnectors/chunk-VVEXF6KG.js +273 -0
  245. package/dist/wallets/walletConnectors/chunk-W2YIRNMB.js +300 -0
  246. package/dist/wallets/walletConnectors/chunk-W7L2SBIG.js +138 -0
  247. package/dist/wallets/walletConnectors/chunk-WC7BGU5Z.js +814 -0
  248. package/dist/wallets/walletConnectors/chunk-WS5FG53X.js +54 -0
  249. package/dist/wallets/walletConnectors/chunk-WVRGC2YL.js +300 -0
  250. package/dist/wallets/walletConnectors/chunk-X33WL7R7.js +300 -0
  251. package/dist/wallets/walletConnectors/chunk-XG2R64B7.js +785 -0
  252. package/dist/wallets/walletConnectors/chunk-Y2BWF42Z.js +54 -0
  253. package/dist/wallets/walletConnectors/chunk-Y446VZWI.js +585 -0
  254. package/dist/wallets/walletConnectors/chunk-YDSBY7NO.js +54 -0
  255. package/dist/wallets/walletConnectors/chunk-YROAFC7Z.js +54 -0
  256. package/dist/wallets/walletConnectors/chunk-YV6IZWGE.js +393 -0
  257. package/dist/wallets/walletConnectors/chunk-Z4WVT3G2.js +1416 -0
  258. package/dist/wallets/walletConnectors/chunk-Z5SBGIWT.js +300 -0
  259. package/dist/wallets/walletConnectors/chunk-ZK3PZIAH.js +300 -0
  260. package/dist/wallets/walletConnectors/chunk-ZKCUYHBK.js +300 -0
  261. package/dist/wallets/walletConnectors/chunk-ZPJLV3E7.js +151 -0
  262. package/dist/wallets/walletConnectors/chunk-ZQ3LCYGH.js +408 -0
  263. package/dist/wallets/walletConnectors/chunk-ZX6HMX7N.js +1468 -0
  264. package/dist/wallets/walletConnectors/chunk-ZXN465CA.js +209 -0
  265. package/dist/wallets/walletConnectors/index.js +73 -72
  266. package/package.json +12 -11
  267. package/LICENSE +0 -9
@@ -0,0 +1,1387 @@
1
+ "use client";
2
+ import {
3
+ hexToNumber,
4
+ numberToHex
5
+ } from "./chunk-GMAYKJEI.js";
6
+
7
+ // src/wallets/walletConnectors/abcWallet/abcProvider.ts
8
+ import { getTalkenApiClient } from "@talken/talkenkit";
9
+ import { parseGwei } from "viem";
10
+
11
+ // src/config/networks.ts
12
+ var NETWORK_CONFIGS = {
13
+ // Ethereum Mainnet
14
+ 1: {
15
+ chainId: 1,
16
+ network: "ethereum",
17
+ name: "Ethereum",
18
+ type: "EVM" /* EVM */,
19
+ isTestnet: false,
20
+ explorer: "https://etherscan.io",
21
+ website: "https://ethereum.org",
22
+ nativeCurrency: {
23
+ name: "Ether",
24
+ symbol: "ETH",
25
+ decimals: 18
26
+ },
27
+ apiSupport: { tokens: true, nft: true, transactions: true },
28
+ signSupport: { legacy: true, eip1559: true }
29
+ },
30
+ // Ethereum Sepolia Testnet
31
+ 11155111: {
32
+ chainId: 11155111,
33
+ network: "ethereum_sepolia",
34
+ name: "Ethereum Sepolia",
35
+ type: "EVM" /* EVM */,
36
+ isTestnet: true,
37
+ explorer: "https://sepolia.etherscan.io",
38
+ website: "https://ethereum.org",
39
+ nativeCurrency: {
40
+ name: "Sepolia Ether",
41
+ symbol: "ETH",
42
+ decimals: 18
43
+ },
44
+ apiSupport: { tokens: true, nft: true, transactions: true },
45
+ signSupport: { legacy: true, eip1559: true }
46
+ },
47
+ // Ethereum Holesky Testnet
48
+ 17e3: {
49
+ chainId: 17e3,
50
+ network: "ethereum_holesky",
51
+ name: "Ethereum Holesky",
52
+ type: "EVM" /* EVM */,
53
+ isTestnet: true,
54
+ explorer: "https://holesky.etherscan.io",
55
+ website: "https://ethereum.org",
56
+ nativeCurrency: {
57
+ name: "Holesky Ether",
58
+ symbol: "ETH",
59
+ decimals: 18
60
+ },
61
+ apiSupport: { tokens: true, nft: true, transactions: true },
62
+ signSupport: { legacy: true, eip1559: true }
63
+ },
64
+ // Kaia Mainnet (formerly Klaytn)
65
+ 8217: {
66
+ chainId: 8217,
67
+ network: "kaia",
68
+ name: "Kaia Mainnet",
69
+ type: "EVM" /* EVM */,
70
+ isTestnet: false,
71
+ explorer: "https://kaiascan.io",
72
+ website: "https://kaia.io",
73
+ nativeCurrency: {
74
+ name: "Kaia",
75
+ symbol: "KAIA",
76
+ decimals: 18
77
+ },
78
+ apiSupport: { tokens: true, nft: true, transactions: true },
79
+ signSupport: { legacy: true, eip1559: true }
80
+ },
81
+ // Kaia Kairos Testnet
82
+ 1001: {
83
+ chainId: 1001,
84
+ network: "kaia_kairos",
85
+ name: "Kaia Kairos Testnet",
86
+ type: "EVM" /* EVM */,
87
+ isTestnet: true,
88
+ explorer: "https://kairos.kaiascan.io",
89
+ website: "https://kaia.io",
90
+ nativeCurrency: {
91
+ name: "Kaia",
92
+ symbol: "KAIA",
93
+ decimals: 18
94
+ },
95
+ apiSupport: { tokens: true, nft: true, transactions: true },
96
+ signSupport: { legacy: true, eip1559: true }
97
+ },
98
+ // Polygon Mainnet
99
+ 137: {
100
+ chainId: 137,
101
+ network: "polygon",
102
+ name: "Polygon",
103
+ type: "EVM" /* EVM */,
104
+ isTestnet: false,
105
+ explorer: "https://polygonscan.com",
106
+ website: "https://polygon.technology",
107
+ nativeCurrency: {
108
+ name: "MATIC",
109
+ symbol: "MATIC",
110
+ decimals: 18
111
+ },
112
+ apiSupport: { tokens: true, nft: true, transactions: true },
113
+ signSupport: { legacy: true, eip1559: true }
114
+ },
115
+ // Polygon Amoy Testnet
116
+ 80001: {
117
+ chainId: 80001,
118
+ network: "polygon_amoy",
119
+ name: "Polygon Amoy Testnet",
120
+ type: "EVM" /* EVM */,
121
+ isTestnet: true,
122
+ explorer: "https://amoy.polygonscan.com",
123
+ website: "https://polygon.technology",
124
+ nativeCurrency: {
125
+ name: "MATIC",
126
+ symbol: "MATIC",
127
+ decimals: 18
128
+ },
129
+ apiSupport: { tokens: true, nft: true, transactions: true },
130
+ signSupport: { legacy: true, eip1559: true }
131
+ },
132
+ // Binance Smart Chain Mainnet
133
+ 56: {
134
+ chainId: 56,
135
+ network: "binance",
136
+ name: "Binance Smart Chain Mainnet",
137
+ type: "EVM" /* EVM */,
138
+ isTestnet: false,
139
+ explorer: "https://bscscan.com",
140
+ website: "https://www.bnbchain.org/en/bnb-smart-chain",
141
+ nativeCurrency: {
142
+ name: "BNB",
143
+ symbol: "BNB",
144
+ decimals: 18
145
+ },
146
+ apiSupport: { tokens: true, nft: true, transactions: true },
147
+ signSupport: { legacy: true, eip1559: true }
148
+ },
149
+ // Binance Smart Chain Testnet
150
+ 97: {
151
+ chainId: 97,
152
+ network: "binance_testnet",
153
+ name: "Binance Smart Chain Testnet",
154
+ type: "EVM" /* EVM */,
155
+ isTestnet: true,
156
+ explorer: "https://testnet.bscscan.com",
157
+ website: "https://www.bnbchain.org/en/bnb-smart-chain",
158
+ nativeCurrency: {
159
+ name: "BNB",
160
+ symbol: "BNB",
161
+ decimals: 18
162
+ },
163
+ apiSupport: { tokens: true, nft: true, transactions: true },
164
+ signSupport: { legacy: true, eip1559: true }
165
+ },
166
+ // Arbitrum One
167
+ 42161: {
168
+ chainId: 42161,
169
+ network: "arbitrum",
170
+ name: "Arbitrum One",
171
+ type: "EVM" /* EVM */,
172
+ isTestnet: false,
173
+ explorer: "https://arbiscan.io",
174
+ website: "https://arbitrum.io",
175
+ nativeCurrency: {
176
+ name: "Ether",
177
+ symbol: "ETH",
178
+ decimals: 18
179
+ },
180
+ apiSupport: { tokens: true, nft: true, transactions: true },
181
+ signSupport: { legacy: true, eip1559: true }
182
+ },
183
+ // Arbitrum Sepolia
184
+ 421614: {
185
+ chainId: 421614,
186
+ network: "arbitrum_sepolia",
187
+ name: "Arbitrum Sepolia",
188
+ type: "EVM" /* EVM */,
189
+ isTestnet: true,
190
+ explorer: "https://sepolia.arbiscan.io",
191
+ website: "https://arbitrum.io",
192
+ nativeCurrency: {
193
+ name: "Ether",
194
+ symbol: "ETH",
195
+ decimals: 18
196
+ },
197
+ apiSupport: { tokens: true, nft: true, transactions: true },
198
+ signSupport: { legacy: true, eip1559: true }
199
+ },
200
+ // Optimism Mainnet
201
+ 10: {
202
+ chainId: 10,
203
+ network: "optimism",
204
+ name: "Optimism",
205
+ type: "EVM" /* EVM */,
206
+ isTestnet: false,
207
+ explorer: "https://optimistic.etherscan.io",
208
+ website: "https://optimism.io",
209
+ nativeCurrency: {
210
+ name: "Ether",
211
+ symbol: "ETH",
212
+ decimals: 18
213
+ },
214
+ apiSupport: { tokens: true, nft: true, transactions: true },
215
+ signSupport: { legacy: true, eip1559: true }
216
+ },
217
+ // Optimism Sepolia
218
+ 420: {
219
+ chainId: 420,
220
+ network: "optimism_sepolia",
221
+ name: "Optimism Sepolia",
222
+ type: "EVM" /* EVM */,
223
+ isTestnet: true,
224
+ explorer: "https://sepolia-optimism.etherscan.io",
225
+ website: "https://optimism.io",
226
+ nativeCurrency: {
227
+ name: "Ether",
228
+ symbol: "ETH",
229
+ decimals: 18
230
+ },
231
+ apiSupport: { tokens: true, nft: true, transactions: true },
232
+ signSupport: { legacy: true, eip1559: true }
233
+ },
234
+ // Avalanche C-Chain
235
+ 43114: {
236
+ chainId: 43114,
237
+ network: "avalanche",
238
+ name: "Avalanche C-Chain",
239
+ type: "EVM" /* EVM */,
240
+ isTestnet: false,
241
+ explorer: "https://avascan.info/blockchain/c/home",
242
+ website: "https://avax.network",
243
+ nativeCurrency: {
244
+ name: "Avalanche",
245
+ symbol: "AVAX",
246
+ decimals: 18
247
+ },
248
+ apiSupport: { tokens: true, nft: true, transactions: true },
249
+ signSupport: { legacy: true, eip1559: true }
250
+ },
251
+ // Avalanche Fuji Testnet
252
+ 43113: {
253
+ chainId: 43113,
254
+ network: "avalanche_fuji",
255
+ name: "Avalanche Fuji Testnet",
256
+ type: "EVM" /* EVM */,
257
+ isTestnet: true,
258
+ explorer: "https://testnet.avascan.info",
259
+ website: "https://avax.network",
260
+ nativeCurrency: {
261
+ name: "Avalanche",
262
+ symbol: "AVAX",
263
+ decimals: 18
264
+ },
265
+ apiSupport: { tokens: false, nft: false, transactions: false },
266
+ signSupport: { legacy: true, eip1559: true }
267
+ },
268
+ // Mantle Mainnet
269
+ 5e3: {
270
+ chainId: 5e3,
271
+ network: "mantle",
272
+ name: "Mantle Mainnet",
273
+ type: "EVM" /* EVM */,
274
+ isTestnet: false,
275
+ explorer: "https://explorer.mantle.xyz",
276
+ website: "https://www.mantle.xyz",
277
+ nativeCurrency: {
278
+ name: "Mantle",
279
+ symbol: "MNT",
280
+ decimals: 18
281
+ },
282
+ apiSupport: { tokens: true, nft: true, transactions: true },
283
+ signSupport: { legacy: true, eip1559: true }
284
+ },
285
+ // Mantle Testnet
286
+ 5001: {
287
+ chainId: 5001,
288
+ network: "mantle_testnet",
289
+ name: "Mantle Testnet",
290
+ type: "EVM" /* EVM */,
291
+ isTestnet: true,
292
+ explorer: "https://sepolia.mantlescan.xyz",
293
+ website: "https://www.mantle.xyz",
294
+ nativeCurrency: {
295
+ name: "Mantle",
296
+ symbol: "MNT",
297
+ decimals: 18
298
+ },
299
+ apiSupport: { tokens: true, nft: true, transactions: true },
300
+ signSupport: { legacy: true, eip1559: true }
301
+ },
302
+ // Moonbeam
303
+ 1284: {
304
+ chainId: 1284,
305
+ network: "moonbeam",
306
+ name: "Moonbeam",
307
+ type: "EVM" /* EVM */,
308
+ isTestnet: false,
309
+ explorer: "https://moonbeam.moonscan.io",
310
+ website: "https://moonbeam.network",
311
+ nativeCurrency: {
312
+ name: "Glimmer",
313
+ symbol: "GLMR",
314
+ decimals: 18
315
+ },
316
+ apiSupport: { tokens: true, nft: true, transactions: true },
317
+ signSupport: { legacy: true, eip1559: true }
318
+ },
319
+ // Moonriver
320
+ 1285: {
321
+ chainId: 1285,
322
+ network: "moonriver",
323
+ name: "Moonriver",
324
+ type: "EVM" /* EVM */,
325
+ isTestnet: false,
326
+ explorer: "https://moonriver.moonscan.io",
327
+ website: "https://moonbeam.network/networks/moonriver",
328
+ nativeCurrency: {
329
+ name: "Moonriver",
330
+ symbol: "MOVR",
331
+ decimals: 18
332
+ },
333
+ apiSupport: { tokens: true, nft: true, transactions: true },
334
+ signSupport: { legacy: true, eip1559: true }
335
+ },
336
+ // Scroll Mainnet
337
+ 534352: {
338
+ chainId: 534352,
339
+ network: "scroll",
340
+ name: "Scroll",
341
+ type: "EVM" /* EVM */,
342
+ isTestnet: false,
343
+ explorer: "https://scrollscan.co",
344
+ website: "https://scroll.io",
345
+ nativeCurrency: {
346
+ name: "Ether",
347
+ symbol: "ETH",
348
+ decimals: 18
349
+ },
350
+ apiSupport: { tokens: true, nft: true, transactions: true },
351
+ signSupport: { legacy: true, eip1559: true }
352
+ },
353
+ // Scroll Testnet
354
+ 534351: {
355
+ chainId: 534351,
356
+ network: "scroll_testnet",
357
+ name: "Scroll Testnet",
358
+ type: "EVM" /* EVM */,
359
+ isTestnet: true,
360
+ explorer: "https://sepolia.scrollscan.com",
361
+ website: "https://scroll.io",
362
+ nativeCurrency: {
363
+ name: "Ether",
364
+ symbol: "ETH",
365
+ decimals: 18
366
+ },
367
+ apiSupport: { tokens: true, nft: true, transactions: true },
368
+ signSupport: { legacy: true, eip1559: true }
369
+ },
370
+ // Silicon Mainnet
371
+ 2355: {
372
+ chainId: 2355,
373
+ network: "silicon",
374
+ name: "Silicon",
375
+ type: "EVM" /* EVM */,
376
+ isTestnet: false,
377
+ explorer: "https://scope.silicon.network",
378
+ website: "https://silicon.network",
379
+ nativeCurrency: {
380
+ name: "Ether",
381
+ symbol: "ETH",
382
+ decimals: 18
383
+ },
384
+ apiSupport: { tokens: true, nft: true, transactions: true },
385
+ signSupport: { legacy: true, eip1559: true }
386
+ },
387
+ // Silicon Sepolia
388
+ 1722641160: {
389
+ chainId: 1722641160,
390
+ network: "silicon_sepolia",
391
+ name: "Silicon Sepolia",
392
+ type: "EVM" /* EVM */,
393
+ isTestnet: true,
394
+ explorer: "https://scope-sepolia.silicon.network",
395
+ website: "https://silicon.network",
396
+ nativeCurrency: {
397
+ name: "Ether",
398
+ symbol: "ETH",
399
+ decimals: 18
400
+ },
401
+ apiSupport: { tokens: true, nft: true, transactions: true },
402
+ signSupport: { legacy: true, eip1559: true }
403
+ },
404
+ // Six Protocol
405
+ 98: {
406
+ chainId: 98,
407
+ network: "six_evm",
408
+ name: "Six Protocol",
409
+ type: "EVM" /* EVM */,
410
+ isTestnet: false,
411
+ explorer: "https://v2.sixscan.io",
412
+ website: "https://www.six.network",
413
+ nativeCurrency: {
414
+ name: "SIX",
415
+ symbol: "SIX",
416
+ decimals: 18
417
+ },
418
+ apiSupport: { tokens: true, nft: false, transactions: true },
419
+ signSupport: { legacy: true, eip1559: false }
420
+ },
421
+ // Six Protocol Testnet
422
+ 150: {
423
+ chainId: 150,
424
+ network: "six_evm_testnet",
425
+ name: "Six Protocol Testnet",
426
+ type: "EVM" /* EVM */,
427
+ isTestnet: true,
428
+ explorer: "https://v2.fivenet.sixscan.io",
429
+ website: "https://www.six.network",
430
+ nativeCurrency: {
431
+ name: "SIX",
432
+ symbol: "SIX",
433
+ decimals: 18
434
+ },
435
+ apiSupport: { tokens: true, nft: false, transactions: true },
436
+ signSupport: { legacy: true, eip1559: false }
437
+ },
438
+ // Wemix Mainnet
439
+ 1111: {
440
+ chainId: 1111,
441
+ network: "wemix",
442
+ name: "Wemix3.0 Mainnet",
443
+ type: "EVM" /* EVM */,
444
+ isTestnet: false,
445
+ explorer: "https://explorer.wemix.com",
446
+ website: "https://wemix.com",
447
+ nativeCurrency: {
448
+ name: "WEMIX",
449
+ symbol: "WEMIX",
450
+ decimals: 18
451
+ },
452
+ apiSupport: { tokens: true, nft: true, transactions: true },
453
+ signSupport: { legacy: true, eip1559: true }
454
+ },
455
+ // Wemix Testnet
456
+ 1112: {
457
+ chainId: 1112,
458
+ network: "wemix_testnet",
459
+ name: "Wemix3.0 Testnet",
460
+ type: "EVM" /* EVM */,
461
+ isTestnet: true,
462
+ explorer: "https://explorer.test.wemix.com",
463
+ website: "https://wemix.com",
464
+ nativeCurrency: {
465
+ name: "WEMIX",
466
+ symbol: "WEMIX",
467
+ decimals: 18
468
+ },
469
+ apiSupport: { tokens: true, nft: true, transactions: true },
470
+ signSupport: { legacy: true, eip1559: true }
471
+ },
472
+ // Taiko Mainnet
473
+ 167e3: {
474
+ chainId: 167e3,
475
+ network: "taiko",
476
+ name: "Taiko Mainnet",
477
+ type: "EVM" /* EVM */,
478
+ isTestnet: false,
479
+ explorer: "https://taikoscan.io",
480
+ website: "https://taiko.xyz",
481
+ nativeCurrency: {
482
+ name: "Ether",
483
+ symbol: "ETH",
484
+ decimals: 18
485
+ },
486
+ apiSupport: { tokens: true, nft: true, transactions: true },
487
+ signSupport: { legacy: true, eip1559: true }
488
+ },
489
+ // Taiko Hekla Testnet
490
+ 167009: {
491
+ chainId: 167009,
492
+ network: "taiko_hekla",
493
+ name: "Taiko Hekla Testnet",
494
+ type: "EVM" /* EVM */,
495
+ isTestnet: true,
496
+ explorer: "https://hekla.taikoscan.io",
497
+ website: "https://taiko.xyz",
498
+ nativeCurrency: {
499
+ name: "Ether",
500
+ symbol: "ETH",
501
+ decimals: 18
502
+ },
503
+ apiSupport: { tokens: true, nft: true, transactions: true },
504
+ signSupport: { legacy: true, eip1559: true }
505
+ },
506
+ // Base Mainnet
507
+ 8453: {
508
+ chainId: 8453,
509
+ network: "base",
510
+ name: "Base",
511
+ type: "EVM" /* EVM */,
512
+ isTestnet: false,
513
+ explorer: "https://basescan.org",
514
+ website: "https://base.org",
515
+ nativeCurrency: {
516
+ name: "Ether",
517
+ symbol: "ETH",
518
+ decimals: 18
519
+ },
520
+ apiSupport: { tokens: true, nft: true, transactions: true },
521
+ signSupport: { legacy: true, eip1559: true }
522
+ },
523
+ // Base Sepolia Testnet
524
+ 84532: {
525
+ chainId: 84532,
526
+ network: "base_sepolia",
527
+ name: "Base Sepolia",
528
+ type: "EVM" /* EVM */,
529
+ isTestnet: true,
530
+ explorer: "https://sepolia.basescan.org",
531
+ website: "https://base.org",
532
+ nativeCurrency: {
533
+ name: "Ether",
534
+ symbol: "ETH",
535
+ decimals: 18
536
+ },
537
+ apiSupport: { tokens: true, nft: true, transactions: true },
538
+ signSupport: { legacy: true, eip1559: true }
539
+ },
540
+ // ChainBounty Mainnet
541
+ 51828: {
542
+ chainId: 51828,
543
+ network: "chainbounty",
544
+ name: "ChainBounty Mainnet",
545
+ type: "EVM" /* EVM */,
546
+ isTestnet: false,
547
+ explorer: "https://scan.chainbounty.io",
548
+ website: "https://chainbounty.io",
549
+ nativeCurrency: {
550
+ name: "ChainBounty",
551
+ symbol: "CBY",
552
+ decimals: 18
553
+ },
554
+ apiSupport: { tokens: true, nft: true, transactions: true },
555
+ signSupport: { legacy: true, eip1559: true }
556
+ },
557
+ // ChainBounty Testnet
558
+ 56580: {
559
+ chainId: 56580,
560
+ network: "chainbounty_testnet",
561
+ name: "ChainBounty Testnet",
562
+ type: "EVM" /* EVM */,
563
+ isTestnet: true,
564
+ explorer: "https://test.scan.chainbounty.io",
565
+ website: "https://chainbounty.io",
566
+ nativeCurrency: {
567
+ name: "ChainBounty",
568
+ symbol: "CBY",
569
+ decimals: 18
570
+ },
571
+ apiSupport: { tokens: true, nft: true, transactions: true },
572
+ signSupport: { legacy: true, eip1559: true }
573
+ },
574
+ // Aptos Mainnet (Non-EVM)
575
+ aptos: {
576
+ chainId: null,
577
+ network: "aptos",
578
+ name: "Aptos",
579
+ type: "Non-EVM" /* NON_EVM */,
580
+ isTestnet: false,
581
+ explorer: "https://explorer.aptoslabs.com/?network=mainnet",
582
+ website: "https://aptos.dev",
583
+ nativeCurrency: {
584
+ name: "Aptos",
585
+ symbol: "APT",
586
+ decimals: 8
587
+ },
588
+ apiSupport: { tokens: true, nft: true, transactions: true },
589
+ signSupport: { legacy: true, eip1559: false }
590
+ },
591
+ // Aptos Testnet (Non-EVM)
592
+ aptos_testnet: {
593
+ chainId: null,
594
+ network: "aptos_testnet",
595
+ name: "Aptos Testnet",
596
+ type: "Non-EVM" /* NON_EVM */,
597
+ isTestnet: true,
598
+ explorer: "https://explorer.aptoslabs.com/?network=testnet",
599
+ website: "https://aptos.dev",
600
+ nativeCurrency: {
601
+ name: "Aptos",
602
+ symbol: "APT",
603
+ decimals: 8
604
+ },
605
+ apiSupport: { tokens: true, nft: true, transactions: true },
606
+ signSupport: { legacy: true, eip1559: false }
607
+ },
608
+ // Bitcoin Mainnet
609
+ bitcoin: {
610
+ chainId: null,
611
+ network: "bitcoin",
612
+ name: "Bitcoin Mainnet",
613
+ type: "Bitcoin" /* BITCOIN */,
614
+ isTestnet: false,
615
+ explorer: "https://blockstream.info",
616
+ website: "https://bitcoin.org",
617
+ nativeCurrency: {
618
+ name: "Bitcoin",
619
+ symbol: "BTC",
620
+ decimals: 8
621
+ },
622
+ apiSupport: { tokens: true, nft: false, transactions: true },
623
+ signSupport: { legacy: true, eip1559: false }
624
+ },
625
+ // Bitcoin Testnet
626
+ bitcoin_testnet: {
627
+ chainId: null,
628
+ network: "bitcoin_testnet",
629
+ name: "Bitcoin Testnet",
630
+ type: "Bitcoin" /* BITCOIN */,
631
+ isTestnet: true,
632
+ explorer: "https://blockstream.info/testnet",
633
+ website: "https://bitcoin.org",
634
+ nativeCurrency: {
635
+ name: "Bitcoin",
636
+ symbol: "BTC",
637
+ decimals: 8
638
+ },
639
+ apiSupport: { tokens: true, nft: false, transactions: true },
640
+ signSupport: { legacy: true, eip1559: false }
641
+ },
642
+ // Tron Mainnet
643
+ tron: {
644
+ chainId: null,
645
+ network: "tron",
646
+ name: "Tron Mainnet",
647
+ type: "TRX" /* TRON */,
648
+ isTestnet: false,
649
+ explorer: "https://tronscan.org",
650
+ website: "https://tron.network",
651
+ nativeCurrency: {
652
+ name: "Tronix",
653
+ symbol: "TRX",
654
+ decimals: 6
655
+ },
656
+ apiSupport: { tokens: true, nft: true, transactions: true },
657
+ signSupport: { legacy: true, eip1559: true }
658
+ },
659
+ // Tron Nile Testnet
660
+ tron_nile: {
661
+ chainId: null,
662
+ network: "tron_nile",
663
+ name: "Tron Nile Testnet",
664
+ type: "TRX" /* TRON */,
665
+ isTestnet: true,
666
+ explorer: "https://nile.tronscan.org",
667
+ website: "https://tron.network",
668
+ nativeCurrency: {
669
+ name: "Tronix",
670
+ symbol: "TRX",
671
+ decimals: 6
672
+ },
673
+ apiSupport: { tokens: true, nft: true, transactions: true },
674
+ signSupport: { legacy: true, eip1559: true }
675
+ },
676
+ // ICP Mainnet
677
+ icp: {
678
+ chainId: null,
679
+ network: "icp",
680
+ name: "Internet Computer",
681
+ type: "ICP" /* ICP */,
682
+ isTestnet: false,
683
+ explorer: "https://dashboard.internetcomputer.org",
684
+ website: "https://internetcomputer.org",
685
+ nativeCurrency: {
686
+ name: "ICP",
687
+ symbol: "ICP",
688
+ decimals: 8
689
+ },
690
+ apiSupport: { tokens: true, nft: true, transactions: true },
691
+ signSupport: { legacy: true, eip1559: true }
692
+ }
693
+ };
694
+ var NETWORK_BY_PARAM = Object.values(
695
+ NETWORK_CONFIGS
696
+ ).reduce(
697
+ (acc, config) => {
698
+ acc[config.network] = config;
699
+ return acc;
700
+ },
701
+ {}
702
+ );
703
+ function getNetworkName(chainId, fallback = "ethereum") {
704
+ return NETWORK_CONFIGS[chainId]?.network ?? fallback;
705
+ }
706
+ var CHAIN_ID_TO_KEY = {
707
+ // Mainnet
708
+ 1: "ethereum",
709
+ 42161: "arbitrum",
710
+ 8217: "kaia",
711
+ 56: "bsc",
712
+ 8453: "base",
713
+ 137: "polygon",
714
+ // Testnet
715
+ 11155111: "sepolia",
716
+ 421614: "arbitrumSepolia",
717
+ 1001: "kaiaKairos",
718
+ 97: "bscTestnet",
719
+ 84532: "baseSepolia",
720
+ 80002: "polygonAmoy",
721
+ 998: "hyperevmTestnet"
722
+ };
723
+ function getChainKey(chainId) {
724
+ const key = CHAIN_ID_TO_KEY[chainId];
725
+ if (!key) {
726
+ throw new Error(`Unsupported chainId for tx endpoint: ${chainId}`);
727
+ }
728
+ return key;
729
+ }
730
+
731
+ // src/wallets/walletConnectors/abcWallet/abcProvider.ts
732
+ var EventEmitter = class {
733
+ constructor() {
734
+ this.events = /* @__PURE__ */ new Map();
735
+ }
736
+ on(event, listener) {
737
+ if (!this.events.has(event)) {
738
+ this.events.set(event, []);
739
+ }
740
+ this.events.get(event).push(listener);
741
+ return this;
742
+ }
743
+ off(event, listener) {
744
+ const listeners = this.events.get(event);
745
+ if (listeners) {
746
+ const index = listeners.indexOf(listener);
747
+ if (index !== -1) {
748
+ listeners.splice(index, 1);
749
+ }
750
+ }
751
+ return this;
752
+ }
753
+ removeListener(event, listener) {
754
+ return this.off(event, listener);
755
+ }
756
+ emit(event, ...args) {
757
+ const listeners = this.events.get(event);
758
+ if (listeners) {
759
+ for (const listener of listeners) {
760
+ listener(...args);
761
+ }
762
+ return true;
763
+ }
764
+ return false;
765
+ }
766
+ removeAllListeners(event) {
767
+ if (event) {
768
+ this.events.delete(event);
769
+ } else {
770
+ this.events.clear();
771
+ }
772
+ return this;
773
+ }
774
+ };
775
+ var ProviderRpcError = class extends Error {
776
+ constructor(code, message, data) {
777
+ super(message);
778
+ this.code = code;
779
+ this.data = data;
780
+ this.name = "ProviderRpcError";
781
+ }
782
+ };
783
+ var ErrorCode = {
784
+ USER_REJECTED: 4001,
785
+ UNAUTHORIZED: 4100,
786
+ UNSUPPORTED_METHOD: 4200,
787
+ DISCONNECTED: 4900,
788
+ CHAIN_DISCONNECTED: 4901,
789
+ INVALID_PARAMS: -32602,
790
+ INTERNAL_ERROR: -32603
791
+ };
792
+ var AbcEvmProvider = class extends EventEmitter {
793
+ constructor(talkenApi) {
794
+ super();
795
+ this.wallet = null;
796
+ this.chainId = 1;
797
+ // Default to Ethereum mainnet
798
+ this.connected = false;
799
+ this.talkenApi = talkenApi;
800
+ }
801
+ /**
802
+ * Set wallet information
803
+ */
804
+ setWallet(wallet) {
805
+ const previousAddress = this.wallet?.address;
806
+ const previousChainId = this.chainId;
807
+ this.wallet = wallet;
808
+ this.chainId = wallet.chainId;
809
+ this.connected = true;
810
+ if (previousAddress !== wallet.address) {
811
+ this.emit("accountsChanged", [wallet.address]);
812
+ }
813
+ if (previousChainId !== wallet.chainId) {
814
+ this.emit("chainChanged", numberToHex(wallet.chainId));
815
+ }
816
+ this.emit("connect", { chainId: numberToHex(wallet.chainId) });
817
+ }
818
+ /**
819
+ * Clear wallet (disconnect)
820
+ */
821
+ clearWallet() {
822
+ this.wallet = null;
823
+ this.connected = false;
824
+ this.emit("disconnect", {
825
+ code: ErrorCode.DISCONNECTED,
826
+ message: "User disconnected"
827
+ });
828
+ this.emit("accountsChanged", []);
829
+ }
830
+ /**
831
+ * Set request interceptor for sign confirmation
832
+ * The interceptor is called before signing operations to show confirmation UI
833
+ */
834
+ setRequestInterceptor(interceptor) {
835
+ this.requestInterceptor = interceptor;
836
+ }
837
+ /**
838
+ * Set TalkenApiClient for backend-proxied transaction flow
839
+ * When set, transaction methods will use a single API call instead of multi-step WaaS
840
+ */
841
+ setTalkenApi(talkenApi) {
842
+ this.talkenApi = talkenApi;
843
+ }
844
+ getTalkenApiClientOrThrow() {
845
+ const api = this.talkenApi || getTalkenApiClient();
846
+ if (!api) {
847
+ throw new ProviderRpcError(
848
+ ErrorCode.INTERNAL_ERROR,
849
+ "TalkenApiClient not initialized"
850
+ );
851
+ }
852
+ return api;
853
+ }
854
+ /**
855
+ * Call request interceptor if configured
856
+ * Called by specific signing/transaction methods that need user confirmation
857
+ * @returns Resolved transaction with user modifications if changed in confirmation modal
858
+ */
859
+ async callInterceptor(method, params) {
860
+ if (!this.requestInterceptor) {
861
+ return void 0;
862
+ }
863
+ const request = {
864
+ method,
865
+ params,
866
+ chainId: this.chainId,
867
+ address: this.wallet?.address || ""
868
+ };
869
+ return this.requestInterceptor(request);
870
+ }
871
+ /**
872
+ * EIP-1193 request method
873
+ */
874
+ async request(args) {
875
+ const { method, params } = args;
876
+ switch (method) {
877
+ case "eth_requestAccounts":
878
+ return this.eth_requestAccounts();
879
+ case "eth_accounts":
880
+ return this.eth_accounts();
881
+ case "eth_chainId":
882
+ return this.eth_chainId();
883
+ case "eth_sendTransaction":
884
+ case "wallet_sendTransaction":
885
+ return this.eth_sendTransaction(params);
886
+ case "eth_signTransaction":
887
+ return this.eth_signTransaction(params);
888
+ case "personal_sign":
889
+ return this.personal_sign(params);
890
+ case "eth_sign":
891
+ return this.eth_sign(params);
892
+ case "eth_signTypedData":
893
+ case "eth_signTypedData_v3":
894
+ case "eth_signTypedData_v4":
895
+ return this.eth_signTypedData(params);
896
+ case "wallet_getCapabilities":
897
+ return this.wallet_getCapabilities();
898
+ case "eth_signAuthorization":
899
+ return this.eth_signAuthorization(params);
900
+ case "wallet_switchEthereumChain":
901
+ return this.wallet_switchEthereumChain(params);
902
+ case "wallet_addEthereumChain":
903
+ return this.wallet_addEthereumChain(params);
904
+ case "eth_estimateGas":
905
+ return this.eth_estimateGas(params);
906
+ case "eth_getTransactionCount":
907
+ return this.eth_getTransactionCount(
908
+ Array.isArray(params) ? params : []
909
+ );
910
+ case "eth_blockNumber":
911
+ case "eth_call":
912
+ case "eth_gasPrice":
913
+ case "eth_getBalance":
914
+ case "eth_getBlockByHash":
915
+ case "eth_getBlockByNumber":
916
+ case "eth_getCode":
917
+ case "eth_getStorageAt":
918
+ case "eth_getTransactionByHash":
919
+ case "eth_getTransactionReceipt":
920
+ throw new ProviderRpcError(
921
+ ErrorCode.UNSUPPORTED_METHOD,
922
+ `Method ${method} should be handled by RPC provider`
923
+ );
924
+ default:
925
+ throw new ProviderRpcError(
926
+ ErrorCode.UNSUPPORTED_METHOD,
927
+ `Method ${method} not supported`
928
+ );
929
+ }
930
+ }
931
+ /**
932
+ * Request accounts (EIP-1193)
933
+ */
934
+ async eth_requestAccounts() {
935
+ if (!this.wallet) {
936
+ throw new ProviderRpcError(
937
+ ErrorCode.UNAUTHORIZED,
938
+ "Wallet not connected"
939
+ );
940
+ }
941
+ return [this.wallet.address];
942
+ }
943
+ /**
944
+ * Get accounts
945
+ */
946
+ async eth_accounts() {
947
+ if (!this.wallet) {
948
+ return [];
949
+ }
950
+ return [this.wallet.address];
951
+ }
952
+ /**
953
+ * Get chain ID
954
+ */
955
+ async eth_chainId() {
956
+ return numberToHex(this.chainId);
957
+ }
958
+ /**
959
+ * Send transaction
960
+ */
961
+ async eth_sendTransaction(params) {
962
+ if (!this.wallet) {
963
+ throw new ProviderRpcError(
964
+ ErrorCode.UNAUTHORIZED,
965
+ "Wallet not connected"
966
+ );
967
+ }
968
+ if (!Array.isArray(params) || params.length === 0) {
969
+ throw new ProviderRpcError(
970
+ ErrorCode.INVALID_PARAMS,
971
+ "Invalid transaction params"
972
+ );
973
+ }
974
+ const resolved = await this.callInterceptor("eth_sendTransaction", params);
975
+ const tx = params[0];
976
+ console.log("[AbcProvider] eth_sendTransaction incoming gas params:", {
977
+ gas: tx.gas ?? tx.gasLimit,
978
+ gasPrice: tx.gasPrice,
979
+ maxFeePerGas: tx.maxFeePerGas,
980
+ maxPriorityFeePerGas: tx.maxPriorityFeePerGas
981
+ });
982
+ if (resolved) {
983
+ if (resolved.data) {
984
+ tx.data = resolved.data;
985
+ }
986
+ if (resolved.gasFee?.maxFeePerGas) {
987
+ try {
988
+ const maxFeeWei = parseGwei(resolved.gasFee.maxFeePerGas);
989
+ tx.maxFeePerGas = `0x${maxFeeWei.toString(16)}`;
990
+ } catch (error) {
991
+ console.error(
992
+ "[AbcProvider] \u274C Failed to parse maxFeePerGas:",
993
+ error
994
+ );
995
+ }
996
+ }
997
+ if (resolved.gasFee?.maxPriorityFeePerGas) {
998
+ try {
999
+ const priorityFeeWei = parseGwei(
1000
+ resolved.gasFee.maxPriorityFeePerGas
1001
+ );
1002
+ tx.maxPriorityFeePerGas = `0x${priorityFeeWei.toString(16)}`;
1003
+ } catch (error) {
1004
+ console.error(
1005
+ "[AbcProvider] \u274C Failed to parse maxPriorityFeePerGas:",
1006
+ error
1007
+ );
1008
+ }
1009
+ }
1010
+ }
1011
+ console.log("[AbcProvider] eth_sendTransaction final gas params:", {
1012
+ gas: tx.gas ?? tx.gasLimit,
1013
+ gasPrice: tx.gasPrice,
1014
+ maxFeePerGas: tx.maxFeePerGas,
1015
+ maxPriorityFeePerGas: tx.maxPriorityFeePerGas
1016
+ });
1017
+ const isContractDeployment = !tx.to || tx.to === "0x" || tx.to === "0x0" || tx.to === "0x0000000000000000000000000000000000000000";
1018
+ if (isContractDeployment) {
1019
+ tx.to = "0x";
1020
+ } else if (!tx.to) {
1021
+ throw new ProviderRpcError(
1022
+ ErrorCode.INVALID_PARAMS,
1023
+ 'Transaction must have "to" field'
1024
+ );
1025
+ }
1026
+ const pinHash = localStorage.getItem("talkenkit_abc_pin_hash");
1027
+ if (!pinHash) {
1028
+ throw new ProviderRpcError(
1029
+ ErrorCode.INTERNAL_ERROR,
1030
+ "PIN hash not found. Please login again."
1031
+ );
1032
+ }
1033
+ const hexValue = tx.value || "0x0";
1034
+ const amountWei = BigInt(hexValue).toString();
1035
+ const api = this.getTalkenApiClientOrThrow();
1036
+ const result = await api.evm.sendTransaction({
1037
+ chainKey: getChainKey(this.chainId),
1038
+ to: tx.to,
1039
+ amountWei,
1040
+ pin: pinHash,
1041
+ data: tx.data || "0x",
1042
+ gasLimit: tx.gas || tx.gasLimit,
1043
+ maxFeePerGas: tx.maxFeePerGas,
1044
+ maxPriorityFeePerGas: tx.maxPriorityFeePerGas
1045
+ });
1046
+ return result.txHash;
1047
+ }
1048
+ /**
1049
+ * Sign transaction (without sending)
1050
+ */
1051
+ async eth_signTransaction(params) {
1052
+ if (!this.wallet) {
1053
+ throw new ProviderRpcError(
1054
+ ErrorCode.UNAUTHORIZED,
1055
+ "Wallet not connected"
1056
+ );
1057
+ }
1058
+ if (!Array.isArray(params) || params.length === 0) {
1059
+ throw new ProviderRpcError(
1060
+ ErrorCode.INVALID_PARAMS,
1061
+ "Invalid transaction params"
1062
+ );
1063
+ }
1064
+ const resolved = await this.callInterceptor("eth_signTransaction", params);
1065
+ const tx = params[0];
1066
+ if (resolved) {
1067
+ if (resolved.data) {
1068
+ tx.data = resolved.data;
1069
+ }
1070
+ if (resolved.gasFee?.maxFeePerGas) {
1071
+ try {
1072
+ const maxFeeWei = parseGwei(resolved.gasFee.maxFeePerGas);
1073
+ tx.maxFeePerGas = `0x${maxFeeWei.toString(16)}`;
1074
+ } catch (error) {
1075
+ console.error(
1076
+ "[AbcProvider] \u274C Failed to parse maxFeePerGas:",
1077
+ error
1078
+ );
1079
+ }
1080
+ }
1081
+ if (resolved.gasFee?.maxPriorityFeePerGas) {
1082
+ try {
1083
+ const priorityFeeWei = parseGwei(
1084
+ resolved.gasFee.maxPriorityFeePerGas
1085
+ );
1086
+ tx.maxPriorityFeePerGas = `0x${priorityFeeWei.toString(16)}`;
1087
+ } catch (error) {
1088
+ console.error(
1089
+ "[AbcProvider] \u274C Failed to parse maxPriorityFeePerGas:",
1090
+ error
1091
+ );
1092
+ }
1093
+ }
1094
+ }
1095
+ const api = this.getTalkenApiClientOrThrow();
1096
+ const result = await api.evm.signTransaction({
1097
+ network: getNetworkName(this.chainId),
1098
+ to: tx.to,
1099
+ value: tx.value || "0x0",
1100
+ data: tx.data || "0x",
1101
+ gasLimit: tx.gas || tx.gasLimit,
1102
+ maxFeePerGas: tx.maxFeePerGas,
1103
+ maxPriorityFeePerGas: tx.maxPriorityFeePerGas,
1104
+ nonce: tx.nonce ? String(Number.parseInt(tx.nonce, 16)) : void 0
1105
+ });
1106
+ return result.signature;
1107
+ }
1108
+ /**
1109
+ * Personal sign (EIP-191)
1110
+ */
1111
+ async personal_sign(params) {
1112
+ if (!this.wallet) {
1113
+ console.error("[AbcProvider] \u274C Wallet not connected");
1114
+ throw new ProviderRpcError(
1115
+ ErrorCode.UNAUTHORIZED,
1116
+ "Wallet not connected"
1117
+ );
1118
+ }
1119
+ if (!Array.isArray(params) || params.length < 2) {
1120
+ console.error("[AbcProvider] \u274C Invalid params:", params);
1121
+ throw new ProviderRpcError(
1122
+ ErrorCode.INVALID_PARAMS,
1123
+ "Invalid personal_sign params"
1124
+ );
1125
+ }
1126
+ await this.callInterceptor("personal_sign", params);
1127
+ const [message, address] = params;
1128
+ if (address.toLowerCase() !== this.wallet.address.toLowerCase()) {
1129
+ console.error("[AbcProvider] \u274C Address mismatch");
1130
+ throw new ProviderRpcError(
1131
+ ErrorCode.INVALID_PARAMS,
1132
+ "Address does not match connected wallet"
1133
+ );
1134
+ }
1135
+ const api = this.getTalkenApiClientOrThrow();
1136
+ const network = getNetworkName(this.chainId);
1137
+ const pinHash = localStorage.getItem("talkenkit_abc_pin_hash") || void 0;
1138
+ const result = await api.evm.signPersonal({
1139
+ network,
1140
+ message,
1141
+ address,
1142
+ pin: pinHash
1143
+ });
1144
+ return result.signature;
1145
+ }
1146
+ /**
1147
+ * Eth sign
1148
+ */
1149
+ async eth_sign(params) {
1150
+ if (!Array.isArray(params) || params.length < 2) {
1151
+ throw new ProviderRpcError(
1152
+ ErrorCode.INVALID_PARAMS,
1153
+ "Invalid eth_sign params"
1154
+ );
1155
+ }
1156
+ const [address, message] = params;
1157
+ return this.personal_sign([message, address]);
1158
+ }
1159
+ /**
1160
+ * Sign typed data (EIP-712)
1161
+ */
1162
+ async eth_signTypedData(params) {
1163
+ if (!this.wallet) {
1164
+ throw new ProviderRpcError(
1165
+ ErrorCode.UNAUTHORIZED,
1166
+ "Wallet not connected"
1167
+ );
1168
+ }
1169
+ if (!Array.isArray(params) || params.length < 2) {
1170
+ throw new ProviderRpcError(
1171
+ ErrorCode.INVALID_PARAMS,
1172
+ "Invalid signTypedData params"
1173
+ );
1174
+ }
1175
+ await this.callInterceptor("eth_signTypedData_v4", params);
1176
+ const [address, typedData] = params;
1177
+ if (address.toLowerCase() !== this.wallet.address.toLowerCase()) {
1178
+ throw new ProviderRpcError(
1179
+ ErrorCode.INVALID_PARAMS,
1180
+ "Address does not match connected wallet"
1181
+ );
1182
+ }
1183
+ const api = this.getTalkenApiClientOrThrow();
1184
+ const network = getNetworkName(this.chainId);
1185
+ const pinHash = localStorage.getItem("talkenkit_abc_pin_hash") || void 0;
1186
+ const result = await api.evm.signTypedData({
1187
+ network,
1188
+ typedData: typeof typedData === "string" ? typedData : JSON.stringify(typedData),
1189
+ pin: pinHash,
1190
+ email: this.wallet.email
1191
+ });
1192
+ return result.signature;
1193
+ }
1194
+ /**
1195
+ * Return normalized wallet capabilities for ABC embedded wallets.
1196
+ * ABC supports EIP-7702 authorization signing via talken-api.
1197
+ */
1198
+ async wallet_getCapabilities() {
1199
+ return {
1200
+ supportsTypedDataV4: true,
1201
+ supports7702Authorization: true,
1202
+ supports5792Batch: false,
1203
+ supportsPaymasterService: false,
1204
+ supportsPermit2RelayHints: true,
1205
+ walletType: "abc-embedded"
1206
+ };
1207
+ }
1208
+ /**
1209
+ * Sign EIP-7702 authorization via Talken API.
1210
+ */
1211
+ async eth_signAuthorization(params) {
1212
+ if (!this.wallet) {
1213
+ throw new ProviderRpcError(
1214
+ ErrorCode.UNAUTHORIZED,
1215
+ "Wallet not connected"
1216
+ );
1217
+ }
1218
+ if (!Array.isArray(params) || params.length < 2) {
1219
+ throw new ProviderRpcError(
1220
+ ErrorCode.INVALID_PARAMS,
1221
+ "Invalid signAuthorization params"
1222
+ );
1223
+ }
1224
+ const [address, authorization] = params;
1225
+ if (address.toLowerCase() !== this.wallet.address.toLowerCase()) {
1226
+ throw new ProviderRpcError(
1227
+ ErrorCode.INVALID_PARAMS,
1228
+ "Address does not match connected wallet"
1229
+ );
1230
+ }
1231
+ if (!authorization?.address || authorization.chainId == null || authorization.nonce == null) {
1232
+ throw new ProviderRpcError(
1233
+ ErrorCode.INVALID_PARAMS,
1234
+ "Authorization payload is incomplete"
1235
+ );
1236
+ }
1237
+ await this.callInterceptor("eth_signAuthorization", params);
1238
+ const api = this.getTalkenApiClientOrThrow();
1239
+ const network = getNetworkName(this.chainId);
1240
+ const pinHash = localStorage.getItem("talkenkit_abc_pin_hash") || void 0;
1241
+ const chainIdValue = typeof authorization.chainId === "string" ? Number(BigInt(authorization.chainId)) : Number(authorization.chainId);
1242
+ const nonceValue = typeof authorization.nonce === "string" ? BigInt(authorization.nonce).toString() : String(authorization.nonce);
1243
+ const result = await api.evm.signAuthorization({
1244
+ network,
1245
+ authorization: {
1246
+ chainId: chainIdValue,
1247
+ address: authorization.address,
1248
+ nonce: nonceValue
1249
+ },
1250
+ pin: pinHash,
1251
+ email: this.wallet.email
1252
+ });
1253
+ return result.authorization;
1254
+ }
1255
+ /**
1256
+ * Switch Ethereum chain
1257
+ */
1258
+ async wallet_switchEthereumChain(params) {
1259
+ if (!Array.isArray(params) || params.length === 0) {
1260
+ throw new ProviderRpcError(
1261
+ ErrorCode.INVALID_PARAMS,
1262
+ "Invalid switchEthereumChain params"
1263
+ );
1264
+ }
1265
+ const { chainId } = params[0];
1266
+ const newChainId = hexToNumber(chainId);
1267
+ if (this.chainId === newChainId) {
1268
+ return null;
1269
+ }
1270
+ const _previousChainId = this.chainId;
1271
+ this.chainId = newChainId;
1272
+ if (this.wallet) {
1273
+ this.wallet.chainId = newChainId;
1274
+ }
1275
+ this.emit("chainChanged", numberToHex(newChainId));
1276
+ return null;
1277
+ }
1278
+ /**
1279
+ * Add Ethereum chain
1280
+ */
1281
+ async wallet_addEthereumChain(params) {
1282
+ return this.wallet_switchEthereumChain(params);
1283
+ }
1284
+ /**
1285
+ * Get transaction count (nonce) using ABC WaaS API
1286
+ */
1287
+ async eth_getTransactionCount(params) {
1288
+ const address = params[0]?.toLowerCase();
1289
+ if (!address) {
1290
+ throw new ProviderRpcError(
1291
+ ErrorCode.INVALID_PARAMS,
1292
+ "Missing address parameter"
1293
+ );
1294
+ }
1295
+ const currentChainId = this.chainId;
1296
+ try {
1297
+ const api = this.getTalkenApiClientOrThrow();
1298
+ const response = await api.evm.getNonce(
1299
+ getNetworkName(currentChainId),
1300
+ address
1301
+ );
1302
+ const nonce = response.result !== void 0 ? typeof response.result === "number" ? `0x${response.result.toString(16)}` : response.result : void 0;
1303
+ if (!nonce) {
1304
+ throw new Error("No result in nonce response");
1305
+ }
1306
+ return nonce;
1307
+ } catch (error) {
1308
+ console.error(
1309
+ "[AbcEvmProvider] \u274C Failed to get transaction count from ABC WaaS:",
1310
+ error
1311
+ );
1312
+ throw new ProviderRpcError(
1313
+ ErrorCode.INTERNAL_ERROR,
1314
+ `Failed to get transaction count: ${error instanceof Error ? error.message : String(error)}`
1315
+ );
1316
+ }
1317
+ }
1318
+ /**
1319
+ * Estimate gas for transaction
1320
+ * Uses ABC WaaS gas estimation API with fallback
1321
+ */
1322
+ async eth_estimateGas(params) {
1323
+ if (!Array.isArray(params) || params.length === 0) {
1324
+ throw new ProviderRpcError(
1325
+ ErrorCode.INVALID_PARAMS,
1326
+ "Invalid estimateGas params"
1327
+ );
1328
+ }
1329
+ const tx = params[0];
1330
+ if (!tx.to) {
1331
+ throw new ProviderRpcError(
1332
+ ErrorCode.INVALID_PARAMS,
1333
+ 'Transaction must have "to" field'
1334
+ );
1335
+ }
1336
+ try {
1337
+ const response = await this.getTalkenApiClientOrThrow().evm.estimateGas({
1338
+ network: getNetworkName(this.chainId),
1339
+ from: tx.from || this.wallet?.address || "",
1340
+ to: tx.to,
1341
+ value: tx.value,
1342
+ data: tx.data
1343
+ });
1344
+ if (!response.result) {
1345
+ throw new Error("No result in gas estimate response");
1346
+ }
1347
+ return response.result;
1348
+ } catch (error) {
1349
+ console.warn(
1350
+ "[AbcEvmProvider] Gas estimation failed, using fallback:",
1351
+ error
1352
+ );
1353
+ if (tx.data && tx.data !== "0x") {
1354
+ return "0x493e0";
1355
+ }
1356
+ return "0x5208";
1357
+ }
1358
+ }
1359
+ /**
1360
+ * Check if connected
1361
+ */
1362
+ isConnected() {
1363
+ return this.connected;
1364
+ }
1365
+ /**
1366
+ * Get current wallet
1367
+ */
1368
+ getWallet() {
1369
+ return this.wallet;
1370
+ }
1371
+ /**
1372
+ * Get current chain ID
1373
+ */
1374
+ getChainId() {
1375
+ return this.chainId;
1376
+ }
1377
+ };
1378
+ function createAbcEvmProvider(talkenApi) {
1379
+ return new AbcEvmProvider(talkenApi);
1380
+ }
1381
+ var createAbcProvider = createAbcEvmProvider;
1382
+
1383
+ export {
1384
+ AbcEvmProvider,
1385
+ createAbcEvmProvider,
1386
+ createAbcProvider
1387
+ };