@gurge/sdk 0.3.142 → 0.3.151

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 (1106) hide show
  1. package/README.md +43 -29
  2. package/common/src/API/API.cjs +1 -1
  3. package/common/src/API/API.d.ts +97 -0
  4. package/common/src/API/API.mjs +96 -121
  5. package/common/src/API/TokenCallsCachedHelper.d.ts +15 -0
  6. package/common/src/API/admin-calls.cjs +1 -1
  7. package/common/src/API/admin-calls.d.ts +9 -0
  8. package/common/src/API/admin-calls.mjs +3 -1
  9. package/common/src/API/callLifiAPI.cjs +1 -1
  10. package/common/src/API/callLifiAPI.d.ts +37 -0
  11. package/common/src/API/callLifiAPI.mjs +7 -2
  12. package/common/src/API/callMonitor.d.ts +9 -0
  13. package/common/src/API/callNearIntentsAPI.cjs +1 -1
  14. package/common/src/API/callNearIntentsAPI.d.ts +3 -0
  15. package/common/src/API/callNearIntentsAPI.mjs +2 -2
  16. package/common/src/API/callOkxAPI.d.ts +10 -0
  17. package/common/src/API/callRelayer.cjs +1 -1
  18. package/common/src/API/callRelayer.d.ts +76 -0
  19. package/common/src/API/callRelayer.mjs +7 -1
  20. package/common/src/API/checkRisk.d.ts +1 -0
  21. package/common/src/API/dashboardAccountCalls.d.ts +24 -0
  22. package/common/src/API/dashboardAccountMemberCalls.cjs +1 -1
  23. package/common/src/API/dashboardAccountMemberCalls.d.ts +49 -0
  24. package/common/src/API/dashboardAccountMemberCalls.mjs +5 -2
  25. package/common/src/API/dashboardBalanceCalls.d.ts +12 -0
  26. package/common/src/API/dashboardContactCalls.d.ts +9 -0
  27. package/common/src/API/dashboardPayoutCalls.cjs +1 -1
  28. package/common/src/API/dashboardPayoutCalls.d.ts +15 -0
  29. package/common/src/API/dashboardPayoutCalls.mjs +4 -1
  30. package/common/src/API/dashboardTransactionCalls.cjs +1 -1
  31. package/common/src/API/dashboardTransactionCalls.d.ts +6 -0
  32. package/common/src/API/dashboardTransactionCalls.mjs +2 -2
  33. package/common/src/API/enclaveRecipientInfoCalls.d.ts +12 -0
  34. package/common/src/API/enclaveSignatureCalls.cjs +1 -1
  35. package/common/src/API/enclaveSignatureCalls.d.ts +6 -0
  36. package/common/src/API/enclaveSignatureCalls.mjs +5 -8
  37. package/common/src/API/enclaveUtxoCalls.cjs +1 -1
  38. package/common/src/API/enclaveUtxoCalls.d.ts +59 -0
  39. package/common/src/API/enclaveUtxoCalls.mjs +16 -17
  40. package/common/src/API/evm-rpc-fallback.cjs +1 -0
  41. package/common/src/API/evm-rpc-fallback.d.ts +1 -0
  42. package/common/src/API/evm-rpc-fallback.mjs +17 -0
  43. package/common/src/API/evm-token-assets.d.ts +8 -0
  44. package/common/src/API/fetchCommitmentsCache.d.ts +19 -0
  45. package/common/src/API/get-token-data.d.ts +6 -0
  46. package/common/src/API/get-token-price-chart-data.d.ts +16 -0
  47. package/common/src/API/getCoingeckoPrice.d.ts +21 -0
  48. package/common/src/API/getGasEstimates.d.ts +10 -0
  49. package/common/src/API/getOdosPriceForToken.cjs +1 -0
  50. package/common/src/API/getOdosPriceForToken.d.ts +1 -0
  51. package/common/src/API/getOdosPriceForToken.mjs +14 -0
  52. package/common/src/API/getServerURL.d.ts +7 -0
  53. package/common/src/API/getTokenPrice.d.ts +10 -0
  54. package/common/src/API/getWebsiteURL.d.ts +3 -0
  55. package/common/src/API/index.cjs +1 -1
  56. package/common/src/API/index.d.ts +24 -0
  57. package/common/src/API/index.mjs +4 -5
  58. package/common/src/API/onrampCalls.d.ts +20 -0
  59. package/common/src/API/payoutNotificationStateCalls.cjs +1 -0
  60. package/common/src/API/payoutNotificationStateCalls.d.ts +10 -0
  61. package/common/src/API/payoutNotificationStateCalls.mjs +10 -0
  62. package/common/src/API/privacy-score-calls.d.ts +17 -0
  63. package/common/src/API/privateSendEmailNotificationsCalls.d.ts +8 -0
  64. package/common/src/API/privateSendNonceCalls.d.ts +13 -0
  65. package/common/src/API/privateSendRecipientInfoCalls.cjs +1 -1
  66. package/common/src/API/privateSendRecipientInfoCalls.d.ts +8 -0
  67. package/common/src/API/privateSendRecipientInfoCalls.mjs +12 -6
  68. package/common/src/API/proxyAccountsCalls.cjs +1 -1
  69. package/common/src/API/proxyAccountsCalls.d.ts +5 -0
  70. package/common/src/API/proxyAccountsCalls.mjs +11 -10
  71. package/common/src/API/relayCalls.d.ts +5 -0
  72. package/common/src/API/resolve-sns.d.ts +1 -0
  73. package/common/src/API/rewardsUserCalls.cjs +1 -1
  74. package/common/src/API/rewardsUserCalls.d.ts +21 -0
  75. package/common/src/API/rewardsUserCalls.mjs +2 -10
  76. package/common/src/API/route-config.cjs +1 -0
  77. package/common/src/API/route-config.d.ts +1 -0
  78. package/common/src/API/route-config.mjs +26 -0
  79. package/common/src/API/scheduled-transactions-calls.cjs +1 -1
  80. package/common/src/API/scheduled-transactions-calls.d.ts +17 -0
  81. package/common/src/API/scheduled-transactions-calls.mjs +2 -6
  82. package/common/src/API/seedless-calls.d.ts +53 -0
  83. package/common/src/API/simulate-batch-tx.d.ts +3 -0
  84. package/common/src/API/simulate-transaction.d.ts +5 -0
  85. package/common/src/API/snapshot-event-calls.d.ts +7 -0
  86. package/common/src/API/solana-nft-assets.d.ts +1 -0
  87. package/common/src/API/solana-priority-fee.cjs +1 -0
  88. package/common/src/API/solana-priority-fee.d.ts +3 -0
  89. package/common/src/API/solana-priority-fee.mjs +20 -0
  90. package/common/src/API/solana-rpc-fallback.cjs +1 -0
  91. package/common/src/API/solana-rpc-fallback.d.ts +1 -0
  92. package/common/src/API/solana-rpc-fallback.mjs +13 -0
  93. package/common/src/API/temporaryWalletCalls.cjs +1 -1
  94. package/common/src/API/temporaryWalletCalls.d.ts +11 -0
  95. package/common/src/API/temporaryWalletCalls.mjs +8 -9
  96. package/common/src/API/tenderly.api.cjs +1 -1
  97. package/common/src/API/tenderly.api.d.ts +15 -0
  98. package/common/src/API/tenderly.api.mjs +1 -1
  99. package/common/src/API/token-calls.d.ts +4 -0
  100. package/common/src/API/tronSubsidyCalls.d.ts +13 -0
  101. package/common/src/API/weeklyAnalyticCalls.cjs +1 -1
  102. package/common/src/API/weeklyAnalyticCalls.d.ts +12 -0
  103. package/common/src/API/weeklyAnalyticCalls.mjs +2 -5
  104. package/common/src/constants/activity.constants.d.ts +2 -0
  105. package/common/src/constants/addresses.constants.cjs +1 -1
  106. package/common/src/constants/addresses.constants.d.ts +28 -0
  107. package/common/src/constants/addresses.constants.mjs +19 -60
  108. package/common/src/constants/auth.constants.d.ts +2 -0
  109. package/common/src/constants/backend.constants.d.ts +12 -0
  110. package/common/src/constants/balance.constants.cjs +1 -0
  111. package/common/src/constants/balance.constants.d.ts +4 -0
  112. package/common/src/constants/balance.constants.mjs +4 -0
  113. package/common/src/constants/bridging.constants.cjs +1 -1
  114. package/common/src/constants/bridging.constants.d.ts +35 -0
  115. package/common/src/constants/bridging.constants.mjs +2 -1
  116. package/common/src/constants/chains.constants.cjs +1 -1
  117. package/common/src/constants/chains.constants.d.ts +74 -0
  118. package/common/src/constants/chains.constants.mjs +175 -198
  119. package/common/src/constants/coingecko.constants.cjs +1 -1
  120. package/common/src/constants/coingecko.constants.d.ts +46 -0
  121. package/common/src/constants/coingecko.constants.mjs +1 -1
  122. package/common/src/constants/contracts.constants.cjs +1 -1
  123. package/common/src/constants/contracts.constants.d.ts +11 -0
  124. package/common/src/constants/contracts.constants.mjs +16 -34
  125. package/common/src/constants/conversion.constants.d.ts +1 -0
  126. package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
  127. package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.mjs +8 -9
  128. package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.cjs +1 -1
  129. package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.mjs +7 -6
  130. package/common/src/constants/deploy-data/deploy-data-base.json.cjs +1 -1
  131. package/common/src/constants/deploy-data/deploy-data-base.json.mjs +8 -9
  132. package/common/src/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +1 -0
  133. package/common/src/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +12 -0
  134. package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
  135. package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.mjs +8 -9
  136. package/common/src/constants/deploy-data/deploy-data-localhost.json.cjs +1 -1
  137. package/common/src/constants/deploy-data/deploy-data-localhost.json.mjs +0 -3
  138. package/common/src/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
  139. package/common/src/constants/deploy-data/deploy-data-optimism.json.mjs +8 -9
  140. package/common/src/constants/deploy-data/deploy-data-optimismTest.json.cjs +1 -1
  141. package/common/src/constants/deploy-data/deploy-data-optimismTest.json.mjs +5 -9
  142. package/common/src/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
  143. package/common/src/constants/deploy-data/deploy-data-polygon.json.mjs +8 -9
  144. package/common/src/constants/deploy-data/deploy-data-sepoliaTestnet.json.cjs +1 -1
  145. package/common/src/constants/deploy-data/deploy-data-sepoliaTestnet.json.mjs +0 -1
  146. package/common/src/constants/deploy-data/deploy-data-solana.json.cjs +1 -1
  147. package/common/src/constants/deploy-data/deploy-data-solana.json.mjs +2 -2
  148. package/common/src/constants/deploy-data/deploy-data-tempo.json.cjs +1 -1
  149. package/common/src/constants/deploy-data/deploy-data-tempo.json.mjs +7 -7
  150. package/common/src/constants/deploy-data/deploy-data-tronMainnet.json.cjs +1 -1
  151. package/common/src/constants/deploy-data/deploy-data-tronMainnet.json.mjs +2 -4
  152. package/common/src/constants/deploy-data/deploy-data-tronNile.json.cjs +1 -1
  153. package/common/src/constants/deploy-data/deploy-data-tronNile.json.mjs +2 -4
  154. package/common/src/constants/deploy-data/index.cjs +1 -1
  155. package/common/src/constants/deploy-data/index.d.ts +15 -0
  156. package/common/src/constants/deploy-data/index.mjs +16 -15
  157. package/common/src/constants/deploy-data/mergeDeployData.d.ts +4 -0
  158. package/common/src/constants/deploy-data/shared-deploy-data-evm.json.cjs +1 -1
  159. package/common/src/constants/deploy-data/shared-deploy-data-evm.json.mjs +36 -45
  160. package/common/src/constants/deploy-data/shared-deploy-data-solana.json.cjs +1 -1
  161. package/common/src/constants/deploy-data/shared-deploy-data-solana.json.mjs +1 -1
  162. package/common/src/constants/deploy-data/shared-deploy-data-tron.json.cjs +1 -1
  163. package/common/src/constants/deploy-data/shared-deploy-data-tron.json.mjs +2 -46
  164. package/common/src/constants/enclaveAuth.constants.d.ts +5 -0
  165. package/common/src/constants/events.constants.cjs +1 -1
  166. package/common/src/constants/events.constants.d.ts +1 -0
  167. package/common/src/constants/events.constants.mjs +1 -15
  168. package/common/src/constants/fees.constants.cjs +1 -1
  169. package/common/src/constants/fees.constants.d.ts +9 -0
  170. package/common/src/constants/fees.constants.mjs +2 -2
  171. package/common/src/constants/function-signatures.constants.d.ts +4 -0
  172. package/common/src/constants/images.constants.d.ts +1 -0
  173. package/common/src/constants/index.cjs +1 -1
  174. package/common/src/constants/index.d.ts +32 -0
  175. package/common/src/constants/index.mjs +1 -1
  176. package/common/src/constants/lifi.constants.cjs +1 -1
  177. package/common/src/constants/lifi.constants.d.ts +3 -0
  178. package/common/src/constants/lifi.constants.mjs +6 -3
  179. package/common/src/constants/link.constant.d.ts +1 -0
  180. package/common/src/constants/mediaUrls.constants.d.ts +43 -0
  181. package/common/src/constants/oauthUrls.constants.d.ts +4 -0
  182. package/common/src/constants/okx.constants.d.ts +3 -0
  183. package/common/src/constants/pay.constants.d.ts +2 -0
  184. package/common/src/constants/permit2.constants.d.ts +7 -0
  185. package/common/src/constants/presale.constants.d.ts +87 -0
  186. package/common/src/constants/protocol.constants.cjs +2 -1
  187. package/common/src/constants/protocol.constants.d.ts +74 -0
  188. package/common/src/constants/protocol.constants.mjs +3 -15
  189. package/common/src/constants/reorg-depths.constants.d.ts +17 -0
  190. package/common/src/constants/save-depths.d.ts +19 -0
  191. package/common/src/constants/schedule.constants.d.ts +2 -0
  192. package/common/src/constants/server.constants.cjs +1 -1
  193. package/common/src/constants/server.constants.d.ts +116 -0
  194. package/common/src/constants/server.constants.mjs +19 -49
  195. package/common/src/constants/tokens.constants.cjs +1 -1
  196. package/common/src/constants/tokens.constants.d.ts +5 -0
  197. package/common/src/constants/tokens.constants.mjs +4 -1
  198. package/common/src/constants/tx-confirmation.constants.cjs +1 -1
  199. package/common/src/constants/tx-confirmation.constants.d.ts +5 -0
  200. package/common/src/constants/tx-confirmation.constants.mjs +2 -2
  201. package/common/src/constants/vite.constants.d.ts +16 -0
  202. package/common/src/constants/wallet.constants.d.ts +1 -0
  203. package/common/src/crypto/babyJub.d.ts +16 -0
  204. package/common/src/crypto/ecdh-sealed-keys.cjs +1 -1
  205. package/common/src/crypto/ecdh-sealed-keys.d.ts +22 -0
  206. package/common/src/crypto/ecdh-sealed-keys.mjs +17 -2
  207. package/common/src/crypto/ecdh.d.ts +2 -0
  208. package/common/src/crypto/eddsa.d.ts +8 -0
  209. package/common/src/crypto/index.cjs +1 -1
  210. package/common/src/crypto/index.d.ts +6 -0
  211. package/common/src/crypto/index.mjs +1 -2
  212. package/common/src/crypto/poseidon.d.ts +15 -0
  213. package/common/src/crypto/preProcessing.d.ts +1 -0
  214. package/common/src/data-structures/AccountActions/AccountActions.d.ts +17 -0
  215. package/common/src/data-structures/AccountActions/index.d.ts +1 -0
  216. package/common/src/data-structures/ApprovalDBs/EventsPublicApprovalsDB.d.ts +17 -0
  217. package/common/src/data-structures/ApprovalDBs/index.d.ts +1 -0
  218. package/common/src/data-structures/BlockchainEvent/BlockchainEvent.d.ts +14 -0
  219. package/common/src/data-structures/Hinkal/Hinkal.cjs +1 -1
  220. package/common/src/data-structures/Hinkal/Hinkal.d.ts +120 -0
  221. package/common/src/data-structures/Hinkal/Hinkal.mjs +142 -174
  222. package/common/src/data-structures/Hinkal/IHinkal.d.ts +106 -0
  223. package/common/src/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
  224. package/common/src/data-structures/Hinkal/handleAutoDepositBack.d.ts +3 -0
  225. package/common/src/data-structures/Hinkal/handleAutoDepositBack.mjs +36 -35
  226. package/common/src/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
  227. package/common/src/data-structures/Hinkal/hinkalActionReceive.d.ts +7 -0
  228. package/common/src/data-structures/Hinkal/hinkalActionReceive.mjs +13 -11
  229. package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.cjs +1 -0
  230. package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.d.ts +6 -0
  231. package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.mjs +100 -0
  232. package/common/src/data-structures/Hinkal/hinkalClaimUtxo.cjs +1 -1
  233. package/common/src/data-structures/Hinkal/hinkalClaimUtxo.d.ts +5 -0
  234. package/common/src/data-structures/Hinkal/hinkalClaimUtxo.mjs +40 -50
  235. package/common/src/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
  236. package/common/src/data-structures/Hinkal/hinkalDeposit.d.ts +7 -0
  237. package/common/src/data-structures/Hinkal/hinkalDeposit.mjs +50 -119
  238. package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.cjs +1 -1
  239. package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.d.ts +4 -0
  240. package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.mjs +113 -109
  241. package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
  242. package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.d.ts +7 -0
  243. package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +98 -64
  244. package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.cjs +1 -1
  245. package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.d.ts +21 -0
  246. package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +50 -48
  247. package/common/src/data-structures/Hinkal/hinkalGetRecipientInfo.d.ts +2 -0
  248. package/common/src/data-structures/Hinkal/hinkalNearDepositAndBridge.cjs +1 -1
  249. package/common/src/data-structures/Hinkal/hinkalNearDepositAndBridge.d.ts +6 -0
  250. package/common/src/data-structures/Hinkal/hinkalNearDepositAndBridge.mjs +8 -3
  251. package/common/src/data-structures/Hinkal/hinkalPalEvmDeposit.d.ts +9 -0
  252. package/common/src/data-structures/Hinkal/hinkalPalSolanaDepositPrepare.d.ts +9 -0
  253. package/common/src/data-structures/Hinkal/hinkalPalTronDepositPrepare.d.ts +9 -0
  254. package/common/src/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
  255. package/common/src/data-structures/Hinkal/hinkalPrivateWallet.d.ts +6 -0
  256. package/common/src/data-structures/Hinkal/hinkalPrivateWallet.mjs +50 -38
  257. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -1
  258. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.d.ts +7 -0
  259. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.mjs +52 -117
  260. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.cjs +1 -1
  261. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.d.ts +10 -0
  262. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.mjs +26 -32
  263. package/common/src/data-structures/Hinkal/hinkalProxySend.cjs +1 -0
  264. package/common/src/data-structures/Hinkal/hinkalProxySend.d.ts +6 -0
  265. package/common/src/data-structures/Hinkal/hinkalProxySend.mjs +16 -0
  266. package/common/src/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
  267. package/common/src/data-structures/Hinkal/hinkalProxySwap.d.ts +7 -0
  268. package/common/src/data-structures/Hinkal/hinkalProxySwap.mjs +13 -12
  269. package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
  270. package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.d.ts +6 -0
  271. package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.mjs +19 -17
  272. package/common/src/data-structures/Hinkal/hinkalSignSubAccount.d.ts +4 -0
  273. package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.cjs +1 -1
  274. package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.d.ts +5 -0
  275. package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.mjs +50 -79
  276. package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
  277. package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.d.ts +8 -0
  278. package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.mjs +47 -51
  279. package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
  280. package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +28 -0
  281. package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +115 -133
  282. package/common/src/data-structures/Hinkal/hinkalSolanaProoflessDeposit.cjs +1 -1
  283. package/common/src/data-structures/Hinkal/hinkalSolanaProoflessDeposit.d.ts +5 -0
  284. package/common/src/data-structures/Hinkal/hinkalSolanaProoflessDeposit.mjs +16 -12
  285. package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
  286. package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.d.ts +6 -0
  287. package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.mjs +1 -3
  288. package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
  289. package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.d.ts +28 -0
  290. package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +82 -56
  291. package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
  292. package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.d.ts +6 -0
  293. package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +11 -13
  294. package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.cjs +1 -0
  295. package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.d.ts +8 -0
  296. package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.mjs +32 -0
  297. package/common/src/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
  298. package/common/src/data-structures/Hinkal/hinkalSolanaSwap.d.ts +4 -0
  299. package/common/src/data-structures/Hinkal/hinkalSolanaSwap.mjs +58 -79
  300. package/common/src/data-structures/Hinkal/hinkalSolanaTransact.cjs +1 -0
  301. package/common/src/data-structures/Hinkal/hinkalSolanaTransact.d.ts +3 -0
  302. package/common/src/data-structures/Hinkal/hinkalSolanaTransact.mjs +119 -0
  303. package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
  304. package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.d.ts +3 -0
  305. package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.mjs +46 -77
  306. package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
  307. package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.d.ts +4 -0
  308. package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +46 -57
  309. package/common/src/data-structures/Hinkal/hinkalSwap.cjs +1 -1
  310. package/common/src/data-structures/Hinkal/hinkalSwap.d.ts +7 -0
  311. package/common/src/data-structures/Hinkal/hinkalSwap.mjs +32 -32
  312. package/common/src/data-structures/Hinkal/hinkalTransact.cjs +1 -0
  313. package/common/src/data-structures/Hinkal/hinkalTransact.d.ts +3 -0
  314. package/common/src/data-structures/Hinkal/hinkalTransact.mjs +106 -0
  315. package/common/src/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
  316. package/common/src/data-structures/Hinkal/hinkalTransfer.d.ts +4 -0
  317. package/common/src/data-structures/Hinkal/hinkalTransfer.mjs +39 -44
  318. package/common/src/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
  319. package/common/src/data-structures/Hinkal/hinkalWithdraw.d.ts +7 -0
  320. package/common/src/data-structures/Hinkal/hinkalWithdraw.mjs +38 -49
  321. package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
  322. package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.d.ts +3 -0
  323. package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +160 -102
  324. package/common/src/data-structures/Hinkal/index.d.ts +25 -0
  325. package/common/src/data-structures/Hinkal/prepareTronDepositToSelf.d.ts +27 -0
  326. package/common/src/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
  327. package/common/src/data-structures/Hinkal/resetMerkleTrees.d.ts +2 -0
  328. package/common/src/data-structures/Hinkal/resetMerkleTrees.mjs +7 -6
  329. package/common/src/data-structures/IndexedDB/activity-db.cjs +1 -1
  330. package/common/src/data-structures/IndexedDB/activity-db.d.ts +14 -0
  331. package/common/src/data-structures/IndexedDB/activity-db.mjs +34 -34
  332. package/common/src/data-structures/IndexedDB/balances-db.d.ts +13 -0
  333. package/common/src/data-structures/IndexedDB/contact-db.cjs +1 -1
  334. package/common/src/data-structures/IndexedDB/contact-db.d.ts +11 -0
  335. package/common/src/data-structures/IndexedDB/contact-db.mjs +14 -28
  336. package/common/src/data-structures/IndexedDB/index.cjs +1 -1
  337. package/common/src/data-structures/IndexedDB/index.d.ts +9 -0
  338. package/common/src/data-structures/IndexedDB/index.mjs +1 -0
  339. package/common/src/data-structures/IndexedDB/key-val-store.cjs +1 -1
  340. package/common/src/data-structures/IndexedDB/key-val-store.d.ts +8 -0
  341. package/common/src/data-structures/IndexedDB/key-val-store.mjs +14 -0
  342. package/common/src/data-structures/IndexedDB/pay-activity-db.cjs +1 -1
  343. package/common/src/data-structures/IndexedDB/pay-activity-db.d.ts +9 -0
  344. package/common/src/data-structures/IndexedDB/pay-activity-db.mjs +43 -1
  345. package/common/src/data-structures/IndexedDB/prices-db.d.ts +9 -0
  346. package/common/src/data-structures/IndexedDB/private-balances-db.cjs +1 -1
  347. package/common/src/data-structures/IndexedDB/private-balances-db.d.ts +10 -0
  348. package/common/src/data-structures/IndexedDB/private-balances-db.mjs +3 -0
  349. package/common/src/data-structures/IndexedDB/scheduled-transactions-db.cjs +1 -0
  350. package/common/src/data-structures/IndexedDB/scheduled-transactions-db.d.ts +11 -0
  351. package/common/src/data-structures/IndexedDB/scheduled-transactions-db.mjs +34 -0
  352. package/common/src/data-structures/IndexedDB/signatures-db.cjs +1 -1
  353. package/common/src/data-structures/IndexedDB/signatures-db.d.ts +10 -0
  354. package/common/src/data-structures/IndexedDB/signatures-db.mjs +11 -11
  355. package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.cjs +1 -1
  356. package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.d.ts +21 -0
  357. package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs +29 -26
  358. package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.d.ts +18 -0
  359. package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.d.ts +11 -0
  360. package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.d.ts +18 -0
  361. package/common/src/data-structures/TokenDBs/IPublicTokensDB.d.ts +6 -0
  362. package/common/src/data-structures/TokenDBs/PrivateTokensDB.cjs +1 -1
  363. package/common/src/data-structures/TokenDBs/PrivateTokensDB.d.ts +11 -0
  364. package/common/src/data-structures/TokenDBs/PrivateTokensDB.mjs +17 -18
  365. package/common/src/data-structures/TokenDBs/PublicTokensDB.d.ts +9 -0
  366. package/common/src/data-structures/TokenDBs/TempoPublicTokensDB.d.ts +9 -0
  367. package/common/src/data-structures/TokenDBs/TronPublicTokensDB.d.ts +10 -0
  368. package/common/src/data-structures/TokenDBs/index.d.ts +6 -0
  369. package/common/src/data-structures/TokenDBs/token-visibility-db.d.ts +17 -0
  370. package/common/src/data-structures/ValueCache/ValueCache.d.ts +10 -0
  371. package/common/src/data-structures/ValueCache/index.d.ts +1 -0
  372. package/common/src/data-structures/WalletManager/WalletManager.d.ts +52 -0
  373. package/common/src/data-structures/WalletManager/index.d.ts +1 -0
  374. package/common/src/data-structures/cacheDevices/AttachableMemoryCacheDevice.d.ts +8 -0
  375. package/common/src/data-structures/cacheDevices/BaseCacheDevice.cjs +1 -1
  376. package/common/src/data-structures/cacheDevices/BaseCacheDevice.d.ts +12 -0
  377. package/common/src/data-structures/cacheDevices/BaseCacheDevice.mjs +3 -0
  378. package/common/src/data-structures/cacheDevices/FileCacheDevice.cjs +1 -1
  379. package/common/src/data-structures/cacheDevices/FileCacheDevice.d.ts +13 -0
  380. package/common/src/data-structures/cacheDevices/FileCacheDevice.mjs +12 -3
  381. package/common/src/data-structures/cacheDevices/LocalStorageCacheDevice.d.ts +8 -0
  382. package/common/src/data-structures/cacheDevices/index.d.ts +2 -0
  383. package/common/src/data-structures/crypto-keys/decodeUTXO.cjs +1 -1
  384. package/common/src/data-structures/crypto-keys/decodeUTXO.d.ts +28 -0
  385. package/common/src/data-structures/crypto-keys/decodeUTXO.mjs +11 -71
  386. package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.cjs +1 -1
  387. package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.d.ts +17 -0
  388. package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.mjs +39 -23
  389. package/common/src/data-structures/crypto-keys/index.d.ts +4 -0
  390. package/common/src/data-structures/crypto-keys/keyUtils.d.ts +2 -0
  391. package/common/src/data-structures/crypto-keys/keys.cjs +1 -1
  392. package/common/src/data-structures/crypto-keys/keys.d.ts +117 -0
  393. package/common/src/data-structures/crypto-keys/keys.mjs +64 -79
  394. package/common/src/data-structures/custom-token-registry/CustomTokenRegistry.d.ts +12 -0
  395. package/common/src/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.d.ts +34 -0
  396. package/common/src/data-structures/event-service/evm/AbstractEventService.d.ts +14 -0
  397. package/common/src/data-structures/event-service/evm/AbstractNullifierSnapshotService.d.ts +22 -0
  398. package/common/src/data-structures/event-service/evm/AbstractSnapshotService.d.ts +22 -0
  399. package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
  400. package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +38 -0
  401. package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.mjs +46 -38
  402. package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.cjs +1 -1
  403. package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.d.ts +11 -0
  404. package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.mjs +2 -2
  405. package/common/src/data-structures/event-service/evm/PollingBlockchainEventEmitter.d.ts +6 -0
  406. package/common/src/data-structures/event-service/helpers/ClientEventHelper.d.ts +10 -0
  407. package/common/src/data-structures/event-service/helpers/PollingEventHelper.d.ts +7 -0
  408. package/common/src/data-structures/event-service/index.d.ts +14 -0
  409. package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.cjs +1 -1
  410. package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.d.ts +34 -0
  411. package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +27 -23
  412. package/common/src/data-structures/event-service/solana/AbstractSolanaEventService.d.ts +17 -0
  413. package/common/src/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.d.ts +22 -0
  414. package/common/src/data-structures/event-service/solana/AbstractSolanaSnapshotService.d.ts +21 -0
  415. package/common/src/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.d.ts +11 -0
  416. package/common/src/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.d.ts +6 -0
  417. package/common/src/data-structures/event-service/solana/SolanaBlockchainEventEmitter.d.ts +42 -0
  418. package/common/src/data-structures/http/BasicHttpClient.d.ts +11 -0
  419. package/common/src/data-structures/http/HttpClient.d.ts +10 -0
  420. package/common/src/data-structures/http/index.d.ts +2 -0
  421. package/common/src/data-structures/index.d.ts +22 -0
  422. package/common/src/data-structures/merkle-tree/MerkleTree.cjs +1 -1
  423. package/common/src/data-structures/merkle-tree/MerkleTree.d.ts +93 -0
  424. package/common/src/data-structures/merkle-tree/MerkleTree.mjs +12 -1
  425. package/common/src/data-structures/merkle-tree/MerkleTreeIncompleteError.d.ts +3 -0
  426. package/common/src/data-structures/merkle-tree/index.d.ts +2 -0
  427. package/common/src/data-structures/presale/PresaleContractWrapper.d.ts +23 -0
  428. package/common/src/data-structures/presale/index.d.ts +1 -0
  429. package/common/src/data-structures/private-balances/BalanceChangedHandler.d.ts +9 -0
  430. package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.cjs +1 -1
  431. package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.d.ts +25 -0
  432. package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.mjs +100 -86
  433. package/common/src/data-structures/private-balances/index.d.ts +3 -0
  434. package/common/src/data-structures/private-balances/privateBalancesReducer.d.ts +2 -0
  435. package/common/src/data-structures/provider-adapter/IProviderAdapter.d.ts +36 -0
  436. package/common/src/data-structures/snapshot/SnapshotFetcherService.d.ts +14 -0
  437. package/common/src/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.d.ts +8 -0
  438. package/common/src/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.d.ts +8 -0
  439. package/common/src/data-structures/snapshot/index.d.ts +5 -0
  440. package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.d.ts +8 -0
  441. package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.d.ts +8 -0
  442. package/common/src/data-structures/token-price-fetcher/TokenChecker.cjs +1 -1
  443. package/common/src/data-structures/token-price-fetcher/TokenChecker.d.ts +10 -0
  444. package/common/src/data-structures/token-price-fetcher/TokenChecker.mjs +5 -3
  445. package/common/src/data-structures/token-price-fetcher/index.d.ts +1 -0
  446. package/common/src/data-structures/transactions-manager/history/history.types.d.ts +16 -0
  447. package/common/src/data-structures/transactions-manager/index.d.ts +1 -0
  448. package/common/src/data-structures/utxo/Utxo.cjs +1 -1
  449. package/common/src/data-structures/utxo/Utxo.d.ts +66 -0
  450. package/common/src/data-structures/utxo/Utxo.mjs +7 -17
  451. package/common/src/error-handling/customErrors/ErrorWithAmount.d.ts +4 -0
  452. package/common/src/error-handling/customErrors/ErrorWithIndex.d.ts +4 -0
  453. package/common/src/error-handling/customErrors/ErrorWithTx.d.ts +4 -0
  454. package/common/src/error-handling/customErrors/FeeOverTransactionValueError.d.ts +9 -0
  455. package/common/src/error-handling/customErrors/HttpError.d.ts +4 -0
  456. package/common/src/error-handling/customErrors/SimulationFailureError.d.ts +10 -0
  457. package/common/src/error-handling/customErrors/customErrors.helpers.d.ts +5 -0
  458. package/common/src/error-handling/customErrors/index.d.ts +7 -0
  459. package/common/src/error-handling/error-codes.constants.cjs +2 -2
  460. package/common/src/error-handling/error-codes.constants.d.ts +249 -0
  461. package/common/src/error-handling/error-codes.constants.mjs +30 -32
  462. package/common/src/error-handling/get-error.message.cjs +1 -1
  463. package/common/src/error-handling/get-error.message.d.ts +5 -0
  464. package/common/src/error-handling/get-error.message.mjs +28 -18
  465. package/common/src/error-handling/index.cjs +1 -1
  466. package/common/src/error-handling/index.d.ts +7 -0
  467. package/common/src/error-handling/index.mjs +1 -0
  468. package/common/src/error-handling/isInsufficientFundsError.d.ts +1 -0
  469. package/common/src/error-handling/logError.d.ts +1 -0
  470. package/common/src/error-handling/logger.d.ts +5 -0
  471. package/common/src/error-handling/retrySolanaError.d.ts +1 -0
  472. package/common/src/error-handling/types.d.ts +10 -0
  473. package/common/src/externalABIs/BUSD.d.ts +38 -0
  474. package/common/src/externalABIs/DAI.d.ts +45 -0
  475. package/common/src/externalABIs/SanctionsList.d.ts +35 -0
  476. package/common/src/externalABIs/USDC.d.ts +28 -0
  477. package/common/src/externalABIs/USDR.d.ts +28 -0
  478. package/common/src/externalABIs/USDR3CRV.d.ts +49 -0
  479. package/common/src/externalABIs/USDT.d.ts +41 -0
  480. package/common/src/externalABIs/WETH.d.ts +38 -0
  481. package/common/src/externalABIs/amToken.d.ts +28 -0
  482. package/common/src/externalABIs/index.cjs +1 -1
  483. package/common/src/externalABIs/index.d.ts +107 -0
  484. package/common/src/externalABIs/index.mjs +2 -6
  485. package/common/src/externalABIs/swapAbi.d.ts +77 -0
  486. package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.cjs +1 -1
  487. package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.d.ts +9 -0
  488. package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.mjs +7 -6
  489. package/common/src/functions/auto-deposit-back-helpers/get-tokens-to-deposit-back.d.ts +3 -0
  490. package/common/src/functions/auto-deposit-back-helpers/index.d.ts +4 -0
  491. package/common/src/functions/auto-deposit-back-helpers/select-gas-token.cjs +1 -1
  492. package/common/src/functions/auto-deposit-back-helpers/select-gas-token.d.ts +13 -0
  493. package/common/src/functions/auto-deposit-back-helpers/select-gas-token.mjs +8 -8
  494. package/common/src/functions/auto-deposit-back-helpers/update-hinkal.d.ts +2 -0
  495. package/common/src/functions/connectors.types.d.ts +22 -0
  496. package/common/src/functions/index.cjs +1 -1
  497. package/common/src/functions/index.d.ts +11 -0
  498. package/common/src/functions/index.mjs +21 -20
  499. package/common/src/functions/pre-transaction/addressTableLookup.d.ts +4 -0
  500. package/common/src/functions/pre-transaction/buildCommitmentValidationData.cjs +1 -1
  501. package/common/src/functions/pre-transaction/buildCommitmentValidationData.d.ts +14 -0
  502. package/common/src/functions/pre-transaction/buildCommitmentValidationData.mjs +36 -38
  503. package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.cjs +1 -1
  504. package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.d.ts +2 -0
  505. package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.mjs +38 -5
  506. package/common/src/functions/pre-transaction/constructAdminData.d.ts +3 -0
  507. package/common/src/functions/pre-transaction/convert-okx-instructions.d.ts +11 -0
  508. package/common/src/functions/pre-transaction/ensureAmountChanges.cjs +1 -1
  509. package/common/src/functions/pre-transaction/ensureAmountChanges.d.ts +2 -0
  510. package/common/src/functions/pre-transaction/ensureAmountChanges.mjs +3 -10
  511. package/common/src/functions/pre-transaction/getExternalSwapAddress.cjs +1 -1
  512. package/common/src/functions/pre-transaction/getExternalSwapAddress.d.ts +2 -0
  513. package/common/src/functions/pre-transaction/getExternalSwapAddress.mjs +2 -18
  514. package/common/src/functions/pre-transaction/getFeeStructure.d.ts +5 -0
  515. package/common/src/functions/pre-transaction/getSolanaCalldataHash.cjs +1 -1
  516. package/common/src/functions/pre-transaction/getSolanaCalldataHash.d.ts +4 -0
  517. package/common/src/functions/pre-transaction/getSolanaCalldataHash.mjs +11 -10
  518. package/common/src/functions/pre-transaction/getVolatileTransferAmount.cjs +1 -1
  519. package/common/src/functions/pre-transaction/getVolatileTransferAmount.d.ts +9 -0
  520. package/common/src/functions/pre-transaction/getVolatileTransferAmount.mjs +1 -1
  521. package/common/src/functions/pre-transaction/index.cjs +1 -1
  522. package/common/src/functions/pre-transaction/index.d.ts +19 -0
  523. package/common/src/functions/pre-transaction/index.mjs +2 -3
  524. package/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.cjs +1 -1
  525. package/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.d.ts +3 -0
  526. package/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.mjs +2 -2
  527. package/common/src/functions/pre-transaction/merge-with-fee-structure.d.ts +2 -0
  528. package/common/src/functions/pre-transaction/outputUtxoProcessing.cjs +1 -1
  529. package/common/src/functions/pre-transaction/outputUtxoProcessing.d.ts +6 -0
  530. package/common/src/functions/pre-transaction/outputUtxoProcessing.mjs +19 -18
  531. package/common/src/functions/pre-transaction/process-gas-estimates.d.ts +5 -0
  532. package/common/src/functions/pre-transaction/sendInitNullifiersTransaction.d.ts +11 -0
  533. package/common/src/functions/pre-transaction/sendV0Transaction.cjs +2 -2
  534. package/common/src/functions/pre-transaction/sendV0Transaction.d.ts +21 -0
  535. package/common/src/functions/pre-transaction/sendV0Transaction.mjs +4 -4
  536. package/common/src/functions/pre-transaction/solana-public-signals.d.ts +22 -0
  537. package/common/src/functions/pre-transaction/solana.cjs +1 -1
  538. package/common/src/functions/pre-transaction/solana.d.ts +27 -0
  539. package/common/src/functions/pre-transaction/solana.mjs +46 -21
  540. package/common/src/functions/pre-transaction/solanaTransfer.utils.cjs +1 -1
  541. package/common/src/functions/pre-transaction/solanaTransfer.utils.d.ts +6 -0
  542. package/common/src/functions/pre-transaction/solanaTransfer.utils.mjs +16 -15
  543. package/common/src/functions/pre-transaction/speculativeUtxo.cjs +1 -0
  544. package/common/src/functions/pre-transaction/speculativeUtxo.d.ts +9 -0
  545. package/common/src/functions/pre-transaction/speculativeUtxo.mjs +19 -0
  546. package/common/src/functions/pre-transaction/store-instructions.d.ts +4 -0
  547. package/common/src/functions/pre-transaction/store-proof.cjs +1 -1
  548. package/common/src/functions/pre-transaction/store-proof.d.ts +7 -0
  549. package/common/src/functions/pre-transaction/store-proof.mjs +1 -0
  550. package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.d.ts +3 -0
  551. package/common/src/functions/private-wallet/emporium.helpers.cjs +1 -1
  552. package/common/src/functions/private-wallet/emporium.helpers.d.ts +53 -0
  553. package/common/src/functions/private-wallet/emporium.helpers.mjs +116 -72
  554. package/common/src/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
  555. package/common/src/functions/private-wallet/emporium.swap.helpers.d.ts +3 -0
  556. package/common/src/functions/private-wallet/emporium.swap.helpers.mjs +38 -80
  557. package/common/src/functions/private-wallet/index.cjs +1 -1
  558. package/common/src/functions/private-wallet/index.d.ts +2 -0
  559. package/common/src/functions/private-wallet/index.mjs +0 -1
  560. package/common/src/functions/snarkjs/common.snarkjs.cjs +1 -1
  561. package/common/src/functions/snarkjs/common.snarkjs.d.ts +32 -0
  562. package/common/src/functions/snarkjs/common.snarkjs.mjs +104 -65
  563. package/common/src/functions/snarkjs/constant.cjs +1 -1
  564. package/common/src/functions/snarkjs/constant.d.ts +236 -0
  565. package/common/src/functions/snarkjs/constant.mjs +231 -145
  566. package/common/src/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
  567. package/common/src/functions/snarkjs/constructGeneralZkProof.d.ts +13 -0
  568. package/common/src/functions/snarkjs/constructGeneralZkProof.mjs +85 -69
  569. package/common/src/functions/snarkjs/constructSignatureFromMnemonicProofInput.cjs +1 -0
  570. package/common/src/functions/snarkjs/constructSignatureFromMnemonicProofInput.d.ts +7 -0
  571. package/common/src/functions/snarkjs/constructSignatureFromMnemonicProofInput.mjs +2 -0
  572. package/common/src/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
  573. package/common/src/functions/snarkjs/constructSolanaZkProof.d.ts +16 -0
  574. package/common/src/functions/snarkjs/constructSolanaZkProof.mjs +62 -61
  575. package/common/src/functions/snarkjs/constructTxEnclave.cjs +1 -0
  576. package/common/src/functions/snarkjs/constructTxEnclave.d.ts +34 -0
  577. package/common/src/functions/snarkjs/constructTxEnclave.mjs +95 -0
  578. package/common/src/functions/snarkjs/constructTxEnclaveVerify.cjs +1 -0
  579. package/common/src/functions/snarkjs/constructTxEnclaveVerify.d.ts +5 -0
  580. package/common/src/functions/snarkjs/constructTxEnclaveVerify.mjs +295 -0
  581. package/common/src/functions/snarkjs/fetchMerkleTreeSiblings.d.ts +9 -0
  582. package/common/src/functions/snarkjs/fetchOnChainRootHashes.cjs +1 -1
  583. package/common/src/functions/snarkjs/fetchOnChainRootHashes.d.ts +4 -0
  584. package/common/src/functions/snarkjs/fetchOnChainRootHashes.mjs +16 -18
  585. package/common/src/functions/snarkjs/fetchTronInsertionSiblings.cjs +1 -0
  586. package/common/src/functions/snarkjs/fetchTronInsertionSiblings.d.ts +7 -0
  587. package/common/src/functions/snarkjs/fetchTronInsertionSiblings.mjs +13 -0
  588. package/common/src/functions/snarkjs/generateCircomData.cjs +1 -1
  589. package/common/src/functions/snarkjs/generateCircomData.d.ts +5 -0
  590. package/common/src/functions/snarkjs/generateCircomData.mjs +41 -31
  591. package/common/src/functions/snarkjs/generateMainAndCommitmentZkProof.cjs +1 -1
  592. package/common/src/functions/snarkjs/generateMainAndCommitmentZkProof.d.ts +11 -0
  593. package/common/src/functions/snarkjs/generateMainAndCommitmentZkProof.mjs +7 -7
  594. package/common/src/functions/snarkjs/generateSignatureFromMnemonicProof.cjs +1 -0
  595. package/common/src/functions/snarkjs/generateSignatureFromMnemonicProof.d.ts +2 -0
  596. package/common/src/functions/snarkjs/generateSignatureFromMnemonicProof.mjs +3 -0
  597. package/common/src/functions/snarkjs/generateZkProof.cjs +1 -1
  598. package/common/src/functions/snarkjs/generateZkProof.d.ts +5 -0
  599. package/common/src/functions/snarkjs/generateZkProof.mjs +9 -16
  600. package/common/src/functions/snarkjs/generateZkProofSelf.d.ts +5 -0
  601. package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.cjs +1 -1
  602. package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.d.ts +17 -0
  603. package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +19 -13
  604. package/common/src/functions/snarkjs/getOriginalSender.d.ts +1 -0
  605. package/common/src/functions/snarkjs/getZKFiles.cjs +1 -1
  606. package/common/src/functions/snarkjs/getZKFiles.d.ts +3 -0
  607. package/common/src/functions/snarkjs/getZKFiles.mjs +9 -3
  608. package/common/src/functions/snarkjs/index.cjs +1 -1
  609. package/common/src/functions/snarkjs/index.d.ts +10 -0
  610. package/common/src/functions/snarkjs/index.mjs +2 -0
  611. package/common/src/functions/snarkjs/signedMessageHash.cjs +1 -1
  612. package/common/src/functions/snarkjs/signedMessageHash.d.ts +47 -0
  613. package/common/src/functions/snarkjs/signedMessageHash.mjs +36 -7
  614. package/common/src/functions/snarkjs/verifyCommitmentValidationData.d.ts +4 -0
  615. package/common/src/functions/snarkjs/verifySignedEnclaveResponse.cjs +1 -0
  616. package/common/src/functions/snarkjs/verifySignedEnclaveResponse.d.ts +1 -0
  617. package/common/src/functions/snarkjs/verifySignedEnclaveResponse.mjs +11 -0
  618. package/common/src/functions/utils/abi.utils.d.ts +3 -0
  619. package/common/src/functions/utils/addresses.cjs +1 -1
  620. package/common/src/functions/utils/addresses.d.ts +12 -0
  621. package/common/src/functions/utils/addresses.mjs +30 -21
  622. package/common/src/functions/utils/aggregateTokenAmounts.d.ts +2 -0
  623. package/common/src/functions/utils/amounts.utils.d.ts +25 -0
  624. package/common/src/functions/utils/arraysMatch.d.ts +1 -0
  625. package/common/src/functions/utils/auth.utils.d.ts +5 -0
  626. package/common/src/functions/utils/bridge-arrival.utils.cjs +1 -0
  627. package/common/src/functions/utils/bridge-arrival.utils.d.ts +1 -0
  628. package/common/src/functions/utils/bridge-arrival.utils.mjs +16 -0
  629. package/common/src/functions/utils/bridge-claimable-utxo.utils.cjs +1 -0
  630. package/common/src/functions/utils/bridge-claimable-utxo.utils.d.ts +19 -0
  631. package/common/src/functions/utils/bridge-claimable-utxo.utils.mjs +24 -0
  632. package/common/src/functions/utils/bridge-claimable.utils.cjs +1 -0
  633. package/common/src/functions/utils/bridge-claimable.utils.d.ts +15 -0
  634. package/common/src/functions/utils/bridge-claimable.utils.mjs +3 -0
  635. package/common/src/functions/utils/bridge-flow.utils.cjs +1 -0
  636. package/common/src/functions/utils/bridge-flow.utils.d.ts +4 -0
  637. package/common/src/functions/utils/bridge-flow.utils.mjs +2 -0
  638. package/common/src/functions/utils/buildClaimableDepositPlan.d.ts +17 -0
  639. package/common/src/functions/utils/bytes32.utils.d.ts +2 -0
  640. package/common/src/functions/utils/cacheDevice.utils.d.ts +3 -0
  641. package/common/src/functions/utils/cacheFunctions.d.ts +16 -0
  642. package/common/src/functions/utils/caseInsensitive.utils.d.ts +3 -0
  643. package/common/src/functions/utils/convertEmporiumOpToCallInfo.cjs +1 -1
  644. package/common/src/functions/utils/convertEmporiumOpToCallInfo.d.ts +2 -0
  645. package/common/src/functions/utils/convertEmporiumOpToCallInfo.mjs +5 -10
  646. package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.cjs +1 -1
  647. package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.d.ts +3 -0
  648. package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.mjs +1 -1
  649. package/common/src/functions/utils/create-provider.cjs +1 -1
  650. package/common/src/functions/utils/create-provider.d.ts +11 -0
  651. package/common/src/functions/utils/create-provider.mjs +45 -9
  652. package/common/src/functions/utils/customEnclaveFunctionsRegister.d.ts +18 -0
  653. package/common/src/functions/utils/deposit-claimable.utils.cjs +1 -1
  654. package/common/src/functions/utils/deposit-claimable.utils.d.ts +3 -0
  655. package/common/src/functions/utils/deposit-claimable.utils.mjs +3 -6
  656. package/common/src/functions/utils/dispatchBalanceRefreshes.d.ts +4 -0
  657. package/common/src/functions/utils/enclave-recipient-info-storage.cjs +1 -1
  658. package/common/src/functions/utils/enclave-recipient-info-storage.d.ts +5 -0
  659. package/common/src/functions/utils/enclave-recipient-info-storage.mjs +1 -0
  660. package/common/src/functions/utils/enclave-signature-storage.cjs +1 -1
  661. package/common/src/functions/utils/enclave-signature-storage.d.ts +1 -0
  662. package/common/src/functions/utils/enclave-signature-storage.mjs +3 -3
  663. package/common/src/functions/utils/enclave-utxo-storage.cjs +1 -1
  664. package/common/src/functions/utils/enclave-utxo-storage.d.ts +6 -0
  665. package/common/src/functions/utils/enclave-utxo-storage.mjs +16 -2
  666. package/common/src/functions/utils/enclaveHandshakeService.d.ts +10 -0
  667. package/common/src/functions/utils/enclaveSessionSigning.cjs +1 -0
  668. package/common/src/functions/utils/enclaveSessionSigning.d.ts +16 -0
  669. package/common/src/functions/utils/enclaveSessionSigning.mjs +2 -0
  670. package/common/src/functions/utils/encodeTokenWithId.cjs +1 -1
  671. package/common/src/functions/utils/encodeTokenWithId.d.ts +1 -0
  672. package/common/src/functions/utils/encodeTokenWithId.mjs +2 -5
  673. package/common/src/functions/utils/encryptInputForEnclave.cjs +1 -1
  674. package/common/src/functions/utils/encryptInputForEnclave.d.ts +16 -0
  675. package/common/src/functions/utils/encryptInputForEnclave.mjs +43 -23
  676. package/common/src/functions/utils/enum.utils.d.ts +9 -0
  677. package/common/src/functions/utils/erc20tokenFunctions.cjs +1 -1
  678. package/common/src/functions/utils/erc20tokenFunctions.d.ts +20 -0
  679. package/common/src/functions/utils/erc20tokenFunctions.mjs +2 -15
  680. package/common/src/functions/utils/evmNetworkFunctions.d.ts +4 -0
  681. package/common/src/functions/utils/external-action.utils.d.ts +3 -0
  682. package/common/src/functions/utils/fees.utils.cjs +1 -1
  683. package/common/src/functions/utils/fees.utils.d.ts +9 -0
  684. package/common/src/functions/utils/fees.utils.mjs +42 -29
  685. package/common/src/functions/utils/formatter.d.ts +3 -0
  686. package/common/src/functions/utils/getBlockExplorerUrl.d.ts +1 -0
  687. package/common/src/functions/utils/getContractAddress.d.ts +2 -0
  688. package/common/src/functions/utils/getDataFromTransaction.d.ts +34 -0
  689. package/common/src/functions/utils/getRecipientInfoFromUserKeys.cjs +1 -1
  690. package/common/src/functions/utils/getRecipientInfoFromUserKeys.d.ts +4 -0
  691. package/common/src/functions/utils/getRecipientInfoFromUserKeys.mjs +2 -3
  692. package/common/src/functions/utils/getSignerFromContract.d.ts +3 -0
  693. package/common/src/functions/utils/getUtxosFromReceipt.utils.cjs +1 -1
  694. package/common/src/functions/utils/getUtxosFromReceipt.utils.d.ts +6 -0
  695. package/common/src/functions/utils/getUtxosFromReceipt.utils.mjs +2 -26
  696. package/common/src/functions/utils/getUtxosFromReceiptSolana.cjs +1 -1
  697. package/common/src/functions/utils/getUtxosFromReceiptSolana.d.ts +7 -0
  698. package/common/src/functions/utils/getUtxosFromReceiptSolana.mjs +7 -24
  699. package/common/src/functions/utils/getWalletGroupKey.utils.d.ts +1 -0
  700. package/common/src/functions/utils/inLogicMetadata.d.ts +2 -0
  701. package/common/src/functions/utils/index.cjs +1 -1
  702. package/common/src/functions/utils/index.d.ts +89 -0
  703. package/common/src/functions/utils/index.mjs +27 -13
  704. package/common/src/functions/utils/involves-permit2-op.d.ts +7 -0
  705. package/common/src/functions/utils/ipfs.d.ts +7 -0
  706. package/common/src/functions/utils/is-valid-url.d.ts +1 -0
  707. package/common/src/functions/utils/legacyKeys.cjs +1 -0
  708. package/common/src/functions/utils/legacyKeys.d.ts +10 -0
  709. package/common/src/functions/utils/legacyKeys.mjs +8 -0
  710. package/common/src/functions/utils/lifi.utils.d.ts +7 -0
  711. package/common/src/functions/utils/map.utils.d.ts +1 -0
  712. package/common/src/functions/utils/memoize.utils.d.ts +1 -0
  713. package/common/src/functions/utils/merkleTree.utils.d.ts +2 -0
  714. package/common/src/functions/utils/mnemonics.cjs +1 -1
  715. package/common/src/functions/utils/mnemonics.d.ts +1 -0
  716. package/common/src/functions/utils/mnemonics.mjs +4 -6
  717. package/common/src/functions/utils/mutexes.utils.d.ts +2 -0
  718. package/common/src/functions/utils/nearIntents.utils.cjs +1 -1
  719. package/common/src/functions/utils/nearIntents.utils.d.ts +11 -0
  720. package/common/src/functions/utils/nearIntents.utils.mjs +27 -13
  721. package/common/src/functions/utils/networks.utils.d.ts +2 -0
  722. package/common/src/functions/utils/nftTokenFunctions.d.ts +2 -0
  723. package/common/src/functions/utils/nickname.utils.d.ts +1 -0
  724. package/common/src/functions/utils/pay-routing.utils.d.ts +4 -0
  725. package/common/src/functions/utils/postToOffscreen.d.ts +2 -0
  726. package/common/src/functions/utils/prepareHinkal.cjs +1 -1
  727. package/common/src/functions/utils/prepareHinkal.d.ts +9 -0
  728. package/common/src/functions/utils/prepareHinkal.mjs +2 -1
  729. package/common/src/functions/utils/process.utils.cjs +1 -1
  730. package/common/src/functions/utils/process.utils.d.ts +13 -0
  731. package/common/src/functions/utils/process.utils.mjs +2 -11
  732. package/common/src/functions/utils/proxyAvatar.utils.cjs +1 -0
  733. package/common/src/functions/utils/proxyAvatar.utils.d.ts +2 -0
  734. package/common/src/functions/utils/proxyAvatar.utils.mjs +3 -0
  735. package/common/src/functions/utils/publicBalance.utils.cjs +1 -1
  736. package/common/src/functions/utils/publicBalance.utils.d.ts +6 -0
  737. package/common/src/functions/utils/publicBalance.utils.mjs +37 -23
  738. package/common/src/functions/utils/recovery-balance.utils.cjs +1 -0
  739. package/common/src/functions/utils/recovery-balance.utils.d.ts +2 -0
  740. package/common/src/functions/utils/recovery-balance.utils.mjs +1 -0
  741. package/common/src/functions/utils/reloadPage.d.ts +1 -0
  742. package/common/src/functions/utils/requireEnv.d.ts +1 -0
  743. package/common/src/functions/utils/resolve-domain-address.cjs +1 -0
  744. package/common/src/functions/utils/resolve-domain-address.d.ts +4 -0
  745. package/common/src/functions/utils/resolve-domain-address.mjs +3 -0
  746. package/common/src/functions/utils/resolve-sync.utils.d.ts +6 -0
  747. package/common/src/functions/utils/rpc-int-encode.d.ts +1 -0
  748. package/common/src/functions/utils/serialize-utxos.utils.cjs +1 -1
  749. package/common/src/functions/utils/serialize-utxos.utils.d.ts +3 -0
  750. package/common/src/functions/utils/serialize-utxos.utils.mjs +6 -4
  751. package/common/src/functions/utils/serialize.utils.d.ts +10 -0
  752. package/common/src/functions/utils/solana-memo.d.ts +3 -0
  753. package/common/src/functions/utils/solana-program.utils.cjs +1 -0
  754. package/common/src/functions/utils/solana-program.utils.d.ts +3 -0
  755. package/common/src/functions/utils/solana-program.utils.mjs +17 -0
  756. package/common/src/functions/utils/solana-sponsored.utils.cjs +1 -0
  757. package/common/src/functions/utils/solana-sponsored.utils.d.ts +22 -0
  758. package/common/src/functions/utils/solana-sponsored.utils.mjs +30 -0
  759. package/common/src/functions/utils/solanaMint.utils.cjs +1 -1
  760. package/common/src/functions/utils/solanaMint.utils.d.ts +17 -0
  761. package/common/src/functions/utils/solanaMint.utils.mjs +18 -8
  762. package/common/src/functions/utils/solanaSendPreflight.utils.d.ts +6 -0
  763. package/common/src/functions/utils/sponsored-shield.utils.cjs +1 -0
  764. package/common/src/functions/utils/sponsored-shield.utils.d.ts +3 -0
  765. package/common/src/functions/utils/sponsored-shield.utils.mjs +3 -0
  766. package/common/src/functions/utils/string.utils.d.ts +16 -0
  767. package/common/src/functions/utils/temp-wallet.utils.cjs +1 -0
  768. package/common/src/functions/utils/temp-wallet.utils.d.ts +8 -0
  769. package/common/src/functions/utils/temp-wallet.utils.mjs +43 -0
  770. package/common/src/functions/utils/temporary-wallet-recovery.utils.cjs +1 -0
  771. package/common/src/functions/utils/temporary-wallet-recovery.utils.d.ts +7 -0
  772. package/common/src/functions/utils/temporary-wallet-recovery.utils.mjs +10 -0
  773. package/common/src/functions/utils/time.utils.d.ts +20 -0
  774. package/common/src/functions/utils/token-check.utils.d.ts +4 -0
  775. package/common/src/functions/utils/transfer-claimable.utils.cjs +1 -1
  776. package/common/src/functions/utils/transfer-claimable.utils.d.ts +8 -0
  777. package/common/src/functions/utils/transfer-claimable.utils.mjs +1 -4
  778. package/common/src/functions/utils/trimFieldValues.d.ts +4 -0
  779. package/common/src/functions/utils/tron.utils.cjs +1 -1
  780. package/common/src/functions/utils/tron.utils.d.ts +35 -0
  781. package/common/src/functions/utils/tron.utils.mjs +89 -152
  782. package/common/src/functions/utils/tronSimulation.utils.cjs +1 -1
  783. package/common/src/functions/utils/tronSimulation.utils.d.ts +1 -0
  784. package/common/src/functions/utils/tronSimulation.utils.mjs +4 -6
  785. package/common/src/functions/utils/tx-confirmation.utils.cjs +1 -1
  786. package/common/src/functions/utils/tx-confirmation.utils.d.ts +11 -0
  787. package/common/src/functions/utils/tx-confirmation.utils.mjs +16 -13
  788. package/common/src/functions/utils/upToDateState.d.ts +2 -0
  789. package/common/src/functions/utils/userAgent.d.ts +2 -0
  790. package/common/src/functions/utils/validateUsername.d.ts +5 -0
  791. package/common/src/functions/utils/validateWalletAddress.cjs +1 -0
  792. package/common/src/functions/utils/validateWalletAddress.d.ts +1 -0
  793. package/common/src/functions/utils/validateWalletAddress.mjs +2 -0
  794. package/common/src/functions/utils/voidWallets.utils.cjs +1 -0
  795. package/common/src/functions/utils/voidWallets.utils.d.ts +4 -0
  796. package/common/src/functions/utils/voidWallets.utils.mjs +1 -0
  797. package/common/src/functions/utils/waasStamp.cjs +1 -0
  798. package/common/src/functions/utils/waasStamp.d.ts +5 -0
  799. package/common/src/functions/utils/waasStamp.mjs +2 -0
  800. package/common/src/functions/utils/walletBalances.utils.d.ts +2 -0
  801. package/common/src/functions/web3/EIP-712.d.ts +23 -0
  802. package/common/src/functions/web3/connectors.utils.d.ts +9 -0
  803. package/common/src/functions/web3/crypto.d.ts +1 -0
  804. package/common/src/functions/web3/etherFunctions.d.ts +21 -0
  805. package/common/src/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
  806. package/common/src/functions/web3/events/getInputUtxoAndBalance.d.ts +31 -0
  807. package/common/src/functions/web3/events/getInputUtxoAndBalance.mjs +50 -61
  808. package/common/src/functions/web3/events/getInputUtxosEnclave.cjs +1 -1
  809. package/common/src/functions/web3/events/getInputUtxosEnclave.d.ts +10 -0
  810. package/common/src/functions/web3/events/getInputUtxosEnclave.mjs +42 -35
  811. package/common/src/functions/web3/events/getShieldedBalance.cjs +1 -1
  812. package/common/src/functions/web3/events/getShieldedBalance.d.ts +18 -0
  813. package/common/src/functions/web3/events/getShieldedBalance.mjs +109 -93
  814. package/common/src/functions/web3/events/getTransactionLogEvents.d.ts +13 -0
  815. package/common/src/functions/web3/events/index.d.ts +3 -0
  816. package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +1 -1
  817. package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.d.ts +3 -0
  818. package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +9 -6
  819. package/common/src/functions/web3/functionCalls/approveToken.cjs +1 -1
  820. package/common/src/functions/web3/functionCalls/approveToken.d.ts +4 -0
  821. package/common/src/functions/web3/functionCalls/approveToken.mjs +21 -107
  822. package/common/src/functions/web3/functionCalls/approveTokensToHinkal.d.ts +4 -0
  823. package/common/src/functions/web3/functionCalls/constructBatchCall.cjs +1 -1
  824. package/common/src/functions/web3/functionCalls/constructBatchCall.d.ts +7 -0
  825. package/common/src/functions/web3/functionCalls/constructBatchCall.mjs +23 -18
  826. package/common/src/functions/web3/functionCalls/estimateGasRelayer.d.ts +4 -0
  827. package/common/src/functions/web3/functionCalls/getRootHash.d.ts +2 -0
  828. package/common/src/functions/web3/functionCalls/recoverTransactionFromError.d.ts +2 -0
  829. package/common/src/functions/web3/functionCalls/relayFunctions.d.ts +3 -0
  830. package/common/src/functions/web3/functionCalls/submitProof.cjs +1 -0
  831. package/common/src/functions/web3/functionCalls/submitProof.d.ts +5 -0
  832. package/common/src/functions/web3/functionCalls/submitProof.mjs +26 -0
  833. package/common/src/functions/web3/functionCalls/transactCallDirect.d.ts +6 -0
  834. package/common/src/functions/web3/functionCalls/transactCallDirectTron.cjs +1 -1
  835. package/common/src/functions/web3/functionCalls/transactCallDirectTron.d.ts +16 -0
  836. package/common/src/functions/web3/functionCalls/transactCallDirectTron.mjs +81 -53
  837. package/common/src/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
  838. package/common/src/functions/web3/functionCalls/transactCallRelayer.d.ts +32 -0
  839. package/common/src/functions/web3/functionCalls/transactCallRelayer.mjs +12 -8
  840. package/common/src/functions/web3/functionCalls/waitForErc20Approvals.d.ts +11 -0
  841. package/common/src/functions/web3/getContractMetadata.d.ts +5 -0
  842. package/common/src/functions/web3/getPublicAddressBalance.cjs +1 -1
  843. package/common/src/functions/web3/getPublicAddressBalance.d.ts +1 -0
  844. package/common/src/functions/web3/getPublicAddressBalance.mjs +6 -5
  845. package/common/src/functions/web3/getTokenHolder.cjs +1 -1
  846. package/common/src/functions/web3/getTokenHolder.d.ts +1 -0
  847. package/common/src/functions/web3/getTokenHolder.mjs +3 -2
  848. package/common/src/functions/web3/index.cjs +1 -1
  849. package/common/src/functions/web3/index.d.ts +11 -0
  850. package/common/src/functions/web3/index.mjs +1 -4
  851. package/common/src/functions/web3/lifiAPI.cjs +1 -1
  852. package/common/src/functions/web3/lifiAPI.d.ts +6 -0
  853. package/common/src/functions/web3/lifiAPI.mjs +38 -7
  854. package/common/src/functions/web3/okxAPI.d.ts +8 -0
  855. package/common/src/functions/web3/runContractFunction.d.ts +16 -0
  856. package/common/src/functions/web3/signAndSendSerializedTransaction.d.ts +2 -0
  857. package/common/src/index.d.ts +9 -0
  858. package/common/src/mutexes/chainBalanceRwLock.d.ts +18 -0
  859. package/common/src/mutexes/index.d.ts +2 -0
  860. package/common/src/mutexes/mutex.d.ts +2 -0
  861. package/common/src/providers/EthersProviderAdapter.cjs +1 -1
  862. package/common/src/providers/EthersProviderAdapter.d.ts +35 -0
  863. package/common/src/providers/EthersProviderAdapter.mjs +0 -3
  864. package/common/src/providers/SolanaProviderAdapter.cjs +1 -1
  865. package/common/src/providers/SolanaProviderAdapter.d.ts +48 -0
  866. package/common/src/providers/SolanaProviderAdapter.mjs +4 -11
  867. package/common/src/providers/TronProviderAdapter.cjs +1 -1
  868. package/common/src/providers/TronProviderAdapter.d.ts +38 -0
  869. package/common/src/providers/TronProviderAdapter.mjs +7 -4
  870. package/common/src/providers/WagmiProviderAdapter.cjs +1 -1
  871. package/common/src/providers/WagmiProviderAdapter.d.ts +47 -0
  872. package/common/src/providers/WagmiProviderAdapter.mjs +32 -39
  873. package/common/src/providers/exportProviers.d.ts +3 -0
  874. package/common/src/types/API.types.d.ts +21 -0
  875. package/common/src/types/ICacheDevice.d.ts +5 -0
  876. package/common/src/types/IMultiThreadedUtxoUtils.d.ts +8 -0
  877. package/common/src/types/RewardUserEnums.d.ts +11 -0
  878. package/common/src/types/TransactionSimulator.types.d.ts +16 -0
  879. package/common/src/types/WeeklyAnalytics.types.d.ts +12 -0
  880. package/common/src/types/activities.types.cjs +1 -1
  881. package/common/src/types/activities.types.d.ts +68 -0
  882. package/common/src/types/activities.types.mjs +1 -1
  883. package/common/src/types/admin.types.cjs +1 -1
  884. package/common/src/types/admin.types.d.ts +45 -0
  885. package/common/src/types/admin.types.mjs +1 -1
  886. package/common/src/types/all-points.types.d.ts +7 -0
  887. package/common/src/types/approvals.types.d.ts +41 -0
  888. package/common/src/types/balances.types.d.ts +39 -0
  889. package/common/src/types/big-intable.types.d.ts +3 -0
  890. package/common/src/types/bridging-tx.types.d.ts +40 -0
  891. package/common/src/types/cache.types.cjs +1 -1
  892. package/common/src/types/cache.types.d.ts +61 -0
  893. package/common/src/types/cache.types.mjs +1 -1
  894. package/common/src/types/chains.types.d.ts +11 -0
  895. package/common/src/types/circom-data.types.cjs +1 -1
  896. package/common/src/types/circom-data.types.d.ts +112 -0
  897. package/common/src/types/circom-data.types.mjs +1 -1
  898. package/common/src/types/coingecko.types.d.ts +220 -0
  899. package/common/src/types/commitments.types.d.ts +34 -0
  900. package/common/src/types/confirmation-request.types.d.ts +10 -0
  901. package/common/src/types/connector.types.d.ts +5 -0
  902. package/common/src/types/contacts.types.d.ts +7 -0
  903. package/common/src/types/dashboard-account.d.ts +116 -0
  904. package/common/src/types/dashboard-payout.types.d.ts +30 -0
  905. package/common/src/types/dashboard-transaction.types.d.ts +25 -0
  906. package/common/src/types/eip5792.types.d.ts +33 -0
  907. package/common/src/types/enclaveApi.types.d.ts +77 -0
  908. package/common/src/types/ethereum-network.types.cjs +1 -1
  909. package/common/src/types/ethereum-network.types.d.ts +46 -0
  910. package/common/src/types/ethereum-network.types.mjs +1 -1
  911. package/common/src/types/events.types.d.ts +6 -0
  912. package/common/src/types/external-action.types.cjs +1 -1
  913. package/common/src/types/external-action.types.d.ts +14 -0
  914. package/common/src/types/external-action.types.mjs +1 -1
  915. package/common/src/types/fee.types.d.ts +13 -0
  916. package/common/src/types/hinkal.types.cjs +1 -1
  917. package/common/src/types/hinkal.types.d.ts +82 -0
  918. package/common/src/types/hinkal.types.mjs +12 -20
  919. package/common/src/types/http.types.d.ts +8 -0
  920. package/common/src/types/index.cjs +1 -1
  921. package/common/src/types/index.d.ts +61 -0
  922. package/common/src/types/index.mjs +3 -2
  923. package/common/src/types/message.types.d.ts +5 -0
  924. package/common/src/types/near-intents.types.d.ts +62 -0
  925. package/common/src/types/new-rewards.type.d.ts +82 -0
  926. package/common/src/types/offscreen.types.cjs +1 -1
  927. package/common/src/types/offscreen.types.d.ts +8 -0
  928. package/common/src/types/offscreen.types.mjs +1 -1
  929. package/common/src/types/okx.types.d.ts +57 -0
  930. package/common/src/types/onramp.types.d.ts +58 -0
  931. package/common/src/types/pay-activities.types.d.ts +52 -0
  932. package/common/src/types/pay-routing.types.d.ts +9 -0
  933. package/common/src/types/payout-notification.types.d.ts +11 -0
  934. package/common/src/types/presaleReferral.types.d.ts +4 -0
  935. package/common/src/types/proxy-progress.types.d.ts +5 -0
  936. package/common/src/types/proxy.types.d.ts +19 -0
  937. package/common/src/types/remote-proof.types.d.ts +14 -0
  938. package/common/src/types/remote-tx-build.types.d.ts +298 -0
  939. package/common/src/types/schedule.types.d.ts +7 -0
  940. package/common/src/types/scheduled-transactions.types.d.ts +67 -0
  941. package/common/src/types/session.types.d.ts +13 -0
  942. package/common/src/types/signature.types.d.ts +10 -0
  943. package/common/src/types/slippage.types.d.ts +3 -0
  944. package/common/src/types/snark.types.d.ts +38 -0
  945. package/common/src/types/solana-transact.types.cjs +1 -0
  946. package/common/src/types/solana-transact.types.d.ts +35 -0
  947. package/common/src/types/solana-transact.types.mjs +6 -0
  948. package/common/src/types/solana.types.cjs +1 -0
  949. package/common/src/types/solana.types.d.ts +96 -0
  950. package/common/src/types/solana.types.mjs +6 -0
  951. package/common/src/types/temp-wallet.types.d.ts +9 -0
  952. package/common/src/types/tenderly.api.types.d.ts +266 -0
  953. package/common/src/types/token-prices.types.d.ts +18 -0
  954. package/common/src/types/token.types.cjs +1 -1
  955. package/common/src/types/token.types.d.ts +98 -0
  956. package/common/src/types/token.types.mjs +2 -2
  957. package/common/src/types/transact.types.cjs +1 -0
  958. package/common/src/types/transact.types.d.ts +53 -0
  959. package/common/src/types/transact.types.mjs +6 -0
  960. package/common/src/types/transaction.types.d.ts +159 -0
  961. package/common/src/types/transactions.types.d.ts +78 -0
  962. package/common/src/types/tron.types.d.ts +15 -0
  963. package/common/src/types/wc.types.d.ts +78 -0
  964. package/common/src/types/with-id.types.d.ts +3 -0
  965. package/common/src/webworker/WorkerWrapper.d.ts +9 -0
  966. package/common/src/webworker/logError-ScFy7p5w.js +2 -0
  967. package/common/src/webworker/package.json +26 -25
  968. package/common/src/webworker/performTaskWithWorker.d.ts +5 -0
  969. package/common/src/webworker/snarkjsWorker/snarkjsWorker.types.d.ts +14 -0
  970. package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.d.ts +1 -0
  971. package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.cjs +1 -1
  972. package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.mjs +1 -1
  973. package/common/src/webworker/snarkjsWorker/snarkjsWorkerLogic.d.ts +2 -0
  974. package/common/src/webworker/snarkjsWorker/snarkjsWorkerNode.d.ts +1 -0
  975. package/common/src/webworker/snarkjsWorkerNode.cjs +1 -1
  976. package/common/src/webworker/utxoWorker/utxoWorker.types.d.ts +33 -0
  977. package/common/src/webworker/utxoWorker/utxoWorkerLauncher.d.ts +1 -0
  978. package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
  979. package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +1 -1
  980. package/common/src/webworker/utxoWorker/utxoWorkerLogic.d.ts +5 -0
  981. package/common/src/webworker/utxoWorker/utxoWorkerNode.d.ts +1 -0
  982. package/common/src/webworker/utxoWorkerNode.cjs +1 -1
  983. package/common/src/webworker/viteWorkerURL.constant.cjs +3 -3
  984. package/common/src/webworker/viteWorkerURL.constant.d.ts +10 -0
  985. package/common/src/webworker/viteWorkerURL.constant.fallback.d.ts +4 -0
  986. package/common/src/webworker/viteWorkerURL.constant.mjs +3 -3
  987. package/common/src/webworker/worker.registry.d.ts +10 -0
  988. package/common/src/webworker/worker.types.d.ts +33 -0
  989. package/common/src/webworker/workerErrorHandler.d.ts +1 -0
  990. package/common/src/webworker/workerFactory.d.ts +11 -0
  991. package/common/src/webworker/workerProxy-B_eSl85g.js +1 -0
  992. package/common/src/webworker/workerProxy.d.ts +39 -0
  993. package/common/src/webworker/zkProofWorker/zkProofWorker.types.d.ts +26 -0
  994. package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.d.ts +1 -0
  995. package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
  996. package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +1 -1
  997. package/common/src/webworker/zkProofWorker/zkProofWorkerLogic.d.ts +4 -0
  998. package/common/src/webworker/zkProofWorker/zkProofWorkerNode.d.ts +1 -0
  999. package/common/src/webworker/zkProofWorkerNode.cjs +1 -1
  1000. package/index.cjs +1 -1
  1001. package/index.mjs +1 -1
  1002. package/internal/swapApi.cjs +1 -1
  1003. package/internal/swapApi.d.ts +3 -3
  1004. package/internal/swapApi.mjs +22 -25
  1005. package/package.json +26 -25
  1006. package/providers/prepareEthersHinkal.cjs +1 -1
  1007. package/providers/prepareEthersHinkal.d.ts +1 -0
  1008. package/providers/prepareEthersHinkal.mjs +2 -2
  1009. package/providers/prepareSolanaHinkal.cjs +1 -1
  1010. package/providers/prepareSolanaHinkal.d.ts +1 -0
  1011. package/providers/prepareSolanaHinkal.mjs +2 -2
  1012. package/providers/prepareTronHinkal.cjs +1 -1
  1013. package/providers/prepareTronHinkal.d.ts +1 -0
  1014. package/providers/prepareTronHinkal.mjs +2 -2
  1015. package/providers/prepareWagmiHinkal.cjs +1 -1
  1016. package/providers/prepareWagmiHinkal.d.ts +1 -0
  1017. package/providers/prepareWagmiHinkal.mjs +2 -2
  1018. package/services/Hinkal.cjs +1 -1
  1019. package/services/Hinkal.d.ts +16 -10
  1020. package/services/Hinkal.mjs +29 -17
  1021. package/types/IHinkal.d.ts +16 -10
  1022. package/types/swap.types.d.ts +3 -20
  1023. package/common/src/API/accessCodeCalls.cjs +0 -1
  1024. package/common/src/API/accessCodeCalls.mjs +0 -13
  1025. package/common/src/API/brotherhoodCalls.cjs +0 -1
  1026. package/common/src/API/brotherhoodCalls.mjs +0 -17
  1027. package/common/src/API/callOdosAPI.cjs +0 -1
  1028. package/common/src/API/callOdosAPI.mjs +0 -18
  1029. package/common/src/API/callOneInchAPI.cjs +0 -1
  1030. package/common/src/API/callOneInchAPI.mjs +0 -13
  1031. package/common/src/API/deposit-and-withdraw-status-calls.cjs +0 -1
  1032. package/common/src/API/deposit-and-withdraw-status-calls.mjs +0 -13
  1033. package/common/src/API/generate-trading-points.cjs +0 -1
  1034. package/common/src/API/generate-trading-points.mjs +0 -23
  1035. package/common/src/API/leaderboardCalls.cjs +0 -1
  1036. package/common/src/API/leaderboardCalls.mjs +0 -8
  1037. package/common/src/API/referralsCalls.cjs +0 -1
  1038. package/common/src/API/referralsCalls.mjs +0 -11
  1039. package/common/src/API/send-telegram-callback.cjs +0 -1
  1040. package/common/src/API/send-telegram-callback.mjs +0 -11
  1041. package/common/src/constants/tasks.constants.cjs +0 -1
  1042. package/common/src/constants/tasks.constants.mjs +0 -124
  1043. package/common/src/crypto/ecdh-dual-path.cjs +0 -1
  1044. package/common/src/crypto/ecdh-dual-path.mjs +0 -6
  1045. package/common/src/data-structures/Hinkal/hinkalMultiSend.cjs +0 -1
  1046. package/common/src/data-structures/Hinkal/hinkalMultiSend.mjs +0 -12
  1047. package/common/src/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.cjs +0 -1
  1048. package/common/src/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.mjs +0 -128
  1049. package/common/src/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.cjs +0 -1
  1050. package/common/src/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.mjs +0 -34
  1051. package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.cjs +0 -1
  1052. package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +0 -172
  1053. package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.cjs +0 -1
  1054. package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.mjs +0 -94
  1055. package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.cjs +0 -1
  1056. package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.mjs +0 -134
  1057. package/common/src/data-structures/TokenDBs/PublicTokensDB.cjs +0 -1
  1058. package/common/src/data-structures/TokenDBs/PublicTokensDB.mjs +0 -32
  1059. package/common/src/data-structures/TokenDBs/TempoPublicTokensDB.cjs +0 -1
  1060. package/common/src/data-structures/TokenDBs/TempoPublicTokensDB.mjs +0 -41
  1061. package/common/src/data-structures/TokenDBs/TronPublicTokensDB.cjs +0 -1
  1062. package/common/src/data-structures/TokenDBs/TronPublicTokensDB.mjs +0 -47
  1063. package/common/src/data-structures/TokenDBs/index.cjs +0 -1
  1064. package/common/src/data-structures/TokenDBs/index.mjs +0 -6
  1065. package/common/src/externalABIs/IQuoterV2.json.cjs +0 -1
  1066. package/common/src/externalABIs/IQuoterV2.json.mjs +0 -203
  1067. package/common/src/externalABIs/ISwapRouter.json.cjs +0 -1
  1068. package/common/src/externalABIs/ISwapRouter.json.mjs +0 -537
  1069. package/common/src/externalABIs/IUniswapV3Factory.json.cjs +0 -1
  1070. package/common/src/externalABIs/IUniswapV3Factory.json.mjs +0 -188
  1071. package/common/src/externalABIs/IUniswapV3Pool.json.cjs +0 -1
  1072. package/common/src/externalABIs/IUniswapV3Pool.json.mjs +0 -938
  1073. package/common/src/externalABIs/UniswapV2PoolAbi.json.cjs +0 -1
  1074. package/common/src/externalABIs/UniswapV2PoolAbi.json.mjs +0 -78
  1075. package/common/src/functions/pre-transaction/interaction-to-action.cjs +0 -1
  1076. package/common/src/functions/pre-transaction/interaction-to-action.mjs +0 -1
  1077. package/common/src/functions/pre-transaction/recipientUtxoProcessing.cjs +0 -1
  1078. package/common/src/functions/pre-transaction/recipientUtxoProcessing.mjs +0 -32
  1079. package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.cjs +0 -1
  1080. package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.mjs +0 -29
  1081. package/common/src/functions/private-wallet/opProducer.cjs +0 -1
  1082. package/common/src/functions/private-wallet/opProducer.mjs +0 -3
  1083. package/common/src/functions/snarkjs/generateZkProofEnclave.cjs +0 -1
  1084. package/common/src/functions/snarkjs/generateZkProofEnclave.mjs +0 -27
  1085. package/common/src/functions/utils/bit.operations.cjs +0 -1
  1086. package/common/src/functions/utils/bit.operations.mjs +0 -4
  1087. package/common/src/functions/utils/get-signature-header.cjs +0 -1
  1088. package/common/src/functions/utils/get-signature-header.mjs +0 -4
  1089. package/common/src/functions/utils/ipfs.cjs +0 -1
  1090. package/common/src/functions/utils/ipfs.mjs +0 -1
  1091. package/common/src/functions/utils/reloadPage.cjs +0 -1
  1092. package/common/src/functions/utils/reloadPage.mjs +0 -4
  1093. package/common/src/functions/web3/getSolanaPriorityFee.cjs +0 -1
  1094. package/common/src/functions/web3/getSolanaPriorityFee.mjs +0 -26
  1095. package/common/src/functions/web3/odosAPI.cjs +0 -1
  1096. package/common/src/functions/web3/odosAPI.mjs +0 -35
  1097. package/common/src/functions/web3/oneInchAPI.cjs +0 -1
  1098. package/common/src/functions/web3/oneInchAPI.mjs +0 -34
  1099. package/common/src/functions/web3/uniswapAPI.cjs +0 -1
  1100. package/common/src/functions/web3/uniswapAPI.mjs +0 -60
  1101. package/common/src/types/new-rewards.type.cjs +0 -1
  1102. package/common/src/types/new-rewards.type.mjs +0 -10
  1103. package/common/src/types/scheduled-transactions.types.cjs +0 -1
  1104. package/common/src/types/scheduled-transactions.types.mjs +0 -6
  1105. package/common/src/webworker/logError-CZYZ3oyV.js +0 -2
  1106. package/common/src/webworker/workerProxy-DPeuP2Mg.js +0 -1
@@ -1,123 +1,58 @@
1
- import { isTronLike as e, networkRegistry as t } from "../../constants/chains.constants.mjs";
2
- import { TRON_DEFAULT_FEE_LIMIT_SUN as n, zeroAddress as r } from "../../constants/protocol.constants.mjs";
3
- import { caseInsensitiveEqual as i } from "../../functions/utils/caseInsensitive.utils.mjs";
4
- import { ContractType as a } from "../../types/ethereum-network.types.mjs";
5
- import { Logger as o } from "../../error-handling/logger.mjs";
6
- import { assertTronSufficientBalance as s, createTronCallData as c, evmHexToTronBase58Address as l, splitTronTokensByNative as u } from "../../functions/utils/tron.utils.mjs";
7
- import { validateAndGetChainId as d } from "../../functions/utils/token-check.utils.mjs";
8
- import { constructAdminData as f } from "../../functions/pre-transaction/constructAdminData.mjs";
9
- import { getStealthAddressStructureFromUserKeys as p } from "../../functions/utils/getRecipientInfoFromUserKeys.mjs";
10
- import { getContractAddress as m } from "../../functions/utils/getContractAddress.mjs";
11
- import { simulateTronTransaction as h } from "../../functions/utils/tronSimulation.utils.mjs";
12
- import { buildApproveAndProoflessDepositCalls as g } from "../../functions/web3/functionCalls/constructBatchCall.mjs";
13
- import { waitForErc20Approvals as _, waitForTronErc20Approvals as v } from "../../functions/web3/functionCalls/waitForErc20Approvals.mjs";
14
- import { emitTxPublicData as y } from "../../API/admin-calls.mjs";
15
- import { aggregateAmountsForApproval as b, approveTokens as x, approveTronTokens as S, assertNoDuplicateStealthAddressStructures as C } from "./hinkalProoflessDeposit.utils.mjs";
16
- import { hinkalEvmProoflessDepositViaWrapper as w, hinkalTronProoflessDepositViaWrapper as T } from "./hinkalProoflessDepositViaWrapper.mjs";
1
+ import { isTronLike as e } from "../../constants/chains.constants.mjs";
2
+ import { zeroAddress as t } from "../../constants/protocol.constants.mjs";
3
+ import { zeroProoflessFeeStructure as n } from "../../types/hinkal.types.mjs";
4
+ import { caseInsensitiveEqual as r } from "../../functions/utils/caseInsensitive.utils.mjs";
5
+ import { ContractType as i } from "../../types/ethereum-network.types.mjs";
6
+ import { validateAndGetChainId as a } from "../../functions/utils/token-check.utils.mjs";
7
+ import { constructAdminData as o } from "../../functions/pre-transaction/constructAdminData.mjs";
8
+ import { getContractAddress as s } from "../../functions/utils/getContractAddress.mjs";
9
+ import { buildApproveAndProoflessDepositCalls as c } from "../../functions/web3/functionCalls/constructBatchCall.mjs";
10
+ import { waitForErc20Approvals as l } from "../../functions/web3/functionCalls/waitForErc20Approvals.mjs";
11
+ import { emitTxPublicData as u } from "../../API/admin-calls.mjs";
12
+ import { getStealthAddressStructureFromUserKeys as d } from "../../functions/utils/getRecipientInfoFromUserKeys.mjs";
13
+ import { aggregateAmountsForApproval as f, approveTokens as p, assertNoDuplicateStealthAddressStructures as m, buildProoflessEncryptedOutputs as h, getOwnRecipientEncryptionKeys as g } from "./hinkalProoflessDeposit.utils.mjs";
17
14
  //#region libs/shared/common/src/data-structures/Hinkal/hinkalProoflessDeposit.ts
18
- var E = async (e, r, i, a, d, f = !1) => {
19
- let p = e.getTronWeb(), { hinkalAddress: m } = t[r].contractData, g = l(m), _ = await e.getEthereumAddressByChain(r), y = i.map((e) => e.erc20TokenAddress), b = i.map(() => 0n), { totalTrxValue: x, tokensNeedingApproval: C } = u(i, a), w = d.map((e) => ({
20
- extraRandomization: e.extraRandomization.toString(),
21
- stealthAddress: e.stealthAddress.toString(),
22
- H0: e.H0.toString(),
23
- H1: e.H1.toString()
24
- }));
25
- if (x > 0n) {
26
- let { hinkalABI: e } = t[r].contractData;
27
- if (!e) throw Error("Hinkal ABI not found");
28
- await s(p, r, g, _, c(e, "prooflessDeposit", [
29
- y,
30
- a.map(String),
31
- b.map(String),
32
- d.map((e) => [
33
- e.extraRandomization.toString(),
34
- e.stealthAddress.toString(),
35
- e.H0.toString(),
36
- e.H1.toString()
37
- ])
38
- ]), x);
39
- }
40
- let { transaction: T } = await p.transactionBuilder.triggerSmartContract(g, "prooflessDeposit(address[],uint256[],uint256[],(uint256,uint256,uint256,uint256)[])", {
41
- feeLimit: n,
42
- callValue: x > 0n ? Number(x) : 0
43
- }, [
44
- {
45
- type: "address[]",
46
- value: y
47
- },
48
- {
49
- type: "uint256[]",
50
- value: a.map(String)
51
- },
52
- {
53
- type: "uint256[]",
54
- value: b.map(String)
55
- },
56
- {
57
- type: "tuple(uint256,uint256,uint256,uint256)[]",
58
- value: w.map((e) => [
59
- e.extraRandomization,
60
- e.stealthAddress,
61
- e.H0,
62
- e.H1
63
- ])
64
- }
65
- ], _);
66
- if (f) return T;
67
- await S(p, _, g, C), await v(p, _, g, Array.from(C.entries()).map(([e, t]) => ({
68
- tokenAddress: e,
69
- requiredAmount: t
70
- }))), await h(r, g, "prooflessDeposit", t[r].contractData.hinkalABI, [
15
+ var _ = async (_, v, y, b, x, S = !1, C = n, w = "", T, E = !1) => {
16
+ let D = a(v);
17
+ if (e(D)) throw Error("Proofless deposit is not supported on Tron");
18
+ let O = await _.getEthereumAddressByChain(D), k = b ?? v.map(() => d(_.userKeys));
19
+ if (k.length !== v.length) throw Error("Stealth address structures length must be equal to erc20 tokens length");
20
+ if (m(k), b && !x) throw Error("recipientEncryptionKeysOverride is required whenever stealthAddressStructuresOverride is provided");
21
+ if (x && x.length !== v.length) throw Error("recipientEncryptionKeysOverride length must be equal to erc20 tokens length");
22
+ let A = h(k, x ?? g(_.userKeys, v.length)), j = C.feeAmount > 0n, M = j ? _.getContractWithSigner(D, i.HinkalWrapperContract) : _.getContractWithSigner(D, i.HinkalContract), N = j ? [
23
+ v.map(({ erc20TokenAddress: e }) => e),
24
+ y,
25
+ k,
26
+ A,
27
+ S,
28
+ C,
29
+ w
30
+ ] : [
31
+ v.map(({ erc20TokenAddress: e }) => e),
71
32
  y,
72
- a.map(String),
73
- b.map(String),
74
- d.map((e) => [
75
- e.extraRandomization.toString(),
76
- e.stealthAddress.toString(),
77
- e.H0.toString(),
78
- e.H1.toString()
79
- ])
80
- ], _, x > 0n ? x : void 0);
81
- let E = await p.trx.sign(T), D = await p.trx.sendRawTransaction(E);
82
- if (!D.result) throw o.error("Tron prooflessDeposit broadcast failed", D), Error("Tron prooflessDeposit broadcast failed");
83
- let O = typeof D == "string" ? D : D?.txid ?? D?.transaction?.txID;
84
- if (!O) throw Error("Tron prooflessDeposit failed (missing txid)");
85
- return O;
86
- }, D = async (t, n, o, s, c, l = !1) => {
87
- let u = d(n), h = e(u), v = await t.getEthereumAddressByChain(u), S = s ?? n.map(() => p(t.userKeys));
88
- if (S.length !== n.length) throw Error("Stealth address structures length must be equal to erc20 tokens length");
89
- C(S);
90
- let w;
91
- if (h) {
92
- let e = await E(t, u, n, o, S, l);
93
- if (l) return e;
94
- w = e;
33
+ k,
34
+ A,
35
+ S,
36
+ w
37
+ ], P = r(C.feeToken, t), F = v.reduce((e, n, i) => r(n.erc20TokenAddress, t) ? e + y[i] : e, 0n) + (P ? C.feeAmount : 0n);
38
+ if (E) return M.prooflessDeposit.populateTransaction(...N, { value: F > 0n ? F : void 0 });
39
+ let I = _.getProviderAdapter(D), L = f(!P && C.feeAmount > 0n ? [...v, {
40
+ erc20TokenAddress: C.feeToken,
41
+ chainId: D
42
+ }] : v, !P && C.feeAmount > 0n ? [...y, C.feeAmount] : y), R = L.filter(({ token: e, balance: n }) => !r(e.erc20TokenAddress, t) && n > 0n), z;
43
+ if (R.length > 0 && await I.supportsBatchCall?.(D) && I.sendBatchCallsTransaction) {
44
+ let e = c(R.map(({ token: e }) => e.erc20TokenAddress), R.map(({ balance: e }) => e), s(M), M, v.map(({ erc20TokenAddress: e }) => e), y, k, A, S, j ? C : void 0, w, F);
45
+ z = await I.sendBatchCallsTransaction(D, e);
95
46
  } else {
96
- let e = t.getContractWithSigner(u, a.HinkalContract), s = [
97
- n.map(({ erc20TokenAddress: e }) => e),
98
- o,
99
- n.map(() => 0n),
100
- S
101
- ];
102
- if (l) return e.prooflessDeposit.populateTransaction(...s);
103
- let c = t.getProviderAdapter(u), d = b(n, o), f = n.reduce((e, t, n) => i(t.erc20TokenAddress, r) ? e + o[n] : e, 0n), p = d.filter(({ token: e, balance: t }) => !i(e.erc20TokenAddress, r) && t > 0n), h;
104
- if (p.length > 0 && await c.supportsBatchCall?.(u) && c.sendBatchCallsTransaction) {
105
- let t = g(p.map(({ token: e }) => e.erc20TokenAddress), p.map(({ balance: e }) => e), m(e), e, ...s, f);
106
- h = await c.sendBatchCallsTransaction(u, t);
107
- } else {
108
- await x(t, u, m(e), d);
109
- let n = await t.getEthereumAddressByChain(u), r = d.map(({ token: e, balance: t }) => ({
110
- tokenAddress: e.erc20TokenAddress,
111
- requiredAmount: t
112
- }));
113
- await _(t, u, n, m(e), r), h = await e.prooflessDeposit(...s, { value: f > 0n ? f : void 0 });
114
- }
115
- w = h.hash;
47
+ await p(_, D, s(M), L);
48
+ let e = await _.getEthereumAddressByChain(D), t = L.map(({ token: e, balance: t }) => ({
49
+ tokenAddress: e.erc20TokenAddress,
50
+ requiredAmount: t
51
+ }));
52
+ await l(_, D, e, s(M), t), z = await M.prooflessDeposit(...N, { value: F > 0n ? F : void 0 });
116
53
  }
117
- return y(f(c, u, n.map(({ erc20TokenAddress: e }) => e), o, v)), w;
118
- }, O = async (n, r, i, a, o, s, c) => {
119
- let l = a.map(() => i), u = i.erc20TokenAddress;
120
- return e(r) ? T(n, r, u, s, l, a, o, c) : t[r]?.contractData?.hinkalWrapperAddress ? w(n, r, u, s, l, a, o, c) : await D(n, l, a, o, c, !0);
54
+ let B = z.hash;
55
+ return u(o(T, D, v.map(({ erc20TokenAddress: e }) => e), y, O)), B;
121
56
  };
122
57
  //#endregion
123
- export { D as hinkalProoflessDeposit, O as hinkalProoflessDepositWithPublicFee };
58
+ export { _ as hinkalProoflessDeposit };
@@ -1 +1 @@
1
- const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../functions/utils/caseInsensitive.utils.cjs`),n=require(`../../types/ethereum-network.types.cjs`),r=require(`../../externalABIs/index.cjs`),i=require(`../../functions/utils/token-check.utils.cjs`),a=require(`../../functions/utils/tx-confirmation.utils.cjs`);var o=(e,t)=>{let n=[],r=0;for(let a=0;a<e.length;a+=1){let o=!1;for(let s=0;s<r;s+=1)if(i.isSameERC20Token(n[s].token,e[a])){n[s].balance+=t[a],o=!0;break}o||(n[r]={token:e[a],balance:t[a]},r+=1)}return n},s=async(r,i,o,s)=>{for(let c=0;c<s.length;c+=1)t.caseInsensitiveEqual(s[c].token.erc20TokenAddress,e.zeroAddress)||await a.waitForEthereumTransactionConfirmation(i,(await r.getContractWithSigner(i,n.ContractType.ERC20Contract,s[c].token.erc20TokenAddress).approve(o,s[c].balance)).hash)},c=async(t,n,i,a)=>{let o=Array.from(a.entries());for(let a=0;a<o.length;a+=1){let[s,c]=o[a],l=await t.contract(r.ERC20ABI,s).allowance(n,i).call({from:n});if(BigInt(String(l))<c){let{transaction:r}=await t.transactionBuilder.triggerSmartContract(s,`approve(address,uint256)`,{feeLimit:e.TRON_DEFAULT_FEE_LIMIT_SUN},[{type:`address`,value:i},{type:`uint256`,value:c.toString()}],n),a=await t.trx.sign(r),o=await t.trx.sendRawTransaction(a);if(!o.result){let e=o.code??`UNKNOWN`,t=o.message?Buffer.from(o.message,`hex`).toString():`no message`;throw Error(`Tron token approval failed: ${e} - ${t}`)}}}},l=e=>{let t=new Set;e.forEach(({extraRandomization:e,stealthAddress:n})=>{let r=`${e.toString()}:${n.toString()}`;if(t.has(r))throw Error(`Duplicate randomization and stealth address pair detected in stealthAddressStructures`);t.add(r)})};exports.aggregateAmountsForApproval=o,exports.approveTokens=s,exports.approveTronTokens=c,exports.assertNoDuplicateStealthAddressStructures=l;
1
+ const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../functions/utils/caseInsensitive.utils.cjs`),n=require(`../crypto-keys/keys.cjs`),r=require(`../../types/ethereum-network.types.cjs`),i=require(`../../functions/utils/token-check.utils.cjs`),a=require(`../crypto-keys/encryptDecryptUtxo.cjs`);require(`../../externalABIs/index.cjs`);const o=require(`../../functions/utils/tx-confirmation.utils.cjs`);var s=(e,t)=>{if(e.length!==t.length)throw Error(`stealthAddressStructures and recipientEncryptionKeys must have equal length`);return e.map((e,n)=>{let r=t[n];if(!r)throw Error(`Missing encryptionKey for proofless deposit output ${n}: required so the enclave can attribute this UTXO to its owner`);return`0x${Buffer.from(a.encryptEncryptionKeyAndStealthAddress(r,e.stealthAddress)).toString(`hex`)}`})},c=(e,t)=>{let r=n.UserKeys.getEncryptionKeyPair(e.getShieldedPrivateKey()).publicKey;return Array.from({length:t},()=>r)},l=(e,t)=>{let n=[],r=0;for(let a=0;a<e.length;a+=1){let o=!1;for(let s=0;s<r;s+=1)if(i.isSameERC20Token(n[s].token,e[a])){n[s].balance+=t[a],o=!0;break}o||(n[r]={token:e[a],balance:t[a]},r+=1)}return n},u=async(n,i,a,s)=>{for(let c=0;c<s.length;c+=1)t.caseInsensitiveEqual(s[c].token.erc20TokenAddress,e.zeroAddress)||await o.waitForEthereumTransactionConfirmation(i,(await n.getContractWithSigner(i,r.ContractType.ERC20Contract,s[c].token.erc20TokenAddress).approve(a,s[c].balance)).hash)},d=e=>{let t=new Set;e.forEach(({H0x:e,stealthAddress:n})=>{let r=`${e.toString()}:${n.toString()}`;if(t.has(r))throw Error(`Duplicate randomization and stealth address pair detected in stealthAddressStructures`);t.add(r)})};exports.aggregateAmountsForApproval=l,exports.approveTokens=u,exports.assertNoDuplicateStealthAddressStructures=d,exports.buildProoflessEncryptedOutputs=s,exports.getOwnRecipientEncryptionKeys=c;
@@ -0,0 +1,10 @@
1
+ import { ERC20Token, TokenBalance } from '../../types/token.types';
2
+ import { StealthAddressStructure } from '../../types/circom-data.types';
3
+ import { UserKeys } from '../crypto-keys/keys';
4
+ import { IHinkal } from './IHinkal';
5
+ export declare const buildProoflessEncryptedOutputs: (stealthAddressStructures: StealthAddressStructure[], recipientEncryptionKeys: string[]) => string[];
6
+ export declare const getOwnRecipientEncryptionKeys: (userKeys: UserKeys, count: number) => string[];
7
+ export declare const aggregateAmountsForApproval: (erc20Tokens: ERC20Token[], amounts: bigint[]) => TokenBalance[];
8
+ export declare const approveTokens: (hinkal: IHinkal, chainId: number, spenderAddress: string, tokensWithBalances: TokenBalance[]) => Promise<void>;
9
+ export declare const approveTronTokens: (tronWeb: any, ethereumAddress: string, spenderAddress: string, tokensNeedingApproval: Map<string, bigint>) => Promise<void>;
10
+ export declare const assertNoDuplicateStealthAddressStructures: (stealthAddressStructures: StealthAddressStructure[]) => void;
@@ -1,51 +1,45 @@
1
- import { TRON_DEFAULT_FEE_LIMIT_SUN as e, zeroAddress as t } from "../../constants/protocol.constants.mjs";
2
- import { caseInsensitiveEqual as n } from "../../functions/utils/caseInsensitive.utils.mjs";
1
+ import { zeroAddress as e } from "../../constants/protocol.constants.mjs";
2
+ import { caseInsensitiveEqual as t } from "../../functions/utils/caseInsensitive.utils.mjs";
3
+ import { UserKeys as n } from "../crypto-keys/keys.mjs";
3
4
  import { ContractType as r } from "../../types/ethereum-network.types.mjs";
4
- import { ERC20ABI as i } from "../../externalABIs/index.mjs";
5
- import { isSameERC20Token as a } from "../../functions/utils/token-check.utils.mjs";
5
+ import { isSameERC20Token as i } from "../../functions/utils/token-check.utils.mjs";
6
+ import { encryptEncryptionKeyAndStealthAddress as a } from "../crypto-keys/encryptDecryptUtxo.mjs";
7
+ import "../../externalABIs/index.mjs";
6
8
  import { waitForEthereumTransactionConfirmation as o } from "../../functions/utils/tx-confirmation.utils.mjs";
7
9
  //#region libs/shared/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.ts
8
10
  var s = (e, t) => {
11
+ if (e.length !== t.length) throw Error("stealthAddressStructures and recipientEncryptionKeys must have equal length");
12
+ return e.map((e, n) => {
13
+ let r = t[n];
14
+ if (!r) throw Error(`Missing encryptionKey for proofless deposit output ${n}: required so the enclave can attribute this UTXO to its owner`);
15
+ return `0x${Buffer.from(a(r, e.stealthAddress)).toString("hex")}`;
16
+ });
17
+ }, c = (e, t) => {
18
+ let r = n.getEncryptionKeyPair(e.getShieldedPrivateKey()).publicKey;
19
+ return Array.from({ length: t }, () => r);
20
+ }, l = (e, t) => {
9
21
  let n = [], r = 0;
10
- for (let i = 0; i < e.length; i += 1) {
22
+ for (let a = 0; a < e.length; a += 1) {
11
23
  let o = !1;
12
- for (let s = 0; s < r; s += 1) if (a(n[s].token, e[i])) {
13
- n[s].balance += t[i], o = !0;
24
+ for (let s = 0; s < r; s += 1) if (i(n[s].token, e[a])) {
25
+ n[s].balance += t[a], o = !0;
14
26
  break;
15
27
  }
16
28
  o || (n[r] = {
17
- token: e[i],
18
- balance: t[i]
29
+ token: e[a],
30
+ balance: t[a]
19
31
  }, r += 1);
20
32
  }
21
33
  return n;
22
- }, c = async (e, i, a, s) => {
23
- for (let c = 0; c < s.length; c += 1) n(s[c].token.erc20TokenAddress, t) || await o(i, (await e.getContractWithSigner(i, r.ERC20Contract, s[c].token.erc20TokenAddress).approve(a, s[c].balance)).hash);
24
- }, l = async (t, n, r, a) => {
25
- let o = Array.from(a.entries());
26
- for (let a = 0; a < o.length; a += 1) {
27
- let [s, c] = o[a], l = await t.contract(i, s).allowance(n, r).call({ from: n });
28
- if (BigInt(String(l)) < c) {
29
- let { transaction: i } = await t.transactionBuilder.triggerSmartContract(s, "approve(address,uint256)", { feeLimit: e }, [{
30
- type: "address",
31
- value: r
32
- }, {
33
- type: "uint256",
34
- value: c.toString()
35
- }], n), a = await t.trx.sign(i), o = await t.trx.sendRawTransaction(a);
36
- if (!o.result) {
37
- let e = o.code ?? "UNKNOWN", t = o.message ? Buffer.from(o.message, "hex").toString() : "no message";
38
- throw Error(`Tron token approval failed: ${e} - ${t}`);
39
- }
40
- }
41
- }
42
- }, u = (e) => {
34
+ }, u = async (n, i, a, s) => {
35
+ for (let c = 0; c < s.length; c += 1) t(s[c].token.erc20TokenAddress, e) || await o(i, (await n.getContractWithSigner(i, r.ERC20Contract, s[c].token.erc20TokenAddress).approve(a, s[c].balance)).hash);
36
+ }, d = (e) => {
43
37
  let t = /* @__PURE__ */ new Set();
44
- e.forEach(({ extraRandomization: e, stealthAddress: n }) => {
38
+ e.forEach(({ H0x: e, stealthAddress: n }) => {
45
39
  let r = `${e.toString()}:${n.toString()}`;
46
40
  if (t.has(r)) throw Error("Duplicate randomization and stealth address pair detected in stealthAddressStructures");
47
41
  t.add(r);
48
42
  });
49
43
  };
50
44
  //#endregion
51
- export { s as aggregateAmountsForApproval, c as approveTokens, l as approveTronTokens, u as assertNoDuplicateStealthAddressStructures };
45
+ export { l as aggregateAmountsForApproval, u as approveTokens, d as assertNoDuplicateStealthAddressStructures, s as buildProoflessEncryptedOutputs, c as getOwnRecipientEncryptionKeys };
@@ -0,0 +1 @@
1
+ const e=require(`../../constants/chains.constants.cjs`),t=require(`../../functions/utils/token-check.utils.cjs`),n=require(`../../functions/private-wallet/emporium.helpers.cjs`),r=require(`./hinkalSolanaProxySend.cjs`);var i=async(i,a,o,s,c,l,u,d)=>{let f=t.validateAndGetChainId(a);if(e.isSolanaLike(f))return r.hinkalSolanaProxySend(i,a[0],o[0],s,c,d);let p=n.createTransaferEmporiumOpsBatch(i,f,a.map(e=>e.erc20TokenAddress),o,c),m=a.map((e,t)=>({token:e,amount:-1n*o[t]}));return await i.actionPrivateWallet(f,[],[],[],p,m,s,l,u,void 0,void 0,void 0,d,void 0)};exports.hinkalProxySend=i;
@@ -0,0 +1,6 @@
1
+ import { FeeStructure } from '../../types/hinkal.types';
2
+ import { ERC20Token } from '../../types/token.types';
3
+ import { SubAccount } from '../../types/proxy.types';
4
+ import { AdminTransactionType } from '../../types/admin.types';
5
+ import { IHinkal } from './IHinkal';
6
+ export declare const hinkalProxySend: (hinkal: IHinkal, erc20Tokens: ERC20Token[], amounts: bigint[], subAccount: SubAccount, recipientAddress: string, feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType) => Promise<string>;
@@ -0,0 +1,16 @@
1
+ import { isSolanaLike as e } from "../../constants/chains.constants.mjs";
2
+ import { validateAndGetChainId as t } from "../../functions/utils/token-check.utils.mjs";
3
+ import { createTransaferEmporiumOpsBatch as n } from "../../functions/private-wallet/emporium.helpers.mjs";
4
+ import { hinkalSolanaProxySend as r } from "./hinkalSolanaProxySend.mjs";
5
+ //#region libs/shared/common/src/data-structures/Hinkal/hinkalProxySend.ts
6
+ var i = async (i, a, o, s, c, l, u, d) => {
7
+ let f = t(a);
8
+ if (e(f)) return r(i, a[0], o[0], s, c, d);
9
+ let p = n(i, f, a.map((e) => e.erc20TokenAddress), o, c), m = a.map((e, t) => ({
10
+ token: e,
11
+ amount: -1n * o[t]
12
+ }));
13
+ return await i.actionPrivateWallet(f, [], [], [], p, m, s, l, u, void 0, void 0, void 0, d, void 0);
14
+ };
15
+ //#endregion
16
+ export { i as hinkalProxySend };
@@ -1 +1 @@
1
- require(`../../constants/protocol.constants.cjs`);const e=require(`../../error-handling/error-codes.constants.cjs`),t=require(`../../types/external-action.types.cjs`),n=require(`../../functions/utils/token-check.utils.cjs`),r=require(`../AccountActions/AccountActions.cjs`),i=require(`../../functions/pre-transaction/getFeeStructure.cjs`),a=require(`../../constants/addresses.constants.cjs`),o=require(`../../functions/utils/convertEmporiumOpToCallInfo.cjs`),s=require(`../../functions/private-wallet/emporium.swap.helpers.cjs`);var c=async(c,l,u,d,f,p,m,h,g,_=!1,v,y)=>{if(!h)throw Error(`Fee token is required in hinkalProxySwap`);let b=n.validateAndGetChainId(l),x=r.AccountActions.getAddressFromSubAccount(b,m);if(!x)throw Error(`Public account address is not available`);let S=l.map(e=>e.erc20TokenAddress),C=await c.getRandomRelay(b,!0);if(!C)throw Error(e.transactionErrorCodes.RELAYER_NOT_AVAILABLE);let w=await s.createSwapToEmporiumOps(c,b,d,a.SWAP_ROUTER_ADDRESSES[d][b],f,S[0],u[0],u[1],S[1],p,x,C,!0),T=g??await i.getFeeStructure(b,h,S,t.ExternalActionId.Emporium,w.map(e=>o.convertEmporiumOpToCallInfo(e,x,b)),35n),E=l.map((e,t)=>({token:e,amount:u[t]}));return c.actionPrivateWallet(b,[],[],[],w,E,m,h,T,C,_,v,y,void 0)};exports.hinkalProxySwap=c;
1
+ require(`../../constants/protocol.constants.cjs`);const e=require(`../../error-handling/error-codes.constants.cjs`),t=require(`../../types/external-action.types.cjs`),n=require(`../../functions/utils/token-check.utils.cjs`),r=require(`../AccountActions/AccountActions.cjs`),i=require(`../../functions/pre-transaction/getFeeStructure.cjs`),a=require(`../../constants/addresses.constants.cjs`),o=require(`../../functions/utils/convertEmporiumOpToCallInfo.cjs`),s=require(`../../functions/utils/fees.utils.cjs`),c=require(`../../functions/private-wallet/emporium.swap.helpers.cjs`);var l=async(l,u,d,f,p,m,h,g,_,v=!1,y,b,x,S)=>{if(!g)throw Error(`Fee token is required in hinkalProxySwap`);let C=n.validateAndGetChainId(u),w=r.AccountActions.getAddressFromSubAccount(C,h);if(!w)throw Error(`Public account address is not available`);let T=u.map(e=>e.erc20TokenAddress),E=await l.getRandomRelay(C,!0);if(!E)throw Error(e.transactionErrorCodes.RELAYER_NOT_AVAILABLE);let D=await c.createSwapToEmporiumOps(l,C,f,a.SWAP_ROUTER_ADDRESSES[f][C],p,T[0],d[0],d[1],T[1],m,w,E,!0),O=_??await i.getFeeStructure(C,g,T,t.ExternalActionId.Emporium,D.map(e=>o.convertEmporiumOpToCallInfo(e,w,C)),35n),k=u.map((e,t)=>({token:e,amount:d[t]})),A=x&&S!==void 0?await s.calculateModifiedFeeStructure(C,x,S,O):O;return l.actionPrivateWallet(C,[],[],[],D,k,h,g,A,E,v,y,b,void 0)};exports.hinkalProxySwap=l;
@@ -0,0 +1,7 @@
1
+ import { ERC20Token } from '../../types/token.types';
2
+ import { ExternalActionId } from '../../types/external-action.types';
3
+ import { FeeStructure } from '../../types/hinkal.types';
4
+ import { IHinkal } from './IHinkal';
5
+ import { SubAccount } from '../../types/proxy.types';
6
+ import { AdminTransactionType } from '../../types/admin.types';
7
+ export declare const hinkalProxySwap: (hinkal: IHinkal, erc20Tokens: ERC20Token[], deltaAmounts: bigint[], externalActionId: ExternalActionId, data: string, isTheSameChainSwap: boolean, subAccount: SubAccount, feeToken?: string, feeStructureOverride?: FeeStructure, autoDepositBack?: boolean, maxGasInDollar?: string, action?: AdminTransactionType, bridgedToken?: ERC20Token, bridgedTokenAmount?: bigint) => Promise<string>;
@@ -6,19 +6,20 @@ import { AccountActions as r } from "../AccountActions/AccountActions.mjs";
6
6
  import { getFeeStructure as i } from "../../functions/pre-transaction/getFeeStructure.mjs";
7
7
  import { SWAP_ROUTER_ADDRESSES as a } from "../../constants/addresses.constants.mjs";
8
8
  import { convertEmporiumOpToCallInfo as o } from "../../functions/utils/convertEmporiumOpToCallInfo.mjs";
9
- import { createSwapToEmporiumOps as s } from "../../functions/private-wallet/emporium.swap.helpers.mjs";
9
+ import { calculateModifiedFeeStructure as s } from "../../functions/utils/fees.utils.mjs";
10
+ import { createSwapToEmporiumOps as c } from "../../functions/private-wallet/emporium.swap.helpers.mjs";
10
11
  //#region libs/shared/common/src/data-structures/Hinkal/hinkalProxySwap.ts
11
- var c = async (c, l, u, d, f, p, m, h, g, _ = !1, v, y) => {
12
- if (!h) throw Error("Fee token is required in hinkalProxySwap");
13
- let b = n(l), x = r.getAddressFromSubAccount(b, m);
14
- if (!x) throw Error("Public account address is not available");
15
- let S = l.map((e) => e.erc20TokenAddress), C = await c.getRandomRelay(b, !0);
16
- if (!C) throw Error(e.RELAYER_NOT_AVAILABLE);
17
- let w = await s(c, b, d, a[d][b], f, S[0], u[0], u[1], S[1], p, x, C, !0), T = g ?? await i(b, h, S, t.Emporium, w.map((e) => o(e, x, b)), 35n), E = l.map((e, t) => ({
12
+ var l = async (l, u, d, f, p, m, h, g, _, v = !1, y, b, x, S) => {
13
+ if (!g) throw Error("Fee token is required in hinkalProxySwap");
14
+ let C = n(u), w = r.getAddressFromSubAccount(C, h);
15
+ if (!w) throw Error("Public account address is not available");
16
+ let T = u.map((e) => e.erc20TokenAddress), E = await l.getRandomRelay(C, !0);
17
+ if (!E) throw Error(e.RELAYER_NOT_AVAILABLE);
18
+ let D = await c(l, C, f, a[f][C], p, T[0], d[0], d[1], T[1], m, w, E, !0), O = _ ?? await i(C, g, T, t.Emporium, D.map((e) => o(e, w, C)), 35n), k = u.map((e, t) => ({
18
19
  token: e,
19
- amount: u[t]
20
- }));
21
- return c.actionPrivateWallet(b, [], [], [], w, E, m, h, T, C, _, v, y, void 0);
20
+ amount: d[t]
21
+ })), A = x && S !== void 0 ? await s(C, x, S, O) : O;
22
+ return l.actionPrivateWallet(C, [], [], [], D, k, h, g, A, E, v, y, b, void 0);
22
23
  };
23
24
  //#endregion
24
- export { c as hinkalProxySwap };
25
+ export { l as hinkalProxySwap };
@@ -1 +1 @@
1
- const e=require(`../../error-handling/error-codes.constants.cjs`),t=require(`../../types/external-action.types.cjs`),n=require(`../../functions/utils/addresses.cjs`),r=require(`../../functions/utils/token-check.utils.cjs`),i=require(`../../functions/pre-transaction/getVolatileTransferAmount.cjs`),a=require(`../AccountActions/AccountActions.cjs`),o=require(`../../functions/pre-transaction/getFeeStructure.cjs`),s=require(`../../functions/utils/convertEmporiumOpToCallInfo.cjs`),c=require(`../../functions/private-wallet/emporium.helpers.cjs`);var l=async(l,u,d,f,p,m,h,g)=>{if(!h)throw Error(`hinkalProxyToPrivate: subAccount should be provided`);if(!p)throw Error(`Fee token is required in hinkalProxyToPrivate`);if(!n.isValidPrivateAddress(f))throw Error(e.transactionErrorCodes.RECIPIENT_FORMAT_INCORRECT);let _=r.validateAndGetChainId(u),v=a.AccountActions.getAddressFromSubAccount(_,h);if(!v)throw Error(`Public account address is not available`);let y=u.map(e=>e.erc20TokenAddress),b=await i.modifyVolatileTokenAmountChanges(_,u,d,v),x=c.createTransaferEmporiumOpsBatch(l,_,y,b),S=m??await o.getFeeStructure(_,p,y,t.ExternalActionId.Emporium,x.map(e=>s.convertEmporiumOpToCallInfo(e,v,_))),C=u.map((e,t)=>({token:e,amount:-1n*b[t]}));return l.actionPrivateWallet(_,[u[0]],[0n],[!1],x,C,h,p,S,void 0,void 0,void 0,g,{recipientInfo:f,amount:b[0],token:u[0]})};exports.hinkalProxyToPrivate=l;
1
+ require(`../../constants/protocol.constants.cjs`);const e=require(`../../error-handling/error-codes.constants.cjs`),t=require(`../../functions/utils/addresses.cjs`),n=require(`../../types/external-action.types.cjs`),r=require(`../../functions/utils/token-check.utils.cjs`),i=require(`../../functions/pre-transaction/getVolatileTransferAmount.cjs`),a=require(`../AccountActions/AccountActions.cjs`),o=require(`../../functions/pre-transaction/getFeeStructure.cjs`),s=require(`../../functions/private-wallet/emporium.helpers.cjs`),c=require(`../../functions/utils/convertEmporiumOpToCallInfo.cjs`),l=require(`../../functions/utils/fees.utils.cjs`);var u=async(u,d,f,p,m,h,g,_)=>{if(!g)throw Error(`hinkalProxyToPrivate: subAccount should be provided`);if(!m)throw Error(`Fee token is required in hinkalProxyToPrivate`);if(!t.isValidPrivateAddress(p))throw Error(e.transactionErrorCodes.RECIPIENT_FORMAT_INCORRECT);let v=r.validateAndGetChainId(d),y=a.AccountActions.getAddressFromSubAccount(v,g);if(!y)throw Error(`Public account address is not available`);let b=d.map(e=>e.erc20TokenAddress),x=await i.modifyVolatileTokenAmountChanges(v,d,f,y),S=s.createTransaferEmporiumOpsBatch(u,v,b,x),C=await l.calculateModifiedFeeStructureForTokens(v,d,x,h??await o.getFeeStructure(v,m,b,n.ExternalActionId.Emporium,S.map(e=>c.convertEmporiumOpToCallInfo(e,y,v)),25n)),w=d.map((e,t)=>({token:e,amount:-1n*x[t]}));return u.actionPrivateWallet(v,[d[0]],[0n],[!1],S,w,g,m,C,void 0,void 0,void 0,_,{recipientInfo:p,amount:x[0],token:d[0]})};exports.hinkalProxyToPrivate=u;
@@ -0,0 +1,6 @@
1
+ import { ERC20Token } from '../../types/token.types';
2
+ import { FeeStructure } from '../../types/hinkal.types';
3
+ import { AdminTransactionType } from '../../types/admin.types';
4
+ import { IHinkal } from './IHinkal';
5
+ import { SubAccount } from '../../types/proxy.types';
6
+ export declare const hinkalProxyToPrivate: (hinkal: IHinkal, erc20Tokens: ERC20Token[], deltaAmountsBase: bigint[], recipientInfo: string, feeToken?: string, feeStructureOverride?: FeeStructure, subAccount?: SubAccount, action?: AdminTransactionType) => Promise<string>;
@@ -1,28 +1,30 @@
1
+ import "../../constants/protocol.constants.mjs";
1
2
  import { transactionErrorCodes as e } from "../../error-handling/error-codes.constants.mjs";
2
- import { ExternalActionId as t } from "../../types/external-action.types.mjs";
3
- import { isValidPrivateAddress as n } from "../../functions/utils/addresses.mjs";
3
+ import { isValidPrivateAddress as t } from "../../functions/utils/addresses.mjs";
4
+ import { ExternalActionId as n } from "../../types/external-action.types.mjs";
4
5
  import { validateAndGetChainId as r } from "../../functions/utils/token-check.utils.mjs";
5
6
  import { modifyVolatileTokenAmountChanges as i } from "../../functions/pre-transaction/getVolatileTransferAmount.mjs";
6
7
  import { AccountActions as a } from "../AccountActions/AccountActions.mjs";
7
8
  import { getFeeStructure as o } from "../../functions/pre-transaction/getFeeStructure.mjs";
8
- import { convertEmporiumOpToCallInfo as s } from "../../functions/utils/convertEmporiumOpToCallInfo.mjs";
9
- import { createTransaferEmporiumOpsBatch as c } from "../../functions/private-wallet/emporium.helpers.mjs";
9
+ import { createTransaferEmporiumOpsBatch as s } from "../../functions/private-wallet/emporium.helpers.mjs";
10
+ import { convertEmporiumOpToCallInfo as c } from "../../functions/utils/convertEmporiumOpToCallInfo.mjs";
11
+ import { calculateModifiedFeeStructureForTokens as l } from "../../functions/utils/fees.utils.mjs";
10
12
  //#region libs/shared/common/src/data-structures/Hinkal/hinkalProxyToPrivate.ts
11
- var l = async (l, u, d, f, p, m, h, g) => {
12
- if (!h) throw Error("hinkalProxyToPrivate: subAccount should be provided");
13
- if (!p) throw Error("Fee token is required in hinkalProxyToPrivate");
14
- if (!n(f)) throw Error(e.RECIPIENT_FORMAT_INCORRECT);
15
- let _ = r(u), v = a.getAddressFromSubAccount(_, h);
16
- if (!v) throw Error("Public account address is not available");
17
- let y = u.map((e) => e.erc20TokenAddress), b = await i(_, u, d, v), x = c(l, _, y, b), S = m ?? await o(_, p, y, t.Emporium, x.map((e) => s(e, v, _))), C = u.map((e, t) => ({
13
+ var u = async (u, d, f, p, m, h, g, _) => {
14
+ if (!g) throw Error("hinkalProxyToPrivate: subAccount should be provided");
15
+ if (!m) throw Error("Fee token is required in hinkalProxyToPrivate");
16
+ if (!t(p)) throw Error(e.RECIPIENT_FORMAT_INCORRECT);
17
+ let v = r(d), y = a.getAddressFromSubAccount(v, g);
18
+ if (!y) throw Error("Public account address is not available");
19
+ let b = d.map((e) => e.erc20TokenAddress), x = await i(v, d, f, y), S = s(u, v, b, x), C = await l(v, d, x, h ?? await o(v, m, b, n.Emporium, S.map((e) => c(e, y, v)), 25n)), w = d.map((e, t) => ({
18
20
  token: e,
19
- amount: -1n * b[t]
21
+ amount: -1n * x[t]
20
22
  }));
21
- return l.actionPrivateWallet(_, [u[0]], [0n], [!1], x, C, h, p, S, void 0, void 0, void 0, g, {
22
- recipientInfo: f,
23
- amount: b[0],
24
- token: u[0]
23
+ return u.actionPrivateWallet(v, [d[0]], [0n], [!1], S, w, g, m, C, void 0, void 0, void 0, _, {
24
+ recipientInfo: p,
25
+ amount: x[0],
26
+ token: d[0]
25
27
  });
26
28
  };
27
29
  //#endregion
28
- export { l as hinkalProxyToPrivate };
30
+ export { u as hinkalProxyToPrivate };
@@ -0,0 +1,4 @@
1
+ import { SubAccount } from '../../types/proxy.types';
2
+ import { TypedData } from '../../types/circom-data.types';
3
+ export declare const hinkalSignSubAccount: (chainId: number, messageToSign: string | undefined, // it should be a hex number in string format
4
+ typedData: TypedData | undefined, subAccount: SubAccount) => Promise<string>;
@@ -1 +1 @@
1
- require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../error-handling/error-codes.constants.cjs`),r=require(`../../functions/web3/etherFunctions.cjs`),i=require(`../crypto-keys/keys.cjs`),a=require(`../../functions/utils/time.utils.cjs`),o=require(`../utxo/Utxo.cjs`),s=require(`../../types/external-action.types.cjs`);require(`../../types/index.cjs`);const c=require(`../../functions/utils/token-check.utils.cjs`),l=require(`../../functions/snarkjs/common.snarkjs.cjs`),u=require(`../../functions/pre-transaction/getFeeStructure.cjs`),d=require(`../../functions/snarkjs/constructSolanaZkProof.cjs`),f=require(`../../functions/web3/functionCalls/transactCallRelayer.cjs`);let p=require(`ethers`);var m=async(m,h,g,_,v)=>{let y=c.validateAndGetChainId([h]),b=h.erc20TokenAddress;if(g.getTokenAddress(y)!==b)throw Error(`Off-chain UTXO token mismatch`);let x=v?new i.UserKeys(v):new i.UserKeys(g.nullifyingKey,g.nullifyingKey);if(!g.nullifyingKey&&!v)throw Error(`Claimable UTXO nullifyingKey is missing`);let S=x.getShieldedPrivateKey();if(g.nullifyingKey&&g.nullifyingKey!==S)throw Error(`Claimable UTXO key mismatch`);let{originalDeployer:C}=e.networkRegistry[y].contractData;if(!C)throw Error(`missing data`);let w=o.Utxo.createFrom(g,{nullifyingKey:S}),T=_??await u.getFeeStructure(y,b,[b],s.ExternalActionId.Transact,void 0,void 0,{mintTo:b,nullifierCount:1});if(T.feeToken!==b)throw Error(`Claim fee token mismatch: fee must be paid from claimed UTXO token`);let E=T.variableRate>0n?T.variableRate:t.HINKAL_PRIVATE_SEND_VARIABLE_RATE;if(w.amount<=T.flatFee)throw Error(n.transactionErrorCodes.INSUFFICIENT_FUNDS_TO_TRANSACT);let D=w.amount-T.flatFee,O=D*E/10000n,k=D-O;if(k<=0n)throw Error(n.transactionErrorCodes.RECIPIENT_AMOUNT_INVALID);let A=T.flatFee+O,[j,M,N,,P]=m.getRecipientInfo().split(`,`);if(!M||!N||!j||!P)throw Error(`Invalid recipient info`);let F=a.getCurrentTimeInSeconds().toString(),I=new o.Utxo({amount:0n,erc20TokenAddress:w.erc20TokenAddress,mintAddress:w.mintAddress,nullifyingKey:x.getShieldedPrivateKey(),...w.isNewStyle?{spendingPublicKey:x.getSpendingKeyPair().pubSpendingBJJPoint,isNewStyle:!0}:{isNewStyle:!1}}),L=new o.Utxo({amount:0n,erc20TokenAddress:w.erc20TokenAddress,mintAddress:w.mintAddress,nullifyingKey:x.getShieldedPrivateKey(),timeStamp:F,spendingPublicKey:x.getSpendingKeyPair().pubSpendingBJJPoint,isNewStyle:!0}),R=new o.Utxo({amount:k,erc20TokenAddress:w.erc20TokenAddress,mintAddress:w.mintAddress,timeStamp:F,H0:[BigInt(M),BigInt(N)],stealthAddress:j,encryptionKey:P,isNewStyle:!0}),z=[w,I],B=[L,R],V=await m.getRandomRelay(y,!0);if(!V)throw Error(n.transactionErrorCodes.RELAYER_NOT_AVAILABLE);let H=i.UserKeys.findCorrectRandomization(r.randomBigInt(31),x.getShieldedPrivateKey()),U={tokenNumber:1,nullifierAmount:z.length,outputAmount:B.length},W=l.calcEncryptedOutputs([B])[0].map(e=>Array.from(p.ethers.getBytes(e))),{proofAArr:G,proofBArr:K,proofCArr:q,publicInputsArr:J,commitmentValidationData:Y}=await d.constructSolanaZkProof(m.generateProofRemotely,m.merkleTreeHinkalByChain[y],x,[b],[z],[B],H,A,0n,t.solanaNativeAddress,V,U,W,y),X={recipient:V,mint:b===`11111111111111111111111111111111`?void 0:b};return f.solanaTransactCallRelayer({chainId:y,relayAddress:V,functionName:`transfer`,args:{proofAArr:G,proofBArr:K,proofCArr:q,publicInputsArr:J,encryptedOutputs:W,relayerFee:A.toString(),dimensions:U},accounts:X,commitmentValidationData:Y})};exports.hinkalSolanaClaimUtxo=m;
1
+ const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../error-handling/error-codes.constants.cjs`),r=require(`../crypto-keys/keys.cjs`),i=require(`../utxo/Utxo.cjs`),a=require(`../../types/external-action.types.cjs`),o=require(`../../types/solana-transact.types.cjs`);require(`../../types/index.cjs`);const s=require(`../../functions/utils/token-check.utils.cjs`),c=require(`../../functions/pre-transaction/getFeeStructure.cjs`),l=require(`./hinkalSolanaTransact.cjs`);var u=async(u,d,f,p,m)=>{let h=s.validateAndGetChainId([d]),g=d.erc20TokenAddress;if(f.getTokenAddress(h)!==g)throw Error(`Off-chain UTXO token mismatch`);let _=new r.UserKeys(p),v=_.getShieldedPrivateKey();if(f.nullifyingKey&&BigInt(f.nullifyingKey)!==BigInt(v))throw Error(`Claimable UTXO key mismatch`);let{originalDeployer:y}=e.networkRegistry[h].contractData;if(!y)throw Error(`missing data`);let b=i.Utxo.createFrom(f,{nullifyingKey:v}),x=m??await c.getFeeStructure(h,g,[g],a.ExternalActionId.Transact,void 0,void 0,{mintTo:g,nullifierCount:1,rootInsertCount:2});if(x.feeToken!==g)throw Error(`Claim fee token mismatch: fee must be paid from claimed UTXO token`);let S=x.variableRate>0n?x.variableRate:t.HINKAL_PRIVATE_SEND_VARIABLE_RATE;if(b.amount<=x.flatFee)throw Error(n.transactionErrorCodes.INSUFFICIENT_FUNDS_TO_TRANSACT);let C=b.amount-x.flatFee,w=C*S/10000n,T=C-w;if(T<=0n)throw Error(n.transactionErrorCodes.RECIPIENT_AMOUNT_INVALID);let E=x.flatFee+w,D=u.getRecipientInfo(),[O,k,A,,,j]=D.split(`,`);if(!k||!A||!O||!j)throw Error(`Invalid recipient info`);let M=new i.Utxo({amount:0n,erc20TokenAddress:b.erc20TokenAddress,mintAddress:b.mintAddress,nullifyingKey:_.getShieldedPrivateKey(),spendingPublicKey:_.getSpendingKeyPair().pubSpendingBJJPoint}),N=await u.getRandomRelay(h,!0);if(!N)throw Error(n.transactionErrorCodes.RELAYER_NOT_AVAILABLE);let P={recipient:N,mint:g===`11111111111111111111111111111111`?void 0:g};return l.hinkalSolanaTransact(u,{chainId:h,mintAddresses:[g],amountChanges:[-(T+E)],relayAddress:N,recipient:t.solanaNativeAddress,signer:N,functionName:`transfer`,accounts:P,relayerFee:E,recipientAddress:D,recipientAmounts:[T],inputUtxos:[[b,M]],userKeys:_,submit:{mode:o.SolanaSubmitMode.Relayer}})};exports.hinkalSolanaClaimUtxo=u;
@@ -0,0 +1,5 @@
1
+ import { ERC20Token } from '../../types';
2
+ import { FeeStructure } from '../../types/hinkal.types';
3
+ import { Utxo } from '../utxo/Utxo';
4
+ import { IHinkal } from './IHinkal';
5
+ export declare const hinkalSolanaClaimUtxo: (hinkal: IHinkal, erc20Token: ERC20Token, utxo: Utxo, claimableSignature: string, feeStructureOverride?: FeeStructure) => Promise<string>;