@web3jskit/walletkit 0.4.5 → 0.5.1

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 (409) hide show
  1. package/README.md +494 -145
  2. package/README.zh.md +569 -0
  3. package/dist/assets/svg/browserWalletIcon.d.ts +2 -0
  4. package/dist/assets/svg/browserWalletIcon.d.ts.map +1 -0
  5. package/dist/{src/assets → assets}/svg/dataBase.d.ts +1 -1
  6. package/dist/assets/svg/dataBase.d.ts.map +1 -0
  7. package/dist/assets/svg/metaMaskWallet.d.ts +2 -0
  8. package/dist/assets/svg/metaMaskWallet.d.ts.map +1 -0
  9. package/dist/btcConnector-BPOSvvaA.js +1 -0
  10. package/dist/btcConnector-Bc6dNLGT.js +1 -0
  11. package/dist/btcConnector-CWSxooB_.mjs +68 -0
  12. package/dist/btcConnector-H4vacfvE.mjs +58 -0
  13. package/dist/components/ConnectButton/ConnectedInfo.d.ts +2 -0
  14. package/dist/components/ConnectButton/ConnectedInfo.d.ts.map +1 -0
  15. package/dist/components/ConnectButton/index.d.ts +9 -0
  16. package/dist/components/ConnectButton/index.d.ts.map +1 -0
  17. package/dist/components/ConnectModal/index.d.ts +7 -0
  18. package/dist/components/ConnectModal/index.d.ts.map +1 -0
  19. package/dist/{src/components → components}/Dropdown/index.d.ts +2 -7
  20. package/dist/components/Dropdown/index.d.ts.map +1 -0
  21. package/dist/components/InfoModal/index.d.ts +3 -0
  22. package/dist/components/InfoModal/index.d.ts.map +1 -0
  23. package/dist/components/Modal/index.d.ts +15 -0
  24. package/dist/components/Modal/index.d.ts.map +1 -0
  25. package/dist/components/ModalHeader/index.d.ts +8 -0
  26. package/dist/components/ModalHeader/index.d.ts.map +1 -0
  27. package/dist/{src/components → components}/SVGs/backArrowSvg.d.ts +1 -0
  28. package/dist/components/SVGs/backArrowSvg.d.ts.map +1 -0
  29. package/dist/{src/components → components}/SVGs/closeSvg.d.ts +1 -0
  30. package/dist/components/SVGs/closeSvg.d.ts.map +1 -0
  31. package/dist/{src/components → components}/SVGs/copiedSvg.d.ts +1 -0
  32. package/dist/components/SVGs/copiedSvg.d.ts.map +1 -0
  33. package/dist/{src/components → components}/SVGs/copySvg.d.ts +1 -0
  34. package/dist/components/SVGs/copySvg.d.ts.map +1 -0
  35. package/dist/{src/components → components}/SVGs/exitSvg.d.ts +1 -0
  36. package/dist/components/SVGs/exitSvg.d.ts.map +1 -0
  37. package/dist/components/SVGs/spinSvg.d.ts +5 -0
  38. package/dist/components/SVGs/spinSvg.d.ts.map +1 -0
  39. package/dist/{src/components → components}/SVGs/vectorSvg.d.ts +1 -0
  40. package/dist/components/SVGs/vectorSvg.d.ts.map +1 -0
  41. package/dist/{src/components → components}/Text/index.d.ts +3 -1
  42. package/dist/components/Text/index.d.ts.map +1 -0
  43. package/dist/components/ThemeToggle.d.ts +5 -0
  44. package/dist/components/ThemeToggle.d.ts.map +1 -0
  45. package/dist/components/WalletItem/index.d.ts +9 -0
  46. package/dist/components/WalletItem/index.d.ts.map +1 -0
  47. package/dist/components/WalletKitProvider/ChainProvider.d.ts +27 -0
  48. package/dist/components/WalletKitProvider/ChainProvider.d.ts.map +1 -0
  49. package/dist/components/WalletKitProvider/I18nProvider.d.ts +15 -0
  50. package/dist/components/WalletKitProvider/I18nProvider.d.ts.map +1 -0
  51. package/dist/components/WalletKitProvider/ThemeProvider.d.ts +25 -0
  52. package/dist/components/WalletKitProvider/ThemeProvider.d.ts.map +1 -0
  53. package/dist/components/WalletKitProvider/index.d.ts +23 -0
  54. package/dist/components/WalletKitProvider/index.d.ts.map +1 -0
  55. package/dist/config/iconDatabase.d.ts +11 -0
  56. package/dist/config/iconDatabase.d.ts.map +1 -0
  57. package/dist/config/netConfig.d.ts +16 -0
  58. package/dist/config/netConfig.d.ts.map +1 -0
  59. package/dist/config/walletConfig.d.ts +28 -0
  60. package/dist/config/walletConfig.d.ts.map +1 -0
  61. package/dist/core/connectors/Bitget_Wallet/btcConnector.d.ts +36 -0
  62. package/dist/core/connectors/Bitget_Wallet/btcConnector.d.ts.map +1 -0
  63. package/dist/core/connectors/Bitget_Wallet/deepLinkConnector.d.ts +15 -0
  64. package/dist/core/connectors/Bitget_Wallet/deepLinkConnector.d.ts.map +1 -0
  65. package/dist/core/connectors/Bitget_Wallet/solConnector.d.ts +13 -0
  66. package/dist/core/connectors/Bitget_Wallet/solConnector.d.ts.map +1 -0
  67. package/dist/core/connectors/GelWallet/evmConnector.d.ts +27 -0
  68. package/dist/core/connectors/GelWallet/evmConnector.d.ts.map +1 -0
  69. package/dist/core/connectors/GelWallet/solConnector.d.ts +15 -0
  70. package/dist/core/connectors/GelWallet/solConnector.d.ts.map +1 -0
  71. package/dist/core/connectors/GelWallet/tronConnector.d.ts +8 -0
  72. package/dist/core/connectors/GelWallet/tronConnector.d.ts.map +1 -0
  73. package/dist/core/connectors/MetaMask/deepLinkConnector.d.ts +15 -0
  74. package/dist/core/connectors/MetaMask/deepLinkConnector.d.ts.map +1 -0
  75. package/dist/core/connectors/OKX_Wallet/btcConnector.d.ts +40 -0
  76. package/dist/core/connectors/OKX_Wallet/btcConnector.d.ts.map +1 -0
  77. package/dist/core/connectors/OKX_Wallet/deepLinkConnector.d.ts +15 -0
  78. package/dist/core/connectors/OKX_Wallet/deepLinkConnector.d.ts.map +1 -0
  79. package/dist/core/connectors/OKX_Wallet/solConnector.d.ts +12 -0
  80. package/dist/core/connectors/OKX_Wallet/solConnector.d.ts.map +1 -0
  81. package/dist/core/connectors/OKX_Wallet/tronConnector.d.ts +12 -0
  82. package/dist/core/connectors/OKX_Wallet/tronConnector.d.ts.map +1 -0
  83. package/dist/core/connectors/Phantom/btcConnector.d.ts +32 -0
  84. package/dist/core/connectors/Phantom/btcConnector.d.ts.map +1 -0
  85. package/dist/core/connectors/Phantom/deepLinkConnector.d.ts +15 -0
  86. package/dist/core/connectors/Phantom/deepLinkConnector.d.ts.map +1 -0
  87. package/dist/core/connectors/Phantom/solConnector.d.ts +12 -0
  88. package/dist/core/connectors/Phantom/solConnector.d.ts.map +1 -0
  89. package/dist/core/connectors/TokenPocket/deepLinkConnector.d.ts +17 -0
  90. package/dist/core/connectors/TokenPocket/deepLinkConnector.d.ts.map +1 -0
  91. package/dist/core/connectors/TronLink/deepLinkConnector.d.ts +17 -0
  92. package/dist/core/connectors/TronLink/deepLinkConnector.d.ts.map +1 -0
  93. package/dist/core/connectors/TronLink/tronConnector.d.ts +13 -0
  94. package/dist/core/connectors/TronLink/tronConnector.d.ts.map +1 -0
  95. package/dist/core/connectors/Trust_Wallet/deepLinkConnector.d.ts +15 -0
  96. package/dist/core/connectors/Trust_Wallet/deepLinkConnector.d.ts.map +1 -0
  97. package/dist/core/connectors/_evm/createConnectors.d.ts +4 -0
  98. package/dist/core/connectors/_evm/createConnectors.d.ts.map +1 -0
  99. package/dist/core/connectors/_evm/createEmitter.d.ts +35 -0
  100. package/dist/core/connectors/_evm/createEmitter.d.ts.map +1 -0
  101. package/dist/core/connectors/_evm/evmConnector.d.ts +51 -0
  102. package/dist/core/connectors/_evm/evmConnector.d.ts.map +1 -0
  103. package/dist/core/connectors/_gelwallet/gelWalletConnector.d.ts +26 -0
  104. package/dist/core/connectors/_gelwallet/gelWalletConnector.d.ts.map +1 -0
  105. package/dist/core/connectors/_sol/resolveAddress.d.ts +2 -0
  106. package/dist/core/connectors/_sol/resolveAddress.d.ts.map +1 -0
  107. package/dist/core/connectors/_sol/solConnector.d.ts +32 -0
  108. package/dist/core/connectors/_sol/solConnector.d.ts.map +1 -0
  109. package/dist/core/connectors/_tron/tronConnector.d.ts +30 -0
  110. package/dist/core/connectors/_tron/tronConnector.d.ts.map +1 -0
  111. package/dist/core/connectors/baseConnector.d.ts +36 -0
  112. package/dist/core/connectors/baseConnector.d.ts.map +1 -0
  113. package/dist/core/connectors/createConnectors.d.ts +20 -0
  114. package/dist/core/connectors/createConnectors.d.ts.map +1 -0
  115. package/dist/core/errors/base.d.ts +24 -0
  116. package/dist/core/errors/base.d.ts.map +1 -0
  117. package/dist/core/errors/request.d.ts +80 -0
  118. package/dist/core/errors/request.d.ts.map +1 -0
  119. package/dist/core/errors/rpc.d.ts +290 -0
  120. package/dist/core/errors/rpc.d.ts.map +1 -0
  121. package/dist/core/errors/unit.d.ts +11 -0
  122. package/dist/core/errors/unit.d.ts.map +1 -0
  123. package/dist/core/errors/utils.d.ts +8 -0
  124. package/dist/core/errors/utils.d.ts.map +1 -0
  125. package/dist/core/types/chain.d.ts +49 -0
  126. package/dist/core/types/chain.d.ts.map +1 -0
  127. package/dist/core/types/config.d.ts +7 -0
  128. package/dist/core/types/config.d.ts.map +1 -0
  129. package/dist/core/types/connector.d.ts +104 -0
  130. package/dist/core/types/connector.d.ts.map +1 -0
  131. package/dist/core/types/events.d.ts +2 -0
  132. package/dist/core/types/events.d.ts.map +1 -0
  133. package/dist/core/types/unit.d.ts +2 -0
  134. package/dist/core/types/unit.d.ts.map +1 -0
  135. package/dist/core/types/utils.d.ts +61 -0
  136. package/dist/core/types/utils.d.ts.map +1 -0
  137. package/dist/core/utils/decodePhantom.d.ts +2 -0
  138. package/dist/core/utils/decodePhantom.d.ts.map +1 -0
  139. package/dist/core/utils/deepEqual.d.ts +3 -0
  140. package/dist/core/utils/deepEqual.d.ts.map +1 -0
  141. package/dist/core/utils/deserialize.d.ts +4 -0
  142. package/dist/core/utils/deserialize.d.ts.map +1 -0
  143. package/dist/core/utils/filterWallets.d.ts +4 -0
  144. package/dist/core/utils/filterWallets.d.ts.map +1 -0
  145. package/dist/core/utils/rpc.d.ts +21 -0
  146. package/dist/core/utils/rpc.d.ts.map +1 -0
  147. package/dist/core/utils/serialize.d.ts +16 -0
  148. package/dist/core/utils/serialize.d.ts.map +1 -0
  149. package/dist/core/utils/silentConnect.d.ts +5 -0
  150. package/dist/core/utils/silentConnect.d.ts.map +1 -0
  151. package/dist/core/utils/stringify.d.ts +5 -0
  152. package/dist/core/utils/stringify.d.ts.map +1 -0
  153. package/dist/core/utils/uid.d.ts +2 -0
  154. package/dist/core/utils/uid.d.ts.map +1 -0
  155. package/dist/core/utils/util.d.ts +11 -0
  156. package/dist/core/utils/util.d.ts.map +1 -0
  157. package/dist/dapp.es-BPGP9PnL.mjs +15917 -0
  158. package/dist/dapp.es-sLnregcu.js +103 -0
  159. package/dist/deepLinkConnector-BEhA9fXM.js +1 -0
  160. package/dist/deepLinkConnector-BoFKaohV.js +1 -0
  161. package/dist/deepLinkConnector-C9yLvhQ0.js +1 -0
  162. package/dist/deepLinkConnector-CJskbSoZ.mjs +43 -0
  163. package/dist/deepLinkConnector-COkumXeY.js +1 -0
  164. package/dist/deepLinkConnector-CeF0BGa0.mjs +43 -0
  165. package/dist/deepLinkConnector-Cv1mS_6-.mjs +34 -0
  166. package/dist/deepLinkConnector-DVJJth-5.mjs +34 -0
  167. package/dist/deepLinkConnector-Dd1GhvIt.mjs +33 -0
  168. package/dist/deepLinkConnector-DjP2afmX.js +1 -0
  169. package/dist/deepLinkConnector-DmY8duGW.mjs +42 -0
  170. package/dist/deepLinkConnector-JrGcvOeL.mjs +34 -0
  171. package/dist/deepLinkConnector-k6omMzz2.js +1 -0
  172. package/dist/deepLinkConnector-uAd7NNtg.js +1 -0
  173. package/dist/errors/index.d.ts +4 -0
  174. package/dist/errors/index.d.ts.map +1 -0
  175. package/dist/evmConnector-CCvp7d3d.js +1 -0
  176. package/dist/evmConnector-CoauAOGL.mjs +163 -0
  177. package/dist/gelWalletConnector-B3UtBzAC.mjs +76 -0
  178. package/dist/gelWalletConnector-DWtJW90d.js +1 -0
  179. package/dist/hooks/useWalletKit.d.ts +113 -0
  180. package/dist/hooks/useWalletKit.d.ts.map +1 -0
  181. package/dist/index-9qmfDVzH-C-zsxX98.mjs +25638 -0
  182. package/dist/index-9qmfDVzH-C6VVZD9P.js +28 -0
  183. package/dist/index-B3LF1VeP-58KzZv6u.js +1 -0
  184. package/dist/index-B3LF1VeP-IR-fSZI0.mjs +120 -0
  185. package/dist/index-CCHY2zSF-OxZZmzOg.mjs +45 -0
  186. package/dist/index-CCHY2zSF-ocS_tvXl.js +1 -0
  187. package/dist/index-CQkA0oWr.js +138 -0
  188. package/dist/index-CqeMS3Gf-C4g86ca5.js +1 -0
  189. package/dist/index-CqeMS3Gf-DXS8RsUh.mjs +67 -0
  190. package/dist/index-DGMGsMkJ-BTPPfxmS.js +1 -0
  191. package/dist/index-DGMGsMkJ-CHecRdpD.mjs +27 -0
  192. package/dist/index-djQ_DEqj.mjs +9254 -0
  193. package/dist/index-yUF_S07V-Cm9-qVkc.js +1 -0
  194. package/dist/index-yUF_S07V-DHeRsyE0.mjs +48 -0
  195. package/dist/index.d.ts +23 -0
  196. package/dist/index.d.ts.map +1 -0
  197. package/dist/index.esm.js +27 -0
  198. package/dist/index.js +1 -0
  199. package/dist/index.umd.js +57350 -0
  200. package/dist/locals/i18n.d.ts +5 -0
  201. package/dist/locals/i18n.d.ts.map +1 -0
  202. package/dist/locals/languages/en.json.d.ts +43 -0
  203. package/dist/locals/languages/ja.json.d.ts +43 -0
  204. package/dist/locals/languages/ko.json.d.ts +43 -0
  205. package/dist/locals/languages/ms.json.d.ts +43 -0
  206. package/dist/locals/languages/th.json.d.ts +43 -0
  207. package/dist/locals/languages/vi.json.d.ts +43 -0
  208. package/dist/locals/languages/zh.json.d.ts +43 -0
  209. package/dist/locals/languages/zhTW.json.d.ts +43 -0
  210. package/dist/locals/resources.d.ts +347 -0
  211. package/dist/locals/resources.d.ts.map +1 -0
  212. package/dist/solConnector-6iJX98IC.mjs +41 -0
  213. package/dist/solConnector-B0hCu-c0.js +1 -0
  214. package/dist/solConnector-BF2LX1V2.js +1 -0
  215. package/dist/solConnector-BJTonslk.mjs +11 -0
  216. package/dist/solConnector-BZeW9sSK.js +1 -0
  217. package/dist/solConnector-DiPxszBo.mjs +11 -0
  218. package/dist/solConnector-RfQtdzBT.js +1 -0
  219. package/dist/solConnector-uPbRCSOa.mjs +11 -0
  220. package/dist/stores/helperStore.d.ts +92 -0
  221. package/dist/stores/helperStore.d.ts.map +1 -0
  222. package/dist/{src/stores → stores}/index.d.ts +15 -6
  223. package/dist/stores/index.d.ts.map +1 -0
  224. package/dist/{src/stores → stores}/modalStore.d.ts +5 -4
  225. package/dist/stores/modalStore.d.ts.map +1 -0
  226. package/dist/style.css +492 -0
  227. package/dist/tronConnector-BlFA83pA.js +1 -0
  228. package/dist/tronConnector-BsjZsmAJ.js +1 -0
  229. package/dist/tronConnector-CUOxt6Cw.mjs +35 -0
  230. package/dist/tronConnector-DfZzS07Y.mjs +13 -0
  231. package/dist/tronConnector-fKlrodno.js +1 -0
  232. package/dist/tronConnector-ofdgn1lq.mjs +21 -0
  233. package/dist/types/chain.d.ts +12 -0
  234. package/dist/types/chain.d.ts.map +1 -0
  235. package/dist/types/configType.d.ts +3 -0
  236. package/dist/types/configType.d.ts.map +1 -0
  237. package/dist/{src/types → types}/error.d.ts +1 -0
  238. package/dist/types/error.d.ts.map +1 -0
  239. package/dist/types/index.d.ts +2 -0
  240. package/dist/types/index.d.ts.map +1 -0
  241. package/dist/{src/types → types}/store.d.ts +1 -0
  242. package/dist/types/store.d.ts.map +1 -0
  243. package/dist/{src/utils → utils}/formatter.d.ts +1 -0
  244. package/dist/utils/formatter.d.ts.map +1 -0
  245. package/dist/{src/utils → utils}/generateAvatar.d.ts +1 -0
  246. package/dist/utils/generateAvatar.d.ts.map +1 -0
  247. package/dist/utils/proxy.d.ts +5 -0
  248. package/dist/utils/proxy.d.ts.map +1 -0
  249. package/package.json +96 -45
  250. package/dist/package.json +0 -47
  251. package/dist/src/assets/svg/dataBase.js +0 -5
  252. package/dist/src/assets/svg/dataBase.js.map +0 -1
  253. package/dist/src/assets/svg/metaMaskWallet.d.ts +0 -1
  254. package/dist/src/assets/svg/metaMaskWallet.js +0 -35
  255. package/dist/src/assets/svg/metaMaskWallet.js.map +0 -1
  256. package/dist/src/components/ConnectButton/ConnectedInfo.d.ts +0 -1
  257. package/dist/src/components/ConnectButton/ConnectedInfo.js +0 -21
  258. package/dist/src/components/ConnectButton/ConnectedInfo.js.map +0 -1
  259. package/dist/src/components/ConnectButton/index.d.ts +0 -8
  260. package/dist/src/components/ConnectButton/index.js +0 -16
  261. package/dist/src/components/ConnectButton/index.js.map +0 -1
  262. package/dist/src/components/ConnectButton/style.d.ts +0 -2
  263. package/dist/src/components/ConnectButton/style.js +0 -13
  264. package/dist/src/components/ConnectButton/style.js.map +0 -1
  265. package/dist/src/components/Connecting/index.d.ts +0 -6
  266. package/dist/src/components/Connecting/index.js +0 -11
  267. package/dist/src/components/Connecting/index.js.map +0 -1
  268. package/dist/src/components/Connecting/style.d.ts +0 -2
  269. package/dist/src/components/Connecting/style.js +0 -52
  270. package/dist/src/components/Connecting/style.js.map +0 -1
  271. package/dist/src/components/Dropdown/index.js +0 -24
  272. package/dist/src/components/Dropdown/index.js.map +0 -1
  273. package/dist/src/components/Dropdown/style.d.ts +0 -15
  274. package/dist/src/components/Dropdown/style.js +0 -66
  275. package/dist/src/components/Dropdown/style.js.map +0 -1
  276. package/dist/src/components/GetWallet/index.d.ts +0 -7
  277. package/dist/src/components/GetWallet/index.js +0 -21
  278. package/dist/src/components/GetWallet/index.js.map +0 -1
  279. package/dist/src/components/GetWallet/style.d.ts +0 -2
  280. package/dist/src/components/GetWallet/style.js +0 -117
  281. package/dist/src/components/GetWallet/style.js.map +0 -1
  282. package/dist/src/components/Header/ModalHeader.d.ts +0 -8
  283. package/dist/src/components/Header/ModalHeader.js +0 -9
  284. package/dist/src/components/Header/ModalHeader.js.map +0 -1
  285. package/dist/src/components/Header/style.d.ts +0 -2
  286. package/dist/src/components/Header/style.js +0 -74
  287. package/dist/src/components/Header/style.js.map +0 -1
  288. package/dist/src/components/Icon/index.d.ts +0 -23
  289. package/dist/src/components/Icon/index.js +0 -48
  290. package/dist/src/components/Icon/index.js.map +0 -1
  291. package/dist/src/components/Introduce/index.d.ts +0 -6
  292. package/dist/src/components/Introduce/index.js +0 -11
  293. package/dist/src/components/Introduce/index.js.map +0 -1
  294. package/dist/src/components/Introduce/style.d.ts +0 -2
  295. package/dist/src/components/Introduce/style.js +0 -97
  296. package/dist/src/components/Introduce/style.js.map +0 -1
  297. package/dist/src/components/Modal/ConnectModal.d.ts +0 -7
  298. package/dist/src/components/Modal/ConnectModal.js +0 -123
  299. package/dist/src/components/Modal/ConnectModal.js.map +0 -1
  300. package/dist/src/components/Modal/WalletInfoModal.d.ts +0 -1
  301. package/dist/src/components/Modal/WalletInfoModal.js +0 -46
  302. package/dist/src/components/Modal/WalletInfoModal.js.map +0 -1
  303. package/dist/src/components/Modal/index.d.ts +0 -13
  304. package/dist/src/components/Modal/index.js +0 -55
  305. package/dist/src/components/Modal/index.js.map +0 -1
  306. package/dist/src/components/Modal/style.d.ts +0 -5
  307. package/dist/src/components/Modal/style.js +0 -187
  308. package/dist/src/components/Modal/style.js.map +0 -1
  309. package/dist/src/components/SVGs/backArrowSvg.js +0 -4
  310. package/dist/src/components/SVGs/backArrowSvg.js.map +0 -1
  311. package/dist/src/components/SVGs/closeSvg.js +0 -4
  312. package/dist/src/components/SVGs/closeSvg.js.map +0 -1
  313. package/dist/src/components/SVGs/copiedSvg.js +0 -4
  314. package/dist/src/components/SVGs/copiedSvg.js.map +0 -1
  315. package/dist/src/components/SVGs/copySvg.js +0 -4
  316. package/dist/src/components/SVGs/copySvg.js.map +0 -1
  317. package/dist/src/components/SVGs/exitSvg.js +0 -4
  318. package/dist/src/components/SVGs/exitSvg.js.map +0 -1
  319. package/dist/src/components/SVGs/spinSvg.d.ts +0 -4
  320. package/dist/src/components/SVGs/spinSvg.js +0 -4
  321. package/dist/src/components/SVGs/spinSvg.js.map +0 -1
  322. package/dist/src/components/SVGs/vectorSvg.js +0 -4
  323. package/dist/src/components/SVGs/vectorSvg.js.map +0 -1
  324. package/dist/src/components/Text/index.js +0 -32
  325. package/dist/src/components/Text/index.js.map +0 -1
  326. package/dist/src/components/WalletKitProvider/ChainProvider.d.ts +0 -23
  327. package/dist/src/components/WalletKitProvider/ChainProvider.js +0 -66
  328. package/dist/src/components/WalletKitProvider/ChainProvider.js.map +0 -1
  329. package/dist/src/components/WalletKitProvider/I18nProvider.d.ts +0 -13
  330. package/dist/src/components/WalletKitProvider/I18nProvider.js +0 -42
  331. package/dist/src/components/WalletKitProvider/I18nProvider.js.map +0 -1
  332. package/dist/src/components/WalletKitProvider/ThemeProvider.d.ts +0 -8
  333. package/dist/src/components/WalletKitProvider/ThemeProvider.js +0 -14
  334. package/dist/src/components/WalletKitProvider/ThemeProvider.js.map +0 -1
  335. package/dist/src/components/WalletKitProvider/index.d.ts +0 -18
  336. package/dist/src/components/WalletKitProvider/index.js +0 -14
  337. package/dist/src/components/WalletKitProvider/index.js.map +0 -1
  338. package/dist/src/components/WalletList/index.d.ts +0 -8
  339. package/dist/src/components/WalletList/index.js +0 -18
  340. package/dist/src/components/WalletList/index.js.map +0 -1
  341. package/dist/src/components/WalletList/style.d.ts +0 -2
  342. package/dist/src/components/WalletList/style.js +0 -102
  343. package/dist/src/components/WalletList/style.js.map +0 -1
  344. package/dist/src/components/WalletTriggerButton/index.d.ts +0 -13
  345. package/dist/src/components/WalletTriggerButton/index.js +0 -37
  346. package/dist/src/components/WalletTriggerButton/index.js.map +0 -1
  347. package/dist/src/components/WalletTriggerButton/style.d.ts +0 -2
  348. package/dist/src/components/WalletTriggerButton/style.js +0 -63
  349. package/dist/src/components/WalletTriggerButton/style.js.map +0 -1
  350. package/dist/src/errors/index.d.ts +0 -2
  351. package/dist/src/errors/index.js +0 -6
  352. package/dist/src/errors/index.js.map +0 -1
  353. package/dist/src/hooks/useWalletKit.d.ts +0 -80
  354. package/dist/src/hooks/useWalletKit.js +0 -38
  355. package/dist/src/hooks/useWalletKit.js.map +0 -1
  356. package/dist/src/index.d.ts +0 -9
  357. package/dist/src/index.js +0 -10
  358. package/dist/src/index.js.map +0 -1
  359. package/dist/src/locals/i18n.d.ts +0 -2
  360. package/dist/src/locals/i18n.js +0 -17
  361. package/dist/src/locals/i18n.js.map +0 -1
  362. package/dist/src/locals/languages/en.json +0 -30
  363. package/dist/src/locals/languages/zh.json +0 -30
  364. package/dist/src/locals/resources.d.ts +0 -66
  365. package/dist/src/locals/resources.js +0 -11
  366. package/dist/src/locals/resources.js.map +0 -1
  367. package/dist/src/modals/connectModal/index.d.ts +0 -0
  368. package/dist/src/modals/connectModal/index.js +0 -2
  369. package/dist/src/modals/connectModal/index.js.map +0 -1
  370. package/dist/src/stores/SlotsWalletStore.d.ts +0 -18
  371. package/dist/src/stores/SlotsWalletStore.js +0 -33
  372. package/dist/src/stores/SlotsWalletStore.js.map +0 -1
  373. package/dist/src/stores/index.js +0 -25
  374. package/dist/src/stores/index.js.map +0 -1
  375. package/dist/src/stores/modalStore.js +0 -41
  376. package/dist/src/stores/modalStore.js.map +0 -1
  377. package/dist/src/styled/index.d.ts +0 -17
  378. package/dist/src/styled/index.js +0 -76
  379. package/dist/src/styled/index.js.map +0 -1
  380. package/dist/src/test/getwalletprovider.test.d.ts +0 -1
  381. package/dist/src/test/getwalletprovider.test.js +0 -10
  382. package/dist/src/test/getwalletprovider.test.js.map +0 -1
  383. package/dist/src/test/setup.d.ts +0 -1
  384. package/dist/src/test/setup.js +0 -7
  385. package/dist/src/test/setup.js.map +0 -1
  386. package/dist/src/theme/index.d.ts +0 -61
  387. package/dist/src/theme/index.js +0 -99
  388. package/dist/src/theme/index.js.map +0 -1
  389. package/dist/src/types/configType.d.ts +0 -2
  390. package/dist/src/types/configType.js +0 -2
  391. package/dist/src/types/configType.js.map +0 -1
  392. package/dist/src/types/error.js +0 -5
  393. package/dist/src/types/error.js.map +0 -1
  394. package/dist/src/types/slotsType.d.ts +0 -23
  395. package/dist/src/types/slotsType.js +0 -2
  396. package/dist/src/types/slotsType.js.map +0 -1
  397. package/dist/src/types/store.js +0 -2
  398. package/dist/src/types/store.js.map +0 -1
  399. package/dist/src/utils/formatter.js +0 -6
  400. package/dist/src/utils/formatter.js.map +0 -1
  401. package/dist/src/utils/generateAvatar.js +0 -32
  402. package/dist/src/utils/generateAvatar.js.map +0 -1
  403. package/dist/src/wallets/GelWallet/index.d.ts +0 -0
  404. package/dist/src/wallets/GelWallet/index.js +0 -2
  405. package/dist/src/wallets/GelWallet/index.js.map +0 -1
  406. package/dist/src/wallets/SlotsWallets/index.d.ts +0 -3
  407. package/dist/src/wallets/SlotsWallets/index.js +0 -26
  408. package/dist/src/wallets/SlotsWallets/index.js.map +0 -1
  409. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CQkA0oWr.js"),i=o=>({request:async({method:e,params:n})=>new Promise(()=>{if(console.log("OKX------request",e,n),e==="openDApp"){const t=`${o.deepLink}?dappUrl=${encodeURIComponent(window==null?void 0:window.location.href)}`;console.log("OKX-----deepLink",t),window.location.href=t}})});class c extends s.BaseConnector{constructor(e){const n=i(e);super(e,n),this.connect=async()=>{const t=await this.getProvider();try{return this.beforeConnecting(),await t.request({method:"openDApp"}),this.resetStatus(),Promise.resolve("")}catch(r){return console.error(r),this.resetStatus(),Promise.reject(r)}},this.reconnection=async()=>{console.log("reconnection")},this.disconnect=async()=>{this.resetStatus()},this.getAccounts=()=>{},this.__onAccountsChanged=()=>{},this.__onChainChanged=()=>{},this.__onConnect=()=>{},this.__onDisconnect=()=>{},this.deepLink=e.deepLink}}exports.default=c;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CQkA0oWr.js"),i=o=>({request:async({method:e,params:n})=>new Promise(()=>{if(console.log("MetaMask------request",e,n),e==="openDApp"){const t=`${o.deepLink}/${window.location.href}`;console.log("MetaMask------deepLink",t),window.location.href=t}})});class c extends r.BaseConnector{constructor(e){const n=i(e);super(e,n),this.connect=async()=>{const t=await this.getProvider();try{return this.beforeConnecting(),await t.request({method:"openDApp"}),this.resetStatus(),Promise.resolve("")}catch(s){return console.error(s),this.resetStatus(),Promise.reject(s)}},this.reconnection=async()=>{console.log("reconnection")},this.disconnect=async()=>{this.resetStatus()},this.getAccounts=()=>{},this.__onAccountsChanged=()=>{},this.__onChainChanged=()=>{},this.__onConnect=()=>{},this.__onDisconnect=()=>{},this.deepLink=e.deepLink}}exports.default=c;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CQkA0oWr.js"),i=o=>({request:async({method:e,params:n})=>new Promise(()=>{if(console.log("Bitget------request",e,n),e==="openDApp"){const t=`${o.deepLink}?action=dapp&url=${window.location.href}`;console.log("Bitget------deepLink",t),window.location.href=t}})});class c extends s.BaseConnector{constructor(e){const n=i(e);super(e,n),this.connect=async()=>{const t=await this.getProvider();try{return this.beforeConnecting(),await t.request({method:"openDApp"}),this.resetStatus(),Promise.resolve("")}catch(r){return console.error(r),this.resetStatus(),Promise.reject(r)}},this.reconnection=async()=>{console.log("reconnection")},this.disconnect=async()=>{this.resetStatus()},this.getAccounts=()=>{},this.__onAccountsChanged=()=>{},this.__onChainChanged=()=>{},this.__onConnect=()=>{},this.__onDisconnect=()=>{},this.deepLink=e.deepLink}}exports.default=c;
@@ -0,0 +1,43 @@
1
+ import { B as r } from "./index-djQ_DEqj.mjs";
2
+ const i = (o) => ({
3
+ request: async ({ method: e, params: t }) => (console.log("Tron-----request", e, t), new Promise(() => {
4
+ if (e === "openDApp") {
5
+ const n = `${o.deepLink}?param=${encodeURIComponent(
6
+ JSON.stringify({
7
+ url: window == null ? void 0 : window.location.href,
8
+ action: "open",
9
+ protocol: "tronlink",
10
+ version: "1.0"
11
+ })
12
+ )}`;
13
+ console.log("Tron-----deepLink", n), window.location.href = n;
14
+ }
15
+ }))
16
+ });
17
+ class a extends r {
18
+ constructor(e) {
19
+ const t = i(e);
20
+ super(e, t), this.connect = async () => {
21
+ const n = await this.getProvider();
22
+ try {
23
+ return this.beforeConnecting(), n.request({ method: "openDApp" }), this.resetStatus(), Promise.resolve("");
24
+ } catch (s) {
25
+ return this.resetStatus(), Promise.reject(s);
26
+ }
27
+ }, this.reconnection = async () => {
28
+ console.log("reconnection");
29
+ }, this.disconnect = async () => {
30
+ this.resetStatus();
31
+ }, this.switchChain = () => {
32
+ }, this.getAccounts = () => {
33
+ }, this.getChainId = () => {
34
+ }, this.__onAccountsChanged = () => {
35
+ }, this.__onChainChanged = () => {
36
+ }, this.__onConnect = () => {
37
+ }, this.__onDisconnect = () => {
38
+ }, this.deepLink = e.deepLink;
39
+ }
40
+ }
41
+ export {
42
+ a as default
43
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CQkA0oWr.js"),i=o=>({request:async({method:e,params:n})=>(console.log("TokenPocket-----request",e,n),new Promise(()=>{if(e==="openDApp"){const t=`${o.deepLink}?param=${encodeURIComponent(JSON.stringify({url:window==null?void 0:window.location.href}))}`;console.log("TokenPocket-----deepLink",t),window.location.href=t}}))});class c extends r.BaseConnector{constructor(e){const n=i(e);super(e,n),this.connect=async()=>{const t=await this.getProvider();try{return this.beforeConnecting(),t.request({method:"openDApp"}),this.resetStatus(),Promise.resolve("")}catch(s){return this.resetStatus(),Promise.reject(s)}},this.reconnection=async()=>{console.log("reconnection")},this.disconnect=async()=>{this.resetStatus()},this.switchChain=()=>{},this.getAccounts=()=>{},this.getChainId=()=>{},this.__onAccountsChanged=()=>{},this.__onChainChanged=()=>{},this.__onConnect=()=>{},this.__onDisconnect=()=>{},this.deepLink=e.deepLink}}exports.default=c;
@@ -0,0 +1,43 @@
1
+ import { B as l, b as p, c } from "./index-djQ_DEqj.mjs";
2
+ const h = (o, e) => `https://phantom.app/ul/v1/${o}?${e.toString()}`, d = (o) => ({
3
+ request: async ({ method: e, params: r }) => (console.log("Phantom-----request", e, r), new Promise(() => {
4
+ if (e === "openDApp") {
5
+ const n = encodeURIComponent(window.location.href), t = `${o.deepLink}/${n}?ref=${n}`;
6
+ console.log("Phantom------deepLink", t), window.location.href = t;
7
+ } else if (e === "login") {
8
+ const n = p.box.keyPair(), t = c.encode(n.publicKey), s = n.secretKey;
9
+ localStorage.setItem("clientPrivateKey", c.encode(s));
10
+ const i = new URLSearchParams({
11
+ dapp_encryption_public_key: t,
12
+ app_url: window.location.href,
13
+ redirect_link: window.location.href
14
+ }), a = h("connect", i);
15
+ window.location.href = a;
16
+ }
17
+ }))
18
+ });
19
+ class w extends l {
20
+ constructor(e) {
21
+ const r = d(e);
22
+ super(e, r), this.connect = async () => {
23
+ const n = await this.getProvider();
24
+ try {
25
+ return this.beforeConnecting(), await n.request({ method: "openDApp" }), this.resetStatus(), Promise.resolve("");
26
+ } catch (t) {
27
+ return console.error(t), this.resetStatus(), Promise.reject(t);
28
+ }
29
+ }, this.reconnection = async () => {
30
+ console.log("reconnection");
31
+ }, this.disconnect = async () => {
32
+ this.resetStatus();
33
+ }, this.getAccounts = () => {
34
+ }, this.__onAccountsChanged = () => {
35
+ }, this.__onChainChanged = () => {
36
+ }, this.__onConnect = () => {
37
+ }, this.__onDisconnect = () => {
38
+ }, this.deepLink = e.deepLink;
39
+ }
40
+ }
41
+ export {
42
+ w as default
43
+ };
@@ -0,0 +1,34 @@
1
+ import { B as r } from "./index-djQ_DEqj.mjs";
2
+ const i = (o) => ({
3
+ request: async ({ method: e, params: n }) => new Promise(() => {
4
+ if (console.log("MetaMask------request", e, n), e === "openDApp") {
5
+ const t = `${o.deepLink}/${window.location.href}`;
6
+ console.log("MetaMask------deepLink", t), window.location.href = t;
7
+ }
8
+ })
9
+ });
10
+ class a extends r {
11
+ constructor(e) {
12
+ const n = i(e);
13
+ super(e, n), this.connect = async () => {
14
+ const t = await this.getProvider();
15
+ try {
16
+ return this.beforeConnecting(), await t.request({ method: "openDApp" }), this.resetStatus(), Promise.resolve("");
17
+ } catch (s) {
18
+ return console.error(s), this.resetStatus(), Promise.reject(s);
19
+ }
20
+ }, this.reconnection = async () => {
21
+ console.log("reconnection");
22
+ }, this.disconnect = async () => {
23
+ this.resetStatus();
24
+ }, this.getAccounts = () => {
25
+ }, this.__onAccountsChanged = () => {
26
+ }, this.__onChainChanged = () => {
27
+ }, this.__onConnect = () => {
28
+ }, this.__onDisconnect = () => {
29
+ }, this.deepLink = e.deepLink;
30
+ }
31
+ }
32
+ export {
33
+ a as default
34
+ };
@@ -0,0 +1,34 @@
1
+ import { B as r } from "./index-djQ_DEqj.mjs";
2
+ const c = (o) => ({
3
+ request: async ({ method: e, params: t }) => new Promise(() => {
4
+ if (console.log("OKX------request", e, t), e === "openDApp") {
5
+ const n = `${o.deepLink}?dappUrl=${encodeURIComponent(window == null ? void 0 : window.location.href)}`;
6
+ console.log("OKX-----deepLink", n), window.location.href = n;
7
+ }
8
+ })
9
+ });
10
+ class a extends r {
11
+ constructor(e) {
12
+ const t = c(e);
13
+ super(e, t), this.connect = async () => {
14
+ const n = await this.getProvider();
15
+ try {
16
+ return this.beforeConnecting(), await n.request({ method: "openDApp" }), this.resetStatus(), Promise.resolve("");
17
+ } catch (s) {
18
+ return console.error(s), this.resetStatus(), Promise.reject(s);
19
+ }
20
+ }, this.reconnection = async () => {
21
+ console.log("reconnection");
22
+ }, this.disconnect = async () => {
23
+ this.resetStatus();
24
+ }, this.getAccounts = () => {
25
+ }, this.__onAccountsChanged = () => {
26
+ }, this.__onChainChanged = () => {
27
+ }, this.__onConnect = () => {
28
+ }, this.__onDisconnect = () => {
29
+ }, this.deepLink = e.deepLink;
30
+ }
31
+ }
32
+ export {
33
+ a as default
34
+ };
@@ -0,0 +1,33 @@
1
+ import { B as r } from "./index-djQ_DEqj.mjs";
2
+ const i = (s) => ({
3
+ request: async ({ method: e, params: n }) => new Promise(() => {
4
+ if (console.log("Trust------request", e, n), e === "openDApp") {
5
+ const t = `${s.deepLink}?url=${window.location.href}`;
6
+ console.log("Trust------deepLink", t), window.location.href = t;
7
+ }
8
+ })
9
+ });
10
+ class a extends r {
11
+ constructor(e) {
12
+ const n = i(e);
13
+ super(e, n), this.connect = async () => {
14
+ const t = await this.getProvider();
15
+ try {
16
+ return this.beforeConnecting(), await t.request({ method: "openDApp" }), this.resetStatus(), Promise.resolve("");
17
+ } catch (o) {
18
+ return console.error(o), this.resetStatus(), Promise.reject(o);
19
+ }
20
+ }, this.reconnection = async () => {
21
+ }, this.disconnect = async () => {
22
+ this.resetStatus();
23
+ }, this.getAccounts = () => {
24
+ }, this.__onAccountsChanged = () => {
25
+ }, this.__onChainChanged = () => {
26
+ }, this.__onConnect = () => {
27
+ }, this.__onDisconnect = () => {
28
+ }, this.deepLink = e.deepLink;
29
+ }
30
+ }
31
+ export {
32
+ a as default
33
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CQkA0oWr.js"),i=r=>({request:async({method:e,params:n})=>new Promise(()=>{if(console.log("Trust------request",e,n),e==="openDApp"){const t=`${r.deepLink}?url=${window.location.href}`;console.log("Trust------deepLink",t),window.location.href=t}})});class c extends o.BaseConnector{constructor(e){const n=i(e);super(e,n),this.connect=async()=>{const t=await this.getProvider();try{return this.beforeConnecting(),await t.request({method:"openDApp"}),this.resetStatus(),Promise.resolve("")}catch(s){return console.error(s),this.resetStatus(),Promise.reject(s)}},this.reconnection=async()=>{},this.disconnect=async()=>{this.resetStatus()},this.getAccounts=()=>{},this.__onAccountsChanged=()=>{},this.__onChainChanged=()=>{},this.__onConnect=()=>{},this.__onDisconnect=()=>{},this.deepLink=e.deepLink}}exports.default=c;
@@ -0,0 +1,42 @@
1
+ import { B as r } from "./index-djQ_DEqj.mjs";
2
+ const i = (o) => ({
3
+ request: async ({ method: e, params: n }) => (console.log("TokenPocket-----request", e, n), new Promise(() => {
4
+ if (e === "openDApp") {
5
+ const t = `${o.deepLink}?param=${encodeURIComponent(
6
+ JSON.stringify({
7
+ url: window == null ? void 0 : window.location.href
8
+ // chain: 'EOS', // dapp支持的网络
9
+ // "source": "xxx", // 来源,开发者自定义
10
+ })
11
+ )}`;
12
+ console.log("TokenPocket-----deepLink", t), window.location.href = t;
13
+ }
14
+ }))
15
+ });
16
+ class a extends r {
17
+ constructor(e) {
18
+ const n = i(e);
19
+ super(e, n), this.connect = async () => {
20
+ const t = await this.getProvider();
21
+ try {
22
+ return this.beforeConnecting(), t.request({ method: "openDApp" }), this.resetStatus(), Promise.resolve("");
23
+ } catch (s) {
24
+ return this.resetStatus(), Promise.reject(s);
25
+ }
26
+ }, this.reconnection = async () => {
27
+ console.log("reconnection");
28
+ }, this.disconnect = async () => {
29
+ this.resetStatus();
30
+ }, this.switchChain = () => {
31
+ }, this.getAccounts = () => {
32
+ }, this.getChainId = () => {
33
+ }, this.__onAccountsChanged = () => {
34
+ }, this.__onChainChanged = () => {
35
+ }, this.__onConnect = () => {
36
+ }, this.__onDisconnect = () => {
37
+ }, this.deepLink = e.deepLink;
38
+ }
39
+ }
40
+ export {
41
+ a as default
42
+ };
@@ -0,0 +1,34 @@
1
+ import { B as r } from "./index-djQ_DEqj.mjs";
2
+ const i = (o) => ({
3
+ request: async ({ method: e, params: n }) => new Promise(() => {
4
+ if (console.log("Bitget------request", e, n), e === "openDApp") {
5
+ const t = `${o.deepLink}?action=dapp&url=${window.location.href}`;
6
+ console.log("Bitget------deepLink", t), window.location.href = t;
7
+ }
8
+ })
9
+ });
10
+ class a extends r {
11
+ constructor(e) {
12
+ const n = i(e);
13
+ super(e, n), this.connect = async () => {
14
+ const t = await this.getProvider();
15
+ try {
16
+ return this.beforeConnecting(), await t.request({ method: "openDApp" }), this.resetStatus(), Promise.resolve("");
17
+ } catch (s) {
18
+ return console.error(s), this.resetStatus(), Promise.reject(s);
19
+ }
20
+ }, this.reconnection = async () => {
21
+ console.log("reconnection");
22
+ }, this.disconnect = async () => {
23
+ this.resetStatus();
24
+ }, this.getAccounts = () => {
25
+ }, this.__onAccountsChanged = () => {
26
+ }, this.__onChainChanged = () => {
27
+ }, this.__onConnect = () => {
28
+ }, this.__onDisconnect = () => {
29
+ }, this.deepLink = e.deepLink;
30
+ }
31
+ }
32
+ export {
33
+ a as default
34
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CQkA0oWr.js"),i=o=>({request:async({method:e,params:t})=>(console.log("Tron-----request",e,t),new Promise(()=>{if(e==="openDApp"){const n=`${o.deepLink}?param=${encodeURIComponent(JSON.stringify({url:window==null?void 0:window.location.href,action:"open",protocol:"tronlink",version:"1.0"}))}`;console.log("Tron-----deepLink",n),window.location.href=n}}))});class c extends s.BaseConnector{constructor(e){const t=i(e);super(e,t),this.connect=async()=>{const n=await this.getProvider();try{return this.beforeConnecting(),n.request({method:"openDApp"}),this.resetStatus(),Promise.resolve("")}catch(r){return this.resetStatus(),Promise.reject(r)}},this.reconnection=async()=>{console.log("reconnection")},this.disconnect=async()=>{this.resetStatus()},this.switchChain=()=>{},this.getAccounts=()=>{},this.getChainId=()=>{},this.__onAccountsChanged=()=>{},this.__onChainChanged=()=>{},this.__onConnect=()=>{},this.__onDisconnect=()=>{},this.deepLink=e.deepLink}}exports.default=c;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CQkA0oWr.js"),l=(o,e)=>`https://phantom.app/ul/v1/${o}?${e.toString()}`,p=o=>({request:async({method:e,params:c})=>(console.log("Phantom-----request",e,c),new Promise(()=>{if(e==="openDApp"){const n=encodeURIComponent(window.location.href),t=`${o.deepLink}/${n}?ref=${n}`;console.log("Phantom------deepLink",t),window.location.href=t}else if(e==="login"){const n=r.nacl.box.keyPair(),t=r.bs58.encode(n.publicKey),i=n.secretKey;localStorage.setItem("clientPrivateKey",r.bs58.encode(i));const s=new URLSearchParams({dapp_encryption_public_key:t,app_url:window.location.href,redirect_link:window.location.href}),a=l("connect",s);window.location.href=a}}))});class h extends r.BaseConnector{constructor(e){const c=p(e);super(e,c),this.connect=async()=>{const n=await this.getProvider();try{return this.beforeConnecting(),await n.request({method:"openDApp"}),this.resetStatus(),Promise.resolve("")}catch(t){return console.error(t),this.resetStatus(),Promise.reject(t)}},this.reconnection=async()=>{console.log("reconnection")},this.disconnect=async()=>{this.resetStatus()},this.getAccounts=()=>{},this.__onAccountsChanged=()=>{},this.__onChainChanged=()=>{},this.__onConnect=()=>{},this.__onDisconnect=()=>{},this.deepLink=e.deepLink}}exports.default=h;
@@ -0,0 +1,4 @@
1
+ import { ErrorMessage } from '../types/error';
2
+
3
+ export declare const UserRejectError: ErrorMessage;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9D,eAAO,MAAM,eAAe,EAAE,YAG7B,CAAC"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./gelWalletConnector-DWtJW90d.js"),o=require("./index-CQkA0oWr.js");class p extends m.GelWalletConnector{constructor(w){super(w,o.ChainType.EVM),this.getChainId=async()=>{const r=await(await this.getProvider()).request({method:"eth_chainId"});return Number(r)},this.connect=async t=>{try{const r=await this.getProvider();this.addEventListener(),this.beforeConnecting();const s=(await r.request({method:"eth_requestAccounts",params:[{chainId:t||o.numberToHex(this.store.getState().currentNetworkId)}]}))[0];return this.connectSuccess(s),s}catch(r){throw this.removeEventListener(),this.connectError(),r}},this.reconnection=async()=>{try{const t=await this.getProvider();this.addEventListener(),this.beforeConnecting();const e=(await t.request({method:"eth_accounts"}))[0];e?this.connectSuccess(e):this.__onDisconnect()}catch{this.removeEventListener(),this.connectError()}},this.disconnect=async()=>{this.__onDisconnect()},this.signMessage=async t=>await(await this.getProvider()).request({method:"personal_sign",params:[t,this.walletAddress]}),this.signTransaction=async t=>{const r=await this.getProvider();try{return await r.request({method:"eth_signTransaction",params:[t]})}catch(e){throw console.error("signTransaction:error",e),e}},this.sendTransaction=async t=>await(await this.getProvider()).request({method:"eth_sendTransaction",params:[t]}),this.multipleRequests=async t=>await await(await this.getProvider()).multipleRequest({chainType:o.ChainType.EVM,events:t}),this.waitForTransactionReceipt=async(t,r=6e4)=>{const e=await this.getProvider(),s=Date.now();for(;Date.now()-s<r;)try{const n=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(n)return n;await new Promise(a=>setTimeout(a,1e3))}catch(n){throw n}throw new Error("Transaction receipt timeout")},this.readContract=async t=>{try{const{abi:r,address:e,functionName:s,args:n=[],rpcUrl:a,from:h}=t,c=this.store.getState().currentNetwork,l=a||(c==null?void 0:c.rpcUrls[0])||"",d=o.encodeFunctionData({abi:r,functionName:s,args:n}),u=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:Math.floor(Math.random()*1e5),jsonrpc:"2.0",method:"eth_call",params:[h?{from:h,to:e,data:d}:{to:e,data:d},"latest"]})}),i=await u.json();if(i.error)throw new Error(i.error.message);return!i.result||i.result==="0x"?u:o.decodeFunctionResult({abi:r,functionName:s,data:i.result})}catch(r){throw r}},this.writeContract=async t=>{const r=await this.getProvider();try{const e=o.encodeFunctionData({abi:t.abi,functionName:t.functionName,args:t.args||[]}),s={from:this.walletAddress,to:t.address,data:e,value:t.value};return await r.request({method:"eth_sendTransaction",params:[s]})}catch(e){const s=e;throw s.code===o.UserRejectedRequestError.code?new o.UserRejectedRequestError(s):s}},this.multicall=async(t,r)=>{try{const e=this.store.getState().currentNetwork;return await o.multicallRpc(t,{...r,network:e})}catch(e){const s=e;throw s.code===o.UserRejectedRequestError.code?new o.UserRejectedRequestError(s):s}},this.switchNetwork=async t=>{const r=await this.getProvider();try{await r.request({method:"wallet_switchEthereumChain",params:[{chainId:o.numberToHex(t)}]})}catch(e){if((e==null?void 0:e.code)===4902){const n=this.supportedNetworks.find(a=>a.chainId===t);if(n){const a={...n,chainId:o.numberToHex(n==null?void 0:n.chainId)};await r.request({method:"wallet_addEthereumChain",params:[a]})}return}const s=e;throw s.code===o.UserRejectedRequestError.code?new o.UserRejectedRequestError(s):s}}}}exports.default=p;
@@ -0,0 +1,163 @@
1
+ import { G as g } from "./gelWalletConnector-B3UtBzAC.mjs";
2
+ import { a as l, n as h, e as m, d as y, U as n, m as f } from "./index-djQ_DEqj.mjs";
3
+ class C extends g {
4
+ constructor(p) {
5
+ super(p, l.EVM), this.getChainId = async () => {
6
+ const r = await (await this.getProvider()).request({ method: "eth_chainId" });
7
+ return Number(r);
8
+ }, this.connect = async (e) => {
9
+ try {
10
+ const r = await this.getProvider();
11
+ this.addEventListener(), this.beforeConnecting();
12
+ const s = (await r.request({
13
+ method: "eth_requestAccounts",
14
+ params: [
15
+ {
16
+ chainId: e || h(this.store.getState().currentNetworkId)
17
+ }
18
+ ]
19
+ }))[0];
20
+ return this.connectSuccess(s), s;
21
+ } catch (r) {
22
+ throw this.removeEventListener(), this.connectError(), r;
23
+ }
24
+ }, this.reconnection = async () => {
25
+ try {
26
+ const e = await this.getProvider();
27
+ this.addEventListener(), this.beforeConnecting();
28
+ const t = (await e.request({
29
+ method: "eth_accounts"
30
+ }))[0];
31
+ t ? this.connectSuccess(t) : this.__onDisconnect();
32
+ } catch {
33
+ this.removeEventListener(), this.connectError();
34
+ }
35
+ }, this.disconnect = async () => {
36
+ this.__onDisconnect();
37
+ }, this.signMessage = async (e) => await (await this.getProvider()).request({
38
+ method: "personal_sign",
39
+ params: [e, this.walletAddress]
40
+ }), this.signTransaction = async (e) => {
41
+ const r = await this.getProvider();
42
+ try {
43
+ return await r.request({
44
+ method: "eth_signTransaction",
45
+ params: [e]
46
+ });
47
+ } catch (t) {
48
+ throw console.error("signTransaction:error", t), t;
49
+ }
50
+ }, this.sendTransaction = async (e) => await (await this.getProvider()).request({
51
+ method: "eth_sendTransaction",
52
+ params: [e]
53
+ }), this.multipleRequests = async (e) => await await (await this.getProvider()).multipleRequest({
54
+ chainType: l.EVM,
55
+ events: e
56
+ }), this.waitForTransactionReceipt = async (e, r = 6e4) => {
57
+ const t = await this.getProvider(), s = Date.now();
58
+ for (; Date.now() - s < r; )
59
+ try {
60
+ const o = await t.request({
61
+ method: "eth_getTransactionReceipt",
62
+ params: [e]
63
+ });
64
+ if (o) return o;
65
+ await new Promise((a) => setTimeout(a, 1e3));
66
+ } catch (o) {
67
+ throw o;
68
+ }
69
+ throw new Error("Transaction receipt timeout");
70
+ }, this.readContract = async (e) => {
71
+ try {
72
+ const { abi: r, address: t, functionName: s, args: o = [], rpcUrl: a, from: d } = e, c = this.store.getState().currentNetwork, v = a || (c == null ? void 0 : c.rpcUrls[0]) || "", u = m({
73
+ abi: r,
74
+ functionName: s,
75
+ args: o
76
+ }), w = await fetch(v, {
77
+ method: "POST",
78
+ headers: {
79
+ "Content-Type": "application/json"
80
+ },
81
+ body: JSON.stringify({
82
+ id: Math.floor(Math.random() * 1e5),
83
+ jsonrpc: "2.0",
84
+ method: "eth_call",
85
+ params: [d ? { from: d, to: t, data: u } : { to: t, data: u }, "latest"]
86
+ })
87
+ }), i = await w.json();
88
+ if (i.error)
89
+ throw new Error(i.error.message);
90
+ return !i.result || i.result === "0x" ? w : y({
91
+ abi: r,
92
+ functionName: s,
93
+ data: i.result
94
+ });
95
+ } catch (r) {
96
+ throw r;
97
+ }
98
+ }, this.writeContract = async (e) => {
99
+ const r = await this.getProvider();
100
+ try {
101
+ const t = m({
102
+ abi: e.abi,
103
+ functionName: e.functionName,
104
+ args: e.args || []
105
+ }), s = {
106
+ from: this.walletAddress,
107
+ to: e.address,
108
+ data: t,
109
+ value: e.value
110
+ };
111
+ return await r.request({
112
+ method: "eth_sendTransaction",
113
+ params: [s]
114
+ });
115
+ } catch (t) {
116
+ const s = t;
117
+ throw s.code === n.code ? new n(s) : s;
118
+ }
119
+ }, this.multicall = async (e, r) => {
120
+ try {
121
+ const t = this.store.getState().currentNetwork;
122
+ return await f(
123
+ e,
124
+ {
125
+ ...r,
126
+ network: t
127
+ }
128
+ );
129
+ } catch (t) {
130
+ const s = t;
131
+ throw s.code === n.code ? new n(s) : s;
132
+ }
133
+ }, this.switchNetwork = async (e) => {
134
+ const r = await this.getProvider();
135
+ try {
136
+ await r.request({
137
+ method: "wallet_switchEthereumChain",
138
+ params: [{ chainId: h(e) }]
139
+ });
140
+ } catch (t) {
141
+ if ((t == null ? void 0 : t.code) === 4902) {
142
+ const o = this.supportedNetworks.find((a) => a.chainId === e);
143
+ if (o) {
144
+ const a = {
145
+ ...o,
146
+ chainId: h(o == null ? void 0 : o.chainId)
147
+ };
148
+ await r.request({
149
+ method: "wallet_addEthereumChain",
150
+ params: [a]
151
+ });
152
+ }
153
+ return;
154
+ }
155
+ const s = t;
156
+ throw s.code === n.code ? new n(s) : s;
157
+ }
158
+ };
159
+ }
160
+ }
161
+ export {
162
+ C as default
163
+ };
@@ -0,0 +1,76 @@
1
+ import { B as p, a as f, C } from "./index-djQ_DEqj.mjs";
2
+ class y extends p {
3
+ constructor(u, v) {
4
+ super(u, null), this.getProvider = async () => {
5
+ var t, s, o, r;
6
+ let e;
7
+ if (this.provider)
8
+ e = this.provider;
9
+ else {
10
+ const n = await import("./dapp.es-BPGP9PnL.mjs").then((c) => c.b), i = (n == null ? void 0 : n.GelWallet) ?? (n == null ? void 0 : n.Web3Kit) ?? (n == null ? void 0 : n.default);
11
+ if (!i) throw new Error("GelWallet SDK not found in @web3jskit/dapp");
12
+ const a = (t = this.chainType) == null ? void 0 : t.toLowerCase();
13
+ if ((s = window.Web3Kit) != null && s._instance)
14
+ e = window.Web3Kit._instance.provider[a];
15
+ else {
16
+ const c = ((r = (o = this.store) == null ? void 0 : o.getState()) == null ? void 0 : r.useTestWallet) || !1;
17
+ typeof i.config == "function" && i.config({
18
+ hideEvokingButton: !1,
19
+ takeover: {
20
+ ethereum: !0,
21
+ solana: !0,
22
+ tronLink: !0
23
+ },
24
+ useTestWallet: c
25
+ });
26
+ const h = new i();
27
+ if (this.instance = h, e = await new Promise((l) => {
28
+ const d = () => {
29
+ h.provider && h.provider[a] ? l(h.provider[a]) : setTimeout(d, 100);
30
+ };
31
+ d();
32
+ }), window.Web3Kit = window.Web3Kit || {}, window.Web3Kit._instance = h, this.chainType === f.EVM) {
33
+ const l = e.request, d = async ({ methodName: w, ...m }) => await l({
34
+ chainType: this.chainType,
35
+ methodName: w,
36
+ ...m
37
+ });
38
+ e.request = d;
39
+ }
40
+ }
41
+ this.provider = e;
42
+ }
43
+ return this.provider || {};
44
+ }, this.addEventListener = async () => {
45
+ window.addEventListener("message", this.handleWeb3KitEvent);
46
+ }, this.removeEventListener = async () => {
47
+ window.removeEventListener("message", this.handleWeb3KitEvent);
48
+ }, this.handleWeb3KitEvent = (e) => {
49
+ const t = e.data;
50
+ t.target === "jsweb3-did" && (t.eventName === "disconnect" ? this.__onDisconnect() : t.eventName === "accountsChanged" ? this.__onAccountsChanged(t) : t.eventName === "chainChanged" && this.__onChainChanged(t));
51
+ }, this.__onAccountsChanged = (e) => {
52
+ var o, r, n, i, a;
53
+ if (!((o = e.data.connectedWebs) == null ? void 0 : o.find((c) => c.net.chainType === this.chainType)))
54
+ return;
55
+ const s = (a = (i = (n = (r = e.data) == null ? void 0 : r.account) == null ? void 0 : n.seriesWallets) == null ? void 0 : i[this.chainType]) == null ? void 0 : a.walletAddress;
56
+ s && (this.connectSuccess(s), this.walletEventEmitter.emit("accountsChanged", s));
57
+ }, this.__onChainChanged = (e) => {
58
+ const t = e.data.net.chainId;
59
+ this.store.getState().setCurrentNetwork(Number(t)), this.walletEventEmitter.emit("chainChanged", e.data.net);
60
+ }, this.__onConnect = () => {
61
+ }, this.__onDisconnect = async () => {
62
+ const e = await this.getProvider();
63
+ this.resetStatus(), this.removeEventListener(), this.walletEventEmitter.emit("disconnect"), e == null || e.request({
64
+ method: "wallet_revokePermissions",
65
+ params: [
66
+ {
67
+ eth_accounts: {}
68
+ }
69
+ ]
70
+ });
71
+ }, this.chainType = v, this.connectorType = C.Run;
72
+ }
73
+ }
74
+ export {
75
+ y as G
76
+ };
@@ -0,0 +1 @@
1
+ "use strict";const u=require("./index-CQkA0oWr.js");class f extends u.BaseConnector{constructor(v,w){super(v,null),this.getProvider=async()=>{var t,s,a,r;let e;if(this.provider)e=this.provider;else{const n=await Promise.resolve().then(()=>require("./dapp.es-sLnregcu.js")).then(c=>c.dapp_es),i=(n==null?void 0:n.GelWallet)??(n==null?void 0:n.Web3Kit)??(n==null?void 0:n.default);if(!i)throw new Error("GelWallet SDK not found in @web3jskit/dapp");const o=(t=this.chainType)==null?void 0:t.toLowerCase();if((s=window.Web3Kit)!=null&&s._instance)e=window.Web3Kit._instance.provider[o];else{const c=((r=(a=this.store)==null?void 0:a.getState())==null?void 0:r.useTestWallet)||!1;typeof i.config=="function"&&i.config({hideEvokingButton:!1,takeover:{ethereum:!0,solana:!0,tronLink:!0},useTestWallet:c});const h=new i;if(this.instance=h,e=await new Promise(l=>{const d=()=>{h.provider&&h.provider[o]?l(h.provider[o]):setTimeout(d,100)};d()}),window.Web3Kit=window.Web3Kit||{},window.Web3Kit._instance=h,this.chainType===u.ChainType.EVM){const l=e.request,d=async({methodName:m,...p})=>await l({chainType:this.chainType,methodName:m,...p});e.request=d}}this.provider=e}return this.provider||{}},this.addEventListener=async()=>{window.addEventListener("message",this.handleWeb3KitEvent)},this.removeEventListener=async()=>{window.removeEventListener("message",this.handleWeb3KitEvent)},this.handleWeb3KitEvent=e=>{const t=e.data;t.target==="jsweb3-did"&&(t.eventName==="disconnect"?this.__onDisconnect():t.eventName==="accountsChanged"?this.__onAccountsChanged(t):t.eventName==="chainChanged"&&this.__onChainChanged(t))},this.__onAccountsChanged=e=>{var a,r,n,i,o;if(!((a=e.data.connectedWebs)==null?void 0:a.find(c=>c.net.chainType===this.chainType)))return;const s=(o=(i=(n=(r=e.data)==null?void 0:r.account)==null?void 0:n.seriesWallets)==null?void 0:i[this.chainType])==null?void 0:o.walletAddress;s&&(this.connectSuccess(s),this.walletEventEmitter.emit("accountsChanged",s))},this.__onChainChanged=e=>{const t=e.data.net.chainId;this.store.getState().setCurrentNetwork(Number(t)),this.walletEventEmitter.emit("chainChanged",e.data.net)},this.__onConnect=()=>{},this.__onDisconnect=async()=>{const e=await this.getProvider();this.resetStatus(),this.removeEventListener(),this.walletEventEmitter.emit("disconnect"),e==null||e.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]})},this.chainType=w,this.connectorType=u.ConnectorType.Run}}exports.GelWalletConnector=f;