@talken/talkenkit 2.7.0 → 2.7.2

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 (232) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +2 -2
  3. package/dist/chunk-PUVP4PUZ.js +85 -0
  4. package/dist/chunk-V22G3VGP.js +84 -0
  5. package/dist/components/ConfirmationModal/ConfirmationThemeContext.d.ts +12 -0
  6. package/dist/components/RainbowKitProvider/RainbowKitProvider.d.ts +10 -3
  7. package/dist/index.css +14 -14
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.js +1060 -976
  10. package/dist/themes/baseTheme.d.ts +16 -0
  11. package/dist/themes/darkTheme.d.ts +16 -1
  12. package/dist/themes/darkTheme.js +1 -1
  13. package/dist/themes/lightTheme.d.ts +16 -1
  14. package/dist/themes/lightTheme.js +1 -1
  15. package/dist/wallets/walletConnectors/{chunk-H2HUW5JH.js → chunk-GJR24TNY.js} +10 -6
  16. package/dist/wallets/walletConnectors/{chunk-BHEVY4QY.js → chunk-J3LZTPT7.js} +167 -17
  17. package/dist/wallets/walletConnectors/{chunk-DW36LXIV.js → chunk-JAFN4XCH.js} +4 -4
  18. package/dist/wallets/walletConnectors/{chunk-I6ISQP34.js → chunk-JWBNZ6QQ.js} +2 -2
  19. package/dist/wallets/walletConnectors/{chunk-JADQLTFW.js → chunk-Q3XYO62J.js} +3 -3
  20. package/dist/wallets/walletConnectors/{chunk-QEDCPITY.js → chunk-USJWXPX3.js} +16 -13
  21. package/dist/wallets/walletConnectors/index.js +35 -35
  22. package/package.json +13 -13
  23. package/dist/AbcCredentialManager-DDHLW2IH.js +0 -7
  24. package/dist/abcWallet-2BVT5XFX.js +0 -161
  25. package/dist/abcWallet-BFCI4NEM.js +0 -162
  26. package/dist/abcWallet-MNJ2CACG.js +0 -162
  27. package/dist/abcWallet-QJ5BKEXW.js +0 -162
  28. package/dist/abcWallet-XBPHUTFQ.js +0 -172
  29. package/dist/abcWallet-ZCHM5OL7.js +0 -162
  30. package/dist/chunk-ALBABQ53.js +0 -354
  31. package/dist/chunk-D3AVQQJG.js +0 -5703
  32. package/dist/chunk-KOK5ZBR4.js +0 -5447
  33. package/dist/chunk-MXXQYQP6.js +0 -6233
  34. package/dist/chunk-VMJ25FLU.js +0 -6236
  35. package/dist/chunk-WPRIYR63.js +0 -6206
  36. package/dist/chunk-YORGXWYS.js +0 -6232
  37. package/dist/wallets/walletConnectors/abcWallet/AbstractChainProvider.d.ts +0 -67
  38. package/dist/wallets/walletConnectors/abcWallet/AbstractChainProvider.js +0 -10
  39. package/dist/wallets/walletConnectors/abcWallet/EventEmitter.d.ts +0 -12
  40. package/dist/wallets/walletConnectors/abcWallet/EventEmitter.js +0 -7
  41. package/dist/wallets/walletConnectors/abcWallet/ProviderError.d.ts +0 -42
  42. package/dist/wallets/walletConnectors/abcWallet/ProviderError.js +0 -17
  43. package/dist/wallets/walletConnectors/chunk-23ABL6OP.js +0 -65
  44. package/dist/wallets/walletConnectors/chunk-2647P3SA.js +0 -103
  45. package/dist/wallets/walletConnectors/chunk-26RJNF7V.js +0 -48
  46. package/dist/wallets/walletConnectors/chunk-2N244XPQ.js +0 -380
  47. package/dist/wallets/walletConnectors/chunk-2W6UBYKX.js +0 -66
  48. package/dist/wallets/walletConnectors/chunk-34GT4R3A.js +0 -501
  49. package/dist/wallets/walletConnectors/chunk-35YXKHTA.js +0 -93
  50. package/dist/wallets/walletConnectors/chunk-3DSTZ3UG.js +0 -30
  51. package/dist/wallets/walletConnectors/chunk-3IVTKZ7V.js +0 -87
  52. package/dist/wallets/walletConnectors/chunk-3MNX7E5G.js +0 -101
  53. package/dist/wallets/walletConnectors/chunk-3OO564GS.js +0 -49
  54. package/dist/wallets/walletConnectors/chunk-3RMYBZQG.js +0 -46
  55. package/dist/wallets/walletConnectors/chunk-4666JD5V.js +0 -333
  56. package/dist/wallets/walletConnectors/chunk-4L5UWERJ.js +0 -66
  57. package/dist/wallets/walletConnectors/chunk-4M2YTGZ3.js +0 -66
  58. package/dist/wallets/walletConnectors/chunk-4T3UOJYR.js +0 -76
  59. package/dist/wallets/walletConnectors/chunk-4XASX4ZB.js +0 -96
  60. package/dist/wallets/walletConnectors/chunk-53IBFGVW.js +0 -102
  61. package/dist/wallets/walletConnectors/chunk-5CPUXQYD.js +0 -73
  62. package/dist/wallets/walletConnectors/chunk-5NM2LK2G.js +0 -95
  63. package/dist/wallets/walletConnectors/chunk-5QHPQU7J.js +0 -55
  64. package/dist/wallets/walletConnectors/chunk-5UITEZJU.js +0 -121
  65. package/dist/wallets/walletConnectors/chunk-5VWKDJXD.js +0 -93
  66. package/dist/wallets/walletConnectors/chunk-6BGUJ5Q6.js +0 -96
  67. package/dist/wallets/walletConnectors/chunk-6C3GUS6I.js +0 -73
  68. package/dist/wallets/walletConnectors/chunk-6SUL2VHF.js +0 -32
  69. package/dist/wallets/walletConnectors/chunk-6UGYPEQE.js +0 -56
  70. package/dist/wallets/walletConnectors/chunk-6WF4SXLB.js +0 -156
  71. package/dist/wallets/walletConnectors/chunk-7URFB6QL.js +0 -51
  72. package/dist/wallets/walletConnectors/chunk-7VF7KE2P.js +0 -45
  73. package/dist/wallets/walletConnectors/chunk-A2XAHJNR.js +0 -66
  74. package/dist/wallets/walletConnectors/chunk-A66MTFML.js +0 -223
  75. package/dist/wallets/walletConnectors/chunk-A6NLGFMN.js +0 -49
  76. package/dist/wallets/walletConnectors/chunk-ACLPF2UW.js +0 -96
  77. package/dist/wallets/walletConnectors/chunk-AKLKCDXT.js +0 -186
  78. package/dist/wallets/walletConnectors/chunk-ATQWOE4J.js +0 -110
  79. package/dist/wallets/walletConnectors/chunk-B4IG5R5M.js +0 -53
  80. package/dist/wallets/walletConnectors/chunk-B6DM7J4N.js +0 -71
  81. package/dist/wallets/walletConnectors/chunk-BJ3DTYZ7.js +0 -87
  82. package/dist/wallets/walletConnectors/chunk-BJYSWRV6.js +0 -93
  83. package/dist/wallets/walletConnectors/chunk-BKQPOZI3.js +0 -102
  84. package/dist/wallets/walletConnectors/chunk-BXH3GDX5.js +0 -273
  85. package/dist/wallets/walletConnectors/chunk-C7S72VGD.js +0 -93
  86. package/dist/wallets/walletConnectors/chunk-CABLJOMU.js +0 -194
  87. package/dist/wallets/walletConnectors/chunk-CBKU2ERC.js +0 -54
  88. package/dist/wallets/walletConnectors/chunk-CCM24R6M.js +0 -76
  89. package/dist/wallets/walletConnectors/chunk-CCZUA25H.js +0 -102
  90. package/dist/wallets/walletConnectors/chunk-CFBCIVO2.js +0 -26
  91. package/dist/wallets/walletConnectors/chunk-CFJEBVAU.js +0 -94
  92. package/dist/wallets/walletConnectors/chunk-CP45RGL4.js +0 -45
  93. package/dist/wallets/walletConnectors/chunk-CULIWWLV.js +0 -101
  94. package/dist/wallets/walletConnectors/chunk-CYYTCX6W.js +0 -95
  95. package/dist/wallets/walletConnectors/chunk-D7U5WEH2.js +0 -96
  96. package/dist/wallets/walletConnectors/chunk-DDW42EKN.js +0 -91
  97. package/dist/wallets/walletConnectors/chunk-DGVQMUPS.js +0 -27
  98. package/dist/wallets/walletConnectors/chunk-DIWTXF2C.js +0 -76
  99. package/dist/wallets/walletConnectors/chunk-DJPJQZX4.js +0 -94
  100. package/dist/wallets/walletConnectors/chunk-DLVLYRV4.js +0 -108
  101. package/dist/wallets/walletConnectors/chunk-DMQ4RXIY.js +0 -55
  102. package/dist/wallets/walletConnectors/chunk-DPME4O44.js +0 -87
  103. package/dist/wallets/walletConnectors/chunk-DPTDOCWL.js +0 -205
  104. package/dist/wallets/walletConnectors/chunk-DSTY7YNG.js +0 -96
  105. package/dist/wallets/walletConnectors/chunk-DVLTKWTZ.js +0 -91
  106. package/dist/wallets/walletConnectors/chunk-DVXPOWEC.js +0 -52
  107. package/dist/wallets/walletConnectors/chunk-DW37ROR6.js +0 -98
  108. package/dist/wallets/walletConnectors/chunk-DZB25PZ7.js +0 -45
  109. package/dist/wallets/walletConnectors/chunk-E4UMOJTY.js +0 -66
  110. package/dist/wallets/walletConnectors/chunk-EFYKBPOB.js +0 -53
  111. package/dist/wallets/walletConnectors/chunk-EM6BREIH.js +0 -108
  112. package/dist/wallets/walletConnectors/chunk-EYN3CVFM.js +0 -26
  113. package/dist/wallets/walletConnectors/chunk-F2AMOWPX.js +0 -96
  114. package/dist/wallets/walletConnectors/chunk-F2HJ4GJ2.js +0 -94
  115. package/dist/wallets/walletConnectors/chunk-F3ZQ26OQ.js +0 -96
  116. package/dist/wallets/walletConnectors/chunk-F7IHQMO4.js +0 -50
  117. package/dist/wallets/walletConnectors/chunk-FBI7UGNO.js +0 -95
  118. package/dist/wallets/walletConnectors/chunk-FBJ5H6PM.js +0 -300
  119. package/dist/wallets/walletConnectors/chunk-FXDRSDNB.js +0 -98
  120. package/dist/wallets/walletConnectors/chunk-G6SV7RAS.js +0 -58
  121. package/dist/wallets/walletConnectors/chunk-GDGRUMZB.js +0 -17
  122. package/dist/wallets/walletConnectors/chunk-GF7RKBNV.js +0 -96
  123. package/dist/wallets/walletConnectors/chunk-GILMNC3J.js +0 -96
  124. package/dist/wallets/walletConnectors/chunk-GJ4CJL7F.js +0 -57
  125. package/dist/wallets/walletConnectors/chunk-H2QKR36C.js +0 -27
  126. package/dist/wallets/walletConnectors/chunk-H4VBRXN6.js +0 -83
  127. package/dist/wallets/walletConnectors/chunk-H4VSZRGU.js +0 -55
  128. package/dist/wallets/walletConnectors/chunk-H7BUMNEW.js +0 -95
  129. package/dist/wallets/walletConnectors/chunk-HDQGXV3R.js +0 -46
  130. package/dist/wallets/walletConnectors/chunk-HKMJ67FD.js +0 -37
  131. package/dist/wallets/walletConnectors/chunk-HQBZ7PGP.js +0 -186
  132. package/dist/wallets/walletConnectors/chunk-HQO76VJR.js +0 -1470
  133. package/dist/wallets/walletConnectors/chunk-HVRLX7AA.js +0 -66
  134. package/dist/wallets/walletConnectors/chunk-I6ONK6DO.js +0 -95
  135. package/dist/wallets/walletConnectors/chunk-I6W6WEWT.js +0 -108
  136. package/dist/wallets/walletConnectors/chunk-IL6T5D4L.js +0 -362
  137. package/dist/wallets/walletConnectors/chunk-IM7DEERX.js +0 -585
  138. package/dist/wallets/walletConnectors/chunk-IPBHKWE2.js +0 -56
  139. package/dist/wallets/walletConnectors/chunk-ITLTDJ3D.js +0 -101
  140. package/dist/wallets/walletConnectors/chunk-J3YPHDHM.js +0 -827
  141. package/dist/wallets/walletConnectors/chunk-J6CYMZSQ.js +0 -101
  142. package/dist/wallets/walletConnectors/chunk-JBVBQUCS.js +0 -73
  143. package/dist/wallets/walletConnectors/chunk-JCCRWFI3.js +0 -110
  144. package/dist/wallets/walletConnectors/chunk-JKMRKLME.js +0 -69
  145. package/dist/wallets/walletConnectors/chunk-JWO4ZQLK.js +0 -98
  146. package/dist/wallets/walletConnectors/chunk-JYCEB5ON.js +0 -50
  147. package/dist/wallets/walletConnectors/chunk-K6GEK4JB.js +0 -66
  148. package/dist/wallets/walletConnectors/chunk-K6UZPSBG.js +0 -94
  149. package/dist/wallets/walletConnectors/chunk-KBM7EYHR.js +0 -58
  150. package/dist/wallets/walletConnectors/chunk-KE6RMEB7.js +0 -93
  151. package/dist/wallets/walletConnectors/chunk-KGH4QAHQ.js +0 -96
  152. package/dist/wallets/walletConnectors/chunk-KM55XFBI.js +0 -65
  153. package/dist/wallets/walletConnectors/chunk-KNITZFAP.js +0 -378
  154. package/dist/wallets/walletConnectors/chunk-KVQ4CBWP.js +0 -71
  155. package/dist/wallets/walletConnectors/chunk-L3HWFGTN.js +0 -843
  156. package/dist/wallets/walletConnectors/chunk-L6WDO3ZN.js +0 -445
  157. package/dist/wallets/walletConnectors/chunk-LBG7ZBQY.js +0 -273
  158. package/dist/wallets/walletConnectors/chunk-LGCRA2U5.js +0 -98
  159. package/dist/wallets/walletConnectors/chunk-LJJRLODJ.js +0 -17
  160. package/dist/wallets/walletConnectors/chunk-LRMXMK73.js +0 -407
  161. package/dist/wallets/walletConnectors/chunk-LRYS2XBT.js +0 -110
  162. package/dist/wallets/walletConnectors/chunk-MBBGZGXF.js +0 -86
  163. package/dist/wallets/walletConnectors/chunk-MO2AXXLI.js +0 -30
  164. package/dist/wallets/walletConnectors/chunk-MUJPEDFF.js +0 -93
  165. package/dist/wallets/walletConnectors/chunk-NHZMJSPE.js +0 -98
  166. package/dist/wallets/walletConnectors/chunk-NLA45GHJ.js +0 -300
  167. package/dist/wallets/walletConnectors/chunk-NMVFC2I3.js +0 -45
  168. package/dist/wallets/walletConnectors/chunk-NN4KGG3I.js +0 -45
  169. package/dist/wallets/walletConnectors/chunk-NSEEU5C7.js +0 -66
  170. package/dist/wallets/walletConnectors/chunk-NU3ITJNK.js +0 -1485
  171. package/dist/wallets/walletConnectors/chunk-NULM3THX.js +0 -241
  172. package/dist/wallets/walletConnectors/chunk-OAVY2K7F.js +0 -73
  173. package/dist/wallets/walletConnectors/chunk-OK4EYIVU.js +0 -378
  174. package/dist/wallets/walletConnectors/chunk-OMOYFHBT.js +0 -1485
  175. package/dist/wallets/walletConnectors/chunk-OOCL4OPQ.js +0 -378
  176. package/dist/wallets/walletConnectors/chunk-OQO5G6D5.js +0 -95
  177. package/dist/wallets/walletConnectors/chunk-OWSLCYOF.js +0 -103
  178. package/dist/wallets/walletConnectors/chunk-OX3PQBV2.js +0 -53
  179. package/dist/wallets/walletConnectors/chunk-PEMOUMS3.js +0 -45
  180. package/dist/wallets/walletConnectors/chunk-PHF4VWKP.js +0 -51
  181. package/dist/wallets/walletConnectors/chunk-PHROL2KX.js +0 -71
  182. package/dist/wallets/walletConnectors/chunk-PKSDTWUF.js +0 -94
  183. package/dist/wallets/walletConnectors/chunk-PVPSVCVQ.js +0 -96
  184. package/dist/wallets/walletConnectors/chunk-PZTCKFMV.js +0 -52
  185. package/dist/wallets/walletConnectors/chunk-QD3GTY5X.js +0 -98
  186. package/dist/wallets/walletConnectors/chunk-QSR4D74E.js +0 -378
  187. package/dist/wallets/walletConnectors/chunk-R5EIXDO7.js +0 -98
  188. package/dist/wallets/walletConnectors/chunk-RCZCJUTR.js +0 -95
  189. package/dist/wallets/walletConnectors/chunk-S2PY4MDO.js +0 -108
  190. package/dist/wallets/walletConnectors/chunk-S6PEOLL3.js +0 -91
  191. package/dist/wallets/walletConnectors/chunk-SCOX5RF4.js +0 -91
  192. package/dist/wallets/walletConnectors/chunk-SDRE2D5I.js +0 -378
  193. package/dist/wallets/walletConnectors/chunk-SHOOZFML.js +0 -95
  194. package/dist/wallets/walletConnectors/chunk-STRBBO45.js +0 -58
  195. package/dist/wallets/walletConnectors/chunk-TPQX36FR.js +0 -186
  196. package/dist/wallets/walletConnectors/chunk-TUDZHFVC.js +0 -76
  197. package/dist/wallets/walletConnectors/chunk-TVRV7B5N.js +0 -110
  198. package/dist/wallets/walletConnectors/chunk-U24COF36.js +0 -32
  199. package/dist/wallets/walletConnectors/chunk-UIZRBU3F.js +0 -94
  200. package/dist/wallets/walletConnectors/chunk-UXRQQZ2M.js +0 -50
  201. package/dist/wallets/walletConnectors/chunk-UZWMFUJU.js +0 -65
  202. package/dist/wallets/walletConnectors/chunk-V6J5RYPW.js +0 -53
  203. package/dist/wallets/walletConnectors/chunk-V7E5KRXJ.js +0 -103
  204. package/dist/wallets/walletConnectors/chunk-VDWJ3NQ5.js +0 -52
  205. package/dist/wallets/walletConnectors/chunk-VM4OQZLZ.js +0 -48
  206. package/dist/wallets/walletConnectors/chunk-VMCIDCO5.js +0 -54
  207. package/dist/wallets/walletConnectors/chunk-VNL7XEWF.js +0 -54
  208. package/dist/wallets/walletConnectors/chunk-VPNHMRSO.js +0 -65
  209. package/dist/wallets/walletConnectors/chunk-VRI5ZALU.js +0 -212
  210. package/dist/wallets/walletConnectors/chunk-VUMT22HL.js +0 -186
  211. package/dist/wallets/walletConnectors/chunk-W5HMOCGP.js +0 -18
  212. package/dist/wallets/walletConnectors/chunk-W5RLBS44.js +0 -96
  213. package/dist/wallets/walletConnectors/chunk-WB7EEKPS.js +0 -50
  214. package/dist/wallets/walletConnectors/chunk-WSLFMQIG.js +0 -98
  215. package/dist/wallets/walletConnectors/chunk-WSNGX6YG.js +0 -87
  216. package/dist/wallets/walletConnectors/chunk-WXXI4WBF.js +0 -71
  217. package/dist/wallets/walletConnectors/chunk-X2B7QZZE.js +0 -102
  218. package/dist/wallets/walletConnectors/chunk-XF73ULPJ.js +0 -378
  219. package/dist/wallets/walletConnectors/chunk-XFCZU22I.js +0 -58
  220. package/dist/wallets/walletConnectors/chunk-XHS5TWNG.js +0 -58
  221. package/dist/wallets/walletConnectors/chunk-XOHFJA7X.js +0 -55
  222. package/dist/wallets/walletConnectors/chunk-Y3E6EZ7J.js +0 -30
  223. package/dist/wallets/walletConnectors/chunk-YMP3W2MO.js +0 -27
  224. package/dist/wallets/walletConnectors/chunk-YQTKJ7GF.js +0 -58
  225. package/dist/wallets/walletConnectors/chunk-YV6IZWGE.js +0 -393
  226. package/dist/wallets/walletConnectors/chunk-Z2E65XSS.js +0 -96
  227. package/dist/wallets/walletConnectors/chunk-Z3TWAZA5.js +0 -103
  228. package/dist/wallets/walletConnectors/chunk-ZFVYS64S.js +0 -96
  229. package/dist/wallets/walletConnectors/chunk-ZHFDEYPR.js +0 -53
  230. package/dist/wallets/walletConnectors/chunk-ZRY6ILYP.js +0 -27
  231. package/dist/wallets/walletConnectors/chunk-ZYWSQ3LI.js +0 -53
  232. package/dist/wallets/walletConnectors/{chunk-PAYYNMNP.js → chunk-HRB2TD63.js} +6 -6
@@ -1,1470 +0,0 @@
1
- "use client";
2
- import {
3
- hexToNumber,
4
- numberToHex
5
- } from "./chunk-VRI5ZALU.js";
6
- import {
7
- TalkenApiError
8
- } from "./chunk-4P3SPC44.js";
9
- import {
10
- getCredentialManager
11
- } from "./chunk-36BJXEBA.js";
12
- import {
13
- AbstractChainProvider
14
- } from "./chunk-5UITEZJU.js";
15
- import {
16
- ProviderErrorCode,
17
- ProviderRpcError
18
- } from "./chunk-GJ4CJL7F.js";
19
-
20
- // src/wallets/walletConnectors/abcWallet/abcProvider.ts
21
- import { parseGwei } from "viem";
22
-
23
- // src/config/networks.ts
24
- var NETWORK_CONFIGS = {
25
- // Ethereum Mainnet
26
- 1: {
27
- chainId: 1,
28
- network: "ethereum",
29
- name: "Ethereum",
30
- type: "EVM" /* EVM */,
31
- isTestnet: false,
32
- explorer: "https://etherscan.io",
33
- website: "https://ethereum.org",
34
- nativeCurrency: {
35
- name: "Ether",
36
- symbol: "ETH",
37
- decimals: 18
38
- },
39
- apiSupport: { tokens: true, nft: true, transactions: true },
40
- signSupport: { legacy: true, eip1559: true }
41
- },
42
- // Ethereum Sepolia Testnet
43
- 11155111: {
44
- chainId: 11155111,
45
- network: "ethereum_sepolia",
46
- name: "Ethereum Sepolia",
47
- type: "EVM" /* EVM */,
48
- isTestnet: true,
49
- explorer: "https://sepolia.etherscan.io",
50
- website: "https://ethereum.org",
51
- nativeCurrency: {
52
- name: "Sepolia Ether",
53
- symbol: "ETH",
54
- decimals: 18
55
- },
56
- apiSupport: { tokens: true, nft: true, transactions: true },
57
- signSupport: { legacy: true, eip1559: true }
58
- },
59
- // Ethereum Holesky Testnet
60
- 17e3: {
61
- chainId: 17e3,
62
- network: "ethereum_holesky",
63
- name: "Ethereum Holesky",
64
- type: "EVM" /* EVM */,
65
- isTestnet: true,
66
- explorer: "https://holesky.etherscan.io",
67
- website: "https://ethereum.org",
68
- nativeCurrency: {
69
- name: "Holesky Ether",
70
- symbol: "ETH",
71
- decimals: 18
72
- },
73
- apiSupport: { tokens: true, nft: true, transactions: true },
74
- signSupport: { legacy: true, eip1559: true }
75
- },
76
- // Kaia Mainnet (formerly Klaytn)
77
- 8217: {
78
- chainId: 8217,
79
- network: "kaia",
80
- name: "Kaia Mainnet",
81
- type: "EVM" /* EVM */,
82
- isTestnet: false,
83
- explorer: "https://kaiascan.io",
84
- website: "https://kaia.io",
85
- nativeCurrency: {
86
- name: "Kaia",
87
- symbol: "KAIA",
88
- decimals: 18
89
- },
90
- apiSupport: { tokens: true, nft: true, transactions: true },
91
- signSupport: { legacy: true, eip1559: true }
92
- },
93
- // Kaia Kairos Testnet
94
- 1001: {
95
- chainId: 1001,
96
- network: "kaia_kairos",
97
- name: "Kaia Kairos Testnet",
98
- type: "EVM" /* EVM */,
99
- isTestnet: true,
100
- explorer: "https://kairos.kaiascan.io",
101
- website: "https://kaia.io",
102
- nativeCurrency: {
103
- name: "Kaia",
104
- symbol: "KAIA",
105
- decimals: 18
106
- },
107
- apiSupport: { tokens: true, nft: true, transactions: true },
108
- signSupport: { legacy: true, eip1559: true }
109
- },
110
- // Polygon Mainnet
111
- 137: {
112
- chainId: 137,
113
- network: "polygon",
114
- name: "Polygon",
115
- type: "EVM" /* EVM */,
116
- isTestnet: false,
117
- explorer: "https://polygonscan.com",
118
- website: "https://polygon.technology",
119
- nativeCurrency: {
120
- name: "MATIC",
121
- symbol: "MATIC",
122
- decimals: 18
123
- },
124
- apiSupport: { tokens: true, nft: true, transactions: true },
125
- signSupport: { legacy: true, eip1559: true }
126
- },
127
- // Polygon Amoy Testnet
128
- 80002: {
129
- chainId: 80002,
130
- network: "polygon_amoy",
131
- name: "Polygon Amoy Testnet",
132
- type: "EVM" /* EVM */,
133
- isTestnet: true,
134
- explorer: "https://amoy.polygonscan.com",
135
- website: "https://polygon.technology",
136
- nativeCurrency: {
137
- name: "MATIC",
138
- symbol: "MATIC",
139
- decimals: 18
140
- },
141
- apiSupport: { tokens: true, nft: true, transactions: true },
142
- signSupport: { legacy: true, eip1559: true }
143
- },
144
- // Binance Smart Chain Mainnet
145
- 56: {
146
- chainId: 56,
147
- network: "binance",
148
- name: "Binance Smart Chain Mainnet",
149
- type: "EVM" /* EVM */,
150
- isTestnet: false,
151
- explorer: "https://bscscan.com",
152
- website: "https://www.bnbchain.org/en/bnb-smart-chain",
153
- nativeCurrency: {
154
- name: "BNB",
155
- symbol: "BNB",
156
- decimals: 18
157
- },
158
- apiSupport: { tokens: true, nft: true, transactions: true },
159
- signSupport: { legacy: true, eip1559: true }
160
- },
161
- // Binance Smart Chain Testnet
162
- 97: {
163
- chainId: 97,
164
- network: "binance_testnet",
165
- name: "Binance Smart Chain Testnet",
166
- type: "EVM" /* EVM */,
167
- isTestnet: true,
168
- explorer: "https://testnet.bscscan.com",
169
- website: "https://www.bnbchain.org/en/bnb-smart-chain",
170
- nativeCurrency: {
171
- name: "BNB",
172
- symbol: "BNB",
173
- decimals: 18
174
- },
175
- apiSupport: { tokens: true, nft: true, transactions: true },
176
- signSupport: { legacy: true, eip1559: true }
177
- },
178
- // Arbitrum One
179
- 42161: {
180
- chainId: 42161,
181
- network: "arbitrum",
182
- name: "Arbitrum One",
183
- type: "EVM" /* EVM */,
184
- isTestnet: false,
185
- explorer: "https://arbiscan.io",
186
- website: "https://arbitrum.io",
187
- nativeCurrency: {
188
- name: "Ether",
189
- symbol: "ETH",
190
- decimals: 18
191
- },
192
- apiSupport: { tokens: true, nft: true, transactions: true },
193
- signSupport: { legacy: true, eip1559: true }
194
- },
195
- // Arbitrum Sepolia
196
- 421614: {
197
- chainId: 421614,
198
- network: "arbitrum_sepolia",
199
- name: "Arbitrum Sepolia",
200
- type: "EVM" /* EVM */,
201
- isTestnet: true,
202
- explorer: "https://sepolia.arbiscan.io",
203
- website: "https://arbitrum.io",
204
- nativeCurrency: {
205
- name: "Ether",
206
- symbol: "ETH",
207
- decimals: 18
208
- },
209
- apiSupport: { tokens: true, nft: true, transactions: true },
210
- signSupport: { legacy: true, eip1559: true }
211
- },
212
- // Optimism Mainnet
213
- 10: {
214
- chainId: 10,
215
- network: "optimism",
216
- name: "Optimism",
217
- type: "EVM" /* EVM */,
218
- isTestnet: false,
219
- explorer: "https://optimistic.etherscan.io",
220
- website: "https://optimism.io",
221
- nativeCurrency: {
222
- name: "Ether",
223
- symbol: "ETH",
224
- decimals: 18
225
- },
226
- apiSupport: { tokens: true, nft: true, transactions: true },
227
- signSupport: { legacy: true, eip1559: true }
228
- },
229
- // Optimism Sepolia
230
- 420: {
231
- chainId: 420,
232
- network: "optimism_sepolia",
233
- name: "Optimism Sepolia",
234
- type: "EVM" /* EVM */,
235
- isTestnet: true,
236
- explorer: "https://sepolia-optimism.etherscan.io",
237
- website: "https://optimism.io",
238
- nativeCurrency: {
239
- name: "Ether",
240
- symbol: "ETH",
241
- decimals: 18
242
- },
243
- apiSupport: { tokens: true, nft: true, transactions: true },
244
- signSupport: { legacy: true, eip1559: true }
245
- },
246
- // Avalanche C-Chain
247
- 43114: {
248
- chainId: 43114,
249
- network: "avalanche",
250
- name: "Avalanche C-Chain",
251
- type: "EVM" /* EVM */,
252
- isTestnet: false,
253
- explorer: "https://avascan.info/blockchain/c/home",
254
- website: "https://avax.network",
255
- nativeCurrency: {
256
- name: "Avalanche",
257
- symbol: "AVAX",
258
- decimals: 18
259
- },
260
- apiSupport: { tokens: true, nft: true, transactions: true },
261
- signSupport: { legacy: true, eip1559: true }
262
- },
263
- // Avalanche Fuji Testnet
264
- 43113: {
265
- chainId: 43113,
266
- network: "avalanche_fuji",
267
- name: "Avalanche Fuji Testnet",
268
- type: "EVM" /* EVM */,
269
- isTestnet: true,
270
- explorer: "https://testnet.avascan.info",
271
- website: "https://avax.network",
272
- nativeCurrency: {
273
- name: "Avalanche",
274
- symbol: "AVAX",
275
- decimals: 18
276
- },
277
- apiSupport: { tokens: false, nft: false, transactions: false },
278
- signSupport: { legacy: true, eip1559: true }
279
- },
280
- // Mantle Mainnet
281
- 5e3: {
282
- chainId: 5e3,
283
- network: "mantle",
284
- name: "Mantle Mainnet",
285
- type: "EVM" /* EVM */,
286
- isTestnet: false,
287
- explorer: "https://explorer.mantle.xyz",
288
- website: "https://www.mantle.xyz",
289
- nativeCurrency: {
290
- name: "Mantle",
291
- symbol: "MNT",
292
- decimals: 18
293
- },
294
- apiSupport: { tokens: true, nft: true, transactions: true },
295
- signSupport: { legacy: true, eip1559: true }
296
- },
297
- // Mantle Testnet
298
- 5001: {
299
- chainId: 5001,
300
- network: "mantle_testnet",
301
- name: "Mantle Testnet",
302
- type: "EVM" /* EVM */,
303
- isTestnet: true,
304
- explorer: "https://sepolia.mantlescan.xyz",
305
- website: "https://www.mantle.xyz",
306
- nativeCurrency: {
307
- name: "Mantle",
308
- symbol: "MNT",
309
- decimals: 18
310
- },
311
- apiSupport: { tokens: true, nft: true, transactions: true },
312
- signSupport: { legacy: true, eip1559: true }
313
- },
314
- // Moonbeam
315
- 1284: {
316
- chainId: 1284,
317
- network: "moonbeam",
318
- name: "Moonbeam",
319
- type: "EVM" /* EVM */,
320
- isTestnet: false,
321
- explorer: "https://moonbeam.moonscan.io",
322
- website: "https://moonbeam.network",
323
- nativeCurrency: {
324
- name: "Glimmer",
325
- symbol: "GLMR",
326
- decimals: 18
327
- },
328
- apiSupport: { tokens: true, nft: true, transactions: true },
329
- signSupport: { legacy: true, eip1559: true }
330
- },
331
- // Moonriver
332
- 1285: {
333
- chainId: 1285,
334
- network: "moonriver",
335
- name: "Moonriver",
336
- type: "EVM" /* EVM */,
337
- isTestnet: false,
338
- explorer: "https://moonriver.moonscan.io",
339
- website: "https://moonbeam.network/networks/moonriver",
340
- nativeCurrency: {
341
- name: "Moonriver",
342
- symbol: "MOVR",
343
- decimals: 18
344
- },
345
- apiSupport: { tokens: true, nft: true, transactions: true },
346
- signSupport: { legacy: true, eip1559: true }
347
- },
348
- // Scroll Mainnet
349
- 534352: {
350
- chainId: 534352,
351
- network: "scroll",
352
- name: "Scroll",
353
- type: "EVM" /* EVM */,
354
- isTestnet: false,
355
- explorer: "https://scrollscan.co",
356
- website: "https://scroll.io",
357
- nativeCurrency: {
358
- name: "Ether",
359
- symbol: "ETH",
360
- decimals: 18
361
- },
362
- apiSupport: { tokens: true, nft: true, transactions: true },
363
- signSupport: { legacy: true, eip1559: true }
364
- },
365
- // Scroll Testnet
366
- 534351: {
367
- chainId: 534351,
368
- network: "scroll_testnet",
369
- name: "Scroll Testnet",
370
- type: "EVM" /* EVM */,
371
- isTestnet: true,
372
- explorer: "https://sepolia.scrollscan.com",
373
- website: "https://scroll.io",
374
- nativeCurrency: {
375
- name: "Ether",
376
- symbol: "ETH",
377
- decimals: 18
378
- },
379
- apiSupport: { tokens: true, nft: true, transactions: true },
380
- signSupport: { legacy: true, eip1559: true }
381
- },
382
- // Silicon Mainnet
383
- 2355: {
384
- chainId: 2355,
385
- network: "silicon",
386
- name: "Silicon",
387
- type: "EVM" /* EVM */,
388
- isTestnet: false,
389
- explorer: "https://scope.silicon.network",
390
- website: "https://silicon.network",
391
- nativeCurrency: {
392
- name: "Ether",
393
- symbol: "ETH",
394
- decimals: 18
395
- },
396
- apiSupport: { tokens: true, nft: true, transactions: true },
397
- signSupport: { legacy: true, eip1559: true }
398
- },
399
- // Silicon Sepolia
400
- 1722641160: {
401
- chainId: 1722641160,
402
- network: "silicon_sepolia",
403
- name: "Silicon Sepolia",
404
- type: "EVM" /* EVM */,
405
- isTestnet: true,
406
- explorer: "https://scope-sepolia.silicon.network",
407
- website: "https://silicon.network",
408
- nativeCurrency: {
409
- name: "Ether",
410
- symbol: "ETH",
411
- decimals: 18
412
- },
413
- apiSupport: { tokens: true, nft: true, transactions: true },
414
- signSupport: { legacy: true, eip1559: true }
415
- },
416
- // Six Protocol
417
- 98: {
418
- chainId: 98,
419
- network: "six_evm",
420
- name: "Six Protocol",
421
- type: "EVM" /* EVM */,
422
- isTestnet: false,
423
- explorer: "https://v2.sixscan.io",
424
- website: "https://www.six.network",
425
- nativeCurrency: {
426
- name: "SIX",
427
- symbol: "SIX",
428
- decimals: 18
429
- },
430
- apiSupport: { tokens: true, nft: false, transactions: true },
431
- signSupport: { legacy: true, eip1559: false }
432
- },
433
- // Six Protocol Testnet
434
- 150: {
435
- chainId: 150,
436
- network: "six_evm_testnet",
437
- name: "Six Protocol Testnet",
438
- type: "EVM" /* EVM */,
439
- isTestnet: true,
440
- explorer: "https://v2.fivenet.sixscan.io",
441
- website: "https://www.six.network",
442
- nativeCurrency: {
443
- name: "SIX",
444
- symbol: "SIX",
445
- decimals: 18
446
- },
447
- apiSupport: { tokens: true, nft: false, transactions: true },
448
- signSupport: { legacy: true, eip1559: false }
449
- },
450
- // Wemix Mainnet
451
- 1111: {
452
- chainId: 1111,
453
- network: "wemix",
454
- name: "Wemix3.0 Mainnet",
455
- type: "EVM" /* EVM */,
456
- isTestnet: false,
457
- explorer: "https://explorer.wemix.com",
458
- website: "https://wemix.com",
459
- nativeCurrency: {
460
- name: "WEMIX",
461
- symbol: "WEMIX",
462
- decimals: 18
463
- },
464
- apiSupport: { tokens: true, nft: true, transactions: true },
465
- signSupport: { legacy: true, eip1559: true }
466
- },
467
- // Wemix Testnet
468
- 1112: {
469
- chainId: 1112,
470
- network: "wemix_testnet",
471
- name: "Wemix3.0 Testnet",
472
- type: "EVM" /* EVM */,
473
- isTestnet: true,
474
- explorer: "https://explorer.test.wemix.com",
475
- website: "https://wemix.com",
476
- nativeCurrency: {
477
- name: "WEMIX",
478
- symbol: "WEMIX",
479
- decimals: 18
480
- },
481
- apiSupport: { tokens: true, nft: true, transactions: true },
482
- signSupport: { legacy: true, eip1559: true }
483
- },
484
- // Taiko Mainnet
485
- 167e3: {
486
- chainId: 167e3,
487
- network: "taiko",
488
- name: "Taiko Mainnet",
489
- type: "EVM" /* EVM */,
490
- isTestnet: false,
491
- explorer: "https://taikoscan.io",
492
- website: "https://taiko.xyz",
493
- nativeCurrency: {
494
- name: "Ether",
495
- symbol: "ETH",
496
- decimals: 18
497
- },
498
- apiSupport: { tokens: true, nft: true, transactions: true },
499
- signSupport: { legacy: true, eip1559: true }
500
- },
501
- // Taiko Hekla Testnet
502
- 167009: {
503
- chainId: 167009,
504
- network: "taiko_hekla",
505
- name: "Taiko Hekla Testnet",
506
- type: "EVM" /* EVM */,
507
- isTestnet: true,
508
- explorer: "https://hekla.taikoscan.io",
509
- website: "https://taiko.xyz",
510
- nativeCurrency: {
511
- name: "Ether",
512
- symbol: "ETH",
513
- decimals: 18
514
- },
515
- apiSupport: { tokens: true, nft: true, transactions: true },
516
- signSupport: { legacy: true, eip1559: true }
517
- },
518
- // Base Mainnet
519
- 8453: {
520
- chainId: 8453,
521
- network: "base",
522
- name: "Base",
523
- type: "EVM" /* EVM */,
524
- isTestnet: false,
525
- explorer: "https://basescan.org",
526
- website: "https://base.org",
527
- nativeCurrency: {
528
- name: "Ether",
529
- symbol: "ETH",
530
- decimals: 18
531
- },
532
- apiSupport: { tokens: true, nft: true, transactions: true },
533
- signSupport: { legacy: true, eip1559: true }
534
- },
535
- // Base Sepolia Testnet
536
- 84532: {
537
- chainId: 84532,
538
- network: "base_sepolia",
539
- name: "Base Sepolia",
540
- type: "EVM" /* EVM */,
541
- isTestnet: true,
542
- explorer: "https://sepolia.basescan.org",
543
- website: "https://base.org",
544
- nativeCurrency: {
545
- name: "Ether",
546
- symbol: "ETH",
547
- decimals: 18
548
- },
549
- apiSupport: { tokens: true, nft: true, transactions: true },
550
- signSupport: { legacy: true, eip1559: true }
551
- },
552
- // ChainBounty Mainnet
553
- 51828: {
554
- chainId: 51828,
555
- network: "chainbounty",
556
- name: "ChainBounty Mainnet",
557
- type: "EVM" /* EVM */,
558
- isTestnet: false,
559
- explorer: "https://scan.chainbounty.io",
560
- website: "https://chainbounty.io",
561
- nativeCurrency: {
562
- name: "ChainBounty",
563
- symbol: "CBY",
564
- decimals: 18
565
- },
566
- apiSupport: { tokens: true, nft: true, transactions: true },
567
- signSupport: { legacy: true, eip1559: true }
568
- },
569
- // ChainBounty Testnet
570
- 56580: {
571
- chainId: 56580,
572
- network: "chainbounty_testnet",
573
- name: "ChainBounty Testnet",
574
- type: "EVM" /* EVM */,
575
- isTestnet: true,
576
- explorer: "https://test.scan.chainbounty.io",
577
- website: "https://chainbounty.io",
578
- nativeCurrency: {
579
- name: "ChainBounty",
580
- symbol: "CBY",
581
- decimals: 18
582
- },
583
- apiSupport: { tokens: true, nft: true, transactions: true },
584
- signSupport: { legacy: true, eip1559: true }
585
- },
586
- // Aptos Mainnet (Non-EVM)
587
- aptos: {
588
- chainId: null,
589
- network: "aptos",
590
- name: "Aptos",
591
- type: "Non-EVM" /* NON_EVM */,
592
- isTestnet: false,
593
- explorer: "https://explorer.aptoslabs.com/?network=mainnet",
594
- website: "https://aptos.dev",
595
- nativeCurrency: {
596
- name: "Aptos",
597
- symbol: "APT",
598
- decimals: 8
599
- },
600
- apiSupport: { tokens: true, nft: true, transactions: true },
601
- signSupport: { legacy: true, eip1559: false }
602
- },
603
- // Aptos Testnet (Non-EVM)
604
- aptos_testnet: {
605
- chainId: null,
606
- network: "aptos_testnet",
607
- name: "Aptos Testnet",
608
- type: "Non-EVM" /* NON_EVM */,
609
- isTestnet: true,
610
- explorer: "https://explorer.aptoslabs.com/?network=testnet",
611
- website: "https://aptos.dev",
612
- nativeCurrency: {
613
- name: "Aptos",
614
- symbol: "APT",
615
- decimals: 8
616
- },
617
- apiSupport: { tokens: true, nft: true, transactions: true },
618
- signSupport: { legacy: true, eip1559: false }
619
- },
620
- // Bitcoin Mainnet
621
- bitcoin: {
622
- chainId: null,
623
- network: "bitcoin",
624
- name: "Bitcoin Mainnet",
625
- type: "Bitcoin" /* BITCOIN */,
626
- isTestnet: false,
627
- explorer: "https://blockstream.info",
628
- website: "https://bitcoin.org",
629
- nativeCurrency: {
630
- name: "Bitcoin",
631
- symbol: "BTC",
632
- decimals: 8
633
- },
634
- apiSupport: { tokens: true, nft: false, transactions: true },
635
- signSupport: { legacy: true, eip1559: false }
636
- },
637
- // Bitcoin Testnet
638
- bitcoin_testnet: {
639
- chainId: null,
640
- network: "bitcoin_testnet",
641
- name: "Bitcoin Testnet",
642
- type: "Bitcoin" /* BITCOIN */,
643
- isTestnet: true,
644
- explorer: "https://blockstream.info/testnet",
645
- website: "https://bitcoin.org",
646
- nativeCurrency: {
647
- name: "Bitcoin",
648
- symbol: "BTC",
649
- decimals: 8
650
- },
651
- apiSupport: { tokens: true, nft: false, transactions: true },
652
- signSupport: { legacy: true, eip1559: false }
653
- },
654
- // Tron Mainnet
655
- tron: {
656
- chainId: null,
657
- network: "tron",
658
- name: "Tron Mainnet",
659
- type: "TRX" /* TRON */,
660
- isTestnet: false,
661
- explorer: "https://tronscan.org",
662
- website: "https://tron.network",
663
- nativeCurrency: {
664
- name: "Tronix",
665
- symbol: "TRX",
666
- decimals: 6
667
- },
668
- apiSupport: { tokens: true, nft: true, transactions: true },
669
- signSupport: { legacy: true, eip1559: true }
670
- },
671
- // Tron Nile Testnet
672
- tron_nile: {
673
- chainId: null,
674
- network: "tron_nile",
675
- name: "Tron Nile Testnet",
676
- type: "TRX" /* TRON */,
677
- isTestnet: true,
678
- explorer: "https://nile.tronscan.org",
679
- website: "https://tron.network",
680
- nativeCurrency: {
681
- name: "Tronix",
682
- symbol: "TRX",
683
- decimals: 6
684
- },
685
- apiSupport: { tokens: true, nft: true, transactions: true },
686
- signSupport: { legacy: true, eip1559: true }
687
- },
688
- // ICP Mainnet
689
- icp: {
690
- chainId: null,
691
- network: "icp",
692
- name: "Internet Computer",
693
- type: "ICP" /* ICP */,
694
- isTestnet: false,
695
- explorer: "https://dashboard.internetcomputer.org",
696
- website: "https://internetcomputer.org",
697
- nativeCurrency: {
698
- name: "ICP",
699
- symbol: "ICP",
700
- decimals: 8
701
- },
702
- apiSupport: { tokens: true, nft: true, transactions: true },
703
- signSupport: { legacy: true, eip1559: true }
704
- }
705
- };
706
- var NETWORK_BY_PARAM = Object.values(
707
- NETWORK_CONFIGS
708
- ).reduce(
709
- (acc, config) => {
710
- acc[config.network] = config;
711
- return acc;
712
- },
713
- {}
714
- );
715
- function getNetworkByChainId(chainId) {
716
- return NETWORK_CONFIGS[chainId];
717
- }
718
- function getNetworkByParam(network) {
719
- return NETWORK_BY_PARAM[network];
720
- }
721
- function getNetworkName(chainId, fallback = "ethereum") {
722
- return NETWORK_CONFIGS[chainId]?.network ?? fallback;
723
- }
724
- var CHAIN_ID_TO_KEY = {
725
- // Mainnet
726
- 1: "ethereum",
727
- 42161: "arbitrum",
728
- 8217: "kaia",
729
- 56: "bsc",
730
- 8453: "base",
731
- 137: "polygon",
732
- 43114: "avalanche",
733
- 5e3: "mantle",
734
- 51828: "chainbounty",
735
- // Testnet
736
- 11155111: "sepolia",
737
- 421614: "arbitrumSepolia",
738
- 1001: "kaiaKairos",
739
- 97: "bscTestnet",
740
- 84532: "baseSepolia",
741
- 80002: "polygonAmoy",
742
- 43113: "avalancheFuji",
743
- 5003: "mantleSepolia",
744
- 56580: "chainbountyTestnet",
745
- 998: "hyperevmTestnet"
746
- };
747
- function getChainKey(chainId) {
748
- const key = CHAIN_ID_TO_KEY[chainId];
749
- if (!key) {
750
- throw new Error(`Unsupported chainId for tx endpoint: ${chainId}`);
751
- }
752
- return key;
753
- }
754
- function getExplorerTxUrl(chainIdOrNetwork, txHash) {
755
- const config = typeof chainIdOrNetwork === "number" ? getNetworkByChainId(chainIdOrNetwork) : getNetworkByParam(chainIdOrNetwork);
756
- if (!config) {
757
- throw new Error(`Unknown network: ${chainIdOrNetwork}`);
758
- }
759
- return `${config.explorer}/tx/${txHash}`;
760
- }
761
-
762
- // src/wallets/walletConnectors/abcWallet/abcProvider.ts
763
- var AbcEvmProvider = class extends AbstractChainProvider {
764
- constructor() {
765
- super(...arguments);
766
- this.chainId = 1;
767
- }
768
- // Default to Ethereum mainnet
769
- getRecoveryEmail() {
770
- const walletEmail = this.wallet?.email?.trim();
771
- if (walletEmail) {
772
- return walletEmail;
773
- }
774
- return getCredentialManager().getEmail() || void 0;
775
- }
776
- /**
777
- * Set wallet — EVM override for chainId tracking + chainChanged event
778
- */
779
- setWallet(wallet) {
780
- const previousChainId = this.chainId;
781
- this.chainId = wallet.chainId;
782
- super.setWallet(wallet);
783
- if (previousChainId !== wallet.chainId) {
784
- this.emit("chainChanged", numberToHex(wallet.chainId));
785
- }
786
- }
787
- onWalletSet(wallet) {
788
- this.emit("connect", { chainId: numberToHex(wallet.chainId) });
789
- }
790
- /**
791
- * Check if an error is a "Missing required wallet fields" 502 from the server.
792
- * When the server's in-memory signing credential cache is cold, it needs
793
- * a wallet.generate() call (idempotent create/recover) to repopulate.
794
- */
795
- isSigningCredentialError(error) {
796
- return error instanceof TalkenApiError && error.statusCode === 502 && error.message.includes("Missing required wallet fields");
797
- }
798
- /**
799
- * Refresh server-side signing credentials.
800
- *
801
- * Strategy (in priority order):
802
- * 1. PIN hash in memory → wallet.generate() to repopulate server cache
803
- * 2. Neither available → throw UNAUTHORIZED
804
- *
805
- * Note: sessionStorage-cached credentials (evmCreds) are automatically
806
- * attached to every signing request by TalkenApiClient, so the server
807
- * can use them as fallback without a separate refresh call.
808
- */
809
- async refreshSigningCredentials() {
810
- const credMgr = getCredentialManager();
811
- const pinHash = credMgr.getPinHash();
812
- const email = this.getRecoveryEmail();
813
- if (pinHash && email) {
814
- const api = this.getTalkenApiClientOrThrow();
815
- console.log(
816
- "[AbcProvider] Refreshing signing credentials via wallet.generate..."
817
- );
818
- await api.wallet.generate(pinHash, email);
819
- console.log("[AbcProvider] Signing credentials refreshed via PIN");
820
- return;
821
- }
822
- console.warn(
823
- "[AbcProvider] Cannot refresh signing credentials \u2014 PIN hash or email missing"
824
- );
825
- throw new ProviderRpcError(
826
- ProviderErrorCode.UNAUTHORIZED,
827
- "Session expired. Please reconnect and verify your PIN."
828
- );
829
- }
830
- /**
831
- * Wrap a signing operation with auto-retry on "Missing required wallet fields" error.
832
- * On first failure, refreshes the server's signing credential cache and retries once.
833
- */
834
- async withSigningCredentialRetry(operation) {
835
- try {
836
- return await operation();
837
- } catch (error) {
838
- if (this.isSigningCredentialError(error)) {
839
- console.log(
840
- "[AbcProvider] Signing credentials missing on server \u2014 attempting refresh and retry"
841
- );
842
- await this.refreshSigningCredentials();
843
- return await operation();
844
- }
845
- throw error;
846
- }
847
- }
848
- /**
849
- * Call request interceptor if configured
850
- * Called by specific signing/transaction methods that need user confirmation
851
- * @returns Resolved transaction with user modifications if changed in confirmation modal
852
- */
853
- async callInterceptor(method, params) {
854
- if (!this.requestInterceptor) {
855
- return void 0;
856
- }
857
- const request = {
858
- method,
859
- params,
860
- chainId: this.chainId,
861
- address: this.wallet?.address || ""
862
- };
863
- return this.requestInterceptor(request);
864
- }
865
- /**
866
- * EIP-1193 request method
867
- */
868
- async request(args) {
869
- const { method, params } = args;
870
- switch (method) {
871
- case "eth_requestAccounts":
872
- return this.eth_requestAccounts();
873
- case "eth_accounts":
874
- return this.eth_accounts();
875
- case "eth_chainId":
876
- return this.eth_chainId();
877
- case "eth_sendTransaction":
878
- case "wallet_sendTransaction":
879
- return this.eth_sendTransaction(params);
880
- case "eth_signTransaction":
881
- return this.eth_signTransaction(params);
882
- case "personal_sign":
883
- return this.personal_sign(params);
884
- case "eth_sign":
885
- return this.eth_sign(params);
886
- case "eth_signTypedData":
887
- case "eth_signTypedData_v3":
888
- case "eth_signTypedData_v4":
889
- return this.eth_signTypedData(params);
890
- case "wallet_getCapabilities":
891
- return this.wallet_getCapabilities();
892
- case "eth_signAuthorization":
893
- return this.eth_signAuthorization(params);
894
- case "wallet_switchEthereumChain":
895
- return this.wallet_switchEthereumChain(params);
896
- case "wallet_addEthereumChain":
897
- return this.wallet_addEthereumChain(params);
898
- case "eth_estimateGas":
899
- return this.eth_estimateGas(params);
900
- case "eth_getTransactionCount":
901
- return this.eth_getTransactionCount(
902
- Array.isArray(params) ? params : []
903
- );
904
- case "eth_call":
905
- return this.eth_call(params);
906
- case "eth_getBalance":
907
- return this.eth_getBalance(params);
908
- case "eth_blockNumber":
909
- case "eth_gasPrice":
910
- case "eth_getBlockByHash":
911
- case "eth_getBlockByNumber":
912
- case "eth_getCode":
913
- case "eth_getStorageAt":
914
- case "eth_getTransactionByHash":
915
- case "eth_getTransactionReceipt":
916
- throw new ProviderRpcError(
917
- ProviderErrorCode.UNSUPPORTED_METHOD,
918
- `Method ${method} should be handled by RPC provider`
919
- );
920
- default:
921
- throw new ProviderRpcError(
922
- ProviderErrorCode.UNSUPPORTED_METHOD,
923
- `Method ${method} not supported`
924
- );
925
- }
926
- }
927
- /**
928
- * Request accounts (EIP-1193)
929
- */
930
- async eth_requestAccounts() {
931
- if (!this.wallet) {
932
- throw new ProviderRpcError(
933
- ProviderErrorCode.UNAUTHORIZED,
934
- "Wallet not connected"
935
- );
936
- }
937
- return [this.wallet.address];
938
- }
939
- /**
940
- * Get accounts
941
- */
942
- async eth_accounts() {
943
- if (!this.wallet) {
944
- return [];
945
- }
946
- return [this.wallet.address];
947
- }
948
- /**
949
- * Get chain ID
950
- */
951
- async eth_chainId() {
952
- return numberToHex(this.chainId);
953
- }
954
- /**
955
- * Send transaction
956
- */
957
- async eth_sendTransaction(params) {
958
- if (!this.wallet) {
959
- throw new ProviderRpcError(
960
- ProviderErrorCode.UNAUTHORIZED,
961
- "Wallet not connected"
962
- );
963
- }
964
- if (!Array.isArray(params) || params.length === 0) {
965
- throw new ProviderRpcError(
966
- ProviderErrorCode.INVALID_PARAMS,
967
- "Invalid transaction params"
968
- );
969
- }
970
- const resolved = await this.callInterceptor("eth_sendTransaction", params);
971
- const tx = params[0];
972
- console.log("[AbcProvider] eth_sendTransaction incoming gas params:", {
973
- gas: tx.gas ?? tx.gasLimit,
974
- gasPrice: tx.gasPrice,
975
- maxFeePerGas: tx.maxFeePerGas,
976
- maxPriorityFeePerGas: tx.maxPriorityFeePerGas
977
- });
978
- if (resolved) {
979
- if (resolved.data) {
980
- tx.data = resolved.data;
981
- }
982
- if (resolved.gasFee?.maxFeePerGas) {
983
- try {
984
- const maxFeeWei = parseGwei(resolved.gasFee.maxFeePerGas);
985
- tx.maxFeePerGas = `0x${maxFeeWei.toString(16)}`;
986
- } catch (error) {
987
- console.error(
988
- "[AbcProvider] \u274C Failed to parse maxFeePerGas:",
989
- error
990
- );
991
- }
992
- }
993
- if (resolved.gasFee?.maxPriorityFeePerGas) {
994
- try {
995
- const priorityFeeWei = parseGwei(
996
- resolved.gasFee.maxPriorityFeePerGas
997
- );
998
- tx.maxPriorityFeePerGas = `0x${priorityFeeWei.toString(16)}`;
999
- } catch (error) {
1000
- console.error(
1001
- "[AbcProvider] \u274C Failed to parse maxPriorityFeePerGas:",
1002
- error
1003
- );
1004
- }
1005
- }
1006
- }
1007
- console.log("[AbcProvider] eth_sendTransaction final gas params:", {
1008
- gas: tx.gas ?? tx.gasLimit,
1009
- gasPrice: tx.gasPrice,
1010
- maxFeePerGas: tx.maxFeePerGas,
1011
- maxPriorityFeePerGas: tx.maxPriorityFeePerGas
1012
- });
1013
- const isContractDeployment = !tx.to || tx.to === "0x" || tx.to === "0x0" || tx.to === "0x0000000000000000000000000000000000000000";
1014
- if (isContractDeployment) {
1015
- tx.to = "0x";
1016
- } else if (!tx.to) {
1017
- throw new ProviderRpcError(
1018
- ProviderErrorCode.INVALID_PARAMS,
1019
- 'Transaction must have "to" field'
1020
- );
1021
- }
1022
- const pinHash = getCredentialManager().getPinHash();
1023
- if (!pinHash) {
1024
- throw new ProviderRpcError(
1025
- ProviderErrorCode.INTERNAL_ERROR,
1026
- "PIN hash not found. Please login again."
1027
- );
1028
- }
1029
- const hexValue = tx.value || "0x0";
1030
- const amountWei = BigInt(hexValue).toString();
1031
- const email = this.getRecoveryEmail();
1032
- const chainKey = getChainKey(this.chainId);
1033
- this.showPendingTx({ network: chainKey, chain: "evm" });
1034
- const gasLimit = tx.gas || tx.gasLimit;
1035
- const api = this.getTalkenApiClientOrThrow();
1036
- const result = await this.withSigningCredentialRetry(
1037
- () => api.evm.sendTransaction({
1038
- chainKey,
1039
- to: tx.to,
1040
- amountWei,
1041
- pin: pinHash,
1042
- data: tx.data || "0x",
1043
- waitForReceipt: true,
1044
- ...gasLimit && { gasLimit },
1045
- ...tx.gasPrice && { gasPrice: tx.gasPrice },
1046
- ...tx.maxFeePerGas && { maxFeePerGas: tx.maxFeePerGas },
1047
- ...tx.maxPriorityFeePerGas && {
1048
- maxPriorityFeePerGas: tx.maxPriorityFeePerGas
1049
- },
1050
- ...email && { email }
1051
- })
1052
- );
1053
- this.updateTxResult({
1054
- txHash: result.txHash,
1055
- network: chainKey,
1056
- chain: "evm",
1057
- receipt: result.receipt,
1058
- explorerUrl: getExplorerTxUrl(this.chainId, result.txHash)
1059
- });
1060
- return result.txHash;
1061
- }
1062
- /**
1063
- * Sign transaction (without sending)
1064
- */
1065
- async eth_signTransaction(params) {
1066
- if (!this.wallet) {
1067
- throw new ProviderRpcError(
1068
- ProviderErrorCode.UNAUTHORIZED,
1069
- "Wallet not connected"
1070
- );
1071
- }
1072
- if (!Array.isArray(params) || params.length === 0) {
1073
- throw new ProviderRpcError(
1074
- ProviderErrorCode.INVALID_PARAMS,
1075
- "Invalid transaction params"
1076
- );
1077
- }
1078
- const resolved = await this.callInterceptor("eth_signTransaction", params);
1079
- const tx = params[0];
1080
- if (resolved) {
1081
- if (resolved.data) {
1082
- tx.data = resolved.data;
1083
- }
1084
- if (resolved.gasFee?.maxFeePerGas) {
1085
- try {
1086
- const maxFeeWei = parseGwei(resolved.gasFee.maxFeePerGas);
1087
- tx.maxFeePerGas = `0x${maxFeeWei.toString(16)}`;
1088
- } catch (error) {
1089
- console.error(
1090
- "[AbcProvider] \u274C Failed to parse maxFeePerGas:",
1091
- error
1092
- );
1093
- }
1094
- }
1095
- if (resolved.gasFee?.maxPriorityFeePerGas) {
1096
- try {
1097
- const priorityFeeWei = parseGwei(
1098
- resolved.gasFee.maxPriorityFeePerGas
1099
- );
1100
- tx.maxPriorityFeePerGas = `0x${priorityFeeWei.toString(16)}`;
1101
- } catch (error) {
1102
- console.error(
1103
- "[AbcProvider] \u274C Failed to parse maxPriorityFeePerGas:",
1104
- error
1105
- );
1106
- }
1107
- }
1108
- }
1109
- const api = this.getTalkenApiClientOrThrow();
1110
- const pinHash = getCredentialManager().getPinHash() || void 0;
1111
- const email = this.getRecoveryEmail();
1112
- const result = await this.withSigningCredentialRetry(
1113
- () => api.evm.signTransaction({
1114
- network: getNetworkName(this.chainId),
1115
- to: tx.to,
1116
- value: tx.value || "0x0",
1117
- data: tx.data || "0x",
1118
- gasLimit: tx.gas || tx.gasLimit,
1119
- maxFeePerGas: tx.maxFeePerGas,
1120
- maxPriorityFeePerGas: tx.maxPriorityFeePerGas,
1121
- nonce: tx.nonce ? String(Number.parseInt(tx.nonce, 16)) : void 0,
1122
- ...pinHash && { pin: pinHash },
1123
- ...email && { email }
1124
- })
1125
- );
1126
- return result.signature;
1127
- }
1128
- /**
1129
- * Personal sign (EIP-191)
1130
- */
1131
- async personal_sign(params) {
1132
- if (!this.wallet) {
1133
- console.error("[AbcProvider] \u274C Wallet not connected");
1134
- throw new ProviderRpcError(
1135
- ProviderErrorCode.UNAUTHORIZED,
1136
- "Wallet not connected"
1137
- );
1138
- }
1139
- if (!Array.isArray(params) || params.length < 2) {
1140
- console.error("[AbcProvider] \u274C Invalid params:", params);
1141
- throw new ProviderRpcError(
1142
- ProviderErrorCode.INVALID_PARAMS,
1143
- "Invalid personal_sign params"
1144
- );
1145
- }
1146
- await this.callInterceptor("personal_sign", params);
1147
- const [message, address] = params;
1148
- if (address.toLowerCase() !== this.wallet.address.toLowerCase()) {
1149
- console.error("[AbcProvider] \u274C Address mismatch");
1150
- throw new ProviderRpcError(
1151
- ProviderErrorCode.INVALID_PARAMS,
1152
- "Address does not match connected wallet"
1153
- );
1154
- }
1155
- const api = this.getTalkenApiClientOrThrow();
1156
- const network = getNetworkName(this.chainId);
1157
- const pinHash = getCredentialManager().getPinHash() || void 0;
1158
- const email = this.getRecoveryEmail();
1159
- const rawOpts = Array.isArray(params) && params.length > 2 ? params[2] : null;
1160
- const validPrefixes = ["eip191", "native"];
1161
- const signaturePrefix = rawOpts != null && typeof rawOpts === "object" && "signaturePrefix" in rawOpts && validPrefixes.includes(rawOpts.signaturePrefix) ? rawOpts.signaturePrefix : void 0;
1162
- const result = await this.withSigningCredentialRetry(
1163
- () => api.evm.signPersonal({
1164
- network,
1165
- message,
1166
- address,
1167
- pin: pinHash,
1168
- ...email && { email },
1169
- ...signaturePrefix && { signaturePrefix }
1170
- })
1171
- );
1172
- return result.signature;
1173
- }
1174
- /**
1175
- * Eth sign
1176
- */
1177
- async eth_sign(params) {
1178
- if (!Array.isArray(params) || params.length < 2) {
1179
- throw new ProviderRpcError(
1180
- ProviderErrorCode.INVALID_PARAMS,
1181
- "Invalid eth_sign params"
1182
- );
1183
- }
1184
- const [address, message] = params;
1185
- return this.personal_sign([message, address]);
1186
- }
1187
- /**
1188
- * Sign typed data (EIP-712)
1189
- */
1190
- async eth_signTypedData(params) {
1191
- if (!this.wallet) {
1192
- throw new ProviderRpcError(
1193
- ProviderErrorCode.UNAUTHORIZED,
1194
- "Wallet not connected"
1195
- );
1196
- }
1197
- if (!Array.isArray(params) || params.length < 2) {
1198
- throw new ProviderRpcError(
1199
- ProviderErrorCode.INVALID_PARAMS,
1200
- "Invalid signTypedData params"
1201
- );
1202
- }
1203
- await this.callInterceptor("eth_signTypedData_v4", params);
1204
- const [address, typedData] = params;
1205
- if (address.toLowerCase() !== this.wallet.address.toLowerCase()) {
1206
- throw new ProviderRpcError(
1207
- ProviderErrorCode.INVALID_PARAMS,
1208
- "Address does not match connected wallet"
1209
- );
1210
- }
1211
- const api = this.getTalkenApiClientOrThrow();
1212
- const network = getNetworkName(this.chainId);
1213
- const pinHash = getCredentialManager().getPinHash() || void 0;
1214
- const email = this.getRecoveryEmail();
1215
- const result = await this.withSigningCredentialRetry(
1216
- () => api.evm.signTypedData({
1217
- network,
1218
- typedData: typeof typedData === "string" ? typedData : JSON.stringify(typedData),
1219
- pin: pinHash,
1220
- ...email && { email }
1221
- })
1222
- );
1223
- return result.signature;
1224
- }
1225
- /**
1226
- * Return normalized wallet capabilities for ABC embedded wallets.
1227
- * ABC supports EIP-7702 authorization signing via talken-api.
1228
- */
1229
- async wallet_getCapabilities() {
1230
- return {
1231
- supportsTypedDataV4: true,
1232
- supports7702Authorization: true,
1233
- supports5792Batch: false,
1234
- supportsPaymasterService: false,
1235
- supportsPermit2RelayHints: true,
1236
- walletType: "abc-embedded"
1237
- };
1238
- }
1239
- /**
1240
- * Sign EIP-7702 authorization via Talken API.
1241
- */
1242
- async eth_signAuthorization(params) {
1243
- if (!this.wallet) {
1244
- throw new ProviderRpcError(
1245
- ProviderErrorCode.UNAUTHORIZED,
1246
- "Wallet not connected"
1247
- );
1248
- }
1249
- if (!Array.isArray(params) || params.length < 2) {
1250
- throw new ProviderRpcError(
1251
- ProviderErrorCode.INVALID_PARAMS,
1252
- "Invalid signAuthorization params"
1253
- );
1254
- }
1255
- const [address, authorization] = params;
1256
- if (address.toLowerCase() !== this.wallet.address.toLowerCase()) {
1257
- throw new ProviderRpcError(
1258
- ProviderErrorCode.INVALID_PARAMS,
1259
- "Address does not match connected wallet"
1260
- );
1261
- }
1262
- if (!authorization?.address || authorization.chainId == null || authorization.nonce == null) {
1263
- throw new ProviderRpcError(
1264
- ProviderErrorCode.INVALID_PARAMS,
1265
- "Authorization payload is incomplete"
1266
- );
1267
- }
1268
- await this.callInterceptor("eth_signAuthorization", params);
1269
- const api = this.getTalkenApiClientOrThrow();
1270
- const network = getNetworkName(this.chainId);
1271
- const pinHash = getCredentialManager().getPinHash() || void 0;
1272
- const email = this.getRecoveryEmail();
1273
- const chainIdValue = typeof authorization.chainId === "string" ? Number(BigInt(authorization.chainId)) : Number(authorization.chainId);
1274
- const nonceValue = typeof authorization.nonce === "string" ? BigInt(authorization.nonce).toString() : String(authorization.nonce);
1275
- const authAddress = authorization.address;
1276
- const result = await this.withSigningCredentialRetry(
1277
- () => api.evm.signAuthorization({
1278
- network,
1279
- authorization: {
1280
- chainId: chainIdValue,
1281
- address: authAddress,
1282
- nonce: nonceValue
1283
- },
1284
- pin: pinHash,
1285
- ...email && { email }
1286
- })
1287
- );
1288
- return result.authorization;
1289
- }
1290
- /**
1291
- * Switch Ethereum chain
1292
- */
1293
- async wallet_switchEthereumChain(params) {
1294
- if (!Array.isArray(params) || params.length === 0) {
1295
- throw new ProviderRpcError(
1296
- ProviderErrorCode.INVALID_PARAMS,
1297
- "Invalid switchEthereumChain params"
1298
- );
1299
- }
1300
- const { chainId } = params[0];
1301
- const newChainId = hexToNumber(chainId);
1302
- if (this.chainId === newChainId) {
1303
- return null;
1304
- }
1305
- const _previousChainId = this.chainId;
1306
- this.chainId = newChainId;
1307
- if (this.wallet) {
1308
- this.wallet.chainId = newChainId;
1309
- }
1310
- this.emit("chainChanged", numberToHex(newChainId));
1311
- return null;
1312
- }
1313
- /**
1314
- * Add Ethereum chain
1315
- */
1316
- async wallet_addEthereumChain(params) {
1317
- return this.wallet_switchEthereumChain(params);
1318
- }
1319
- /**
1320
- * Get transaction count (nonce) using ABC WaaS API
1321
- */
1322
- async eth_getTransactionCount(params) {
1323
- const address = params[0]?.toLowerCase();
1324
- if (!address) {
1325
- throw new ProviderRpcError(
1326
- ProviderErrorCode.INVALID_PARAMS,
1327
- "Missing address parameter"
1328
- );
1329
- }
1330
- const currentChainId = this.chainId;
1331
- try {
1332
- const api = this.getTalkenApiClientOrThrow();
1333
- const response = await api.evm.getNonce(
1334
- getNetworkName(currentChainId),
1335
- address
1336
- );
1337
- const nonce = response.result !== void 0 ? typeof response.result === "number" ? `0x${response.result.toString(16)}` : response.result : void 0;
1338
- if (!nonce) {
1339
- throw new Error("No result in nonce response");
1340
- }
1341
- return nonce;
1342
- } catch (error) {
1343
- console.error(
1344
- "[AbcEvmProvider] \u274C Failed to get transaction count from ABC WaaS:",
1345
- error
1346
- );
1347
- throw new ProviderRpcError(
1348
- ProviderErrorCode.INTERNAL_ERROR,
1349
- `Failed to get transaction count: ${error instanceof Error ? error.message : String(error)}`
1350
- );
1351
- }
1352
- }
1353
- /**
1354
- * Estimate gas for transaction
1355
- * Uses ABC WaaS gas estimation API with fallback
1356
- */
1357
- async eth_estimateGas(params) {
1358
- if (!Array.isArray(params) || params.length === 0) {
1359
- throw new ProviderRpcError(
1360
- ProviderErrorCode.INVALID_PARAMS,
1361
- "Invalid estimateGas params"
1362
- );
1363
- }
1364
- const tx = params[0];
1365
- if (!tx.to) {
1366
- throw new ProviderRpcError(
1367
- ProviderErrorCode.INVALID_PARAMS,
1368
- 'Transaction must have "to" field'
1369
- );
1370
- }
1371
- try {
1372
- const response = await this.getTalkenApiClientOrThrow().evm.estimateGas({
1373
- network: getNetworkName(this.chainId),
1374
- from: tx.from || this.wallet?.address || "",
1375
- to: tx.to,
1376
- value: tx.value,
1377
- data: tx.data
1378
- });
1379
- if (!response.result) {
1380
- throw new Error("No result in gas estimate response");
1381
- }
1382
- return response.result;
1383
- } catch (error) {
1384
- console.warn(
1385
- "[AbcEvmProvider] Gas estimation failed, using fallback:",
1386
- error
1387
- );
1388
- if (tx.data && tx.data !== "0x") {
1389
- return "0x493e0";
1390
- }
1391
- return "0x5208";
1392
- }
1393
- }
1394
- /**
1395
- * Execute read-only eth_call via talken-api
1396
- */
1397
- async eth_call(params) {
1398
- const p = Array.isArray(params) ? params : [];
1399
- const tx = p[0];
1400
- if (!tx?.to || !tx?.data) {
1401
- throw new ProviderRpcError(
1402
- ProviderErrorCode.INVALID_PARAMS,
1403
- "eth_call requires to and data"
1404
- );
1405
- }
1406
- try {
1407
- const api = this.getTalkenApiClientOrThrow();
1408
- const response = await api.evm.ethCall({
1409
- network: getNetworkName(this.chainId),
1410
- to: tx.to,
1411
- data: tx.data,
1412
- from: tx.from || this.wallet?.address
1413
- });
1414
- return response?.result ?? response?.data ?? "0x";
1415
- } catch (error) {
1416
- throw new ProviderRpcError(
1417
- ProviderErrorCode.INTERNAL_ERROR,
1418
- `eth_call failed: ${error instanceof Error ? error.message : String(error)}`
1419
- );
1420
- }
1421
- }
1422
- /**
1423
- * Get native balance via talken-api
1424
- */
1425
- async eth_getBalance(params) {
1426
- const p = Array.isArray(params) ? params : [];
1427
- const address = p[0] || this.wallet?.address;
1428
- if (!address) {
1429
- throw new ProviderRpcError(
1430
- ProviderErrorCode.INVALID_PARAMS,
1431
- "Missing address parameter"
1432
- );
1433
- }
1434
- try {
1435
- const api = this.getTalkenApiClientOrThrow();
1436
- const response = await api.evm.getBalance(
1437
- getNetworkName(this.chainId),
1438
- address
1439
- );
1440
- return response?.balance ?? "0x0";
1441
- } catch (error) {
1442
- throw new ProviderRpcError(
1443
- ProviderErrorCode.INTERNAL_ERROR,
1444
- `eth_getBalance failed: ${error instanceof Error ? error.message : String(error)}`
1445
- );
1446
- }
1447
- }
1448
- /**
1449
- * Get current wallet
1450
- */
1451
- getWallet() {
1452
- return this.wallet;
1453
- }
1454
- /**
1455
- * Get current chain ID
1456
- */
1457
- getChainId() {
1458
- return this.chainId;
1459
- }
1460
- };
1461
- function createAbcEvmProvider(talkenApi) {
1462
- return new AbcEvmProvider(talkenApi);
1463
- }
1464
- var createAbcProvider = createAbcEvmProvider;
1465
-
1466
- export {
1467
- AbcEvmProvider,
1468
- createAbcEvmProvider,
1469
- createAbcProvider
1470
- };