@hinkal/common 0.2.15 → 0.2.16

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 (1149) hide show
  1. package/API/API.cjs +1 -1
  2. package/API/API.d.ts +73 -34
  3. package/API/API.mjs +112 -59
  4. package/API/accessCodeCalls.cjs +1 -0
  5. package/API/accessCodeCalls.d.ts +23 -0
  6. package/API/accessCodeCalls.mjs +23 -0
  7. package/API/admin-calls.cjs +1 -0
  8. package/API/admin-calls.d.ts +2 -0
  9. package/API/admin-calls.mjs +8 -0
  10. package/API/ai-calls.cjs +1 -1
  11. package/API/ai-calls.d.ts +8 -0
  12. package/API/ai-calls.mjs +16 -8
  13. package/API/brotherhoodCalls.cjs +1 -0
  14. package/API/brotherhoodCalls.d.ts +82 -0
  15. package/API/brotherhoodCalls.mjs +59 -0
  16. package/API/callLifiAPI.cjs +1 -0
  17. package/API/callLifiAPI.d.ts +33 -0
  18. package/API/callLifiAPI.mjs +11 -0
  19. package/API/callMonitor.cjs +1 -1
  20. package/API/callMonitor.mjs +5 -2
  21. package/API/callOdosAPI.cjs +1 -1
  22. package/API/callOdosAPI.mjs +12 -13
  23. package/API/callOkxAPI.cjs +1 -0
  24. package/API/callOkxAPI.d.ts +10 -0
  25. package/API/callOkxAPI.mjs +13 -0
  26. package/API/callOneInchAPI.cjs +1 -1
  27. package/API/callOneInchAPI.mjs +9 -8
  28. package/API/callRelayer.cjs +1 -1
  29. package/API/callRelayer.d.ts +17 -0
  30. package/API/callRelayer.mjs +15 -6
  31. package/API/checkRisk.cjs +1 -1
  32. package/API/checkRisk.mjs +5 -4
  33. package/API/duneAPI.cjs +1 -1
  34. package/API/duneAPI.mjs +7 -5
  35. package/API/enclaveCalls.cjs +1 -0
  36. package/API/enclaveCalls.d.ts +9 -0
  37. package/API/enclaveCalls.mjs +11 -0
  38. package/API/fetchCommitmentsCache.cjs +1 -1
  39. package/API/fetchCommitmentsCache.d.ts +12 -4
  40. package/API/fetchCommitmentsCache.mjs +21 -7
  41. package/API/generate-trading-points.cjs +1 -0
  42. package/API/generate-trading-points.d.ts +27 -0
  43. package/API/generate-trading-points.mjs +45 -0
  44. package/API/get-token-data.cjs +1 -0
  45. package/API/get-token-data.d.ts +6 -0
  46. package/API/get-token-data.mjs +8 -0
  47. package/API/getBridgeProtocols.cjs +1 -0
  48. package/API/getBridgeProtocols.d.ts +7 -0
  49. package/API/getBridgeProtocols.mjs +8 -0
  50. package/API/getGasEstimates.cjs +1 -1
  51. package/API/getGasEstimates.d.ts +2 -2
  52. package/API/getGasEstimates.mjs +10 -10
  53. package/API/getLifiStatus.cjs +1 -0
  54. package/API/getLifiStatus.d.ts +24 -0
  55. package/API/getLifiStatus.mjs +15 -0
  56. package/API/getRelayerURL.cjs +1 -1
  57. package/API/getRelayerURL.mjs +6 -6
  58. package/API/getServerURL.cjs +1 -1
  59. package/API/getServerURL.d.ts +3 -1
  60. package/API/getServerURL.mjs +60 -29
  61. package/API/getTokenPrice.cjs +1 -1
  62. package/API/getTokenPrice.d.ts +0 -11
  63. package/API/getTokenPrice.mjs +8 -16
  64. package/API/getWebsiteURL.cjs +1 -0
  65. package/API/getWebsiteURL.d.ts +3 -0
  66. package/API/getWebsiteURL.mjs +56 -0
  67. package/API/index.d.ts +9 -3
  68. package/API/is-tx-stateless.cjs +1 -1
  69. package/API/is-tx-stateless.d.ts +4 -2
  70. package/API/is-tx-stateless.mjs +18 -7
  71. package/API/kycCalls.cjs +1 -1
  72. package/API/kycCalls.d.ts +4 -7
  73. package/API/kycCalls.mjs +34 -32
  74. package/API/leaderboardCalls.cjs +1 -0
  75. package/API/leaderboardCalls.d.ts +14 -0
  76. package/API/leaderboardCalls.mjs +16 -0
  77. package/API/proxyAccountsCalls.cjs +1 -0
  78. package/API/proxyAccountsCalls.d.ts +4 -0
  79. package/API/proxyAccountsCalls.mjs +26 -0
  80. package/API/referralsCalls.cjs +1 -0
  81. package/API/referralsCalls.d.ts +22 -0
  82. package/API/referralsCalls.mjs +22 -0
  83. package/API/relayCalls.cjs +1 -1
  84. package/API/relayCalls.d.ts +1 -1
  85. package/API/relayCalls.mjs +8 -5
  86. package/API/resolve-sns.cjs +1 -0
  87. package/API/resolve-sns.d.ts +1 -0
  88. package/API/resolve-sns.mjs +12 -0
  89. package/API/restoreSnapshots.cjs +1 -1
  90. package/API/restoreSnapshots.mjs +4 -3
  91. package/API/rewardsUserCalls.cjs +1 -0
  92. package/API/rewardsUserCalls.d.ts +51 -0
  93. package/API/rewardsUserCalls.mjs +44 -0
  94. package/API/scheduled-transactions-calls.cjs +1 -0
  95. package/API/scheduled-transactions-calls.d.ts +6 -0
  96. package/API/scheduled-transactions-calls.mjs +9 -0
  97. package/API/seedless-calls.cjs +1 -0
  98. package/API/seedless-calls.d.ts +53 -0
  99. package/API/seedless-calls.mjs +12 -0
  100. package/API/send-telegram-callback.cjs +1 -0
  101. package/API/send-telegram-callback.d.ts +7 -0
  102. package/API/send-telegram-callback.mjs +11 -0
  103. package/API/simulate-batch-tx.cjs +1 -0
  104. package/API/simulate-batch-tx.d.ts +3 -0
  105. package/API/simulate-batch-tx.mjs +13 -0
  106. package/API/solana-calls.cjs +1 -0
  107. package/API/solana-calls.d.ts +34 -0
  108. package/API/solana-calls.mjs +19 -0
  109. package/API/tenderly.api.cjs +1 -1
  110. package/API/tenderly.api.mjs +24 -22
  111. package/API/token-calls.cjs +1 -1
  112. package/API/token-calls.d.ts +1 -1
  113. package/API/token-calls.mjs +12 -7
  114. package/API/unspent-utxos-calls.cjs +1 -0
  115. package/API/unspent-utxos-calls.d.ts +26 -0
  116. package/API/unspent-utxos-calls.mjs +27 -0
  117. package/API/weeklyAnalyticCalls.cjs +1 -0
  118. package/API/weeklyAnalyticCalls.d.ts +22 -0
  119. package/API/weeklyAnalyticCalls.mjs +16 -0
  120. package/README.md +61 -0
  121. package/constants/activity.constants.cjs +1 -0
  122. package/constants/activity.constants.d.ts +2 -0
  123. package/constants/activity.constants.mjs +14 -0
  124. package/constants/addresses.constants.cjs +1 -1
  125. package/constants/addresses.constants.d.ts +9 -0
  126. package/constants/addresses.constants.mjs +71 -41
  127. package/constants/backend.constants.cjs +1 -1
  128. package/constants/backend.constants.d.ts +3 -1
  129. package/constants/backend.constants.mjs +6 -7
  130. package/constants/bridging.constants.cjs +1 -0
  131. package/constants/bridging.constants.d.ts +5 -0
  132. package/constants/bridging.constants.mjs +8 -0
  133. package/constants/chains.constants.cjs +1 -1
  134. package/constants/chains.constants.d.ts +8 -3
  135. package/constants/chains.constants.mjs +88 -79
  136. package/constants/coingecko.constants.cjs +1 -1
  137. package/constants/coingecko.constants.d.ts +4 -1
  138. package/constants/coingecko.constants.mjs +25 -15
  139. package/constants/contracts.constants.cjs +1 -1
  140. package/constants/contracts.constants.mjs +74 -252
  141. package/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
  142. package/constants/deploy-data/deploy-data-arbMainnet.json.mjs +1487 -8687
  143. package/constants/deploy-data/deploy-data-arcTestnet.json.cjs +1 -0
  144. package/constants/deploy-data/deploy-data-arcTestnet.json.mjs +7381 -0
  145. package/constants/deploy-data/deploy-data-avalanche.json.cjs +1 -1
  146. package/constants/deploy-data/deploy-data-avalanche.json.mjs +258 -8430
  147. package/constants/deploy-data/deploy-data-base.json.cjs +1 -1
  148. package/constants/deploy-data/deploy-data-base.json.mjs +1491 -8681
  149. package/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +1 -1
  150. package/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +258 -7898
  151. package/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
  152. package/constants/deploy-data/deploy-data-ethMainnet.json.mjs +1835 -8845
  153. package/constants/deploy-data/deploy-data-localhost.json.cjs +1 -1
  154. package/constants/deploy-data/deploy-data-localhost.json.mjs +1209 -10210
  155. package/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
  156. package/constants/deploy-data/deploy-data-optimism.json.mjs +1491 -8681
  157. package/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
  158. package/constants/deploy-data/deploy-data-polygon.json.mjs +1491 -8681
  159. package/constants/deploy-data/deploy-data-solana.json.cjs +1 -0
  160. package/constants/deploy-data/deploy-data-solana.json.mjs +6111 -0
  161. package/constants/deploy-data/index.d.ts +3 -3
  162. package/constants/events.constants.cjs +1 -0
  163. package/constants/events.constants.d.ts +1 -0
  164. package/constants/events.constants.mjs +12 -0
  165. package/constants/fees.constants.cjs +1 -1
  166. package/constants/fees.constants.d.ts +1 -12
  167. package/constants/fees.constants.mjs +4 -35
  168. package/constants/function-signatures.constants.cjs +1 -0
  169. package/constants/function-signatures.constants.d.ts +5 -0
  170. package/constants/function-signatures.constants.mjs +8 -0
  171. package/constants/index.d.ts +11 -6
  172. package/constants/kyc.constants.cjs +1 -1
  173. package/constants/kyc.constants.mjs +23 -35
  174. package/constants/lifi.constants.cjs +1 -0
  175. package/constants/lifi.constants.d.ts +1 -0
  176. package/constants/lifi.constants.mjs +4 -0
  177. package/constants/link.constant.cjs +1 -0
  178. package/constants/link.constant.d.ts +1 -0
  179. package/constants/link.constant.mjs +4 -0
  180. package/constants/mediaUrls.constants.cjs +1 -1
  181. package/constants/mediaUrls.constants.d.ts +10 -0
  182. package/constants/mediaUrls.constants.mjs +14 -4
  183. package/constants/oauthUrls.constants.cjs +1 -0
  184. package/constants/oauthUrls.constants.d.ts +7 -0
  185. package/constants/oauthUrls.constants.mjs +10 -0
  186. package/constants/okx.constants.cjs +1 -0
  187. package/constants/okx.constants.d.ts +2 -0
  188. package/constants/okx.constants.mjs +5 -0
  189. package/constants/permit2.constants.cjs +1 -1
  190. package/constants/permit2.constants.d.ts +6 -0
  191. package/constants/permit2.constants.mjs +14 -2
  192. package/constants/presale.constants.cjs +1 -0
  193. package/constants/presale.constants.d.ts +78 -0
  194. package/{externalABIs/LidoWstEthAbi.json.mjs → constants/presale.constants.mjs} +242 -218
  195. package/constants/protocol.constants.cjs +1 -1
  196. package/constants/protocol.constants.d.ts +32 -11
  197. package/constants/protocol.constants.mjs +44 -36
  198. package/constants/reorg-depths.constants.cjs +1 -1
  199. package/constants/reorg-depths.constants.mjs +14 -11
  200. package/constants/rewards.constants.cjs +1 -1
  201. package/constants/rewards.constants.d.ts +3 -4
  202. package/constants/rewards.constants.mjs +14 -21
  203. package/constants/save-depths.cjs +1 -0
  204. package/constants/save-depths.d.ts +3 -0
  205. package/constants/save-depths.mjs +19 -0
  206. package/constants/server.constants.cjs +1 -1
  207. package/constants/server.constants.d.ts +103 -79
  208. package/constants/server.constants.mjs +195 -148
  209. package/constants/tasks.constants.cjs +1 -0
  210. package/constants/tasks.constants.d.ts +9 -0
  211. package/constants/tasks.constants.mjs +230 -0
  212. package/constants/token-data/ERC20Registry.cjs +1 -1
  213. package/constants/token-data/ERC20Registry.mjs +50 -33
  214. package/constants/token-data/arbMainnetRegistry.json.cjs +1 -1
  215. package/constants/token-data/arbMainnetRegistry.json.mjs +1185 -526
  216. package/constants/token-data/arbMainnetRegistryFixed.json.cjs +1 -1
  217. package/constants/token-data/arbMainnetRegistryFixed.json.mjs +1218 -463
  218. package/constants/token-data/arcTestnetRegistry.json.cjs +1 -0
  219. package/constants/token-data/arcTestnetRegistry.json.mjs +439 -0
  220. package/constants/token-data/avalancheRegistry.json.cjs +1 -1
  221. package/constants/token-data/avalancheRegistry.json.mjs +296 -322
  222. package/constants/token-data/avalancheRegistryFixed.json.cjs +1 -1
  223. package/constants/token-data/avalancheRegistryFixed.json.mjs +297 -323
  224. package/constants/token-data/baseRegistry.json.cjs +1 -1
  225. package/constants/token-data/baseRegistry.json.mjs +715 -232
  226. package/constants/token-data/baseRegistryFixed.json.cjs +1 -1
  227. package/constants/token-data/baseRegistryFixed.json.mjs +736 -217
  228. package/constants/token-data/bnbMainnetRegistry.json.cjs +1 -1
  229. package/constants/token-data/bnbMainnetRegistry.json.mjs +444 -516
  230. package/constants/token-data/bnbMainnetRegistryFixed.json.cjs +1 -1
  231. package/constants/token-data/bnbMainnetRegistryFixed.json.mjs +444 -516
  232. package/constants/token-data/ethMainnetRegistry.json.cjs +1 -1
  233. package/constants/token-data/ethMainnetRegistry.json.mjs +2710 -1798
  234. package/constants/token-data/ethMainnetRegistryFixed.json.cjs +1 -1
  235. package/constants/token-data/ethMainnetRegistryFixed.json.mjs +2894 -1494
  236. package/constants/token-data/index.cjs +1 -1
  237. package/constants/token-data/index.d.ts +228 -291
  238. package/constants/token-data/index.mjs +34 -28
  239. package/constants/token-data/localhostRegistry.json.cjs +1 -1
  240. package/constants/token-data/localhostRegistry.json.mjs +3 -3
  241. package/constants/token-data/optimismRegistry.json.cjs +1 -1
  242. package/constants/token-data/optimismRegistry.json.mjs +129 -1402
  243. package/constants/token-data/optimismRegistryFixed.json.cjs +1 -1
  244. package/constants/token-data/optimismRegistryFixed.json.mjs +129 -1322
  245. package/constants/token-data/polygonRegistry.json.cjs +1 -1
  246. package/constants/token-data/polygonRegistry.json.mjs +1395 -784
  247. package/constants/token-data/polygonRegistryFixed.json.cjs +1 -1
  248. package/constants/token-data/polygonRegistryFixed.json.mjs +1447 -746
  249. package/constants/token-data/solanaLocalnetRegistry.json.cjs +1 -0
  250. package/constants/token-data/solanaLocalnetRegistry.json.mjs +24 -0
  251. package/constants/token-data/solanaMainnetRegistry.json.cjs +1 -0
  252. package/constants/token-data/solanaMainnetRegistry.json.mjs +560 -0
  253. package/constants/token-data/tokenPricing.consts.d.ts +0 -3
  254. package/constants/vite.constants.cjs +1 -1
  255. package/constants/vite.constants.d.ts +7 -11
  256. package/constants/vite.constants.mjs +13 -38
  257. package/constants/wallet.constants.cjs +1 -0
  258. package/constants/wallet.constants.d.ts +7 -0
  259. package/constants/wallet.constants.mjs +10 -0
  260. package/crypto/preProcessing.cjs +1 -1
  261. package/crypto/preProcessing.mjs +3 -3
  262. package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.cjs +1 -0
  263. package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.d.ts +18 -0
  264. package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.mjs +175 -0
  265. package/data-structures/ApprovalDBs/index.d.ts +1 -0
  266. package/data-structures/Hinkal/Hinkal.cjs +1 -1
  267. package/data-structures/Hinkal/Hinkal.d.ts +40 -46
  268. package/data-structures/Hinkal/Hinkal.mjs +344 -191
  269. package/data-structures/Hinkal/IHinkal.d.ts +39 -45
  270. package/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -0
  271. package/data-structures/Hinkal/handleAutoDepositBack.d.ts +5 -0
  272. package/data-structures/Hinkal/handleAutoDepositBack.mjs +108 -0
  273. package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.cjs +1 -1
  274. package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.d.ts +5 -1
  275. package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.mjs +31 -50
  276. package/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
  277. package/data-structures/Hinkal/hinkalActionReceive.d.ts +4 -1
  278. package/data-structures/Hinkal/hinkalActionReceive.mjs +33 -31
  279. package/data-structures/Hinkal/hinkalApprove.cjs +1 -1
  280. package/data-structures/Hinkal/hinkalApprove.d.ts +2 -1
  281. package/data-structures/Hinkal/hinkalApprove.mjs +73 -78
  282. package/data-structures/Hinkal/hinkalCheckSolanaTokenRegistry.cjs +1 -0
  283. package/data-structures/Hinkal/hinkalCheckSolanaTokenRegistry.d.ts +3 -0
  284. package/data-structures/Hinkal/hinkalCheckSolanaTokenRegistry.mjs +28 -0
  285. package/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +1 -1
  286. package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +46 -7
  287. package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
  288. package/data-structures/Hinkal/hinkalDeposit.mjs +76 -62
  289. package/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -0
  290. package/data-structures/Hinkal/hinkalDepositAndWithdraw.d.ts +4 -0
  291. package/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +188 -0
  292. package/data-structures/Hinkal/hinkalGetRecipientInfo.cjs +1 -1
  293. package/data-structures/Hinkal/hinkalGetRecipientInfo.d.ts +1 -1
  294. package/data-structures/Hinkal/hinkalGetRecipientInfo.mjs +4 -4
  295. package/data-structures/Hinkal/hinkalGetZkMeProvider.d.ts +27 -2
  296. package/data-structures/Hinkal/hinkalInsideTransact.cjs +1 -1
  297. package/data-structures/Hinkal/hinkalInsideTransact.d.ts +3 -1
  298. package/data-structures/Hinkal/hinkalInsideTransact.mjs +84 -74
  299. package/data-structures/Hinkal/hinkalMultiSend.cjs +1 -1
  300. package/data-structures/Hinkal/hinkalMultiSend.mjs +6 -6
  301. package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
  302. package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +4 -1
  303. package/data-structures/Hinkal/hinkalPrivateWallet.mjs +127 -73
  304. package/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
  305. package/data-structures/Hinkal/hinkalProxySwap.d.ts +4 -1
  306. package/data-structures/Hinkal/hinkalProxySwap.mjs +48 -24
  307. package/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -0
  308. package/data-structures/Hinkal/hinkalProxyToPrivate.d.ts +6 -0
  309. package/data-structures/Hinkal/hinkalProxyToPrivate.mjs +45 -0
  310. package/data-structures/Hinkal/hinkalSignSubAccount.cjs +1 -1
  311. package/data-structures/Hinkal/hinkalSignSubAccount.d.ts +3 -2
  312. package/data-structures/Hinkal/hinkalSignSubAccount.mjs +19 -17
  313. package/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -0
  314. package/data-structures/Hinkal/hinkalSolanaDeposit.d.ts +4 -0
  315. package/data-structures/Hinkal/hinkalSolanaDeposit.mjs +133 -0
  316. package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -0
  317. package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +3 -0
  318. package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +236 -0
  319. package/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -0
  320. package/data-structures/Hinkal/hinkalSolanaProxySend.d.ts +6 -0
  321. package/data-structures/Hinkal/hinkalSolanaProxySend.mjs +55 -0
  322. package/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -0
  323. package/data-structures/Hinkal/hinkalSolanaProxyShield.d.ts +6 -0
  324. package/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +99 -0
  325. package/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -0
  326. package/data-structures/Hinkal/hinkalSolanaProxySwap.d.ts +5 -0
  327. package/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +96 -0
  328. package/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -0
  329. package/data-structures/Hinkal/hinkalSolanaSwap.d.ts +4 -0
  330. package/data-structures/Hinkal/hinkalSolanaSwap.mjs +119 -0
  331. package/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -0
  332. package/data-structures/Hinkal/hinkalSolanaTransfer.d.ts +3 -0
  333. package/data-structures/Hinkal/hinkalSolanaTransfer.mjs +89 -0
  334. package/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -0
  335. package/data-structures/Hinkal/hinkalSolanaWithdraw.d.ts +3 -0
  336. package/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +105 -0
  337. package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
  338. package/data-structures/Hinkal/hinkalSwap.d.ts +3 -1
  339. package/data-structures/Hinkal/hinkalSwap.mjs +103 -58
  340. package/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
  341. package/data-structures/Hinkal/hinkalTransfer.d.ts +4 -1
  342. package/data-structures/Hinkal/hinkalTransfer.mjs +127 -2
  343. package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
  344. package/data-structures/Hinkal/hinkalWithdraw.d.ts +2 -2
  345. package/data-structures/Hinkal/hinkalWithdraw.mjs +95 -60
  346. package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -0
  347. package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.d.ts +4 -0
  348. package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +147 -0
  349. package/data-structures/Hinkal/index.d.ts +5 -4
  350. package/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
  351. package/data-structures/Hinkal/resetMerkleTrees.mjs +59 -27
  352. package/data-structures/IndexedDB/activity-db.cjs +1 -1
  353. package/data-structures/IndexedDB/activity-db.d.ts +2 -3
  354. package/data-structures/IndexedDB/activity-db.mjs +146 -83
  355. package/data-structures/IndexedDB/balances-db.cjs +1 -1
  356. package/data-structures/IndexedDB/balances-db.d.ts +1 -1
  357. package/data-structures/IndexedDB/balances-db.mjs +59 -41
  358. package/data-structures/IndexedDB/contact-db.cjs +1 -1
  359. package/data-structures/IndexedDB/contact-db.mjs +83 -29
  360. package/data-structures/IndexedDB/index.d.ts +1 -0
  361. package/data-structures/IndexedDB/signatures-db.cjs +1 -0
  362. package/data-structures/IndexedDB/signatures-db.d.ts +10 -0
  363. package/data-structures/IndexedDB/signatures-db.mjs +63 -0
  364. package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.cjs +1 -1
  365. package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.d.ts +2 -2
  366. package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs +32 -31
  367. package/data-structures/TokenDBs/AlchemyPublicTokensDB.cjs +1 -0
  368. package/data-structures/TokenDBs/AlchemyPublicTokensDB.d.ts +19 -0
  369. package/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +204 -0
  370. package/data-structures/TokenDBs/ArcPublicTokensDB.cjs +1 -0
  371. package/data-structures/TokenDBs/ArcPublicTokensDB.d.ts +11 -0
  372. package/data-structures/TokenDBs/ArcPublicTokensDB.mjs +112 -0
  373. package/data-structures/TokenDBs/EventsPublicTokensDB.cjs +1 -0
  374. package/data-structures/TokenDBs/EventsPublicTokensDB.d.ts +17 -0
  375. package/data-structures/TokenDBs/EventsPublicTokensDB.mjs +173 -0
  376. package/data-structures/TokenDBs/IPublicTokensDB.d.ts +6 -0
  377. package/data-structures/TokenDBs/PrivateTokensDB.cjs +1 -1
  378. package/data-structures/TokenDBs/PrivateTokensDB.mjs +48 -36
  379. package/data-structures/TokenDBs/PublicTokensDB.cjs +1 -1
  380. package/data-structures/TokenDBs/PublicTokensDB.d.ts +4 -8
  381. package/data-structures/TokenDBs/PublicTokensDB.mjs +21 -75
  382. package/data-structures/TokenDBs/index.d.ts +2 -0
  383. package/data-structures/TokenDBs/token-visibility-db.cjs +1 -0
  384. package/data-structures/TokenDBs/token-visibility-db.d.ts +17 -0
  385. package/data-structures/TokenDBs/token-visibility-db.mjs +96 -0
  386. package/data-structures/crypto-keys/decodeUTXO.cjs +1 -1
  387. package/data-structures/crypto-keys/decodeUTXO.d.ts +15 -3
  388. package/data-structures/crypto-keys/decodeUTXO.mjs +84 -26
  389. package/data-structures/crypto-keys/encryptDecryptUtxo.cjs +1 -1
  390. package/data-structures/crypto-keys/encryptDecryptUtxo.mjs +36 -30
  391. package/data-structures/crypto-keys/keys.cjs +1 -1
  392. package/data-structures/crypto-keys/keys.d.ts +21 -0
  393. package/data-structures/crypto-keys/keys.mjs +118 -38
  394. package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.cjs +1 -0
  395. package/data-structures/event-service/{AbstractAccessTokenSnapshotService.d.ts → evm/AbstractAccessTokenSnapshotService.d.ts} +4 -5
  396. package/data-structures/event-service/{AbstractAccessTokenSnapshotService.mjs → evm/AbstractAccessTokenSnapshotService.mjs} +12 -23
  397. package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.cjs +1 -0
  398. package/data-structures/event-service/{AbstractApprovalsSnapshotService.d.ts → evm/AbstractApprovalsSnapshotService.d.ts} +4 -5
  399. package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.mjs +92 -0
  400. package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.cjs +1 -0
  401. package/data-structures/event-service/{AbstractCommitmentsSnapshotService.d.ts → evm/AbstractCommitmentsSnapshotService.d.ts} +5 -6
  402. package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.mjs +86 -0
  403. package/data-structures/event-service/evm/AbstractEventService.cjs +1 -0
  404. package/data-structures/event-service/evm/AbstractEventService.d.ts +12 -0
  405. package/data-structures/event-service/evm/AbstractEventService.mjs +37 -0
  406. package/data-structures/event-service/evm/AbstractNullifierSnapshotService.cjs +1 -0
  407. package/data-structures/event-service/{AbstractNullifierSnapshotService.d.ts → evm/AbstractNullifierSnapshotService.d.ts} +4 -4
  408. package/data-structures/event-service/evm/AbstractNullifierSnapshotService.mjs +48 -0
  409. package/data-structures/event-service/evm/AbstractSnapshotService.cjs +1 -0
  410. package/data-structures/event-service/{AbstractSnapshotService.d.ts → evm/AbstractSnapshotService.d.ts} +6 -7
  411. package/data-structures/event-service/evm/AbstractSnapshotService.mjs +33 -0
  412. package/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -0
  413. package/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +26 -0
  414. package/data-structures/event-service/evm/BlockchainEventEmitter.mjs +90 -0
  415. package/data-structures/event-service/index.d.ts +13 -6
  416. package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.cjs +1 -0
  417. package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.d.ts +34 -0
  418. package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.mjs +87 -0
  419. package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.cjs +1 -0
  420. package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.d.ts +29 -0
  421. package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +96 -0
  422. package/data-structures/event-service/solana/AbstractSolanaEventService.cjs +1 -0
  423. package/data-structures/event-service/solana/AbstractSolanaEventService.d.ts +22 -0
  424. package/data-structures/event-service/solana/AbstractSolanaEventService.mjs +33 -0
  425. package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.cjs +1 -0
  426. package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.d.ts +21 -0
  427. package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.mjs +49 -0
  428. package/data-structures/event-service/solana/AbstractSolanaSnapshotService.cjs +1 -0
  429. package/data-structures/event-service/solana/AbstractSolanaSnapshotService.d.ts +22 -0
  430. package/data-structures/event-service/solana/AbstractSolanaSnapshotService.mjs +33 -0
  431. package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.cjs +1 -0
  432. package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.d.ts +41 -0
  433. package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.mjs +154 -0
  434. package/data-structures/http/BasicHttpClient.cjs +1 -0
  435. package/data-structures/http/BasicHttpClient.d.ts +11 -0
  436. package/data-structures/http/BasicHttpClient.mjs +25 -0
  437. package/data-structures/http/HttpClient.cjs +1 -0
  438. package/data-structures/http/HttpClient.d.ts +10 -0
  439. package/data-structures/http/HttpClient.mjs +15 -0
  440. package/data-structures/http/index.d.ts +2 -0
  441. package/data-structures/index.d.ts +4 -1
  442. package/data-structures/presale/PresaleContractWrapper.cjs +1 -0
  443. package/data-structures/presale/PresaleContractWrapper.d.ts +23 -0
  444. package/data-structures/presale/PresaleContractWrapper.mjs +54 -0
  445. package/data-structures/presale/index.d.ts +1 -0
  446. package/data-structures/provider-adapter/IProviderAdapter.d.ts +4 -3
  447. package/data-structures/snapshot/SnapshotFetcherService.cjs +1 -0
  448. package/data-structures/snapshot/SnapshotFetcherService.d.ts +16 -0
  449. package/data-structures/snapshot/SnapshotFetcherService.mjs +42 -0
  450. package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +1 -0
  451. package/data-structures/snapshot/{ClientAccessTokenSnapshotService.d.ts → evm-snapshots/ClientAccessTokenSnapshotService.d.ts} +4 -3
  452. package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +41 -0
  453. package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.cjs +1 -0
  454. package/data-structures/snapshot/{ClientApprovalsSnapshotService.d.ts → evm-snapshots/ClientApprovalsSnapshotService.d.ts} +4 -4
  455. package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.mjs +43 -0
  456. package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs +1 -0
  457. package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.d.ts +8 -0
  458. package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +35 -0
  459. package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs +1 -0
  460. package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.d.ts +8 -0
  461. package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +34 -0
  462. package/data-structures/snapshot/index.d.ts +8 -0
  463. package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs +1 -0
  464. package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.d.ts +8 -0
  465. package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +42 -0
  466. package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs +1 -0
  467. package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.d.ts +8 -0
  468. package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +34 -0
  469. package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs +1 -0
  470. package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.d.ts +8 -0
  471. package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +34 -0
  472. package/data-structures/token-price-fetcher/TokenChecker.cjs +1 -1
  473. package/data-structures/token-price-fetcher/TokenChecker.d.ts +1 -13
  474. package/data-structures/token-price-fetcher/TokenChecker.mjs +13 -26
  475. package/data-structures/transactions-manager/history/history.types.cjs +1 -1
  476. package/data-structures/transactions-manager/history/history.types.d.ts +2 -81
  477. package/data-structures/transactions-manager/history/history.types.mjs +2 -42
  478. package/data-structures/transactions-manager/index.d.ts +0 -1
  479. package/data-structures/utxo/Utxo.cjs +1 -1
  480. package/data-structures/utxo/Utxo.d.ts +6 -1
  481. package/data-structures/utxo/Utxo.mjs +37 -24
  482. package/error-handling/customErrors/ErrorWithTx.cjs +1 -0
  483. package/error-handling/customErrors/ErrorWithTx.d.ts +5 -0
  484. package/error-handling/customErrors/ErrorWithTx.mjs +9 -0
  485. package/error-handling/customErrors/SimulationFailureError.cjs +1 -0
  486. package/error-handling/customErrors/SimulationFailureError.d.ts +10 -0
  487. package/error-handling/customErrors/SimulationFailureError.mjs +9 -0
  488. package/error-handling/customErrors/index.d.ts +2 -0
  489. package/error-handling/error-codes.constants.cjs +2 -2
  490. package/error-handling/error-codes.constants.d.ts +19 -20
  491. package/error-handling/error-codes.constants.mjs +178 -179
  492. package/error-handling/get-error.message.cjs +1 -1
  493. package/error-handling/get-error.message.d.ts +2 -0
  494. package/error-handling/get-error.message.mjs +81 -36
  495. package/error-handling/index.d.ts +1 -2
  496. package/error-handling/types.cjs +1 -1
  497. package/error-handling/types.d.ts +4 -1
  498. package/error-handling/types.mjs +2 -2
  499. package/externalABIs/ERC1155.json.cjs +1 -0
  500. package/externalABIs/ERC1155.json.mjs +320 -0
  501. package/externalABIs/ERC721.json.cjs +1 -0
  502. package/externalABIs/{BeefyZapOneInchAbi.json.mjs → ERC721.json.mjs} +162 -167
  503. package/externalABIs/NodeInterfaceABI.json.cjs +1 -0
  504. package/externalABIs/NodeInterfaceABI.json.mjs +280 -0
  505. package/externalABIs/index.cjs +1 -1
  506. package/externalABIs/index.d.ts +25 -79
  507. package/externalABIs/index.mjs +18 -20
  508. package/externalABIs/swapAbi.cjs +1 -0
  509. package/externalABIs/{BeefyZapAbi.json.mjs → swapAbi.mjs} +161 -81
  510. package/functions/connectors.types.d.ts +14 -0
  511. package/functions/index.d.ts +1 -1
  512. package/functions/pre-transaction/addressTableLookup.cjs +1 -0
  513. package/functions/pre-transaction/addressTableLookup.d.ts +4 -0
  514. package/functions/pre-transaction/addressTableLookup.mjs +44 -0
  515. package/functions/pre-transaction/constructAdminData.cjs +1 -0
  516. package/functions/pre-transaction/constructAdminData.d.ts +3 -0
  517. package/functions/pre-transaction/constructAdminData.mjs +33 -0
  518. package/functions/pre-transaction/convert-okx-instructions.cjs +1 -0
  519. package/functions/pre-transaction/convert-okx-instructions.d.ts +12 -0
  520. package/functions/pre-transaction/convert-okx-instructions.mjs +30 -0
  521. package/functions/pre-transaction/getExternalSwapAddress.cjs +1 -1
  522. package/functions/pre-transaction/getExternalSwapAddress.mjs +9 -6
  523. package/functions/pre-transaction/getFeeStructure.cjs +1 -1
  524. package/functions/pre-transaction/getFeeStructure.d.ts +2 -2
  525. package/functions/pre-transaction/getFeeStructure.mjs +8 -9
  526. package/functions/pre-transaction/getFlatFees.cjs +1 -1
  527. package/functions/pre-transaction/getFlatFees.d.ts +2 -2
  528. package/functions/pre-transaction/getFlatFees.mjs +43 -166
  529. package/functions/pre-transaction/getSolanaCalldataHash.cjs +1 -0
  530. package/functions/pre-transaction/getSolanaCalldataHash.d.ts +4 -0
  531. package/functions/pre-transaction/getSolanaCalldataHash.mjs +36 -0
  532. package/functions/pre-transaction/getVolatileTransferAmount.cjs +1 -0
  533. package/functions/pre-transaction/getVolatileTransferAmount.d.ts +9 -0
  534. package/functions/pre-transaction/getVolatileTransferAmount.mjs +53 -0
  535. package/functions/pre-transaction/index.d.ts +12 -1
  536. package/functions/pre-transaction/initTokenLimitIfNeeded.cjs +1 -0
  537. package/functions/pre-transaction/initTokenLimitIfNeeded.d.ts +3 -0
  538. package/functions/pre-transaction/initTokenLimitIfNeeded.mjs +20 -0
  539. package/functions/pre-transaction/interaction-to-action.cjs +1 -1
  540. package/functions/pre-transaction/interaction-to-action.d.ts +2 -2
  541. package/functions/pre-transaction/interaction-to-action.mjs +6 -53
  542. package/functions/pre-transaction/merge-with-fee-structure-emporium.cjs +1 -0
  543. package/functions/pre-transaction/merge-with-fee-structure-emporium.d.ts +3 -0
  544. package/functions/pre-transaction/merge-with-fee-structure-emporium.mjs +24 -0
  545. package/functions/pre-transaction/merge-with-fee-structure.cjs +1 -1
  546. package/functions/pre-transaction/merge-with-fee-structure.mjs +15 -17
  547. package/functions/pre-transaction/outputApprovalDataProcessing.cjs +1 -1
  548. package/functions/pre-transaction/outputApprovalDataProcessing.d.ts +1 -0
  549. package/functions/pre-transaction/outputApprovalDataProcessing.mjs +32 -35
  550. package/functions/pre-transaction/outputUtxoProcessing.cjs +1 -1
  551. package/functions/pre-transaction/outputUtxoProcessing.d.ts +1 -1
  552. package/functions/pre-transaction/outputUtxoProcessing.mjs +31 -18
  553. package/functions/pre-transaction/process-gas-estimates.cjs +1 -1
  554. package/functions/pre-transaction/process-gas-estimates.d.ts +2 -2
  555. package/functions/pre-transaction/process-gas-estimates.mjs +9 -9
  556. package/functions/pre-transaction/recipientUtxoProcessing.cjs +1 -0
  557. package/functions/pre-transaction/recipientUtxoProcessing.d.ts +3 -0
  558. package/functions/pre-transaction/recipientUtxoProcessing.mjs +36 -0
  559. package/functions/pre-transaction/sendInitNullifiersTransaction.cjs +1 -0
  560. package/functions/pre-transaction/sendInitNullifiersTransaction.d.ts +11 -0
  561. package/functions/pre-transaction/sendInitNullifiersTransaction.mjs +41 -0
  562. package/functions/pre-transaction/sendV0Transaction.cjs +1 -0
  563. package/functions/pre-transaction/sendV0Transaction.d.ts +22 -0
  564. package/functions/pre-transaction/sendV0Transaction.mjs +121 -0
  565. package/functions/pre-transaction/solana-public-signals.cjs +1 -0
  566. package/functions/pre-transaction/solana-public-signals.d.ts +19 -0
  567. package/functions/pre-transaction/solana-public-signals.mjs +60 -0
  568. package/functions/pre-transaction/solana.cjs +1 -0
  569. package/functions/pre-transaction/solana.d.ts +17 -0
  570. package/functions/pre-transaction/solana.mjs +96 -0
  571. package/functions/pre-transaction/solanaTransfer.utils.cjs +1 -0
  572. package/functions/pre-transaction/solanaTransfer.utils.d.ts +6 -0
  573. package/functions/pre-transaction/solanaTransfer.utils.mjs +38 -0
  574. package/functions/pre-transaction/store-instructions.cjs +1 -0
  575. package/functions/pre-transaction/store-instructions.d.ts +4 -0
  576. package/functions/pre-transaction/store-instructions.mjs +9 -0
  577. package/functions/pre-transaction/store-proof.cjs +1 -0
  578. package/functions/pre-transaction/store-proof.d.ts +7 -0
  579. package/functions/pre-transaction/store-proof.mjs +55 -0
  580. package/functions/private-wallet/emporium.helpers.cjs +1 -1
  581. package/functions/private-wallet/emporium.helpers.d.ts +20 -7
  582. package/functions/private-wallet/emporium.helpers.mjs +171 -95
  583. package/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
  584. package/functions/private-wallet/emporium.swap.helpers.d.ts +3 -1
  585. package/functions/private-wallet/emporium.swap.helpers.mjs +134 -69
  586. package/functions/private-wallet/index.d.ts +0 -1
  587. package/functions/snarkjs/common.snarkjs.cjs +1 -1
  588. package/functions/snarkjs/common.snarkjs.d.ts +5 -1
  589. package/functions/snarkjs/common.snarkjs.mjs +70 -69
  590. package/functions/snarkjs/constant.cjs +1 -1
  591. package/functions/snarkjs/constant.d.ts +64 -6
  592. package/functions/snarkjs/constant.mjs +93 -29
  593. package/functions/snarkjs/constructEmporiumProof.cjs +1 -1
  594. package/functions/snarkjs/constructEmporiumProof.d.ts +7 -6
  595. package/functions/snarkjs/constructEmporiumProof.mjs +146 -149
  596. package/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
  597. package/functions/snarkjs/constructGeneralZkProof.d.ts +4 -4
  598. package/functions/snarkjs/constructGeneralZkProof.mjs +115 -118
  599. package/functions/snarkjs/constructSolanaZkProof.cjs +1 -0
  600. package/functions/snarkjs/constructSolanaZkProof.d.ts +13 -0
  601. package/functions/snarkjs/constructSolanaZkProof.mjs +105 -0
  602. package/functions/snarkjs/fetchMerkleTreeSiblings.cjs +1 -0
  603. package/functions/snarkjs/fetchMerkleTreeSiblings.d.ts +11 -0
  604. package/functions/snarkjs/fetchMerkleTreeSiblings.mjs +22 -0
  605. package/functions/snarkjs/generateCircomData.cjs +1 -1
  606. package/functions/snarkjs/generateCircomData.d.ts +1 -1
  607. package/functions/snarkjs/generateCircomData.mjs +23 -23
  608. package/functions/snarkjs/generateZkProof.cjs +1 -1
  609. package/functions/snarkjs/generateZkProof.mjs +13 -4
  610. package/functions/snarkjs/generateZkProofEnclave.cjs +1 -1
  611. package/functions/snarkjs/generateZkProofEnclave.mjs +13 -12
  612. package/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.cjs +1 -0
  613. package/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.d.ts +13 -0
  614. package/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +92 -0
  615. package/functions/snarkjs/getZKFiles.cjs +1 -1
  616. package/functions/snarkjs/getZKFiles.mjs +13 -13
  617. package/functions/snarkjs/index.d.ts +1 -0
  618. package/functions/utils/addresses.cjs +1 -1
  619. package/functions/utils/addresses.d.ts +2 -1
  620. package/functions/utils/addresses.mjs +21 -15
  621. package/functions/utils/amounts.utils.cjs +1 -1
  622. package/functions/utils/amounts.utils.d.ts +3 -0
  623. package/functions/utils/amounts.utils.mjs +54 -28
  624. package/functions/utils/bytes32.utils.cjs +1 -0
  625. package/functions/utils/bytes32.utils.d.ts +2 -0
  626. package/functions/utils/bytes32.utils.mjs +10 -0
  627. package/functions/utils/cacheDevice.utils.cjs +1 -1
  628. package/functions/utils/cacheDevice.utils.mjs +8 -5
  629. package/functions/utils/cacheFunctions.cjs +1 -1
  630. package/functions/utils/cacheFunctions.mjs +53 -52
  631. package/functions/utils/caseInsensitive.utils.cjs +1 -1
  632. package/functions/utils/caseInsensitive.utils.d.ts +1 -1
  633. package/functions/utils/caseInsensitive.utils.mjs +3 -3
  634. package/functions/utils/convertEmporiumOpToCallInfo.cjs +1 -1
  635. package/functions/utils/convertEmporiumOpToCallInfo.d.ts +1 -1
  636. package/functions/utils/convertEmporiumOpToCallInfo.mjs +6 -5
  637. package/functions/utils/convertIntegrationProviderToExternalActionId.cjs +1 -1
  638. package/functions/utils/convertIntegrationProviderToExternalActionId.mjs +5 -4
  639. package/functions/utils/create-provider.cjs +1 -1
  640. package/functions/utils/create-provider.d.ts +4 -0
  641. package/functions/utils/create-provider.mjs +9 -2
  642. package/functions/utils/encodeTokenWithId.cjs +1 -1
  643. package/functions/utils/encodeTokenWithId.d.ts +1 -1
  644. package/functions/utils/encodeTokenWithId.mjs +6 -2
  645. package/functions/utils/encryptInputForEnclave.cjs +1 -1
  646. package/functions/utils/encryptInputForEnclave.mjs +22 -21
  647. package/functions/utils/erc20tokenFunctions.cjs +1 -1
  648. package/functions/utils/erc20tokenFunctions.d.ts +7 -2
  649. package/functions/utils/erc20tokenFunctions.mjs +54 -21
  650. package/functions/utils/ethers-formatter.utils.cjs +1 -0
  651. package/functions/utils/ethers-formatter.utils.d.ts +5 -0
  652. package/functions/utils/ethers-formatter.utils.mjs +59 -0
  653. package/functions/utils/evmNetworkFunctions.cjs +1 -1
  654. package/functions/utils/evmNetworkFunctions.mjs +10 -7
  655. package/functions/utils/external-action.utils.cjs +1 -1
  656. package/functions/utils/external-action.utils.d.ts +0 -5
  657. package/functions/utils/external-action.utils.mjs +8 -56
  658. package/functions/utils/fees.utils.cjs +1 -1
  659. package/functions/utils/fees.utils.d.ts +3 -0
  660. package/functions/utils/fees.utils.mjs +29 -8
  661. package/functions/utils/get-hinkal-approvals.cjs +1 -0
  662. package/functions/utils/get-hinkal-approvals.d.ts +3 -0
  663. package/functions/utils/get-hinkal-approvals.mjs +38 -0
  664. package/functions/utils/get-signature-header.cjs +1 -0
  665. package/functions/utils/get-signature-header.d.ts +5 -0
  666. package/functions/utils/get-signature-header.mjs +8 -0
  667. package/functions/utils/getBlockExplorerUrl.cjs +1 -1
  668. package/functions/utils/getBlockExplorerUrl.mjs +3 -3
  669. package/functions/utils/getDataFromTransaction.cjs +1 -1
  670. package/functions/utils/getDataFromTransaction.d.ts +3 -4
  671. package/functions/utils/getDataFromTransaction.mjs +25 -44
  672. package/functions/utils/getRecipientInfoFromUserKeys.cjs +1 -1
  673. package/functions/utils/getRecipientInfoFromUserKeys.d.ts +0 -1
  674. package/functions/utils/getRecipientInfoFromUserKeys.mjs +10 -13
  675. package/functions/utils/getUtxosFromReceipt.utils.cjs +1 -0
  676. package/functions/utils/getUtxosFromReceipt.utils.d.ts +4 -0
  677. package/functions/utils/getUtxosFromReceipt.utils.mjs +29 -0
  678. package/functions/utils/getUtxosFromReceiptSolana.cjs +1 -0
  679. package/functions/utils/getUtxosFromReceiptSolana.d.ts +5 -0
  680. package/functions/utils/getUtxosFromReceiptSolana.mjs +19 -0
  681. package/functions/utils/inLogicMetadata.cjs +1 -0
  682. package/functions/utils/inLogicMetadata.d.ts +2 -0
  683. package/functions/utils/inLogicMetadata.mjs +8 -0
  684. package/functions/utils/index.d.ts +16 -2
  685. package/functions/utils/involves-permit2-op.cjs +1 -1
  686. package/functions/utils/involves-permit2-op.d.ts +8 -1
  687. package/functions/utils/involves-permit2-op.mjs +7 -3
  688. package/functions/utils/ipfs.cjs +1 -0
  689. package/functions/utils/ipfs.d.ts +8 -0
  690. package/functions/utils/ipfs.mjs +25 -0
  691. package/functions/utils/is-valid-url.cjs +1 -0
  692. package/functions/utils/is-valid-url.d.ts +1 -0
  693. package/functions/utils/is-valid-url.mjs +4 -0
  694. package/functions/utils/lifi.utils.d.ts +1 -0
  695. package/functions/utils/mutexes.utils.cjs +1 -0
  696. package/functions/utils/mutexes.utils.d.ts +2 -0
  697. package/functions/utils/mutexes.utils.mjs +5 -0
  698. package/functions/utils/networks.utils.cjs +1 -0
  699. package/functions/utils/networks.utils.d.ts +1 -0
  700. package/functions/utils/networks.utils.mjs +21 -0
  701. package/functions/utils/nftTokenFunctions.cjs +1 -0
  702. package/functions/utils/nftTokenFunctions.d.ts +2 -0
  703. package/functions/utils/nftTokenFunctions.mjs +40 -0
  704. package/functions/utils/postToOffscreen.cjs +1 -0
  705. package/functions/utils/postToOffscreen.d.ts +2 -0
  706. package/functions/utils/postToOffscreen.mjs +6 -0
  707. package/functions/utils/prepareHinkal.cjs +1 -0
  708. package/functions/utils/prepareHinkal.d.ts +14 -2
  709. package/functions/utils/prepareHinkal.mjs +88 -0
  710. package/functions/utils/publicBalance.utils.cjs +1 -1
  711. package/functions/utils/publicBalance.utils.d.ts +5 -3
  712. package/functions/utils/publicBalance.utils.mjs +95 -15
  713. package/functions/utils/solanaMint.utils.cjs +1 -0
  714. package/functions/utils/solanaMint.utils.d.ts +10 -0
  715. package/functions/utils/solanaMint.utils.mjs +14 -0
  716. package/functions/utils/string.utils.cjs +1 -1
  717. package/functions/utils/string.utils.d.ts +3 -0
  718. package/functions/utils/string.utils.mjs +10 -4
  719. package/functions/utils/time.utils.cjs +1 -1
  720. package/functions/utils/time.utils.d.ts +11 -0
  721. package/functions/utils/time.utils.mjs +52 -4
  722. package/functions/utils/trimFieldValues.cjs +1 -0
  723. package/functions/utils/trimFieldValues.d.ts +4 -0
  724. package/functions/utils/trimFieldValues.mjs +17 -0
  725. package/functions/utils/userAgent.cjs +1 -1
  726. package/functions/utils/userAgent.d.ts +2 -1
  727. package/functions/utils/userAgent.mjs +23 -11
  728. package/functions/utils/walletBalances.utils.cjs +1 -0
  729. package/functions/utils/walletBalances.utils.d.ts +17 -0
  730. package/functions/utils/walletBalances.utils.mjs +42 -0
  731. package/functions/web3/EIP-712.cjs +1 -0
  732. package/functions/web3/EIP-712.d.ts +23 -0
  733. package/functions/web3/EIP-712.mjs +113 -0
  734. package/functions/web3/connectors.utils.cjs +1 -0
  735. package/functions/web3/connectors.utils.d.ts +6 -0
  736. package/functions/web3/connectors.utils.mjs +23 -0
  737. package/functions/web3/events/balanceChangedCustomHandler.cjs +1 -1
  738. package/functions/web3/events/balanceChangedCustomHandler.mjs +2 -3
  739. package/functions/web3/events/balanceChangedHandler.cjs +1 -1
  740. package/functions/web3/events/balanceChangedHandler.mjs +4 -5
  741. package/functions/web3/events/getApprovedBalance.cjs +1 -1
  742. package/functions/web3/events/getApprovedBalance.mjs +42 -68
  743. package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
  744. package/functions/web3/events/getInputUtxoAndBalance.d.ts +7 -6
  745. package/functions/web3/events/getInputUtxoAndBalance.mjs +154 -119
  746. package/functions/web3/events/getInputUtxosEnclave.cjs +1 -0
  747. package/functions/web3/events/getInputUtxosEnclave.d.ts +8 -0
  748. package/functions/web3/events/getInputUtxosEnclave.mjs +47 -0
  749. package/functions/web3/events/getShieldedBalance.cjs +2 -2
  750. package/functions/web3/events/getShieldedBalance.d.ts +2 -2
  751. package/functions/web3/events/getShieldedBalance.mjs +78 -68
  752. package/functions/web3/events/getTransactionLogEvents.cjs +1 -0
  753. package/functions/web3/events/getTransactionLogEvents.d.ts +13 -0
  754. package/functions/web3/events/getTransactionLogEvents.mjs +75 -0
  755. package/functions/web3/events/index.d.ts +1 -0
  756. package/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +1 -0
  757. package/functions/web3/fetchSolanaMerkleTreeRootHash.d.ts +4 -0
  758. package/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +45 -0
  759. package/functions/web3/functionCalls/accessTokenCalls.cjs +1 -1
  760. package/functions/web3/functionCalls/accessTokenCalls.d.ts +3 -2
  761. package/functions/web3/functionCalls/accessTokenCalls.mjs +24 -21
  762. package/functions/web3/functionCalls/approveToken.cjs +1 -1
  763. package/functions/web3/functionCalls/approveToken.mjs +21 -19
  764. package/functions/web3/functionCalls/constructBatchCall.cjs +1 -0
  765. package/functions/web3/functionCalls/constructBatchCall.d.ts +5 -0
  766. package/functions/web3/functionCalls/constructBatchCall.mjs +21 -0
  767. package/functions/web3/functionCalls/estimateGasRelayer.cjs +1 -1
  768. package/functions/web3/functionCalls/estimateGasRelayer.d.ts +2 -1
  769. package/functions/web3/functionCalls/estimateGasRelayer.mjs +15 -14
  770. package/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
  771. package/functions/web3/functionCalls/transactCallDirect.mjs +38 -24
  772. package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
  773. package/functions/web3/functionCalls/transactCallRelayer.d.ts +22 -2
  774. package/functions/web3/functionCalls/transactCallRelayer.mjs +86 -32
  775. package/functions/web3/getContractMetadata.cjs +1 -1
  776. package/functions/web3/getContractMetadata.mjs +24 -20
  777. package/functions/web3/getPublicAddressBalance.cjs +1 -0
  778. package/functions/web3/getPublicAddressBalance.d.ts +2 -0
  779. package/functions/web3/getPublicAddressBalance.mjs +9 -0
  780. package/functions/web3/getTokenHolder.cjs +1 -1
  781. package/functions/web3/getTokenHolder.mjs +71 -10
  782. package/functions/web3/index.d.ts +6 -0
  783. package/functions/web3/lifiAPI.cjs +1 -0
  784. package/functions/web3/lifiAPI.d.ts +6 -0
  785. package/functions/web3/lifiAPI.mjs +30 -0
  786. package/functions/web3/odosAPI.cjs +1 -1
  787. package/functions/web3/odosAPI.d.ts +1 -1
  788. package/functions/web3/odosAPI.mjs +30 -21
  789. package/functions/web3/okxAPI.cjs +1 -0
  790. package/functions/web3/okxAPI.d.ts +8 -0
  791. package/functions/web3/okxAPI.mjs +43 -0
  792. package/functions/web3/oneInchAPI.cjs +1 -1
  793. package/functions/web3/oneInchAPI.d.ts +1 -1
  794. package/functions/web3/oneInchAPI.mjs +30 -20
  795. package/functions/web3/runContractFunction.cjs +1 -1
  796. package/functions/web3/runContractFunction.mjs +33 -26
  797. package/functions/web3/signAndSendSerializedTransaction.cjs +1 -0
  798. package/functions/web3/signAndSendSerializedTransaction.d.ts +2 -0
  799. package/functions/web3/signAndSendSerializedTransaction.mjs +11 -0
  800. package/functions/web3/solana-wagmi-adapter.cjs +1 -0
  801. package/functions/web3/solana-wagmi-adapter.d.ts +3 -0
  802. package/functions/web3/solana-wagmi-adapter.mjs +29 -0
  803. package/functions/web3/uniswapAPI.cjs +1 -1
  804. package/functions/web3/uniswapAPI.mjs +36 -27
  805. package/index.cjs +1 -1
  806. package/index.d.ts +1 -0
  807. package/index.mjs +978 -787
  808. package/mutexes/index.d.ts +1 -0
  809. package/mutexes/mutex.cjs +1 -0
  810. package/mutexes/mutex.d.ts +2 -0
  811. package/mutexes/mutex.mjs +5 -0
  812. package/package.json +10 -3
  813. package/providers/CustomEthersProvider.cjs +1 -0
  814. package/providers/CustomEthersProvider.d.ts +10 -0
  815. package/providers/CustomEthersProvider.mjs +29 -0
  816. package/providers/CustomSolanaConnection.cjs +1 -0
  817. package/providers/CustomSolanaConnection.d.ts +4 -0
  818. package/providers/CustomSolanaConnection.mjs +33 -0
  819. package/providers/EthersProviderAdapter.cjs +1 -1
  820. package/providers/EthersProviderAdapter.d.ts +1 -2
  821. package/providers/EthersProviderAdapter.mjs +19 -21
  822. package/providers/SolanaProviderAdapter.cjs +1 -0
  823. package/providers/SolanaProviderAdapter.d.ts +44 -0
  824. package/providers/SolanaProviderAdapter.mjs +125 -0
  825. package/providers/WagmiProviderAdapter.cjs +1 -1
  826. package/providers/WagmiProviderAdapter.d.ts +5 -2
  827. package/providers/WagmiProviderAdapter.mjs +110 -56
  828. package/providers/prepareEthersHinkal.cjs +1 -1
  829. package/providers/prepareEthersHinkal.mjs +27 -15
  830. package/providers/prepareWagmiHinkal.cjs +1 -1
  831. package/providers/prepareWagmiHinkal.mjs +27 -15
  832. package/types/API.types.d.ts +0 -19
  833. package/types/IMultiThreadedUtxoUtils.d.ts +2 -2
  834. package/types/RewardUserEnums.cjs +1 -0
  835. package/types/RewardUserEnums.d.ts +11 -0
  836. package/types/RewardUserEnums.mjs +5 -0
  837. package/types/TransactionSimulator.types.d.ts +17 -3
  838. package/types/WeeklyAnalytics.types.d.ts +37 -0
  839. package/types/activities.types.cjs +1 -1
  840. package/types/activities.types.d.ts +34 -7
  841. package/types/activities.types.mjs +22 -10
  842. package/types/admin.types.cjs +1 -1
  843. package/types/admin.types.d.ts +42 -20
  844. package/types/admin.types.mjs +2 -3
  845. package/types/all-points.types.d.ts +7 -0
  846. package/types/approvals.types.cjs +1 -0
  847. package/types/approvals.types.d.ts +41 -0
  848. package/types/approvals.types.mjs +4 -0
  849. package/types/bridging.types.d.ts +29 -0
  850. package/types/brotherhood-user.types.d.ts +11 -0
  851. package/types/cache.types.cjs +1 -1
  852. package/types/cache.types.d.ts +26 -4
  853. package/types/cache.types.mjs +2 -2
  854. package/types/circom-data.types.d.ts +12 -0
  855. package/types/coingecko.types.d.ts +207 -0
  856. package/types/commitments.types.d.ts +12 -0
  857. package/types/confirmation-request.types.cjs +1 -0
  858. package/types/confirmation-request.types.d.ts +10 -0
  859. package/types/confirmation-request.types.mjs +4 -0
  860. package/types/connector.types.d.ts +4 -0
  861. package/types/contacts.types.d.ts +1 -0
  862. package/types/eip5792.types.cjs +1 -0
  863. package/types/eip5792.types.d.ts +33 -0
  864. package/types/eip5792.types.mjs +5 -0
  865. package/types/ethereum-network.types.cjs +1 -1
  866. package/types/ethereum-network.types.d.ts +21 -95
  867. package/types/ethereum-network.types.mjs +2 -2
  868. package/types/external-action.types.cjs +1 -1
  869. package/types/external-action.types.d.ts +4 -16
  870. package/types/external-action.types.mjs +2 -2
  871. package/types/generatePoints.cjs +1 -0
  872. package/types/generatePoints.d.ts +14 -0
  873. package/types/generatePoints.mjs +5 -0
  874. package/types/hinkal.types.cjs +1 -1
  875. package/types/hinkal.types.d.ts +24 -96
  876. package/types/hinkal.types.mjs +26 -33
  877. package/types/http.types.d.ts +8 -0
  878. package/types/index.d.ts +25 -8
  879. package/types/kyc.types.cjs +1 -1
  880. package/types/kyc.types.d.ts +5 -3
  881. package/types/kyc.types.mjs +3 -3
  882. package/types/message.types.d.ts +5 -0
  883. package/types/new-rewards.type.cjs +1 -0
  884. package/types/new-rewards.type.d.ts +156 -0
  885. package/types/new-rewards.type.mjs +7 -0
  886. package/types/offscreen.types.cjs +1 -0
  887. package/types/offscreen.types.d.ts +9 -0
  888. package/types/offscreen.types.mjs +4 -0
  889. package/types/okx.types.d.ts +57 -0
  890. package/types/presaleReferral.types.d.ts +4 -0
  891. package/types/proxy.types.d.ts +10 -0
  892. package/types/referral.types.d.ts +12 -0
  893. package/types/rewards.types.cjs +1 -1
  894. package/types/rewards.types.d.ts +15 -210
  895. package/types/rewards.types.mjs +3 -25
  896. package/types/routing.types.cjs +1 -0
  897. package/types/routing.types.d.ts +7 -0
  898. package/types/routing.types.mjs +4 -0
  899. package/types/sandbox.types.cjs +1 -1
  900. package/types/sandbox.types.d.ts +86 -21
  901. package/types/sandbox.types.mjs +2 -2
  902. package/types/scheduled-transactions.types.cjs +1 -0
  903. package/types/scheduled-transactions.types.d.ts +22 -0
  904. package/types/scheduled-transactions.types.mjs +4 -0
  905. package/types/session.types.d.ts +11 -0
  906. package/types/signature.types.d.ts +10 -0
  907. package/types/slippage.types.cjs +1 -1
  908. package/types/slippage.types.d.ts +1 -13
  909. package/types/slippage.types.mjs +2 -13
  910. package/types/solana.types.d.ts +75 -0
  911. package/types/tenderly.api.types.d.ts +37 -21
  912. package/types/token-prices.types.cjs +1 -0
  913. package/types/token-prices.types.d.ts +7 -0
  914. package/types/token-prices.types.mjs +9 -0
  915. package/types/token.types.d.ts +32 -8
  916. package/types/transactions.types.cjs +1 -1
  917. package/types/transactions.types.d.ts +12 -20
  918. package/types/transactions.types.mjs +5 -5
  919. package/types/wc.types.d.ts +4 -15
  920. package/webworker/snarkjsWorker/snarkjsWorkerLauncher.cjs +1 -1
  921. package/webworker/snarkjsWorker/snarkjsWorkerLauncher.mjs +1 -1
  922. package/webworker/snarkjsWorker/snarkjsWorkerLogic.cjs +1 -1
  923. package/webworker/snarkjsWorker/snarkjsWorkerLogic.mjs +28 -21
  924. package/webworker/utxoWorker/utxoWorker.types.d.ts +2 -0
  925. package/webworker/utxoWorker/utxoWorkerLauncher.cjs +1 -1
  926. package/webworker/utxoWorker/utxoWorkerLauncher.mjs +1 -1
  927. package/webworker/utxoWorker/utxoWorkerLogic.cjs +1 -1
  928. package/webworker/utxoWorker/utxoWorkerLogic.mjs +33 -31
  929. package/webworker/viteWorkerURL.constant.cjs +3 -3
  930. package/webworker/viteWorkerURL.constant.mjs +3 -3
  931. package/webworker/zkProofWorker/zkProofWorkerLauncher.cjs +1 -1
  932. package/webworker/zkProofWorker/zkProofWorkerLauncher.mjs +1 -1
  933. package/API/HinkalPointsCalls.cjs +0 -1
  934. package/API/HinkalPointsCalls.d.ts +0 -20
  935. package/API/HinkalPointsCalls.mjs +0 -15
  936. package/API/callBeefyGraphAPI.cjs +0 -1
  937. package/API/callBeefyGraphAPI.d.ts +0 -2
  938. package/API/callBeefyGraphAPI.mjs +0 -14
  939. package/API/callCurveAPI.cjs +0 -1
  940. package/API/callCurveAPI.d.ts +0 -9
  941. package/API/callCurveAPI.mjs +0 -160
  942. package/API/dataServerCalls.cjs +0 -1
  943. package/API/dataServerCalls.d.ts +0 -6
  944. package/API/dataServerCalls.mjs +0 -13
  945. package/API/fetchNullifiers.cjs +0 -1
  946. package/API/fetchNullifiers.d.ts +0 -5
  947. package/API/fetchNullifiers.mjs +0 -7
  948. package/API/getAxelarGasEstimate.cjs +0 -1
  949. package/API/getAxelarGasEstimate.d.ts +0 -5
  950. package/API/getAxelarGasEstimate.mjs +0 -14
  951. package/API/getConnextReceiveFee.cjs +0 -1
  952. package/API/getConnextReceiveFee.d.ts +0 -2
  953. package/API/getConnextReceiveFee.mjs +0 -7
  954. package/API/referralProgramCalls.cjs +0 -1
  955. package/API/referralProgramCalls.d.ts +0 -36
  956. package/API/referralProgramCalls.mjs +0 -35
  957. package/API/rewardsPointsCalls.cjs +0 -1
  958. package/API/rewardsPointsCalls.d.ts +0 -10
  959. package/API/rewardsPointsCalls.mjs +0 -15
  960. package/API/userVerifyTransactions.cjs +0 -1
  961. package/API/userVerifyTransactions.d.ts +0 -19
  962. package/API/userVerifyTransactions.mjs +0 -21
  963. package/constants/axelar.constants.cjs +0 -1
  964. package/constants/axelar.constants.d.ts +0 -5
  965. package/constants/axelar.constants.mjs +0 -48
  966. package/constants/beefy.registry.cjs +0 -1
  967. package/constants/beefy.registry.d.ts +0 -8
  968. package/constants/beefy.registry.mjs +0 -24
  969. package/constants/crvCvx.registry.cjs +0 -1
  970. package/constants/crvCvx.registry.d.ts +0 -20
  971. package/constants/crvCvx.registry.mjs +0 -638
  972. package/constants/crvDynamic.registry.cjs +0 -1
  973. package/constants/crvDynamic.registry.d.ts +0 -1
  974. package/constants/crvDynamic.registry.mjs +0 -24
  975. package/constants/deploy-data/deploy-data-axelar1.json.cjs +0 -1
  976. package/constants/deploy-data/deploy-data-axelar1.json.mjs +0 -4329
  977. package/constants/deploy-data/deploy-data-axelar2.json.cjs +0 -1
  978. package/constants/deploy-data/deploy-data-axelar2.json.mjs +0 -4329
  979. package/constants/lido.constants.cjs +0 -1
  980. package/constants/lido.constants.d.ts +0 -10
  981. package/constants/lido.constants.mjs +0 -13
  982. package/constants/pendle.registry.cjs +0 -1
  983. package/constants/pendle.registry.d.ts +0 -21
  984. package/constants/pendle.registry.mjs +0 -253
  985. package/constants/token-data/tokenPricing.consts.cjs +0 -1
  986. package/constants/token-data/tokenPricing.consts.mjs +0 -6
  987. package/data-structures/Hinkal/hinkalActionBeefy.cjs +0 -1
  988. package/data-structures/Hinkal/hinkalActionBeefy.d.ts +0 -3
  989. package/data-structures/Hinkal/hinkalActionBeefy.mjs +0 -80
  990. package/data-structures/Hinkal/hinkalActionConvex.cjs +0 -1
  991. package/data-structures/Hinkal/hinkalActionConvex.d.ts +0 -12
  992. package/data-structures/Hinkal/hinkalActionConvex.mjs +0 -61
  993. package/data-structures/Hinkal/hinkalActionCurve.cjs +0 -1
  994. package/data-structures/Hinkal/hinkalActionCurve.d.ts +0 -12
  995. package/data-structures/Hinkal/hinkalActionCurve.mjs +0 -93
  996. package/data-structures/Hinkal/hinkalActionLidoEth.cjs +0 -1
  997. package/data-structures/Hinkal/hinkalActionLidoEth.d.ts +0 -4
  998. package/data-structures/Hinkal/hinkalActionLidoEth.mjs +0 -72
  999. package/data-structures/Hinkal/hinkalActionPendle.cjs +0 -1
  1000. package/data-structures/Hinkal/hinkalActionPendle.d.ts +0 -3
  1001. package/data-structures/Hinkal/hinkalActionPendle.mjs +0 -119
  1002. package/data-structures/Hinkal/hinkalActionPendleLP.cjs +0 -1
  1003. package/data-structures/Hinkal/hinkalActionPendleLP.d.ts +0 -7
  1004. package/data-structures/Hinkal/hinkalActionPendleLP.mjs +0 -81
  1005. package/data-structures/Hinkal/hinkalActionStake.cjs +0 -1
  1006. package/data-structures/Hinkal/hinkalActionStake.mjs +0 -122
  1007. package/data-structures/Hinkal/hinkalActionVolatile.cjs +0 -1
  1008. package/data-structures/Hinkal/hinkalActionVolatile.d.ts +0 -3
  1009. package/data-structures/Hinkal/hinkalActionVolatile.mjs +0 -89
  1010. package/data-structures/Hinkal/hinkalDeploySubAccount.cjs +0 -1
  1011. package/data-structures/Hinkal/hinkalDeploySubAccount.d.ts +0 -3
  1012. package/data-structures/Hinkal/hinkalDeploySubAccount.mjs +0 -15
  1013. package/data-structures/event-service/AbstractAccessTokenSnapshotService.cjs +0 -1
  1014. package/data-structures/event-service/AbstractApprovalsSnapshotService.cjs +0 -1
  1015. package/data-structures/event-service/AbstractApprovalsSnapshotService.mjs +0 -104
  1016. package/data-structures/event-service/AbstractCommitmentsSnapshotService.cjs +0 -1
  1017. package/data-structures/event-service/AbstractCommitmentsSnapshotService.mjs +0 -94
  1018. package/data-structures/event-service/AbstractEventService.cjs +0 -1
  1019. package/data-structures/event-service/AbstractEventService.d.ts +0 -31
  1020. package/data-structures/event-service/AbstractEventService.mjs +0 -95
  1021. package/data-structures/event-service/AbstractNullifierSnapshotService.cjs +0 -1
  1022. package/data-structures/event-service/AbstractNullifierSnapshotService.mjs +0 -59
  1023. package/data-structures/event-service/AbstractSnapshotService.cjs +0 -1
  1024. package/data-structures/event-service/AbstractSnapshotService.mjs +0 -35
  1025. package/data-structures/snapshot/ClientAccessTokenSnapshotService.cjs +0 -1
  1026. package/data-structures/snapshot/ClientAccessTokenSnapshotService.mjs +0 -32
  1027. package/data-structures/snapshot/ClientApprovalsSnapshotService.cjs +0 -1
  1028. package/data-structures/snapshot/ClientApprovalsSnapshotService.mjs +0 -23
  1029. package/data-structures/snapshot/ClientCommitmentsSnapshotService.cjs +0 -1
  1030. package/data-structures/snapshot/ClientCommitmentsSnapshotService.d.ts +0 -7
  1031. package/data-structures/snapshot/ClientCommitmentsSnapshotService.mjs +0 -31
  1032. package/data-structures/snapshot/ClientNullifierSnapshotService.cjs +0 -1
  1033. package/data-structures/snapshot/ClientNullifierSnapshotService.d.ts +0 -7
  1034. package/data-structures/snapshot/ClientNullifierSnapshotService.mjs +0 -28
  1035. package/data-structures/transactions-manager/TransactionsManager.cjs +0 -1
  1036. package/data-structures/transactions-manager/TransactionsManager.d.ts +0 -28
  1037. package/data-structures/transactions-manager/TransactionsManager.mjs +0 -180
  1038. package/data-structures/transactions-manager/history/getBeefyData.cjs +0 -1
  1039. package/data-structures/transactions-manager/history/getBeefyData.d.ts +0 -3
  1040. package/data-structures/transactions-manager/history/getBeefyData.mjs +0 -49
  1041. package/data-structures/transactions-manager/history/getConvexData.cjs +0 -1
  1042. package/data-structures/transactions-manager/history/getConvexData.d.ts +0 -6
  1043. package/data-structures/transactions-manager/history/getConvexData.mjs +0 -38
  1044. package/data-structures/transactions-manager/history/getCurveData.cjs +0 -1
  1045. package/data-structures/transactions-manager/history/getCurveData.d.ts +0 -6
  1046. package/data-structures/transactions-manager/history/getCurveData.mjs +0 -78
  1047. package/data-structures/transactions-manager/history/getDepositData.cjs +0 -1
  1048. package/data-structures/transactions-manager/history/getDepositData.d.ts +0 -2
  1049. package/data-structures/transactions-manager/history/getDepositData.mjs +0 -12
  1050. package/data-structures/transactions-manager/history/getLidoData.cjs +0 -1
  1051. package/data-structures/transactions-manager/history/getLidoData.d.ts +0 -10
  1052. package/data-structures/transactions-manager/history/getLidoData.mjs +0 -26
  1053. package/data-structures/transactions-manager/history/getPendleData.cjs +0 -1
  1054. package/data-structures/transactions-manager/history/getPendleData.d.ts +0 -3
  1055. package/data-structures/transactions-manager/history/getPendleData.mjs +0 -40
  1056. package/data-structures/transactions-manager/history/getSwapData.cjs +0 -1
  1057. package/data-structures/transactions-manager/history/getSwapData.d.ts +0 -3
  1058. package/data-structures/transactions-manager/history/getSwapData.mjs +0 -19
  1059. package/data-structures/transactions-manager/history/getTxDetails.cjs +0 -1
  1060. package/data-structures/transactions-manager/history/getTxDetails.d.ts +0 -3
  1061. package/data-structures/transactions-manager/history/getTxDetails.mjs +0 -57
  1062. package/data-structures/transactions-manager/history/getVolatileData.cjs +0 -1
  1063. package/data-structures/transactions-manager/history/getVolatileData.d.ts +0 -32
  1064. package/data-structures/transactions-manager/history/getVolatileData.mjs +0 -56
  1065. package/data-structures/transactions-manager/history/history.utils.cjs +0 -1
  1066. package/data-structures/transactions-manager/history/history.utils.d.ts +0 -8
  1067. package/data-structures/transactions-manager/history/history.utils.mjs +0 -8
  1068. package/data-structures/volatile-helper/VolatileHelper.cjs +0 -1
  1069. package/data-structures/volatile-helper/VolatileHelper.d.ts +0 -57
  1070. package/data-structures/volatile-helper/VolatileHelper.mjs +0 -161
  1071. package/data-structures/volatile-helper/index.d.ts +0 -1
  1072. package/externalABIs/BeefyRouterAbi.json.cjs +0 -1
  1073. package/externalABIs/BeefyRouterAbi.json.mjs +0 -1025
  1074. package/externalABIs/BeefyStrategyAbi.json.cjs +0 -1
  1075. package/externalABIs/BeefyStrategyAbi.json.mjs +0 -1426
  1076. package/externalABIs/BeefyVaultAbi.json.cjs +0 -1
  1077. package/externalABIs/BeefyVaultAbi.json.mjs +0 -573
  1078. package/externalABIs/BeefyZapAbi.json.cjs +0 -1
  1079. package/externalABIs/BeefyZapOneInchAbi.json.cjs +0 -1
  1080. package/externalABIs/ConvexBoosterAbi.json.cjs +0 -1
  1081. package/externalABIs/ConvexBoosterAbi.json.mjs +0 -677
  1082. package/externalABIs/ConvexBoosterAbiMainnet.json.cjs +0 -1
  1083. package/externalABIs/ConvexBoosterAbiMainnet.json.mjs +0 -1005
  1084. package/externalABIs/ConvexRewardPoolAbi.json.cjs +0 -1
  1085. package/externalABIs/ConvexRewardPoolAbi.json.mjs +0 -886
  1086. package/externalABIs/CurveReadingWrapperAbi.json.cjs +0 -1
  1087. package/externalABIs/CurveReadingWrapperAbi.json.mjs +0 -1425
  1088. package/externalABIs/CurveWrappedMainPool.json.cjs +0 -1
  1089. package/externalABIs/CurveWrappedMainPool.json.mjs +0 -1139
  1090. package/externalABIs/CurveZap.json.cjs +0 -1
  1091. package/externalABIs/CurveZap.json.mjs +0 -265
  1092. package/externalABIs/CvxCrvUtilities.json.cjs +0 -1
  1093. package/externalABIs/CvxCrvUtilities.json.mjs +0 -267
  1094. package/externalABIs/ERC20.d.ts +0 -1
  1095. package/externalABIs/LidoStEthAbi.json.cjs +0 -1
  1096. package/externalABIs/LidoStEthAbi.json.mjs +0 -1603
  1097. package/externalABIs/LidoStMaticAbi.json.cjs +0 -1
  1098. package/externalABIs/LidoStMaticAbi.json.mjs +0 -1764
  1099. package/externalABIs/LidoStakeManagerAbi.json.cjs +0 -1
  1100. package/externalABIs/LidoStakeManagerAbi.json.mjs +0 -2082
  1101. package/externalABIs/LidoWithdrawalQueueERC721Abi.json.cjs +0 -1
  1102. package/externalABIs/LidoWithdrawalQueueERC721Abi.json.mjs +0 -2030
  1103. package/externalABIs/LidoWstEthAbi.json.cjs +0 -1
  1104. package/externalABIs/PendleRouterAbi.json.cjs +0 -1
  1105. package/externalABIs/PendleRouterAbi.json.mjs +0 -176
  1106. package/externalABIs/PoLidoNftAbi.json.cjs +0 -1
  1107. package/externalABIs/PoLidoNftAbi.json.mjs +0 -701
  1108. package/externalABIs/crvFRAX.d.ts +0 -38
  1109. package/functions/pre-transaction/processAmountChanges.cjs +0 -1
  1110. package/functions/pre-transaction/processAmountChanges.d.ts +0 -12
  1111. package/functions/pre-transaction/processAmountChanges.mjs +0 -228
  1112. package/functions/private-wallet/smartContractWalletCalculator.cjs +0 -1
  1113. package/functions/private-wallet/smartContractWalletCalculator.d.ts +0 -5
  1114. package/functions/private-wallet/smartContractWalletCalculator.mjs +0 -25
  1115. package/functions/protocols/convex.protocols.cjs +0 -1
  1116. package/functions/protocols/convex.protocols.d.ts +0 -1
  1117. package/functions/protocols/convex.protocols.mjs +0 -28
  1118. package/functions/protocols/curve.protocols.cjs +0 -1
  1119. package/functions/protocols/curve.protocols.d.ts +0 -1
  1120. package/functions/protocols/curve.protocols.mjs +0 -22
  1121. package/functions/protocols/index.d.ts +0 -3
  1122. package/functions/protocols/pendle.helpers.cjs +0 -1
  1123. package/functions/protocols/pendle.helpers.d.ts +0 -8
  1124. package/functions/protocols/pendle.helpers.mjs +0 -112
  1125. package/functions/utils/axelar.utils.cjs +0 -1
  1126. package/functions/utils/axelar.utils.d.ts +0 -3
  1127. package/functions/utils/axelar.utils.mjs +0 -45
  1128. package/functions/utils/enum.utils.cjs +0 -1
  1129. package/functions/utils/enum.utils.mjs +0 -14
  1130. package/functions/utils/volatile-patcher.utils.cjs +0 -1
  1131. package/functions/utils/volatile-patcher.utils.d.ts +0 -1
  1132. package/functions/utils/volatile-patcher.utils.mjs +0 -18
  1133. package/types/axelar.types.d.ts +0 -14
  1134. package/types/beefy.types.cjs +0 -1
  1135. package/types/beefy.types.d.ts +0 -11
  1136. package/types/beefy.types.mjs +0 -21
  1137. package/types/connext.types.d.ts +0 -13
  1138. package/types/curve.types.cjs +0 -1
  1139. package/types/curve.types.d.ts +0 -133
  1140. package/types/curve.types.mjs +0 -24
  1141. package/types/earlyAccessCode.types.d.ts +0 -4
  1142. package/types/hinkalTvl.types.d.ts +0 -4
  1143. package/types/pendle.api.types.d.ts +0 -233
  1144. package/types/pendle.types.cjs +0 -1
  1145. package/types/pendle.types.d.ts +0 -222
  1146. package/types/pendle.types.mjs +0 -15
  1147. package/types/time.types.cjs +0 -1
  1148. package/types/time.types.d.ts +0 -31
  1149. package/types/time.types.mjs +0 -58
@@ -0,0 +1,88 @@
1
+ import { ethers as p } from "ethers";
2
+ import { PublicKey as u } from "@solana/web3.js";
3
+ import { preProcessing as a } from "../../crypto/preProcessing.mjs";
4
+ import s from "../../providers/EthersProviderAdapter.mjs";
5
+ import { networkRegistry as c } from "../../constants/chains.constants.mjs";
6
+ import { UserKeys as w } from "../../data-structures/crypto-keys/keys.mjs";
7
+ import { createCustomRpcProvider as l, createCustomSolanaConnection as f } from "./create-provider.mjs";
8
+ import { SolanaProviderAdapter as g } from "../../providers/SolanaProviderAdapter.mjs";
9
+ const v = (r, t) => {
10
+ const e = c[t].fetchRpcUrl;
11
+ if (!e)
12
+ throw new Error("RPC URL not found for the specified chain ID");
13
+ const n = l(e);
14
+ return new p.Wallet(r, n);
15
+ }, h = (r, t) => {
16
+ const e = c[t].fetchRpcUrl;
17
+ if (!e)
18
+ throw new Error("RPC URL not found for the specified chain ID");
19
+ const n = l(e);
20
+ return new p.VoidSigner(r, n);
21
+ }, C = async (r, t) => {
22
+ await a();
23
+ const e = s();
24
+ e.initSigner?.(t), await r.initProviderAdapter(void 0, e), await r.initUserKeys();
25
+ }, y = async (r, t, e) => {
26
+ const n = s(), o = h(e, t);
27
+ n.initSigner?.(o), await r.initProviderAdapter(void 0, n);
28
+ }, V = async (r, t, e, n) => {
29
+ await a(), await y(r, e, t), await r.initUserKeysWithPassword(n);
30
+ }, D = async (r, t) => {
31
+ await a();
32
+ const e = r.getSelectedNetwork()?.chainId;
33
+ if (!e)
34
+ throw Error("chainId is undefined");
35
+ const n = v(t, e), o = s();
36
+ return o.initSigner?.(n), { userKeys: new w(await o.signMessage(r.signingMessage)), signer: n };
37
+ }, b = async (r, t, e) => {
38
+ await a();
39
+ const n = r.getSelectedNetwork()?.chainId;
40
+ if (!n)
41
+ throw Error("chainId is undefined");
42
+ const o = h(t, n);
43
+ s().initSigner?.(o);
44
+ const d = new w(e);
45
+ return await r.switchAccount(o), d;
46
+ }, A = (r) => {
47
+ const t = r.userKeys.getDerivedSolanaPublicKey();
48
+ return {
49
+ publicKey: new u(t),
50
+ signTransaction: () => {
51
+ throw new Error("Void wallet cannot sign transactions");
52
+ },
53
+ signAllTransactions: () => {
54
+ throw new Error("Void wallet cannot sign transactions");
55
+ },
56
+ signMessage: () => {
57
+ throw new Error("Void wallet cannot sign messages");
58
+ }
59
+ };
60
+ }, P = async (r, t, e) => {
61
+ const n = c[t].fetchRpcUrl;
62
+ if (!n)
63
+ throw new Error("RPC URL not found for the specified chain ID");
64
+ const o = f(n), i = A(r), d = new g(o, t, i, e);
65
+ await r.initProviderAdapter(i, d);
66
+ }, H = async (r, t, e) => {
67
+ await a();
68
+ const n = c[t].fetchRpcUrl;
69
+ if (!n)
70
+ throw new Error("RPC URL not found for the specified chain ID");
71
+ const o = f(n), i = new g(o, t, e);
72
+ await r.initProviderAdapter(e, i), await r.initUserKeys();
73
+ }, L = async (r, t, e, n) => {
74
+ await r.initUserKeysWithPassword(n), await a(), await P(r, e, t);
75
+ };
76
+ export {
77
+ v as createSigner,
78
+ h as createVoidSigner,
79
+ A as createVoidSolanaWallet,
80
+ y as prepareEthersProviderAdapter,
81
+ C as prepareHinkal,
82
+ V as prepareHinkalWithSignature,
83
+ H as prepareSolanaHinkal,
84
+ L as prepareSolanaHinkalWithSignature,
85
+ P as prepareSolanaProviderAdapter,
86
+ D as prepareToAccessNewWallet,
87
+ b as prepareToAccessNewWalletWithSignature
88
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("ethers"),d=require("../../constants/protocol.constants.cjs"),b=require("../../constants/chains.constants.cjs"),g=require("../../types/ethereum-network.types.cjs"),f=require("./erc20tokenFunctions.cjs"),l=async(n,c,e,s)=>{try{const o=e.erc20TokenAddress;let t;o!==d.zeroAddress?t=await n(g.ContractType.ERC20Contract,e.erc20TokenAddress)?.balanceOf(c):t=await s.getBalance(c);const r=t.toBigInt();return r<=0n?null:{token:e,balance:r}}catch{return null}},p=async(n,c,e,s)=>{const{fetchRpcUrl:o}=b.networkRegistry[n],t=new u.ethers.providers.JsonRpcProvider(o),r=s??f.getErc20TokensForChain(n);return(await Promise.all(r.map(async a=>l(c,e,a,t)))).filter(a=>a!==null)};exports.getPublicBalance=l;exports.getPublicBalancesOfTokens=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("ethers"),y=require("../../constants/chains.constants.cjs"),g=require("../../constants/protocol.constants.cjs"),b=require("./erc20tokenFunctions.cjs"),P=require("../../externalABIs/swapAbi.cjs"),m=require("../../error-handling/logger.cjs"),p=require("../../externalABIs/index.cjs"),w=require("./ipfs.cjs"),C=require("./create-provider.cjs"),k=require("../../data-structures/http/HttpClient.cjs");require("axios");const f=require("@solana/web3.js"),d=require("@solana/spl-token"),T=a=>{const{fetchRpcUrl:e}=y.networkRegistry[a];if(!e)throw new Error(`No RPC URL configured for chain ${a}`);return C.createCustomRpcProvider(e)},R=async(a,e,n)=>{try{const s=n.erc20TokenAddress;let r;const o=new B.ethers.Contract(n.erc20TokenAddress,P.ERC20ABI,a);s!==g.zeroAddress?r=await o?.balanceOf(e):r=await o.provider.getBalance(e);const c=r.toBigInt();return c<=0n?null:{token:n,balance:c}}catch{return null}},q=async(a,e)=>{const n=e.nftTokenType===g.TokenType.ERC721,s=new B.ethers.Contract(e.erc20TokenAddress,n?p.ERC721ABI:p.ERC1155ABI,a),{tokenIds:r}=e;if(!r?.length)return null;const o=await Promise.all(r.map(async c=>{try{const t=await s[n?"tokenURI":"uri"](c),l=t.startsWith("ipfs://")?w.getFormattedIpfsUrl(t,!1):t,u=n?l:l.replace("{id}",c);if(u){const i=await k.httpClient.get(u);return i?.image?.startsWith("ipfs://")&&(i.image=w.getFormattedIpfsUrl(i.image,!1)),{image:i.image,tokenId:Number(c),name:i.name}}return{tokenId:Number(c)}}catch{return{tokenId:Number(c)}}}));return{token:e,balance:r?.length?BigInt(r.length):0n,nfts:o}},v=async(a,e,n)=>{const s=n??b.getErc20TokensForChain(a),r=T(a);return(await Promise.all(s.map(async c=>b.isNFTToken(c)?q(r,c):R(r,e,c)))).filter(c=>c!==null)},E=async(a,e,n)=>{try{const s=T(a),r=new B.ethers.Contract(n,P.ERC20ABI,s);let o;return n!==g.zeroAddress?o=await r?.balanceOf(e):o=await s.getBalance(e),o.toBigInt()}catch{return m.Logger.error(`Failed to fetch public balance for address ${e}`),null}},N=async(a,e)=>{try{return await T(a).getTransactionCount(e)}catch(n){return m.Logger.error(`Failed to fetch transaction count for address ${e} on chain ${a}`,n),null}},U=async(a,e,n)=>{const r=y.networkRegistry[a].fetchRpcUrl??"",o=C.createCustomSolanaConnection(r);return(await Promise.all(n.map(async t=>{if(b.isNFTToken(t))return{token:t,balance:1n,nfts:[{image:t.logoURI,tokenId:0,name:t.symbol}]};if(t.erc20TokenAddress===g.solanaNativeAddress){const I=BigInt(await o.getBalance(new f.PublicKey(e)));return{token:t,balance:I}}const l=new f.PublicKey(t.erc20TokenAddress),u=new f.PublicKey(e),i=await d.getAssociatedTokenAddress(l,u,!0,t.is2022Program?d.TOKEN_2022_PROGRAM_ID:d.TOKEN_PROGRAM_ID);if(!await o.getAccountInfo(i))return{token:t,balance:0n};const h=await o.getTokenAccountBalance(i),A=BigInt(h.value.amount);return{token:t,balance:A}}))).filter(t=>t.balance>0n)};exports.getPublicBalance=R;exports.getPublicBalanceByTokenAddress=E;exports.getPublicBalancesOfTokens=v;exports.getPublicTransactionCount=N;exports.getSolanaPublicBalances=U;
@@ -1,5 +1,7 @@
1
1
  import { ethers } from 'ethers';
2
- import { ContractType } from '../../types/ethereum-network.types';
3
2
  import { ERC20Token, TokenBalance } from '../../types/token.types';
4
- export declare const getPublicBalance: (getContractWithFetcher: (contract: ContractType, contractAddress?: string | undefined) => ethers.Contract, ethereumAddress: string, token: ERC20Token, provider: ethers.providers.JsonRpcProvider) => Promise<TokenBalance | null>;
5
- export declare const getPublicBalancesOfTokens: (chainId: number, getContractWithFetcher: (contract: ContractType, contractAddress?: string | undefined) => ethers.Contract, ethereumAddress: string, tokens?: ERC20Token[]) => Promise<TokenBalance[]>;
3
+ export declare const getPublicBalance: (provider: ethers.providers.JsonRpcProvider, ethereumAddress: string, token: ERC20Token) => Promise<TokenBalance | null>;
4
+ export declare const getPublicBalancesOfTokens: (chainId: number, ethereumAddress: string, tokens?: ERC20Token[]) => Promise<TokenBalance[]>;
5
+ export declare const getPublicBalanceByTokenAddress: (chainId: number, ethereumAddress: string, tokenAddress: string) => Promise<bigint | null>;
6
+ export declare const getPublicTransactionCount: (chainId: number, ethereumAddress: string) => Promise<number | null>;
7
+ export declare const getSolanaPublicBalances: (chainId: number, ethereumAddress: string, tokensToUpdate: ERC20Token[]) => Promise<TokenBalance[]>;
@@ -1,25 +1,105 @@
1
- import { ethers as i } from "ethers";
2
- import { zeroAddress as f } from "../../constants/protocol.constants.mjs";
3
- import { networkRegistry as p } from "../../constants/chains.constants.mjs";
4
- import { ContractType as m } from "../../types/ethereum-network.types.mjs";
5
- import { getErc20TokensForChain as d } from "./erc20tokenFunctions.mjs";
6
- const u = async (e, n, t, o) => {
1
+ import { ethers as m } from "ethers";
2
+ import { networkRegistry as d } from "../../constants/chains.constants.mjs";
3
+ import { zeroAddress as b, solanaNativeAddress as P, TokenType as I } from "../../constants/protocol.constants.mjs";
4
+ import { getErc20TokensForChain as h, isNFTToken as w } from "./erc20tokenFunctions.mjs";
5
+ import { ERC20ABI as B } from "../../externalABIs/swapAbi.mjs";
6
+ import { Logger as T } from "../../error-handling/logger.mjs";
7
+ import { ERC721ABI as A, ERC1155ABI as v } from "../../externalABIs/index.mjs";
8
+ import { getFormattedIpfsUrl as p } from "./ipfs.mjs";
9
+ import { createCustomSolanaConnection as E, createCustomRpcProvider as N } from "./create-provider.mjs";
10
+ import { httpClient as U } from "../../data-structures/http/HttpClient.mjs";
11
+ import "axios";
12
+ import { PublicKey as u } from "@solana/web3.js";
13
+ import { getAssociatedTokenAddress as k, TOKEN_2022_PROGRAM_ID as O, TOKEN_PROGRAM_ID as F } from "@solana/spl-token";
14
+ const g = (e) => {
15
+ const { fetchRpcUrl: t } = d[e];
16
+ if (!t)
17
+ throw new Error(`No RPC URL configured for chain ${e}`);
18
+ return N(t);
19
+ }, _ = async (e, t, n) => {
7
20
  try {
8
- const a = t.erc20TokenAddress;
21
+ const s = n.erc20TokenAddress;
9
22
  let r;
10
- a !== f ? r = await e(m.ERC20Contract, t.erc20TokenAddress)?.balanceOf(n) : r = await o.getBalance(n);
23
+ const o = new m.Contract(n.erc20TokenAddress, B, e);
24
+ s !== b ? r = await o?.balanceOf(t) : r = await o.provider.getBalance(t);
11
25
  const c = r.toBigInt();
12
- return c <= 0n ? null : { token: t, balance: c };
26
+ return c <= 0n ? null : { token: n, balance: c };
13
27
  } catch {
14
28
  return null;
15
29
  }
16
- }, T = async (e, n, t, o) => {
17
- const { fetchRpcUrl: a } = p[e], r = new i.providers.JsonRpcProvider(a), c = o ?? d(e);
30
+ }, $ = async (e, t) => {
31
+ const n = t.nftTokenType === I.ERC721, s = new m.Contract(t.erc20TokenAddress, n ? A : v, e), { tokenIds: r } = t;
32
+ if (!r?.length)
33
+ return null;
34
+ const o = await Promise.all(
35
+ r.map(async (c) => {
36
+ try {
37
+ const a = await s[n ? "tokenURI" : "uri"](c), l = a.startsWith("ipfs://") ? p(a, !1) : a, f = n ? l : l.replace("{id}", c);
38
+ if (f) {
39
+ const i = await U.get(f);
40
+ return i?.image?.startsWith("ipfs://") && (i.image = p(i.image, !1)), { image: i.image, tokenId: Number(c), name: i.name };
41
+ }
42
+ return { tokenId: Number(c) };
43
+ } catch {
44
+ return { tokenId: Number(c) };
45
+ }
46
+ })
47
+ );
48
+ return {
49
+ token: t,
50
+ balance: r?.length ? BigInt(r.length) : 0n,
51
+ nfts: o
52
+ };
53
+ }, V = async (e, t, n) => {
54
+ const s = n ?? h(e), r = g(e);
55
+ return (await Promise.all(
56
+ s.map(async (c) => w(c) ? $(r, c) : _(r, t, c))
57
+ )).filter((c) => c !== null);
58
+ }, X = async (e, t, n) => {
59
+ try {
60
+ const s = g(e), r = new m.Contract(n, B, s);
61
+ let o;
62
+ return n !== b ? o = await r?.balanceOf(t) : o = await s.getBalance(t), o.toBigInt();
63
+ } catch {
64
+ return T.error(`Failed to fetch public balance for address ${t}`), null;
65
+ }
66
+ }, Y = async (e, t) => {
67
+ try {
68
+ return await g(e).getTransactionCount(t);
69
+ } catch (n) {
70
+ return T.error(`Failed to fetch transaction count for address ${t} on chain ${e}`, n), null;
71
+ }
72
+ }, Z = async (e, t, n) => {
73
+ const r = d[e].fetchRpcUrl ?? "", o = E(r);
18
74
  return (await Promise.all(
19
- c.map(async (s) => u(n, t, s, r))
20
- )).filter((s) => s !== null);
75
+ n.map(async (a) => {
76
+ if (w(a))
77
+ return {
78
+ token: a,
79
+ balance: 1n,
80
+ nfts: [{ image: a.logoURI, tokenId: 0, name: a.symbol }]
81
+ };
82
+ if (a.erc20TokenAddress === P) {
83
+ const R = BigInt(await o.getBalance(new u(t)));
84
+ return { token: a, balance: R };
85
+ }
86
+ const l = new u(a.erc20TokenAddress), f = new u(t), i = await k(
87
+ l,
88
+ f,
89
+ !0,
90
+ a.is2022Program ? O : F
91
+ );
92
+ if (!await o.getAccountInfo(i))
93
+ return { token: a, balance: 0n };
94
+ const y = await o.getTokenAccountBalance(i), C = BigInt(y.value.amount);
95
+ return { token: a, balance: C };
96
+ })
97
+ )).filter((a) => a.balance > 0n);
21
98
  };
22
99
  export {
23
- u as getPublicBalance,
24
- T as getPublicBalancesOfTokens
100
+ _ as getPublicBalance,
101
+ X as getPublicBalanceByTokenAddress,
102
+ V as getPublicBalancesOfTokens,
103
+ Y as getPublicTransactionCount,
104
+ Z as getSolanaPublicBalances
25
105
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@solana/web3.js"),u=require("../../crypto/poseidon.cjs"),d=require("ethers"),r=t=>{const e=t.toBytes();return d.ethers.BigNumber.from(e).toBigInt()},y=t=>{const e=typeof t=="string"?new i.PublicKey(t):t,n=r(e),o=n/2n**128n,s=n%2n**128n,c=u.poseidonHash(o,s);return{mintAccountPart1:o,mintAccountPart2:s,compressedAddress:c,mintPublicKey:e}};exports.convertPublicKeyToBigint=r;exports.formatMintAddress=y;
@@ -0,0 +1,10 @@
1
+ import { PublicKey } from '@solana/web3.js';
2
+ type FormattedMintAddress = {
3
+ mintAccountPart1: bigint;
4
+ mintAccountPart2: bigint;
5
+ compressedAddress: string;
6
+ mintPublicKey: PublicKey;
7
+ };
8
+ export declare const convertPublicKeyToBigint: (key: PublicKey) => bigint;
9
+ export declare const formatMintAddress: (mint: PublicKey | string) => FormattedMintAddress;
10
+ export {};
@@ -0,0 +1,14 @@
1
+ import { PublicKey as c } from "@solana/web3.js";
2
+ import { poseidonHash as i } from "../../crypto/poseidon.mjs";
3
+ import { ethers as m } from "ethers";
4
+ const u = (t) => {
5
+ const o = t.toBytes();
6
+ return m.BigNumber.from(o).toBigInt();
7
+ }, f = (t) => {
8
+ const o = typeof t == "string" ? new c(t) : t, n = u(o), r = n / 2n ** 128n, e = n % 2n ** 128n, s = i(r, e);
9
+ return { mintAccountPart1: r, mintAccountPart2: e, compressedAddress: s, mintPublicKey: o };
10
+ };
11
+ export {
12
+ u as convertPublicKeyToBigint,
13
+ f as formatMintAddress
14
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../constants/chains.constants.cjs");function i(t){return t?.toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.substring(1)).join(" ")}function a(t){return t.charAt(0).toUpperCase()+t.slice(1)}function c(t){return!t||t===null||Array.isArray(t)&&t.length===0?!0:Object.keys(t).length===0&&t.constructor===Object}const l=t=>{t.startsWith("0x")&&(t=t.slice(2));const e=[];for(let r=0;r<t.length;r+=2){const s=parseInt(t.slice(r,r+2),16);e.push(s)}return new TextDecoder("utf-8").decode(new Uint8Array(e))},u=(t,e,n=!1)=>{const r=`${t}-${e}`;if(n){const{hinkalAddress:s}=o.networkRegistry[e].contractData;return`${r}-${s}`.toLowerCase()}return r.toLowerCase()},f=(t,e,n)=>{if(!e||!n)throw Error("oldPart and newPart must be provided");return t.toLowerCase().split(e.toLowerCase()).join(n.toLowerCase())};exports.capitalizeFirstLetter=a;exports.getStateKey=u;exports.hexToUtf8=l;exports.isNullOrEmpty=c;exports.replaceAllInstances=f;exports.toTitleCase=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../constants/chains.constants.cjs");function i(t){return t?.toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.substring(1)).join(" ")}function o(t){return t.charAt(0).toUpperCase()+t.slice(1)}function c(t){return!t||t===null||Array.isArray(t)&&t.length===0?!0:Object.keys(t).length===0&&t.constructor===Object}const l=t=>{t.startsWith("0x")&&(t=t.slice(2));const e=[];for(let r=0;r<t.length;r+=2){const s=parseInt(t.slice(r,r+2),16);e.push(s)}return new TextDecoder("utf-8").decode(new Uint8Array(e))},u=(t,e,n=!1)=>{const r=`${t}-${e}`;if(n){const{hinkalAddress:s}=a.networkRegistry[e].contractData;return`${r}-${s}`.toLowerCase()}return r.toLowerCase()},p=t=>{const[,e]=t.split("-");return Number(e)},f=(t,e,n)=>{if(!e||!n)throw Error("oldPart and newPart must be provided");return t.toLowerCase().split(e.toLowerCase()).join(n.toLowerCase())},g=t=>!t||t.trim().length===0?null:t.toLowerCase().replace(/\b\w/g,e=>e.toUpperCase()),y=t=>t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t):!1;exports.capitalizeFirstLetter=o;exports.capitalizeName=g;exports.getChainIdFromStateKey=p;exports.getStateKey=u;exports.hexToUtf8=l;exports.isNullOrEmpty=c;exports.replaceAllInstances=f;exports.toTitleCase=i;exports.validateEmail=y;
@@ -8,4 +8,7 @@ export declare function capitalizeFirstLetter(str: string): string;
8
8
  export declare function isNullOrEmpty(obj: unknown): boolean;
9
9
  export declare const hexToUtf8: (hex: string) => string;
10
10
  export declare const getStateKey: (address: string, chainId: number, withHinkalContractAddress?: boolean) => string;
11
+ export declare const getChainIdFromStateKey: (stateKey: string) => number;
11
12
  export declare const replaceAllInstances: (text: string, oldPart: string, newPart: string) => string;
13
+ export declare const capitalizeName: (name: string | undefined | null) => string | null;
14
+ export declare const validateEmail: (email: string | undefined | null) => boolean;
@@ -23,16 +23,22 @@ const l = (t) => {
23
23
  return `${r}-${s}`.toLowerCase();
24
24
  }
25
25
  return r.toLowerCase();
26
- }, p = (t, e, n) => {
26
+ }, p = (t) => {
27
+ const [, e] = t.split("-");
28
+ return Number(e);
29
+ }, g = (t, e, n) => {
27
30
  if (!e || !n)
28
31
  throw Error("oldPart and newPart must be provided");
29
32
  return t.toLowerCase().split(e.toLowerCase()).join(n.toLowerCase());
30
- };
33
+ }, w = (t) => !t || t.trim().length === 0 ? null : t.toLowerCase().replace(/\b\w/g, (e) => e.toUpperCase()), C = (t) => t ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t) : !1;
31
34
  export {
32
35
  c as capitalizeFirstLetter,
36
+ w as capitalizeName,
37
+ p as getChainIdFromStateKey,
33
38
  f as getStateKey,
34
39
  l as hexToUtf8,
35
40
  u as isNullOrEmpty,
36
- p as replaceAllInstances,
37
- a as toTitleCase
41
+ g as replaceAllInstances,
42
+ a as toTitleCase,
43
+ C as validateEmail
38
44
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=(e=1e3)=>new Promise(t=>{setTimeout(()=>{t(void 0)},e)}),i=()=>Math.floor(Date.now()/1e3);exports.getCurrentTimeInSeconds=i;exports.waitLittle=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=(e=1e3)=>new Promise(t=>{setTimeout(()=>{t(void 0)},e)}),i=()=>Math.floor(Date.now()/1e3),T=e=>new Date(e).toISOString(),o=()=>{const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),6,0,0,0));return e<t?new Date(t.setUTCDate(t.getUTCDate()-1)):t},u=()=>{const e=o(),t=new Date(e);return t.setUTCDate(t.getUTCDate()-6),t},r=()=>{const e=o(),a=(e.getUTCDay()+6)%7,n=new Date(e);return n.setUTCDate(e.getUTCDate()-a),n.setUTCHours(6,0,0,0),n},U=()=>{const e=r();return e.setUTCDate(e.getUTCDate()-7),e},C=()=>{const e=new Date,t=new Date(e);return t.setUTCHours(6,0,0,0),t<=e&&t.setUTCDate(t.getUTCDate()+1),t.getTime()-e.getTime()},m=()=>{const e=new Date,t=new Date(e);return t.setUTCHours(8,0,0,0),t<=e&&t.setUTCDate(t.getUTCDate()+1),t.getTime()-e.getTime()},y=()=>{const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),6,0,0,0));return e<t&&t.setUTCDate(t.getUTCDate()-1),t},S=()=>{const e=new Date,t=new Date(e);return t.setUTCHours(6,0,0,0),t<=e&&t.setUTCDate(t.getUTCDate()+1),t.toISOString()},f=e=>{const n=new Date().getFullYear()===e.getFullYear()?{month:"long",day:"numeric"}:{month:"long",day:"numeric",year:"numeric"};return e.toLocaleDateString(void 0,n)},w=e=>{try{const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const a=t.getDate(),n=t.getFullYear(),s=t.toLocaleString("en-US",{month:"short"}),c=String(t.getHours()).padStart(2,"0"),g=String(t.getMinutes()).padStart(2,"0");return`${a} ${s}, ${n} - ${c}:${g}`}catch{return""}};exports.formatDate=f;exports.formatTxTimestamp=w;exports.getCurrentDayStart=y;exports.getCurrentTimeInSeconds=i;exports.getCurrentWeekStart=r;exports.getDelayUntilUtc8=m;exports.getEffectiveSevenDaysAgo=u;exports.getEffectiveToday=o;exports.getNextDayDelay=C;exports.getNextDayISO=S;exports.getPreviousWeekStart=U;exports.msToISOString=T;exports.waitLittle=D;
@@ -1,2 +1,13 @@
1
1
  export declare const waitLittle: (time?: number) => Promise<unknown>;
2
2
  export declare const getCurrentTimeInSeconds: () => number;
3
+ export declare const msToISOString: (ms: number) => string;
4
+ export declare const getEffectiveToday: () => Date;
5
+ export declare const getEffectiveSevenDaysAgo: () => Date;
6
+ export declare const getCurrentWeekStart: () => Date;
7
+ export declare const getPreviousWeekStart: () => Date;
8
+ export declare const getNextDayDelay: () => number;
9
+ export declare const getDelayUntilUtc8: () => number;
10
+ export declare const getCurrentDayStart: () => Date;
11
+ export declare const getNextDayISO: () => string;
12
+ export declare const formatDate: (date: Date) => string;
13
+ export declare const formatTxTimestamp: (input: string) => string;
@@ -1,9 +1,57 @@
1
- const o = (e = 1e3) => new Promise((t) => {
1
+ const g = (e = 1e3) => new Promise((t) => {
2
2
  setTimeout(() => {
3
3
  t(void 0);
4
4
  }, e);
5
- }), n = () => Math.floor(Date.now() / 1e3);
5
+ }), i = () => Math.floor(Date.now() / 1e3), T = (e) => new Date(e).toISOString(), a = () => {
6
+ const e = /* @__PURE__ */ new Date(), t = new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate(), 6, 0, 0, 0));
7
+ return e < t ? new Date(t.setUTCDate(t.getUTCDate() - 1)) : t;
8
+ }, u = () => {
9
+ const e = a(), t = new Date(e);
10
+ return t.setUTCDate(t.getUTCDate() - 6), t;
11
+ }, D = () => {
12
+ const e = a(), o = (e.getUTCDay() + 6) % 7, n = new Date(e);
13
+ return n.setUTCDate(e.getUTCDate() - o), n.setUTCHours(6, 0, 0, 0), n;
14
+ }, U = () => {
15
+ const e = D();
16
+ return e.setUTCDate(e.getUTCDate() - 7), e;
17
+ }, C = () => {
18
+ const e = /* @__PURE__ */ new Date(), t = new Date(e);
19
+ return t.setUTCHours(6, 0, 0, 0), t <= e && t.setUTCDate(t.getUTCDate() + 1), t.getTime() - e.getTime();
20
+ }, w = () => {
21
+ const e = /* @__PURE__ */ new Date(), t = new Date(e);
22
+ return t.setUTCHours(8, 0, 0, 0), t <= e && t.setUTCDate(t.getUTCDate() + 1), t.getTime() - e.getTime();
23
+ }, m = () => {
24
+ const e = /* @__PURE__ */ new Date(), t = new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate(), 6, 0, 0, 0));
25
+ return e < t && t.setUTCDate(t.getUTCDate() - 1), t;
26
+ }, y = () => {
27
+ const e = /* @__PURE__ */ new Date(), t = new Date(e);
28
+ return t.setUTCHours(6, 0, 0, 0), t <= e && t.setUTCDate(t.getUTCDate() + 1), t.toISOString();
29
+ }, f = (e) => {
30
+ const n = (/* @__PURE__ */ new Date()).getFullYear() === e.getFullYear() ? { month: "long", day: "numeric" } : { month: "long", day: "numeric", year: "numeric" };
31
+ return e.toLocaleDateString(void 0, n);
32
+ }, S = (e) => {
33
+ try {
34
+ const t = new Date(e);
35
+ if (Number.isNaN(t.getTime()))
36
+ return "";
37
+ const o = t.getDate(), n = t.getFullYear(), s = t.toLocaleString("en-US", { month: "short" }), r = String(t.getHours()).padStart(2, "0"), c = String(t.getMinutes()).padStart(2, "0");
38
+ return `${o} ${s}, ${n} - ${r}:${c}`;
39
+ } catch {
40
+ return "";
41
+ }
42
+ };
6
43
  export {
7
- n as getCurrentTimeInSeconds,
8
- o as waitLittle
44
+ f as formatDate,
45
+ S as formatTxTimestamp,
46
+ m as getCurrentDayStart,
47
+ i as getCurrentTimeInSeconds,
48
+ D as getCurrentWeekStart,
49
+ w as getDelayUntilUtc8,
50
+ u as getEffectiveSevenDaysAgo,
51
+ a as getEffectiveToday,
52
+ C as getNextDayDelay,
53
+ y as getNextDayISO,
54
+ U as getPreviousWeekStart,
55
+ T as msToISOString,
56
+ g as waitLittle
9
57
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=[{value:1e9,unit:"b"},{value:1e6,unit:"m"},{value:1e3,unit:"k"}],o=(e,u=n,i=!0)=>{u.sort((t,l)=>l.value-t.value);const r=i?"$":"";if(e<u[u.length-1].value)return`$${e.toFixed(2)}`;for(const t of u)if(e>=t.value)return`${r}${(Math.round(100*e/t.value)/100).toFixed(2)+t.unit}`;return`${r}${e}`};exports.trimFieldValues=o;
@@ -0,0 +1,4 @@
1
+ export declare const trimFieldValues: (value: number, demarcations?: {
2
+ value: number;
3
+ unit: string;
4
+ }[], showDollarSign?: boolean) => string;
@@ -0,0 +1,17 @@
1
+ const l = [
2
+ { value: 1e9, unit: "b" },
3
+ { value: 1e6, unit: "m" },
4
+ { value: 1e3, unit: "k" }
5
+ ], o = (e, u = l, r = !0) => {
6
+ u.sort((t, i) => i.value - t.value);
7
+ const n = r ? "$" : "";
8
+ if (e < u[u.length - 1].value)
9
+ return `$${e.toFixed(2)}`;
10
+ for (const t of u)
11
+ if (e >= t.value)
12
+ return `${n}${(Math.round(100 * e / t.value) / 100).toFixed(2) + t.unit}`;
13
+ return `${n}${e}`;
14
+ };
15
+ export {
16
+ o as trimFieldValues
17
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("ua-parser-js"),a=new s.UAParser,o=17,n=()=>{const{name:e,version:r}=a.getBrowser(),t=parseInt(r?.split(".")[0]??"0",10);return!(e==="Safari"&&t&&o>t)},l={mpcVault:"MPCVault - Multisig Wallet",utila:"UtilaWallet"},u=e=>{const r=e?.session?.peer?.metadata?.name;return!Object.values(l).includes(r)};exports.browserSupported=n;exports.walletSupported=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../constants/token-data/index.cjs");require("../../constants/chains.constants.cjs");require("../../constants/contracts.constants.cjs");require("../../constants/kyc.constants.cjs");require("../../constants/server.constants.cjs");require("../../constants/vite.constants.cjs");require("../../constants/coingecko.constants.cjs");require("../../constants/reorg-depths.constants.cjs");require("../../constants/addresses.constants.cjs");require("../../constants/token.limits.constants.cjs");const s=require("../../constants/wallet.constants.cjs");require("../../constants/presale.constants.cjs");require("../../constants/activity.constants.cjs");require("../../constants/tasks.constants.cjs");require("../../constants/events.constants.cjs");const i=require("ua-parser-js"),n=new i.UAParser,a=17,o=()=>{const{name:t,version:e}=n.getBrowser(),r=parseInt(e?.split(".")[0]??"0",10);return!(t==="Safari"&&r&&a>r)},l=(t,e)=>{const r=e?.type==="walletConnect",u=t?.session?.peer?.metadata?.name;return!(r&&Object.values(s.UNSUPPORTED_WALLETS_WALLETCONNECT_NAMES).includes(u)||Object.values(s.UNSUPPORTED_WALLET_IDS).includes(e?.id))};exports.browserSupported=o;exports.walletSupported=l;
@@ -1,2 +1,3 @@
1
+ import { Connector } from 'wagmi';
1
2
  export declare const browserSupported: () => boolean;
2
- export declare const walletSupported: (provider: any) => boolean;
3
+ export declare const walletSupported: (provider: any, connector: Connector) => boolean;
@@ -1,15 +1,27 @@
1
+ import "../../constants/token-data/index.mjs";
2
+ import "../../constants/chains.constants.mjs";
3
+ import "../../constants/contracts.constants.mjs";
4
+ import "../../constants/kyc.constants.mjs";
5
+ import "../../constants/server.constants.mjs";
6
+ import "../../constants/vite.constants.mjs";
7
+ import "../../constants/coingecko.constants.mjs";
8
+ import "../../constants/reorg-depths.constants.mjs";
9
+ import "../../constants/addresses.constants.mjs";
10
+ import "../../constants/token.limits.constants.mjs";
11
+ import { UNSUPPORTED_WALLETS_WALLETCONNECT_NAMES as i, UNSUPPORTED_WALLET_IDS as p } from "../../constants/wallet.constants.mjs";
12
+ import "../../constants/presale.constants.mjs";
13
+ import "../../constants/activity.constants.mjs";
14
+ import "../../constants/tasks.constants.mjs";
15
+ import "../../constants/events.constants.mjs";
1
16
  import { UAParser as s } from "ua-parser-js";
2
- const a = new s(), n = 17, i = () => {
3
- const { name: e, version: t } = a.getBrowser(), r = parseInt(t?.split(".")[0] ?? "0", 10);
4
- return !(e === "Safari" && r && n > r);
5
- }, o = {
6
- mpcVault: "MPCVault - Multisig Wallet",
7
- utila: "UtilaWallet"
8
- }, u = (e) => {
9
- const t = e?.session?.peer?.metadata?.name;
10
- return !Object.values(o).includes(t);
17
+ const n = new s(), m = 17, w = () => {
18
+ const { name: e, version: r } = n.getBrowser(), t = parseInt(r?.split(".")[0] ?? "0", 10);
19
+ return !(e === "Safari" && t && m > t);
20
+ }, R = (e, r) => {
21
+ const t = r?.type === "walletConnect", o = e?.session?.peer?.metadata?.name;
22
+ return !(t && Object.values(i).includes(o) || Object.values(p).includes(r?.id));
11
23
  };
12
24
  export {
13
- i as browserSupported,
14
- u as walletSupported
25
+ w as browserSupported,
26
+ R as walletSupported
15
27
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../../constants/protocol.constants.cjs"),d=require("./amounts.utils.cjs"),f=require("./caseInsensitive.utils.cjs"),v=require("./publicBalance.utils.cjs"),p=require("../web3/etherFunctions.cjs"),y=require("../../data-structures/crypto-keys/keys.cjs"),A=(s,t)=>s?.length?s.reduce((e,{amount:u,token:r})=>{if(u>=0n)return e;const o=-u,c=t.find(i=>f.caseInsensitiveEqual(i.token.erc20TokenAddress,r.erc20TokenAddress))?.balance??0n;return c<o&&(e.tokensToFund.push(r),e.fundAmounts.push(o-c)),e},{fundAmounts:[],tokensToFund:[]}):{fundAmounts:[],tokensToFund:[]},F=async(s,t,n)=>{if(!n?.length)return{fundAmounts:[],tokensToFund:[],approveTokenAddresses:[],approvedTokenAmounts:[]};const e=s.getCurrentChainId(),u=y.UserKeys.getSignerAddressFromPrivateKey(e,t.privateKey),r=await v.getPublicBalancesOfTokens(e,u,n.map(({token:a})=>a)),{fundAmounts:o,tokensToFund:c}=A(n,r),i=n.length?n.filter(({amount:a,token:g})=>a<0n&&g.erc20TokenAddress!==m.zeroAddress).map(({token:a})=>a.erc20TokenAddress):[],l=i.map(()=>2n**256n-1n);return{fundAmounts:o,tokensToFund:c,approveTokenAddresses:i,approvedTokenAmounts:l}},T=(s,t,n)=>{const e=t.map(r=>r.amount<0n?s.getMyApprovalAmountForInteraction(n,r.token.erc20TokenAddress):0n);return{approvalChanges:t.map((r,o)=>r.amount<0n&&e[o]>0n?d.absBigInt(r.amount)<d.absBigInt(e[o])?r.amount:-e[o]:0n)}};function h(s,t,n,e,u){try{return!n||!s?!0:e?u?+s*u<=+t:!0:p.getAmountInWei(n,s)<=p.getAmountInWei(n,t)}catch{return!0}}exports.getNecessaryApprovalChangesData=T;exports.getNecessaryAssetsForFunding=F;exports.getNecessaryAssetsForFundingFromBalance=A;exports.hasEnoughBalance=h;
@@ -0,0 +1,17 @@
1
+ import { IHinkal } from '../../data-structures/Hinkal/IHinkal';
2
+ import { ERC20Token, TokenBalance, TokenChanges } from '../../types/token.types';
3
+ import { SubAccount } from '../../types/proxy.types';
4
+ export declare const getNecessaryAssetsForFundingFromBalance: (tokenChanges: TokenChanges<bigint>[], subAccountBalances: TokenBalance[]) => {
5
+ fundAmounts: bigint[];
6
+ tokensToFund: ERC20Token[];
7
+ };
8
+ export declare const getNecessaryAssetsForFunding: (hinkal: IHinkal, subAccount: SubAccount, tokenChanges: TokenChanges<bigint>[]) => Promise<{
9
+ fundAmounts: bigint[];
10
+ tokensToFund: ERC20Token[];
11
+ approveTokenAddresses: string[];
12
+ approvedTokenAmounts: bigint[];
13
+ }>;
14
+ export declare const getNecessaryApprovalChangesData: (hinkal: IHinkal, tokenChanges: TokenChanges<bigint>[], to: string) => {
15
+ approvalChanges: bigint[];
16
+ };
17
+ export declare function hasEnoughBalance(tokenAmount: string, maxPossibleAmount: string, token?: ERC20Token, isDollarMode?: boolean, tokenPriceDollar?: number): boolean;
@@ -0,0 +1,42 @@
1
+ import { zeroAddress as f } from "../../constants/protocol.constants.mjs";
2
+ import { absBigInt as c } from "./amounts.utils.mjs";
3
+ import { caseInsensitiveEqual as l } from "./caseInsensitive.utils.mjs";
4
+ import { getPublicBalancesOfTokens as g } from "./publicBalance.utils.mjs";
5
+ import { getAmountInWei as m } from "../web3/etherFunctions.mjs";
6
+ import { UserKeys as v } from "../../data-structures/crypto-keys/keys.mjs";
7
+ const T = (t, s) => t?.length ? t.reduce(
8
+ (r, { amount: u, token: e }) => {
9
+ if (u >= 0n)
10
+ return r;
11
+ const o = -u, d = s.find(
12
+ (p) => l(p.token.erc20TokenAddress, e.erc20TokenAddress)
13
+ )?.balance ?? 0n;
14
+ return d < o && (r.tokensToFund.push(e), r.fundAmounts.push(o - d)), r;
15
+ },
16
+ { fundAmounts: [], tokensToFund: [] }
17
+ ) : { fundAmounts: [], tokensToFund: [] }, K = async (t, s, n) => {
18
+ if (!n?.length)
19
+ return { fundAmounts: [], tokensToFund: [], approveTokenAddresses: [], approvedTokenAmounts: [] };
20
+ const r = t.getCurrentChainId(), u = v.getSignerAddressFromPrivateKey(r, s.privateKey), e = await g(
21
+ r,
22
+ u,
23
+ n.map(({ token: a }) => a)
24
+ ), { fundAmounts: o, tokensToFund: d } = T(n, e), p = n.length ? n.filter(({ amount: a, token: A }) => a < 0n && A.erc20TokenAddress !== f).map(({ token: a }) => a.erc20TokenAddress) : [], i = p.map(() => 2n ** 256n - 1n);
25
+ return { fundAmounts: o, tokensToFund: d, approveTokenAddresses: p, approvedTokenAmounts: i };
26
+ }, N = (t, s, n) => {
27
+ const r = s.map((e) => e.amount < 0n ? t.getMyApprovalAmountForInteraction(n, e.token.erc20TokenAddress) : 0n);
28
+ return { approvalChanges: s.map((e, o) => e.amount < 0n && r[o] > 0n ? c(e.amount) < c(r[o]) ? e.amount : -r[o] : 0n) };
29
+ };
30
+ function k(t, s, n, r, u) {
31
+ try {
32
+ return !n || !t ? !0 : r ? u ? +t * u <= +s : !0 : m(n, t) <= m(n, s);
33
+ } catch {
34
+ return !0;
35
+ }
36
+ }
37
+ export {
38
+ N as getNecessaryApprovalChangesData,
39
+ K as getNecessaryAssetsForFunding,
40
+ T as getNecessaryAssetsForFundingFromBalance,
41
+ k as hasEnoughBalance
42
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("ethers"),c=(i,s,e)=>s.reduce((n,{name:t,type:r})=>{const a=i[t];if(r.endsWith("[]")){const o=r.slice(0,-2);if(e[o]&&Array.isArray(a)){const m=a.reduce((u,f,d)=>({...u,[d]:{value:c(f,e[o],e),type:o}}),{});return{...n,[t]:{value:m,type:r}}}return{...n,[t]:{value:a,type:r}}}return e[r]?{...n,[t]:{value:c(a,e[r],e),type:r}}:{...n,[t]:{value:a,type:r}}},{}),l=(i,s,e)=>{const n=c(i,s[e],s);return{primaryType:{value:e,type:"string"},...n}},g=["Permit","PermitWithExpiry","PermitBatch","PermitBatchTransferFrom","PermitSingle","PermitTransferFrom","PermitWitnessTransferFrom"],T=(i,s)=>{let e;switch(s){case"PermitSingle":case"PermitBatch":e=i.details;break;case"PermitBatchTransferFrom":case"PermitTransferFrom":case"PermitWitnessTransferFrom":e=i.permitted;break}if(e)return Array.isArray(e)?e:[e]},h=(i,s,e)=>{if(!Object.keys(s).some(r=>g.includes(r)))return{isPermit:!1,tokenDetails:[]};const t=T(i,e);return t?{isPermit:!0,tokenDetails:t}:{isPermit:!0,tokenDetails:[]}},k=(i,s,e,n)=>{const{isPermit:t,tokenDetails:r}=h(i,s,n);if(!t)return{isPermit:!1};let a;if(r.length)a=e.verifyingContract;else{const o=e.verifyingContract;o&&r.push({token:o,amount:P.ethers.constants.MaxUint256.toString()})}return{isPermit:t,tokenDetails:r,spender:a}};exports.decodeMessage=c;exports.getDecodedMessage=l;exports.getPermitInfo=k;
@@ -0,0 +1,23 @@
1
+ import { TypedDataField } from 'ethers';
2
+ import { DecodedTypedMessageValue } from '../../types/message.types';
3
+ export declare const decodeMessage: (message: Record<string, any>, typeDefinition: TypedDataField[], types: Record<string, TypedDataField[]>) => Record<string, DecodedTypedMessageValue>;
4
+ export declare const getDecodedMessage: (message: Record<string, any>, types: Record<string, TypedDataField[]>, primaryType: string) => {
5
+ primaryType: {
6
+ value: string;
7
+ type: string;
8
+ };
9
+ };
10
+ type TokenDetail = {
11
+ token: string;
12
+ amount: string;
13
+ };
14
+ export declare const getPermitInfo: (message: Record<string, any>, types: Record<string, TypedDataField[]>, domain: Record<string, unknown>, primaryType: string) => {
15
+ isPermit: boolean;
16
+ tokenDetails?: undefined;
17
+ spender?: undefined;
18
+ } | {
19
+ isPermit: true;
20
+ tokenDetails: TokenDetail[];
21
+ spender: string | undefined;
22
+ };
23
+ export {};