@hinkal/common 0.3.12 → 0.3.14

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 (302) hide show
  1. package/README.md +67 -4
  2. package/common/src/API/API.cjs +1 -1
  3. package/common/src/API/API.d.ts +3 -2
  4. package/common/src/API/API.mjs +92 -91
  5. package/common/src/API/admin-calls.cjs +1 -1
  6. package/common/src/API/admin-calls.d.ts +2 -1
  7. package/common/src/API/admin-calls.mjs +1 -0
  8. package/common/src/API/evm-token-assets.cjs +1 -0
  9. package/common/src/API/evm-token-assets.mjs +3 -0
  10. package/common/src/API/get-token-price-chart-data.cjs +1 -1
  11. package/common/src/API/get-token-price-chart-data.mjs +2 -2
  12. package/common/src/API/getTokenPrice.cjs +1 -1
  13. package/common/src/API/getTokenPrice.mjs +2 -2
  14. package/common/src/API/index.cjs +1 -1
  15. package/common/src/API/index.d.ts +2 -0
  16. package/common/src/API/index.mjs +2 -0
  17. package/common/src/API/privacy-score-calls.cjs +1 -1
  18. package/common/src/API/privacy-score-calls.mjs +2 -2
  19. package/common/src/API/receiveVaultCalls.cjs +1 -0
  20. package/common/src/API/receiveVaultCalls.d.ts +12 -0
  21. package/common/src/API/receiveVaultCalls.mjs +36 -0
  22. package/common/src/constants/chains.constants.cjs +1 -1
  23. package/common/src/constants/chains.constants.d.ts +2 -0
  24. package/common/src/constants/chains.constants.mjs +106 -93
  25. package/common/src/constants/coingecko.constants.cjs +1 -1
  26. package/common/src/constants/coingecko.constants.d.ts +2 -0
  27. package/common/src/constants/coingecko.constants.mjs +1 -1
  28. package/common/src/constants/contracts.constants.cjs +1 -1
  29. package/common/src/constants/contracts.constants.mjs +5 -1
  30. package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
  31. package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.mjs +3 -1
  32. package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.cjs +1 -1
  33. package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.mjs +4 -2
  34. package/common/src/constants/deploy-data/deploy-data-base.json.cjs +1 -1
  35. package/common/src/constants/deploy-data/deploy-data-base.json.mjs +3 -1
  36. package/common/src/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +1 -1
  37. package/common/src/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +3 -1
  38. package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
  39. package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.mjs +3 -1
  40. package/common/src/constants/deploy-data/deploy-data-localhost.json.cjs +1 -1
  41. package/common/src/constants/deploy-data/deploy-data-localhost.json.mjs +2 -1
  42. package/common/src/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
  43. package/common/src/constants/deploy-data/deploy-data-optimism.json.mjs +2 -1
  44. package/common/src/constants/deploy-data/deploy-data-optimismTest.json.cjs +1 -1
  45. package/common/src/constants/deploy-data/deploy-data-optimismTest.json.mjs +2 -1
  46. package/common/src/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
  47. package/common/src/constants/deploy-data/deploy-data-polygon.json.mjs +3 -1
  48. package/common/src/constants/deploy-data/deploy-data-sepoliaTestnet.json.cjs +1 -1
  49. package/common/src/constants/deploy-data/deploy-data-sepoliaTestnet.json.mjs +2 -1
  50. package/common/src/constants/deploy-data/deploy-data-solanaDevnet.json.cjs +1 -0
  51. package/common/src/constants/deploy-data/deploy-data-solanaDevnet.json.mjs +6 -0
  52. package/common/src/constants/deploy-data/deploy-data-tempo.json.cjs +1 -1
  53. package/common/src/constants/deploy-data/deploy-data-tempo.json.mjs +3 -1
  54. package/common/src/constants/deploy-data/deploy-data-tronMainnet.json.cjs +1 -1
  55. package/common/src/constants/deploy-data/deploy-data-tronMainnet.json.mjs +2 -1
  56. package/common/src/constants/deploy-data/deploy-data-tronNile.json.cjs +1 -1
  57. package/common/src/constants/deploy-data/deploy-data-tronNile.json.mjs +2 -1
  58. package/common/src/constants/deploy-data/index.cjs +1 -1
  59. package/common/src/constants/deploy-data/index.d.ts +2 -1
  60. package/common/src/constants/deploy-data/index.mjs +7 -6
  61. package/common/src/constants/deploy-data/shared-deploy-data-evm.json.cjs +1 -1
  62. package/common/src/constants/deploy-data/shared-deploy-data-evm.json.mjs +2 -1
  63. package/common/src/constants/deploy-data/shared-deploy-data-solana.json.cjs +1 -1
  64. package/common/src/constants/deploy-data/shared-deploy-data-solana.json.mjs +1 -1
  65. package/common/src/constants/deploy-data/shared-deploy-data-tron.json.cjs +1 -1
  66. package/common/src/constants/deploy-data/shared-deploy-data-tron.json.mjs +3 -2
  67. package/common/src/constants/events.constants.d.ts +1 -0
  68. package/common/src/constants/index.cjs +1 -1
  69. package/common/src/constants/index.mjs +1 -1
  70. package/common/src/constants/protocol.constants.cjs +2 -2
  71. package/common/src/constants/protocol.constants.d.ts +4 -0
  72. package/common/src/constants/protocol.constants.mjs +2 -2
  73. package/common/src/constants/save-depths.cjs +1 -1
  74. package/common/src/constants/save-depths.d.ts +1 -0
  75. package/common/src/constants/save-depths.mjs +1 -0
  76. package/common/src/constants/server.constants.cjs +1 -1
  77. package/common/src/constants/server.constants.d.ts +13 -6
  78. package/common/src/constants/server.constants.mjs +13 -6
  79. package/common/src/constants/tokens.constants.cjs +1 -1
  80. package/common/src/constants/tokens.constants.mjs +1 -1
  81. package/common/src/data-structures/Hinkal/Hinkal.cjs +1 -1
  82. package/common/src/data-structures/Hinkal/Hinkal.d.ts +8 -4
  83. package/common/src/data-structures/Hinkal/Hinkal.mjs +85 -73
  84. package/common/src/data-structures/Hinkal/IHinkal.d.ts +8 -4
  85. package/common/src/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
  86. package/common/src/data-structures/Hinkal/handleAutoDepositBack.mjs +14 -14
  87. package/common/src/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
  88. package/common/src/data-structures/Hinkal/hinkalActionReceive.mjs +4 -4
  89. package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.cjs +1 -1
  90. package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.mjs +24 -24
  91. package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.cjs +1 -1
  92. package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.mjs +72 -71
  93. package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
  94. package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +64 -61
  95. package/common/src/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
  96. package/common/src/data-structures/Hinkal/hinkalPrivateWallet.d.ts +1 -1
  97. package/common/src/data-structures/Hinkal/hinkalPrivateWallet.mjs +29 -29
  98. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -1
  99. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.d.ts +1 -1
  100. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.mjs +22 -22
  101. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.cjs +1 -1
  102. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.mjs +8 -8
  103. package/common/src/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
  104. package/common/src/data-structures/Hinkal/hinkalProxySwap.mjs +6 -6
  105. package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
  106. package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.mjs +4 -4
  107. package/common/src/data-structures/Hinkal/hinkalReceiveVaultAccount.cjs +1 -0
  108. package/common/src/data-structures/Hinkal/hinkalReceiveVaultAccount.d.ts +3 -0
  109. package/common/src/data-structures/Hinkal/hinkalReceiveVaultAccount.mjs +12 -0
  110. package/common/src/data-structures/Hinkal/hinkalReceiveVaultCreate.cjs +1 -0
  111. package/common/src/data-structures/Hinkal/hinkalReceiveVaultCreate.d.ts +3 -0
  112. package/common/src/data-structures/Hinkal/hinkalReceiveVaultCreate.mjs +29 -0
  113. package/common/src/data-structures/Hinkal/hinkalReceiveVaultRecover.cjs +1 -0
  114. package/common/src/data-structures/Hinkal/hinkalReceiveVaultRecover.d.ts +5 -0
  115. package/common/src/data-structures/Hinkal/hinkalReceiveVaultRecover.mjs +66 -0
  116. package/common/src/data-structures/Hinkal/hinkalReceiveVaultSettle.cjs +1 -0
  117. package/common/src/data-structures/Hinkal/hinkalReceiveVaultSettle.d.ts +6 -0
  118. package/common/src/data-structures/Hinkal/hinkalReceiveVaultSettle.mjs +8 -0
  119. package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
  120. package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.d.ts +2 -2
  121. package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.mjs +54 -62
  122. package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
  123. package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +72 -70
  124. package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
  125. package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.mjs +9 -9
  126. package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
  127. package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +20 -20
  128. package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
  129. package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.d.ts +1 -1
  130. package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +49 -47
  131. package/common/src/data-structures/Hinkal/hinkalSolanaReceiveVault.cjs +1 -0
  132. package/common/src/data-structures/Hinkal/hinkalSolanaReceiveVault.d.ts +5 -0
  133. package/common/src/data-structures/Hinkal/hinkalSolanaReceiveVault.mjs +60 -0
  134. package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
  135. package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.mjs +1 -1
  136. package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
  137. package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +1 -1
  138. package/common/src/data-structures/Hinkal/hinkalTransact.cjs +1 -1
  139. package/common/src/data-structures/Hinkal/hinkalTransact.mjs +7 -6
  140. package/common/src/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
  141. package/common/src/data-structures/Hinkal/hinkalTransfer.mjs +4 -4
  142. package/common/src/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
  143. package/common/src/data-structures/Hinkal/hinkalWithdraw.mjs +35 -26
  144. package/common/src/data-structures/Hinkal/index.d.ts +5 -0
  145. package/common/src/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
  146. package/common/src/data-structures/Hinkal/resetMerkleTrees.mjs +13 -13
  147. package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.d.ts +0 -3
  148. package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.d.ts +0 -1
  149. package/common/src/data-structures/TokenDBs/TronPublicTokensDB.d.ts +0 -2
  150. package/common/src/data-structures/crypto-keys/index.cjs +1 -1
  151. package/common/src/data-structures/crypto-keys/index.mjs +1 -1
  152. package/common/src/error-handling/error-codes.constants.cjs +1 -1
  153. package/common/src/error-handling/error-codes.constants.d.ts +6 -0
  154. package/common/src/error-handling/error-codes.constants.mjs +7 -2
  155. package/common/src/error-handling/get-error.message.cjs +1 -1
  156. package/common/src/error-handling/get-error.message.mjs +59 -49
  157. package/common/src/functions/index.cjs +1 -1
  158. package/common/src/functions/index.mjs +8 -3
  159. package/common/src/functions/pre-transaction/addressTableLookup.d.ts +1 -0
  160. package/common/src/functions/pre-transaction/build-proofless-deposit-fee.cjs +1 -0
  161. package/common/src/functions/pre-transaction/build-proofless-deposit-fee.d.ts +4 -0
  162. package/common/src/functions/pre-transaction/build-proofless-deposit-fee.mjs +3 -0
  163. package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.cjs +1 -1
  164. package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.mjs +7 -7
  165. package/common/src/functions/pre-transaction/constructAdminData.cjs +1 -1
  166. package/common/src/functions/pre-transaction/constructAdminData.mjs +4 -3
  167. package/common/src/functions/pre-transaction/index.cjs +1 -1
  168. package/common/src/functions/pre-transaction/index.d.ts +1 -0
  169. package/common/src/functions/pre-transaction/index.mjs +1 -0
  170. package/common/src/functions/pre-transaction/sendV0Transaction.cjs +1 -1
  171. package/common/src/functions/pre-transaction/sendV0Transaction.d.ts +1 -0
  172. package/common/src/functions/pre-transaction/sendV0Transaction.mjs +22 -2
  173. package/common/src/functions/private-wallet/emporium.helpers.cjs +1 -1
  174. package/common/src/functions/private-wallet/emporium.helpers.mjs +15 -15
  175. package/common/src/functions/snarkjs/constructTxEnclaveVerify.cjs +1 -1
  176. package/common/src/functions/snarkjs/constructTxEnclaveVerify.mjs +2 -1
  177. package/common/src/functions/snarkjs/fetchOnChainRootHashes.cjs +1 -1
  178. package/common/src/functions/snarkjs/fetchOnChainRootHashes.mjs +6 -6
  179. package/common/src/functions/utils/abi.utils.cjs +1 -1
  180. package/common/src/functions/utils/abi.utils.mjs +4 -1
  181. package/common/src/functions/utils/addresses.cjs +1 -1
  182. package/common/src/functions/utils/addresses.d.ts +4 -0
  183. package/common/src/functions/utils/addresses.mjs +17 -17
  184. package/common/src/functions/utils/admin-dimensions.cjs +1 -0
  185. package/common/src/functions/utils/admin-dimensions.d.ts +4 -0
  186. package/common/src/functions/utils/admin-dimensions.mjs +206 -0
  187. package/common/src/functions/utils/create-provider.cjs +1 -1
  188. package/common/src/functions/utils/create-provider.mjs +5 -1
  189. package/common/src/functions/utils/encryptInputForEnclave.cjs +1 -1
  190. package/common/src/functions/utils/encryptInputForEnclave.d.ts +2 -1
  191. package/common/src/functions/utils/encryptInputForEnclave.mjs +1 -1
  192. package/common/src/functions/utils/erc20tokenFunctions.cjs +1 -1
  193. package/common/src/functions/utils/erc20tokenFunctions.mjs +11 -11
  194. package/common/src/functions/utils/fees.utils.cjs +1 -1
  195. package/common/src/functions/utils/fees.utils.d.ts +2 -0
  196. package/common/src/functions/utils/fees.utils.mjs +31 -33
  197. package/common/src/functions/utils/gas-token.utils.cjs +1 -0
  198. package/common/src/functions/utils/gas-token.utils.d.ts +3 -0
  199. package/common/src/functions/utils/gas-token.utils.mjs +7 -0
  200. package/common/src/functions/utils/getSignerFromContract.cjs +1 -1
  201. package/common/src/functions/utils/getSignerFromContract.d.ts +1 -1
  202. package/common/src/functions/utils/getSignerFromContract.mjs +2 -2
  203. package/common/src/functions/utils/getUtxosFromReceipt.utils.cjs +1 -1
  204. package/common/src/functions/utils/getUtxosFromReceipt.utils.mjs +1 -1
  205. package/common/src/functions/utils/getUtxosFromReceiptSolana.cjs +1 -1
  206. package/common/src/functions/utils/getUtxosFromReceiptSolana.d.ts +9 -4
  207. package/common/src/functions/utils/getUtxosFromReceiptSolana.mjs +1 -1
  208. package/common/src/functions/utils/index.cjs +1 -1
  209. package/common/src/functions/utils/index.d.ts +5 -0
  210. package/common/src/functions/utils/index.mjs +7 -2
  211. package/common/src/functions/utils/isSigner.cjs +1 -0
  212. package/common/src/functions/utils/isSigner.d.ts +2 -0
  213. package/common/src/functions/utils/isSigner.mjs +7 -0
  214. package/common/src/functions/utils/publicBalance.utils.cjs +1 -1
  215. package/common/src/functions/utils/publicBalance.utils.mjs +7 -7
  216. package/common/src/functions/utils/receive-vault-account.utils.cjs +1 -0
  217. package/common/src/functions/utils/receive-vault-account.utils.d.ts +9 -0
  218. package/common/src/functions/utils/receive-vault-account.utils.mjs +24 -0
  219. package/common/src/functions/utils/receive-vault-scan.utils.cjs +1 -0
  220. package/common/src/functions/utils/receive-vault-scan.utils.d.ts +2 -0
  221. package/common/src/functions/utils/receive-vault-scan.utils.mjs +55 -0
  222. package/common/src/functions/utils/receive-vault-solana.utils.cjs +1 -0
  223. package/common/src/functions/utils/receive-vault-solana.utils.d.ts +8 -0
  224. package/common/src/functions/utils/receive-vault-solana.utils.mjs +45 -0
  225. package/common/src/functions/utils/receive-vault.utils.cjs +2 -0
  226. package/common/src/functions/utils/receive-vault.utils.d.ts +31 -0
  227. package/common/src/functions/utils/receive-vault.utils.mjs +166 -0
  228. package/common/src/functions/utils/string.utils.cjs +1 -1
  229. package/common/src/functions/utils/string.utils.mjs +12 -4
  230. package/common/src/functions/utils/temporary-wallet-recovery.utils.cjs +1 -1
  231. package/common/src/functions/utils/temporary-wallet-recovery.utils.mjs +1 -1
  232. package/common/src/functions/utils/token-check.utils.d.ts +1 -0
  233. package/common/src/functions/utils/transfer-claimable.utils.cjs +1 -1
  234. package/common/src/functions/utils/transfer-claimable.utils.mjs +1 -1
  235. package/common/src/functions/utils/wallet-token-discovery.utils.cjs +1 -0
  236. package/common/src/functions/utils/wallet-token-discovery.utils.d.ts +9 -0
  237. package/common/src/functions/utils/wallet-token-discovery.utils.mjs +30 -0
  238. package/common/src/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
  239. package/common/src/functions/web3/functionCalls/transactCallDirect.mjs +11 -11
  240. package/common/src/functions/web3/getContractMetadata.cjs +1 -1
  241. package/common/src/functions/web3/getContractMetadata.mjs +6 -6
  242. package/common/src/functions/web3/index.cjs +1 -1
  243. package/common/src/functions/web3/index.mjs +1 -1
  244. package/common/src/types/admin.types.cjs +1 -1
  245. package/common/src/types/admin.types.d.ts +64 -9
  246. package/common/src/types/admin.types.mjs +10 -2
  247. package/common/src/types/connector.types.d.ts +1 -0
  248. package/common/src/types/ethereum-network.types.cjs +1 -1
  249. package/common/src/types/ethereum-network.types.d.ts +5 -1
  250. package/common/src/types/ethereum-network.types.mjs +1 -1
  251. package/common/src/types/external-action.types.cjs +1 -1
  252. package/common/src/types/external-action.types.d.ts +3 -1
  253. package/common/src/types/external-action.types.mjs +1 -1
  254. package/common/src/types/index.cjs +1 -1
  255. package/common/src/types/index.d.ts +1 -0
  256. package/common/src/types/index.mjs +1 -0
  257. package/common/src/types/receive-vault.types.cjs +1 -0
  258. package/common/src/types/receive-vault.types.d.ts +63 -0
  259. package/common/src/types/receive-vault.types.mjs +8 -0
  260. package/common/src/types/remote-tx-build.types.d.ts +5 -0
  261. package/common/src/webworker/{logError-cvFNxc-0.js → logError-C-ej_TX9.js} +1 -1
  262. package/common/src/webworker/package.json +10 -1
  263. package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.cjs +1 -1
  264. package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.mjs +1 -1
  265. package/common/src/webworker/snarkjsWorkerNode.cjs +1 -1
  266. package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
  267. package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +1 -1
  268. package/common/src/webworker/utxoWorkerNode.cjs +1 -1
  269. package/common/src/webworker/viteWorkerURL.constant.cjs +3 -3
  270. package/common/src/webworker/viteWorkerURL.constant.mjs +3 -3
  271. package/common/src/webworker/workerProxy-CE-rYA3W.js +1 -0
  272. package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
  273. package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +1 -1
  274. package/common/src/webworker/zkProofWorkerNode.cjs +1 -1
  275. package/index.cjs +1 -1
  276. package/index.mjs +3 -2
  277. package/internal/monitorConnectedAddress.cjs +1 -1
  278. package/internal/monitorConnectedAddress.d.ts +1 -1
  279. package/internal/monitorConnectedAddress.mjs +1 -3
  280. package/package.json +10 -1
  281. package/providers/prepareEthersHinkal.cjs +1 -1
  282. package/providers/prepareEthersHinkal.mjs +1 -1
  283. package/providers/prepareSolanaHinkal.cjs +1 -1
  284. package/providers/prepareSolanaHinkal.mjs +1 -1
  285. package/providers/prepareTronHinkal.cjs +1 -1
  286. package/providers/prepareTronHinkal.mjs +1 -1
  287. package/providers/prepareWagmiHinkal.cjs +1 -1
  288. package/providers/prepareWagmiHinkal.mjs +1 -1
  289. package/services/Hinkal.cjs +1 -1
  290. package/services/Hinkal.d.ts +7 -3
  291. package/services/Hinkal.mjs +74 -51
  292. package/types/IHinkal.d.ts +7 -2
  293. package/types/index.cjs +1 -1
  294. package/types/index.d.ts +1 -0
  295. package/types/index.mjs +2 -0
  296. package/types/receive-vault.types.cjs +1 -0
  297. package/types/receive-vault.types.d.ts +14 -0
  298. package/types/receive-vault.types.mjs +2 -0
  299. package/common/src/API/getOdosPriceForToken.cjs +0 -1
  300. package/common/src/API/getOdosPriceForToken.d.ts +0 -1
  301. package/common/src/API/getOdosPriceForToken.mjs +0 -14
  302. package/common/src/webworker/workerProxy-BHzCZ9HT.js +0 -1
@@ -1 +1 @@
1
- require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../types/ethereum-network.types.cjs`),n=require(`../../types/balances.types.cjs`),r=require(`../../types/events.types.cjs`);require(`../../types/index.cjs`);const i=require(`../../functions/utils/map.utils.cjs`),a=require(`../../functions/utils/mutexes.utils.cjs`),o=require(`../../functions/utils/create-provider.cjs`),s=require(`../../functions/utils/getContractAddress.cjs`),c=require(`../private-balances/BalanceChangedHandler.cjs`),l=require(`../event-service/evm/ClientBlockchainEventEmitter.cjs`),u=require(`../event-service/solana/ClientSolanaBlockchainEventEmitter.cjs`);require(`../event-service/index.cjs`);const d=require(`../snapshot/SnapshotFetcherService.cjs`),f=require(`../snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs`),p=require(`../snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs`),m=require(`../snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs`),h=require(`../snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs`);require(`../snapshot/index.cjs`);let g=require(`@solana/web3.js`),_=require(`async-mutex`);var v=new Map,y=e=>i.getOrCreateMapValue(v,e,()=>new _.Mutex),b=async(i,_)=>{let v=(_??i.getSupportedChains()).map(_=>y(_).runExclusive(async()=>{if(i.generateProofRemotely)return;i.commitmentsSnapshotServiceByChain[_]?.intervalClear(),i.nullifierSnapshotServiceByChain[_]?.intervalClear();let{maxPageSize:v,rpcUrl:y,contractData:b}=e.networkRegistry[_],x;if(e.isSolanaLike(_)){let e=b.hinkalAddress;if(!e)throw Error(`Solana program ID is not set`);x=new u.ClientSolanaBlockchainEventEmitter(_,o.createCustomSolanaConnection(y),new g.PublicKey(e),0,a.getChainBalanceFetchingMutex(_),v);let t=b.hinkalIdl;t&&x.setIdl(t);let n=new d.SnapshotFetcherService(_,e);i.commitmentsSnapshotServiceByChain[_]=new f.ClientSolanaCommitmentsSnapshotService(x,n),i.nullifierSnapshotServiceByChain[_]=new p.ClientSolanaNullifierSnapshotService(x,n)}else{let e=i.getContractWithFetcherByChainId(_,t.ContractType.HinkalContract),n=a.getChainBalanceFetchingMutex(_);x=new l.ClientBlockchainEventEmitter(r.EventCategory.MainContractEvents,_,e,0,n,v);let o=new d.SnapshotFetcherService(_,s.getContractAddress(e));i.commitmentsSnapshotServiceByChain[_]=new m.ClientCommitmentsSnapshotService(x,o),i.nullifierSnapshotServiceByChain[_]=new h.ClientNullifierSnapshotService(x,o)}let S=i.commitmentsSnapshotServiceByChain[_],C=i.nullifierSnapshotServiceByChain[_];if(!S||!C)throw Error(`Missing snapshot service for chain ${_}`);await Promise.all([S.init(),C.init()]),await x.init(),i.merkleTreeHinkalByChain[_]=S.merkleTree,i.nullifiersByChain[_]=C.nullifiers,i.encryptedOutputsByChain[_]=S.encryptedOutputs,x.onEventsProcessed=e=>{e>0&&c.balanceChangedHandler.dispatch({updateType:n.PrivateBalanceUpdateType.FreshWithoutLoader,updateTokensListBefore:!0,chainIdToUpdate:_})}}));await Promise.allSettled(v)};exports.resetMerkleTrees=b;
1
+ require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../types/ethereum-network.types.cjs`),n=require(`../../types/balances.types.cjs`),r=require(`../../types/events.types.cjs`);require(`../../types/index.cjs`);const i=require(`../../functions/utils/create-provider.cjs`),a=require(`../../functions/utils/map.utils.cjs`),o=require(`../../functions/utils/mutexes.utils.cjs`),s=require(`../../functions/utils/getContractAddress.cjs`),c=require(`../private-balances/BalanceChangedHandler.cjs`),l=require(`../event-service/evm/ClientBlockchainEventEmitter.cjs`),u=require(`../event-service/solana/ClientSolanaBlockchainEventEmitter.cjs`);require(`../event-service/index.cjs`);const d=require(`../snapshot/SnapshotFetcherService.cjs`),f=require(`../snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs`),p=require(`../snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs`),m=require(`../snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs`),h=require(`../snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs`);require(`../snapshot/index.cjs`);let g=require(`@solana/web3.js`),_=require(`async-mutex`);var v=new Map,y=e=>a.getOrCreateMapValue(v,e,()=>new _.Mutex),b=async(a,_)=>{let v=(_??a.getSupportedChains()).map(_=>y(_).runExclusive(async()=>{if(a.generateProofRemotely)return;a.commitmentsSnapshotServiceByChain[_]?.intervalClear(),a.nullifierSnapshotServiceByChain[_]?.intervalClear();let{maxPageSize:v,rpcUrl:y,contractData:b}=e.networkRegistry[_],x;if(e.isSolanaLike(_)){let e=b.hinkalAddress;if(!e)throw Error(`Solana program ID is not set`);x=new u.ClientSolanaBlockchainEventEmitter(_,i.createCustomSolanaConnection(y),new g.PublicKey(e),0,o.getChainBalanceFetchingMutex(_),v);let t=b.hinkalIdl;t&&x.setIdl(t);let n=new d.SnapshotFetcherService(_,e);a.commitmentsSnapshotServiceByChain[_]=new f.ClientSolanaCommitmentsSnapshotService(x,n),a.nullifierSnapshotServiceByChain[_]=new p.ClientSolanaNullifierSnapshotService(x,n)}else{let e=a.getContractWithFetcherByChainId(_,t.ContractType.HinkalContract),n=o.getChainBalanceFetchingMutex(_);x=new l.ClientBlockchainEventEmitter(r.EventCategory.MainContractEvents,_,e,0,n,v);let i=new d.SnapshotFetcherService(_,s.getContractAddress(e));a.commitmentsSnapshotServiceByChain[_]=new m.ClientCommitmentsSnapshotService(x,i),a.nullifierSnapshotServiceByChain[_]=new h.ClientNullifierSnapshotService(x,i)}let S=a.commitmentsSnapshotServiceByChain[_],C=a.nullifierSnapshotServiceByChain[_];if(!S||!C)throw Error(`Missing snapshot service for chain ${_}`);await Promise.all([S.init(),C.init()]),await x.init(),a.merkleTreeHinkalByChain[_]=S.merkleTree,a.nullifiersByChain[_]=C.nullifiers,a.encryptedOutputsByChain[_]=S.encryptedOutputs,x.onEventsProcessed=e=>{e>0&&c.balanceChangedHandler.dispatch({updateType:n.PrivateBalanceUpdateType.FreshWithoutLoader,updateTokensListBefore:!0,chainIdToUpdate:_})}}));await Promise.allSettled(v)};exports.resetMerkleTrees=b;
@@ -3,9 +3,9 @@ import { ContractType as n } from "../../types/ethereum-network.types.mjs";
3
3
  import { PrivateBalanceUpdateType as r } from "../../types/balances.types.mjs";
4
4
  import { EventCategory as i } from "../../types/events.types.mjs";
5
5
  import "../../types/index.mjs";
6
- import { getOrCreateMapValue as a } from "../../functions/utils/map.utils.mjs";
7
- import { getChainBalanceFetchingMutex as o } from "../../functions/utils/mutexes.utils.mjs";
8
- import { createCustomSolanaConnection as s } from "../../functions/utils/create-provider.mjs";
6
+ import { createCustomSolanaConnection as a } from "../../functions/utils/create-provider.mjs";
7
+ import { getOrCreateMapValue as o } from "../../functions/utils/map.utils.mjs";
8
+ import { getChainBalanceFetchingMutex as s } from "../../functions/utils/mutexes.utils.mjs";
9
9
  import { getContractAddress as c } from "../../functions/utils/getContractAddress.mjs";
10
10
  import { balanceChangedHandler as l } from "../private-balances/BalanceChangedHandler.mjs";
11
11
  import { ClientBlockchainEventEmitter as u } from "../event-service/evm/ClientBlockchainEventEmitter.mjs";
@@ -20,28 +20,28 @@ import "../snapshot/index.mjs";
20
20
  import { PublicKey as _ } from "@solana/web3.js";
21
21
  import { Mutex as v } from "async-mutex";
22
22
  //#region libs/shared/common/src/data-structures/Hinkal/resetMerkleTrees.ts
23
- var y = /* @__PURE__ */ new Map(), b = (e) => a(y, e, () => new v()), x = async (a, v) => {
24
- let y = (v ?? a.getSupportedChains()).map((v) => b(v).runExclusive(async () => {
25
- if (a.generateProofRemotely) return;
26
- a.commitmentsSnapshotServiceByChain[v]?.intervalClear(), a.nullifierSnapshotServiceByChain[v]?.intervalClear();
23
+ var y = /* @__PURE__ */ new Map(), b = (e) => o(y, e, () => new v()), x = async (o, v) => {
24
+ let y = (v ?? o.getSupportedChains()).map((v) => b(v).runExclusive(async () => {
25
+ if (o.generateProofRemotely) return;
26
+ o.commitmentsSnapshotServiceByChain[v]?.intervalClear(), o.nullifierSnapshotServiceByChain[v]?.intervalClear();
27
27
  let { maxPageSize: y, rpcUrl: b, contractData: x } = t[v], S;
28
28
  if (e(v)) {
29
29
  let e = x.hinkalAddress;
30
30
  if (!e) throw Error("Solana program ID is not set");
31
- S = new d(v, s(b), new _(e), 0, o(v), y);
31
+ S = new d(v, a(b), new _(e), 0, s(v), y);
32
32
  let t = x.hinkalIdl;
33
33
  t && S.setIdl(t);
34
34
  let n = new f(v, e);
35
- a.commitmentsSnapshotServiceByChain[v] = new p(S, n), a.nullifierSnapshotServiceByChain[v] = new m(S, n);
35
+ o.commitmentsSnapshotServiceByChain[v] = new p(S, n), o.nullifierSnapshotServiceByChain[v] = new m(S, n);
36
36
  } else {
37
- let e = a.getContractWithFetcherByChainId(v, n.HinkalContract), t = o(v);
37
+ let e = o.getContractWithFetcherByChainId(v, n.HinkalContract), t = s(v);
38
38
  S = new u(i.MainContractEvents, v, e, 0, t, y);
39
39
  let r = new f(v, c(e));
40
- a.commitmentsSnapshotServiceByChain[v] = new h(S, r), a.nullifierSnapshotServiceByChain[v] = new g(S, r);
40
+ o.commitmentsSnapshotServiceByChain[v] = new h(S, r), o.nullifierSnapshotServiceByChain[v] = new g(S, r);
41
41
  }
42
- let C = a.commitmentsSnapshotServiceByChain[v], w = a.nullifierSnapshotServiceByChain[v];
42
+ let C = o.commitmentsSnapshotServiceByChain[v], w = o.nullifierSnapshotServiceByChain[v];
43
43
  if (!C || !w) throw Error(`Missing snapshot service for chain ${v}`);
44
- await Promise.all([C.init(), w.init()]), await S.init(), a.merkleTreeHinkalByChain[v] = C.merkleTree, a.nullifiersByChain[v] = w.nullifiers, a.encryptedOutputsByChain[v] = C.encryptedOutputs, S.onEventsProcessed = (e) => {
44
+ await Promise.all([C.init(), w.init()]), await S.init(), o.merkleTreeHinkalByChain[v] = C.merkleTree, o.nullifiersByChain[v] = w.nullifiers, o.encryptedOutputsByChain[v] = C.encryptedOutputs, S.onEventsProcessed = (e) => {
45
45
  e > 0 && l.dispatch({
46
46
  updateType: r.FreshWithoutLoader,
47
47
  updateTokensListBefore: !0,
@@ -8,11 +8,8 @@ export declare class AlchemyPublicTokensDB implements IPublicTokensDB {
8
8
  getFetchedTokens(chainId: number, walletAddress: string): Promise<ERC20Token[]>;
9
9
  fetchAndUpdatePublicTokens(walletAddress: string, chainId: number): Promise<void>;
10
10
  private fetchAndUpdateSolanaTokens;
11
- getWalletTokenAddresses(chainId: number, walletAddress: string): Promise<string[]>;
12
11
  private fetchAndUpdateEVMTokens;
13
- private getSolanaTokenAddresses;
14
12
  private getNFTAddresses;
15
- private getEVMTokenAddresses;
16
13
  private getNFTTokens;
17
14
  }
18
15
  export declare const alchemyPublicTokensDB: AlchemyPublicTokensDB;
@@ -4,7 +4,6 @@ export declare class EventsPublicTokensDB implements IPublicTokensDB {
4
4
  private fetchedTokens;
5
5
  private updateMutexes;
6
6
  private readonly transferEventTopic;
7
- private readonly chunkSize;
8
7
  private getMutex;
9
8
  getPublicTokens(chainId: number, walletAddress: string): Promise<ERC20Token[]>;
10
9
  getFetchedTokens(chainId: number, walletAddress: string): Promise<ERC20Token[]>;
@@ -4,7 +4,5 @@ export declare class TronPublicTokensDB {
4
4
  getPublicTokens(walletAddress: string, chainId: number): Promise<ERC20Token[]>;
5
5
  getFetchedTokens(walletAddress: string, chainId: number): Promise<ERC20Token[]>;
6
6
  fetchAndUpdatePublicTokens(walletAddress: string, chainId: number): Promise<void>;
7
- private getHeldTokenAddresses;
8
- private getTokenAddressesFromTransferHistory;
9
7
  }
10
8
  export declare const tronPublicTokensDB: TronPublicTokensDB;
@@ -1 +1 @@
1
- require(`./keyUtils.cjs`),require(`./keys.cjs`),require(`./encryptDecryptUtxo.cjs`),require(`./decodeUTXO.cjs`);
1
+ require(`./keyUtils.cjs`),require(`./keys.cjs`),require(`./decodeUTXO.cjs`),require(`./encryptDecryptUtxo.cjs`);
@@ -1,4 +1,4 @@
1
1
  import "./keyUtils.mjs";
2
2
  import "./keys.mjs";
3
- import "./encryptDecryptUtxo.mjs";
4
3
  import "./decodeUTXO.mjs";
4
+ import "./encryptDecryptUtxo.mjs";
@@ -1,2 +1,2 @@
1
1
  var e={WC_NO_MATCHING_KEY:`creating the transaction failed
2
- version`,CONNECTION_PROBLEM:`Failed to connect wallet. Please try again.`,REQUEST_PENDING:`request of type 'wallet_requestpermissions' already pending for origin`},t={INSUFFICIENT_FUNDS:`Insufficient funds`,INSUFFICIENT_FUNDS_WITHDRAW:`Not enough funds to withdraw`,INSUFFICIENT_FUNDS_TRANSFER:`Not enough funds to transfer`,INSUFFICIENT_FUNDS_TO_TRANSACT:`Not enough funds to transact`,INSUFFICIENT_FUNDS_GAS:`Insufficient funds for gas * price`,INSUFFICIENT_TRON_BALANCE_FOR_FEE:`Insufficient TRX balance to cover transfer amount and transaction fee reserve`,INSUFFICIENT_SOL_BALANCE:`Insufficient SOL balance`},n={GAS_PRICE_EXCEEDS_AUTOSHIELD_LIMIT:`Skipped shielding due to gas fee exceeding your limit.`,AUTO_SHIELD_INSUFFICIENT_GAS:`Auto-Shield skipped due to insufficient gas.`},r={...e,...t,...n,SOME_ERROR:`Some error has occurred. Please try again in a few minutes. If the issue persists, please report it in Discord`,TOO_HIGH_AMOUNT:`ApproxParamsInvalid`,NOT_ENOUGH_TOKENS:`Transfer amount exceeds balance`,TRANSACTION_NOT_CONFIRMED:`The transaction was not confirmed by the network. Please, try again`,RPC_PROVIDER_LIMIT_ERROR:`Non-200 status code: '429'`,RELAYER_NOT_AVAILABLE:`All relayers are busy, please try in a few seconds`,NO_STUCK_BALANCE_TO_WITHDRAW:`No stuck balance found to withdraw`,TRANSACTION_TIMEOUT:`Your transaction got stale. Please, try in a few seconds`,CONNECT_ERROR:`Connection error`,CONNECT_ERROR2:`DOMException: Failed`,USER_REJECTED_TX:`Transaction rejected`,USER_REJECTED_SIGN:`User rejected signing`,USER_REJECTED_TRANSACTION:`user rejected transaction`,USER_REJECTED_SIGN2:`User rejected the request`,USER_REJECTED_CONNECTION:`The user rejected connection.`,USER_REJECTED_RPC:`User has rejected`,SIMULATION_FAILED:`Simulation failed:`,USER_DENIED_TRANSACTION_SIGNATURE:`User denied transaction signature.`,USER_DENIED_REQUEST_SIGNATURE:`User denied request signature.`,SIGNING_FAILED:`The signing failed. Please, try again`,SIGNATURE_UNSUPPORTED_CHAINS:`Details: Unsupported chains`,SIGNATURE_UNSUPPORTED_CHAINS2:`User disapproved requested chains`,SIGNATURE_REQUEST_EXPIRED:`Request expired. Please try again`,SIGNATURE_UNSUPPORTED_PERSONAL_SIGN:`The method personal_sign does not exist`,USER_DISAPPROVED_REQUESTED_METHODS:`User disapproved requested methods`,INVALID_AUTHORIZATION:`The requested account and/or method has not been authorized by the user`,INVALID_NULLIFIER:`Nullifier cannot be reused`,SANCTIONED_ADDRESS:`Address is sanctioned`,INVALID_AMOUNT:`Please, select correct amount`,RECIPIENT_FORMAT_INCORRECT:`Recipient Information format is incorrect`,INVALID_TOKEN:`Invalid token provided`,STATE_TO_UPDATE:`Error in template Verifier_219 line: 121`,INVALID_RECEIVER:`Receiver address doesn't match`,INVALID_RELAYER:`Relayer address doesn't match`,INVALID_RELAYER_FEE:`Relayer fee amount is not valid`,TIMESTAMP_STALE:`Timestamp provided does not align with current time`,INVALID_ZKP:`Proof must be valid`,NO_TRANSACTIONS_TO_CERTIFY:`This week, you do not have transactions to certify`,RECIPIENT_AMOUNT_INVALID:`Recipient amount is invalid`,UNSUPPORTED_NETWORK:`The selected network is not supported. Please switch to another network to continue.`,SIG_BY_OWNER:`Signature must be signed by the owner of the contract`,AMOUNT_EMPTY:`Please, specify amount`,RELAYER_ISSUE:`Relayer has some issues. Try again later`,RELAYER_GAS_ESTIMATE:`Relayer was not able to estimate the gas costs of tx. Please, try later`,RECEIVER_EMPTY:`Please, enter recipient address`,VALID_ETHEREUM_ADDRESS:`Please, input valid ethereum address`,METAMASK_NOT_INSTALLED:`Please, install Metamask Wallet`,VIABLE_TX:`The transaction is not viable. Please increase the swap amount to swap with Relayer`,TRANSACTION_REPLACED:`transaction was replaced`,TRANSACTION_REPLACED2:`replacement fee too low`,TRANSACTION_CANCELED:`Transaction was cancelled. Please try again`,NONCE_HIGH:`Nonce too high`,WALLET_CONNECT_MATCHING_KEYS:`No matching key. keychain`,UNKNOWN_PROVIDER:`Unknown provider`,SAFE_ERC:`SafeERC20: low-level call failed`,SAFE_ERC_APPROVE:`SafeERC20: approve from non-zero to non-zero allowance`,SWAP_RELAYER_MIN:`Relayer minimum fee is not satisfied`,LOW_LEVEL_CALL:`low-level delegate call failed`,INTEGRAL_CURVE_ZERO:`previous integral cannot be zero`,YOU_CANCELED_REQUEST:`You canceled the request`,YOU_CANCELED_TRANSACTION_REQUEST:`You cancelled the transaction request.`,SLIPPAGE_LIMIT:`Slippage Limit Exceeded`,SLIPPAGE_LIMIT_1:`Slippage screwed you`,QUOTE_EXPIRED:`Quote has expired`,REVERT_NO_STRING:`Transaction reverted without a reason string`,CONNECTION_FAILED:`Failed to connect`,FAILED_TO_SWITCH_NETWORKS:`Please switch networks in your wallet settings`,INVALID_FROM:`Invalid from token`,INVALID_TO:`Invalid to token`,Invalid_Password:`Invalid password`,INTERNAL_ERROR:`Internal error: please, try again`,INVALID_MERKLE_ROOT:`Invalid merkle tree root`,MERLE_TREE_SNARK:`Error in template ForceEqualIfEnabled`,ERROR_MESSAGE_CHAIN_ADDRESS_CHANGED:`Chain/address changed: balance updated canceled`,DECIMALS_LIMIT:`Number of decimals exceed maximum`,MERKLE_TREE_INCOMPLETE:`Merkle tree is incomplete`,FAIL_ESTIMATE_GAS:`Failed to estimate gas: check the transaction parameters`,LEDGER_IS_LOCKED:`Ledger device: Locked device`,LEDGER_BLIDN_SIGNING_NOT_ALLOWED:`Ledger device: UNKNOWN_ERROR (0x6a8c)`,LEDGER_IS_NOT_AVAILABLE:`Ledger device: UNKNOWN_ERROR`,LEDGER_ACCESS_DENIED:`Access denied to use Ledger device.`,GAS_ESTIMATION_ERROR:`Failed Gas Estimates Response`,GAS_ESTIMATE_INCORRECT_PARAMETERS:`Incorrect Parameters for Gas Estimate`,CONNECTIVITY_ERROR:`Request failed with status code 500`,TRANSACTION_FAILED:`Transaction Failed: Revert`,NO_SWAP_QUOTES:`No swap quotes available`,FEES_OVER_TRANSACTION_VALUE:`Fees are over transaction value. Please, increase the amount`,GAS_STATION_NOT_AVAILABLE:`Gas Station Not Available`,INBALANCE_IN_TOKEN:`Inbalance in token detected`,BALANCE_EQUATION_FAILED:`Balance Diff Should be equal to sum of onchain and offchain created commitments`,TOKEN_ADD_ERROR:`Error occoured while adding token. Please make sure you are adding a valid ERC-20 token`,CANNOT_ESTIMATE_GAS:`transaction may require manual gas limit`,NETWORK_ERROR:`Network Error`,MAX_FEE_GAS_ERROR:`max fee per gas less than block base fee`,CORS_ERROR:`has been blocked by CORS policy`,CANNOT_ESTIMATE_GAS2:`transaction may fail or may require manual gas limit`,NO_RESPONSE_PRIVATE:`No resonse from private relay`,TRY_AGAIN_AFTER_TRANSACTION:`Please, try again`,ALREADY_SUBSCRIBED:`User Already Subscribed`,PREFERRED_TOKEN_OR_ADDRESS_MISSING:`Please, specify both the preferred token and public wallet address`,SNAPSHOT_FILE_NOT_FOUND:`We are updating our servers. Please try again in some time`,SAME_ADDRESS_FORBIDDEN:`You cannot recieve staked tokens on the same ethereum address`,NOT_VALID_ETHEREUM_ADDRESS:`Please enter a valid Ethereum address`,MUST_STAKE_AT_LEAST_ONE_ETH:`Amount too low, Please stake at least 1 ETH`,OUT_OF_MEMORY:`Out of memory: Cannot allocate Wasm memory`,OUT_OF_MEMORY2:`could not allocate memory`,OUT_OF_MEMORY3:`out of memory`,UNKNOWN:`Unknown error`,TRANSACTION_WRONG_REQUEST:`The requested Transaction type is not supported`,INSUFFICIENT_LAMPORTS:`insufficient lamports`,TOKENS_DO_NOT_BELONG_SAME_CHAIN:`Tokens belong to different chains. All tokens must belong to the same chain`,OKX_MIN_RETURN_NOT_REACHED:`custom program error: 0x177a`,MIN_RETURNED_NOT_REACHED:`MinReturnNotReached`,SOLANA_RECEIVED_LOWER_THAN_EXPECTED:`ReceivedAmountLowerThanExpected`,AUTO_SHIELD_SKIPPED:`We skipped auto-shield because the asset was an NFT or the remaining token was used as gas.`,LOW_OUTPUT_AMOUNT:`Gas fees exceed received amount. Please try adjusting amount or lowering slippage.`,EXECUTION_REVERTED:`execution reverted`,SOLANA_TRANSACTION_LOG_SIZE_LIMIT:`Transaction logs are too large. Please try again later`,COMPUTATIONAL_BUDGET_EXCEEDED:`ComputationalBudgetExceeded`,RELAY_FEE_OVER_WITHDRAW_AMOUNT:`Relay Fee is over withdraw amount`,TRON_CONFIRMATION_DECLINED:`Confirmation declined by user`,BLACKLISTED_INPUT_COMMITMENT_ADDRESS:`One of the source addresses is restricted from private transactions`,ACCOUNT_RESOURCE_INSUFFICIENT_ERROR:`Account resource insufficient error`,TRON_ROOT_HASH_STALE:`Hinkal Root Hash Is Stale For Insertion`,TRON_TX_IN_FLIGHT:`Another Hinkal transaction is in progress`,SOLANA_CONFIRMATION_TIMEOUT:`Transaction was not confirmed in`,BRIDGE_ARRIVAL_TIMEOUT:`Bridge did not land on destination temp wallet`},i=`Not enough memory. Please, close some tabs/applications to free up memory and try again`,a=`Your transaction didn’t go through due to price slippage. Try increasing your slippage tolerance`,o={USER_REJECTED_TRANSACTION:`You cancelled the transaction`,SOME_ERROR:`Some error has occurred. Please try again in a few minutes. If the issue persists, please report it in Discord`,TOO_HIGH_AMOUNT:`The amount you provided is too high, please adjust the amount`,NOT_ENOUGH_TOKENS:`Transfer amount exceeds balance. Try lowering amount or add funds and retry.`,WC_NO_MATCHING_KEY:`Wallet Connect error. Please, try again`,RPC_PROVIDER_LIMIT_ERROR:`Rate Limit: please, use different rpc provider in your wallet`,INSUFFICIENT_FUNDS_GAS:`Your balance is too low to cover the transaction fees. Please add funds to proceed`,INSUFFICIENT_TRON_BALANCE_FOR_FEE:`Your TRX balance is too low to cover amount and transaction fee`,INVALID_NULLIFIER:`There seems to be an issue with syncing your balance. Please press the refresh icon next to your shielded balance`,STATE_TO_UPDATE:`A technical issue has occurred. Please create a ticket on Hinkal discord server`,INVALID_ZKP:`The Zero Knowledge Proof provided is invalid. Please check and try again`,NONCE_HIGH:`To resolve this issue, please reset your wallet in the Settings`,UNKNOWN_PROVIDER:`The provider is not recognized. Please check your settings`,TRANSACTION_REPLACED:`Your transaction was replaced by another. Please submit your transaction again`,TRANSACTION_REPLACED2:`This transaction was replaced. Please try submitting again`,TRANSACTION_TIMEOUT:`Your transaction got stale. Please, try in a few seconds`,SAFE_ERC:`Your approved amount is lower than what you’re trying to send. Increase the approval or adjust the amount, then try again.`,SIMULATION_FAILED:`Transaction simulation failed. Please try again.`,SAFE_ERC_APPROVE:`The selected ERC20 Token could not be approved. Please contact the Hinkal support team`,INTEGRAL_CURVE_ZERO:`There's an issue with the pool's staking function. Please contact the Hinkal support team for assistance`,LOW_LEVEL_CALL:`A technical issue occurred. Please contact the Hinkal team for assistance`,YOU_CANCELED_REQUEST:`You canceled the request`,YOU_CANCELED_TRANSACTION_REQUEST:`You cancelled the transaction request.`,USER_REJECTED_SIGN2:`You canceled the request`,USER_REJECTED_RPC:`You canceled the request`,USER_DENIED_TRANSACTION_SIGNATURE:`You canceled the request`,USER_DENIED_REQUEST_SIGNATURE:`You canceled the request`,CONNECT_ERROR2:`Oops, there are connectivity issues. Please check your internet connection and try again`,WALLET_CONNECT_MATCHING_KEYS:`An internal WalletConnect error occurred. Please try reconnecting`,SIGNATURE_UNSUPPORTED_CHAINS:`The transaction couldn’t be signed: this network is not supported`,SIGNATURE_UNSUPPORTED_CHAINS2:`The transaction couldn’t be signed: this network is not supported`,SIGNATURE_UNSUPPORTED_PERSONAL_SIGN:`Your active wallet doesn't support personal signatures. Please use a different wallet`,REVERT_NO_STRING:`Your transaction didn’t go through due to technical issues. Please submit a ticket on Hinkal discord server`,INVALID_MERKLE_ROOT:`There's an issue with the merkle tree root. Please submit a ticket on Hinkal discord server`,MERLE_TREE_SNARK:`An error occurred in the circuit processing. Please submit a ticket on Hinkal discord server`,MAX_FEE_GAS_ERROR:`Your transaction was rejected due to high network congestion`,MERKLE_TREE_INCOMPLETE:`A technical issue has occurred. Please submit a ticket on Hinkal discord server`,CORS_ERROR:`Unable to reach the remote client. Please submit a ticket on Hinkal discord server`,NETWORK_ERROR:`Connection error. Please, check back later`,CONNECTIVITY_ERROR:`A connectivity issue occurred. Please check your network connection`,LEDGER_IS_LOCKED:`Your wallet is locked. Please unlock your wallet`,LEDGER_BLIDN_SIGNING_NOT_ALLOWED:`Your ledger is not allowed to sign transactions. Please allow blind signing`,LEDGER_IS_NOT_AVAILABLE:`Access denied to use Ledger device.`,LEDGER_ACCESS_DENIED:`Access denied to use Ledger device.`,INBALANCE_IN_TOKEN:a,OKX_MIN_RETURN_NOT_REACHED:a,SOLANA_RECEIVED_LOWER_THAN_EXPECTED:a,MIN_RETURNED_NOT_REACHED:a,BALANCE_EQUATION_FAILED:`There's an issue with the balance calculation. Please adjust your transaction parameters`,SLIPPAGE_LIMIT_1:`Your transaction didn’t go through due to price slippage. Adjust slippage settings and retry`,CANNOT_ESTIMATE_GAS:`Unable to estimate the gas required. Please set the gas limit manually`,CANNOT_ESTIMATE_GAS2:`Your transaction didn’t go through. Please try setting gas limit manually`,GAS_STATION_NOT_AVAILABLE:`The Gas Station service is currently unavailable. Please submit a ticket on Hinkal discord server`,TIMESTAMP_STALE:`This transaction is outdated. Please initiate a new transaction`,ALREADY_SUBSCRIBED:`This email is already subscribed to the Hinkal newsletter`,OUT_OF_MEMORY:i,OUT_OF_MEMORY2:i,OUT_OF_MEMORY3:i,INVALID_RECOVERY_PHRASE:`Invalid recovery phrase`,PHRASES_DONT_MATCH:`Phrases do not match. You can go back and verify your recovery phrase.`,PASSWORDS_DONT_MATCH:`Passwords do not match`,PASSWORD_SAME_AS_OLD:`Password cannot be the same as the old one`,PASSWORD_TOO_SMALL:`Password must be at least 8 characters`,PASSWORD_NOT_CORRECT:`Incorrect current password`,CODE_ALREADY_USED:`This code has already been used`,ACCESS_CODE_REQUIRED:`Access code is required`,ACCESS_CODE_IS_ALREADY_IN_USE:`Access code is already in use`,ACCESS_CODE_IS_ALREADY_IN_USE1:`Access code already in use. Import or connect existing wallet`,ERROR_DURING_PHRASE_CONFIRMATION:`Error during Phrase confirmation`,INSUFFICIENT_LAMPORTS:`Your SOL balance is too low to complete this transaction`,EXECUTION_REVERTED:`Your transaction reverted.`,COMPUTATIONAL_BUDGET_EXCEEDED:`Your transaction exceeded the limited compute units. Please try again.`,RELAY_FEE_OVER_WITHDRAW_AMOUNT:`Your transaction didn’t go through because the relay fee exceeded the transaction amount`,TRON_CONFIRMATION_DECLINED:`You canceled the request`,INVALID_RELAYER_FEE:`The transaction fee changed while submitting. Please try again.`,REQUEST_PENDING:`A request is already pending in your wallet. Please confirm to connect.`,BLACKLISTED_INPUT_COMMITMENT_ADDRESS:`The funds you’re trying to use have been flagged as sanctioned.`,NO_SWAP_QUOTES:`No swap route available for this token pair on the selected network at the moment. Please try again later or adjust the swap parameters.`,TRON_ROOT_HASH_STALE:`Another transaction was processed just before yours. Please try again`,TRON_TX_IN_FLIGHT:`Another transaction is currently being processed. Please try again in a few seconds`,NO_LIFI_PRICE:`Li-Fi provider couldn't fetch the price. please, retry in a few seconds.`,SOLANA_CONFIRMATION_TIMEOUT:`Network didn't confirm your transfer in time. It may still be confirmed - please, check Solscan before retrying.`,BRIDGE_ARRIVAL_TIMEOUT:`The bridge is taking longer than usual. Your funds left the source chain and are not lost - once they arrive, claim them from Recovery Funds.`},s={UTXO_LIMITATIONS:`Your transaction exceeds the UTXO limit`,INSUFFICIENT_BALANCE_FOR_FEES:`Fees are high right now and would consume a large portion of your balance. Consider reducing the amount or retrying later.`,HIGH_FEE_WARNING:`Total fees exceed your available balance. Consider adding funds or retry later when fees decrease.`,INSUFFICIENT_FUNDS_FOR_RECOVERY_FEES:`Insufficient funds to cover recovery fees`};exports.DIRECTLY_SHOW_MESSAGE_ERROR_CODES=s,exports.UserFriendlyErrorCodes=o,exports.gasErrorCodes=n,exports.insufficientResourcesErrorCodes=t,exports.transactionErrorCodes=r;
2
+ version`,CONNECTION_PROBLEM:`Failed to connect wallet. Please try again.`,REQUEST_PENDING:`request of type 'wallet_requestpermissions' already pending for origin`},t={INSUFFICIENT_FUNDS:`Insufficient funds`,INSUFFICIENT_FUNDS_WITHDRAW:`Not enough funds to withdraw`,INSUFFICIENT_FUNDS_TRANSFER:`Not enough funds to transfer`,INSUFFICIENT_FUNDS_TO_TRANSACT:`Not enough funds to transact`,INSUFFICIENT_FUNDS_GAS:`Insufficient funds for gas * price`,INSUFFICIENT_TRON_BALANCE_FOR_FEE:`Insufficient TRX balance to cover transfer amount and transaction fee reserve`,INSUFFICIENT_SOL_BALANCE:`Insufficient SOL balance`},n={GAS_PRICE_EXCEEDS_AUTOSHIELD_LIMIT:`Skipped shielding due to gas fee exceeding your limit.`,AUTO_SHIELD_INSUFFICIENT_GAS:`Auto-Shield skipped due to insufficient gas.`},r={...e,...t,...n,SOME_ERROR:`Some error has occurred. Please try again in a few minutes. If the issue persists, please report it in Discord`,TOO_HIGH_AMOUNT:`ApproxParamsInvalid`,BRIDGE_AMOUNT_TOO_LOW:`Amount is too low for bridge`,NOT_ENOUGH_TOKENS:`Transfer amount exceeds balance`,TRANSACTION_NOT_CONFIRMED:`The transaction was not confirmed by the network. Please, try again`,RPC_PROVIDER_LIMIT_ERROR:`Non-200 status code: '429'`,RELAYER_NOT_AVAILABLE:`All relayers are busy, please try in a few seconds`,NO_STUCK_BALANCE_TO_WITHDRAW:`No stuck balance found to withdraw`,TRANSACTION_TIMEOUT:`Your transaction got stale. Please, try in a few seconds`,CONNECT_ERROR:`Connection error`,CONNECT_ERROR2:`DOMException: Failed`,USER_REJECTED_TX:`Transaction rejected`,USER_REJECTED_SIGN:`User rejected signing`,USER_REJECTED_TRANSACTION:`user rejected transaction`,USER_REJECTED_ACTION:`user rejected action`,USER_REJECTED_SIGN2:`User rejected the request`,USER_REJECTED_CONNECTION:`The user rejected connection.`,USER_REJECTED_RPC:`User has rejected`,SIMULATION_FAILED:`Simulation failed:`,USER_DENIED_TRANSACTION_SIGNATURE:`User denied transaction signature.`,USER_DENIED_REQUEST_SIGNATURE:`User denied request signature.`,SIGNING_FAILED:`The signing failed. Please, try again`,SIGNATURE_UNSUPPORTED_CHAINS:`Details: Unsupported chains`,SIGNATURE_UNSUPPORTED_CHAINS2:`User disapproved requested chains`,SIGNATURE_REQUEST_EXPIRED:`Request expired. Please try again`,SIGNATURE_UNSUPPORTED_PERSONAL_SIGN:`The method personal_sign does not exist`,USER_DISAPPROVED_REQUESTED_METHODS:`User disapproved requested methods`,INVALID_AUTHORIZATION:`The requested account and/or method has not been authorized by the user`,INVALID_NULLIFIER:`Nullifier cannot be reused`,SANCTIONED_ADDRESS:`Address is sanctioned`,INVALID_AMOUNT:`Please, select correct amount`,RECIPIENT_FORMAT_INCORRECT:`Recipient Information format is incorrect`,INVALID_TOKEN:`Invalid token provided`,STATE_TO_UPDATE:`Error in template Verifier_219 line: 121`,INVALID_RECEIVER:`Receiver address doesn't match`,INVALID_RELAYER:`Relayer address doesn't match`,INVALID_RELAYER_FEE:`Relayer fee amount is not valid`,TIMESTAMP_STALE:`Timestamp provided does not align with current time`,INVALID_ZKP:`Proof must be valid`,NO_TRANSACTIONS_TO_CERTIFY:`This week, you do not have transactions to certify`,RECIPIENT_AMOUNT_INVALID:`Recipient amount is invalid`,UNSUPPORTED_NETWORK:`The selected network is not supported. Please switch to another network to continue.`,SIG_BY_OWNER:`Signature must be signed by the owner of the contract`,AMOUNT_EMPTY:`Please, specify amount`,RELAYER_ISSUE:`Relayer has some issues. Try again later`,RELAYER_GAS_ESTIMATE:`Relayer was not able to estimate the gas costs of tx. Please, try later`,RECEIVER_EMPTY:`Please, enter recipient address`,VALID_ETHEREUM_ADDRESS:`Please, input valid ethereum address`,METAMASK_NOT_INSTALLED:`Please, install Metamask Wallet`,VIABLE_TX:`The transaction is not viable. Please increase the swap amount to swap with Relayer`,TRANSACTION_REPLACED:`transaction was replaced`,TRANSACTION_REPLACED2:`replacement fee too low`,TRANSACTION_CANCELED:`Transaction was cancelled. Please try again`,NONCE_HIGH:`Nonce too high`,WALLET_CONNECT_MATCHING_KEYS:`No matching key. keychain`,UNKNOWN_PROVIDER:`Unknown provider`,SAFE_ERC:`SafeERC20: low-level call failed`,SAFE_ERC_APPROVE:`SafeERC20: approve from non-zero to non-zero allowance`,SWAP_RELAYER_MIN:`Relayer minimum fee is not satisfied`,LOW_LEVEL_CALL:`low-level delegate call failed`,INTEGRAL_CURVE_ZERO:`previous integral cannot be zero`,YOU_CANCELED_REQUEST:`You canceled the request`,YOU_CANCELED_TRANSACTION_REQUEST:`You cancelled the transaction request.`,SLIPPAGE_LIMIT:`Slippage Limit Exceeded`,SLIPPAGE_LIMIT_1:`Slippage screwed you`,QUOTE_EXPIRED:`Quote has expired`,REVERT_NO_STRING:`Transaction reverted without a reason string`,CONNECTION_FAILED:`Failed to connect`,FAILED_TO_SWITCH_NETWORKS:`Please switch networks in your wallet settings`,INVALID_FROM:`Invalid from token`,INVALID_TO:`Invalid to token`,Invalid_Password:`Invalid password`,INTERNAL_ERROR:`Internal error: please, try again`,INVALID_MERKLE_ROOT:`Invalid merkle tree root`,MERLE_TREE_SNARK:`Error in template ForceEqualIfEnabled`,ERROR_MESSAGE_CHAIN_ADDRESS_CHANGED:`Chain/address changed: balance updated canceled`,DECIMALS_LIMIT:`Number of decimals exceed maximum`,MERKLE_TREE_INCOMPLETE:`Merkle tree is incomplete`,FAIL_ESTIMATE_GAS:`Failed to estimate gas: check the transaction parameters`,LEDGER_IS_LOCKED:`Ledger device: Locked device`,LEDGER_BLIDN_SIGNING_NOT_ALLOWED:`Ledger device: UNKNOWN_ERROR (0x6a8c)`,LEDGER_IS_NOT_AVAILABLE:`Ledger device: UNKNOWN_ERROR`,LEDGER_ACCESS_DENIED:`Access denied to use Ledger device.`,GAS_ESTIMATION_ERROR:`Failed Gas Estimates Response`,GAS_ESTIMATE_INCORRECT_PARAMETERS:`Incorrect Parameters for Gas Estimate`,CONNECTIVITY_ERROR:`Request failed with status code 500`,TRANSACTION_FAILED:`Transaction Failed: Revert`,NO_SWAP_QUOTES:`No swap quotes available`,FEES_OVER_TRANSACTION_VALUE:`Fees are over transaction value. Please, increase the amount`,GAS_STATION_NOT_AVAILABLE:`Gas Station Not Available`,INBALANCE_IN_TOKEN:`Inbalance in token detected`,BALANCE_EQUATION_FAILED:`Balance Diff Should be equal to sum of onchain and offchain created commitments`,TOKEN_ADD_ERROR:`Error occoured while adding token. Please make sure you are adding a valid ERC-20 token`,CANNOT_ESTIMATE_GAS:`transaction may require manual gas limit`,NETWORK_ERROR:`Network Error`,MAX_FEE_GAS_ERROR:`max fee per gas less than block base fee`,CORS_ERROR:`has been blocked by CORS policy`,CANNOT_ESTIMATE_GAS2:`transaction may fail or may require manual gas limit`,NO_RESPONSE_PRIVATE:`No resonse from private relay`,TRY_AGAIN_AFTER_TRANSACTION:`Please, try again`,ALREADY_SUBSCRIBED:`User Already Subscribed`,PREFERRED_TOKEN_OR_ADDRESS_MISSING:`Please, specify both the preferred token and public wallet address`,SNAPSHOT_FILE_NOT_FOUND:`We are updating our servers. Please try again in some time`,SAME_ADDRESS_FORBIDDEN:`You cannot recieve staked tokens on the same ethereum address`,NOT_VALID_ETHEREUM_ADDRESS:`Please enter a valid Ethereum address`,MUST_STAKE_AT_LEAST_ONE_ETH:`Amount too low, Please stake at least 1 ETH`,OUT_OF_MEMORY:`Out of memory: Cannot allocate Wasm memory`,OUT_OF_MEMORY2:`could not allocate memory`,OUT_OF_MEMORY3:`out of memory`,UNKNOWN:`Unknown error`,TRANSACTION_WRONG_REQUEST:`The requested Transaction type is not supported`,INSUFFICIENT_LAMPORTS:`insufficient lamports`,TOKENS_DO_NOT_BELONG_SAME_CHAIN:`Tokens belong to different chains. All tokens must belong to the same chain`,OKX_MIN_RETURN_NOT_REACHED:`custom program error: 0x177a`,MIN_RETURNED_NOT_REACHED:`MinReturnNotReached`,SOLANA_RECEIVED_LOWER_THAN_EXPECTED:`ReceivedAmountLowerThanExpected`,AUTO_SHIELD_SKIPPED:`We skipped auto-shield because the asset was an NFT or the remaining token was used as gas.`,LOW_OUTPUT_AMOUNT:`Gas fees exceed received amount. Please try adjusting amount or lowering slippage.`,EXECUTION_REVERTED:`execution reverted`,SOLANA_TRANSACTION_LOG_SIZE_LIMIT:`Transaction logs are too large. Please try again later`,COMPUTATIONAL_BUDGET_EXCEEDED:`ComputationalBudgetExceeded`,RELAY_FEE_OVER_WITHDRAW_AMOUNT:`Relay Fee is over withdraw amount`,TRON_CONFIRMATION_DECLINED:`Confirmation declined by user`,BLACKLISTED_INPUT_COMMITMENT_ADDRESS:`One of the source addresses is restricted from private transactions`,ACCOUNT_RESOURCE_INSUFFICIENT_ERROR:`Account resource insufficient error`,TRON_ROOT_HASH_STALE:`Hinkal Root Hash Is Stale For Insertion`,TRON_TX_IN_FLIGHT:`Another Hinkal transaction is in progress`,SOLANA_CONFIRMATION_TIMEOUT:`Transaction was not confirmed in`,BRIDGE_ARRIVAL_TIMEOUT:`Bridge did not land on destination temp wallet`},i=`Not enough memory. Please, close some tabs/applications to free up memory and try again`,a=`Your transaction didn’t go through due to price slippage. Try increasing your slippage tolerance`,o={USER_REJECTED_TRANSACTION:`You cancelled the transaction`,SOME_ERROR:`Some error has occurred. Please try again in a few minutes. If the issue persists, please report it in Discord`,TOO_HIGH_AMOUNT:`The amount you provided is too high, please adjust the amount`,BRIDGE_AMOUNT_TOO_LOW:`The amount is too low for this swap. Please increase the amount and try again`,NOT_ENOUGH_TOKENS:`Transfer amount exceeds balance. Try lowering amount or add funds and retry.`,WC_NO_MATCHING_KEY:`Wallet Connect error. Please, try again`,RPC_PROVIDER_LIMIT_ERROR:`Rate Limit: please, use different rpc provider in your wallet`,INSUFFICIENT_FUNDS_GAS:`Your balance is too low to cover the transaction fees. Please add funds to proceed`,INSUFFICIENT_TRON_BALANCE_FOR_FEE:`Your TRX balance is too low to cover amount and transaction fee`,INVALID_NULLIFIER:`There seems to be an issue with syncing your balance. Please press the refresh icon next to your shielded balance`,STATE_TO_UPDATE:`A technical issue has occurred. Please create a ticket on Hinkal discord server`,INVALID_ZKP:`The Zero Knowledge Proof provided is invalid. Please check and try again`,NONCE_HIGH:`To resolve this issue, please reset your wallet in the Settings`,UNKNOWN_PROVIDER:`The provider is not recognized. Please check your settings`,TRANSACTION_REPLACED:`Your transaction was replaced by another. Please submit your transaction again`,TRANSACTION_REPLACED2:`This transaction was replaced. Please try submitting again`,TRANSACTION_TIMEOUT:`Your transaction got stale. Please, try in a few seconds`,SAFE_ERC:`Your approved amount is lower than what you’re trying to send. Increase the approval or adjust the amount, then try again.`,SIMULATION_FAILED:`Transaction simulation failed. Please try again.`,SAFE_ERC_APPROVE:`The selected ERC20 Token could not be approved. Please contact the Hinkal support team`,INTEGRAL_CURVE_ZERO:`There's an issue with the pool's staking function. Please contact the Hinkal support team for assistance`,LOW_LEVEL_CALL:`A technical issue occurred. Please contact the Hinkal team for assistance`,YOU_CANCELED_REQUEST:`You canceled the request`,YOU_CANCELED_TRANSACTION_REQUEST:`You cancelled the transaction request.`,USER_REJECTED_ACTION:`You cancelled the transaction`,USER_REJECTED_SIGN2:`You canceled the request`,USER_REJECTED_RPC:`You canceled the request`,USER_DENIED_TRANSACTION_SIGNATURE:`You canceled the request`,USER_DENIED_REQUEST_SIGNATURE:`You canceled the request`,CONNECT_ERROR2:`Oops, there are connectivity issues. Please check your internet connection and try again`,WALLET_CONNECT_MATCHING_KEYS:`An internal WalletConnect error occurred. Please try reconnecting`,SIGNATURE_UNSUPPORTED_CHAINS:`The transaction couldn’t be signed: this network is not supported`,SIGNATURE_UNSUPPORTED_CHAINS2:`The transaction couldn’t be signed: this network is not supported`,SIGNATURE_UNSUPPORTED_PERSONAL_SIGN:`Your active wallet doesn't support personal signatures. Please use a different wallet`,REVERT_NO_STRING:`Your transaction didn’t go through due to technical issues. Please submit a ticket on Hinkal discord server`,INVALID_MERKLE_ROOT:`There's an issue with the merkle tree root. Please submit a ticket on Hinkal discord server`,MERLE_TREE_SNARK:`An error occurred in the circuit processing. Please submit a ticket on Hinkal discord server`,MAX_FEE_GAS_ERROR:`Your transaction was rejected due to high network congestion`,MERKLE_TREE_INCOMPLETE:`A technical issue has occurred. Please submit a ticket on Hinkal discord server`,CORS_ERROR:`Unable to reach the remote client. Please submit a ticket on Hinkal discord server`,NETWORK_ERROR:`Connection error. Please, check back later`,CONNECTIVITY_ERROR:`A connectivity issue occurred. Please check your network connection`,LEDGER_IS_LOCKED:`Your wallet is locked. Please unlock your wallet`,LEDGER_BLIDN_SIGNING_NOT_ALLOWED:`Your ledger is not allowed to sign transactions. Please allow blind signing`,LEDGER_IS_NOT_AVAILABLE:`Access denied to use Ledger device.`,LEDGER_ACCESS_DENIED:`Access denied to use Ledger device.`,INBALANCE_IN_TOKEN:a,OKX_MIN_RETURN_NOT_REACHED:a,SOLANA_RECEIVED_LOWER_THAN_EXPECTED:a,MIN_RETURNED_NOT_REACHED:a,BALANCE_EQUATION_FAILED:`There's an issue with the balance calculation. Please adjust your transaction parameters`,SLIPPAGE_LIMIT_1:`Your transaction didn’t go through due to price slippage. Adjust slippage settings and retry`,CANNOT_ESTIMATE_GAS:`Unable to estimate the gas required. Please set the gas limit manually`,CANNOT_ESTIMATE_GAS2:`Your transaction didn’t go through. Please try setting gas limit manually`,GAS_STATION_NOT_AVAILABLE:`The Gas Station service is currently unavailable. Please submit a ticket on Hinkal discord server`,TIMESTAMP_STALE:`This transaction is outdated. Please initiate a new transaction`,ALREADY_SUBSCRIBED:`This email is already subscribed to the Hinkal newsletter`,OUT_OF_MEMORY:i,OUT_OF_MEMORY2:i,OUT_OF_MEMORY3:i,INVALID_RECOVERY_PHRASE:`Invalid recovery phrase`,PHRASES_DONT_MATCH:`Phrases do not match. You can go back and verify your recovery phrase.`,PASSWORDS_DONT_MATCH:`Passwords do not match`,PASSWORD_SAME_AS_OLD:`Password cannot be the same as the old one`,PASSWORD_TOO_SMALL:`Password must be at least 8 characters`,PASSWORD_NOT_CORRECT:`Incorrect current password`,CODE_ALREADY_USED:`This code has already been used`,ACCESS_CODE_REQUIRED:`Access code is required`,ACCESS_CODE_IS_ALREADY_IN_USE:`Access code is already in use`,ACCESS_CODE_IS_ALREADY_IN_USE1:`Access code already in use. Import or connect existing wallet`,ERROR_DURING_PHRASE_CONFIRMATION:`Error during Phrase confirmation`,INSUFFICIENT_LAMPORTS:`Your SOL balance is too low to complete this transaction`,EXECUTION_REVERTED:`Your transaction reverted.`,COMPUTATIONAL_BUDGET_EXCEEDED:`Your transaction exceeded the limited compute units. Please try again.`,RELAY_FEE_OVER_WITHDRAW_AMOUNT:`Your transaction didn’t go through because the relay fee exceeded the transaction amount`,TRON_CONFIRMATION_DECLINED:`You canceled the request`,INVALID_RELAYER_FEE:`The transaction fee changed while submitting. Please try again.`,REQUEST_PENDING:`A request is already pending in your wallet. Please confirm to connect.`,BLACKLISTED_INPUT_COMMITMENT_ADDRESS:`The funds you’re trying to use have been flagged as sanctioned.`,NO_SWAP_QUOTES:`No swap route available for this token pair on the selected network at the moment. Please try again later or adjust the swap parameters.`,TRON_ROOT_HASH_STALE:`Another transaction was processed just before yours. Please try again`,TRON_TX_IN_FLIGHT:`Another transaction is currently being processed. Please try again in a few seconds`,TRON_ACCOUNT_NOT_ACTIVATED:`Ensure to first activate the TRON account you're connected with.`,NO_LIFI_PRICE:`Li-Fi provider couldn't fetch the price. please, retry in a few seconds.`,SOLANA_CONFIRMATION_TIMEOUT:`Network didn't confirm your transfer in time. It may still be confirmed - please, check Solscan before retrying.`,BRIDGE_ARRIVAL_TIMEOUT:`The bridge is taking longer than usual. Your funds left the source chain and are not lost - once they arrive, claim them from Recovery Funds.`},s=/account\s*\[[^\]]*\]\s*does not exist/i,c={UTXO_LIMITATIONS:`Your transaction exceeds the UTXO limit`,INSUFFICIENT_BALANCE_FOR_FEES:`Fees are high right now and would consume a large portion of your balance. Consider reducing the amount or retrying later.`,HIGH_FEE_WARNING:`Total fees exceed your available balance. Consider adding funds or retry later when fees decrease.`,INSUFFICIENT_FUNDS_FOR_RECOVERY_FEES:`Insufficient funds to cover recovery fees`};exports.DIRECTLY_SHOW_MESSAGE_ERROR_CODES=c,exports.TRON_ACCOUNT_NOT_ACTIVATED_PATTERN=s,exports.UserFriendlyErrorCodes=o,exports.gasErrorCodes=n,exports.insufficientResourcesErrorCodes=t,exports.transactionErrorCodes=r;
@@ -18,6 +18,7 @@ export declare const gasErrorCodes: {
18
18
  export declare const transactionErrorCodes: {
19
19
  SOME_ERROR: string;
20
20
  TOO_HIGH_AMOUNT: string;
21
+ BRIDGE_AMOUNT_TOO_LOW: string;
21
22
  NOT_ENOUGH_TOKENS: string;
22
23
  TRANSACTION_NOT_CONFIRMED: string;
23
24
  RPC_PROVIDER_LIMIT_ERROR: string;
@@ -29,6 +30,7 @@ export declare const transactionErrorCodes: {
29
30
  USER_REJECTED_TX: string;
30
31
  USER_REJECTED_SIGN: string;
31
32
  USER_REJECTED_TRANSACTION: string;
33
+ USER_REJECTED_ACTION: string;
32
34
  USER_REJECTED_SIGN2: string;
33
35
  USER_REJECTED_CONNECTION: string;
34
36
  USER_REJECTED_RPC: string;
@@ -160,6 +162,7 @@ export declare const UserFriendlyErrorCodes: {
160
162
  USER_REJECTED_TRANSACTION: string;
161
163
  SOME_ERROR: string;
162
164
  TOO_HIGH_AMOUNT: string;
165
+ BRIDGE_AMOUNT_TOO_LOW: string;
163
166
  NOT_ENOUGH_TOKENS: string;
164
167
  WC_NO_MATCHING_KEY: string;
165
168
  RPC_PROVIDER_LIMIT_ERROR: string;
@@ -180,6 +183,7 @@ export declare const UserFriendlyErrorCodes: {
180
183
  LOW_LEVEL_CALL: string;
181
184
  YOU_CANCELED_REQUEST: string;
182
185
  YOU_CANCELED_TRANSACTION_REQUEST: string;
186
+ USER_REJECTED_ACTION: string;
183
187
  USER_REJECTED_SIGN2: string;
184
188
  USER_REJECTED_RPC: string;
185
189
  USER_DENIED_TRANSACTION_SIGNATURE: string;
@@ -237,10 +241,12 @@ export declare const UserFriendlyErrorCodes: {
237
241
  NO_SWAP_QUOTES: string;
238
242
  TRON_ROOT_HASH_STALE: string;
239
243
  TRON_TX_IN_FLIGHT: string;
244
+ TRON_ACCOUNT_NOT_ACTIVATED: string;
240
245
  NO_LIFI_PRICE: string;
241
246
  SOLANA_CONFIRMATION_TIMEOUT: string;
242
247
  BRIDGE_ARRIVAL_TIMEOUT: string;
243
248
  };
249
+ export declare const TRON_ACCOUNT_NOT_ACTIVATED_PATTERN: RegExp;
244
250
  export declare const DIRECTLY_SHOW_MESSAGE_ERROR_CODES: {
245
251
  UTXO_LIMITATIONS: string;
246
252
  INSUFFICIENT_BALANCE_FOR_FEES: string;
@@ -20,6 +20,7 @@ var e = {
20
20
  ...n,
21
21
  SOME_ERROR: "Some error has occurred. Please try again in a few minutes. If the issue persists, please report it in Discord",
22
22
  TOO_HIGH_AMOUNT: "ApproxParamsInvalid",
23
+ BRIDGE_AMOUNT_TOO_LOW: "Amount is too low for bridge",
23
24
  NOT_ENOUGH_TOKENS: "Transfer amount exceeds balance",
24
25
  TRANSACTION_NOT_CONFIRMED: "The transaction was not confirmed by the network. Please, try again",
25
26
  RPC_PROVIDER_LIMIT_ERROR: "Non-200 status code: '429'",
@@ -31,6 +32,7 @@ var e = {
31
32
  USER_REJECTED_TX: "Transaction rejected",
32
33
  USER_REJECTED_SIGN: "User rejected signing",
33
34
  USER_REJECTED_TRANSACTION: "user rejected transaction",
35
+ USER_REJECTED_ACTION: "user rejected action",
34
36
  USER_REJECTED_SIGN2: "User rejected the request",
35
37
  USER_REJECTED_CONNECTION: "The user rejected connection.",
36
38
  USER_REJECTED_RPC: "User has rejected",
@@ -149,6 +151,7 @@ var e = {
149
151
  USER_REJECTED_TRANSACTION: "You cancelled the transaction",
150
152
  SOME_ERROR: "Some error has occurred. Please try again in a few minutes. If the issue persists, please report it in Discord",
151
153
  TOO_HIGH_AMOUNT: "The amount you provided is too high, please adjust the amount",
154
+ BRIDGE_AMOUNT_TOO_LOW: "The amount is too low for this swap. Please increase the amount and try again",
152
155
  NOT_ENOUGH_TOKENS: "Transfer amount exceeds balance. Try lowering amount or add funds and retry.",
153
156
  WC_NO_MATCHING_KEY: "Wallet Connect error. Please, try again",
154
157
  RPC_PROVIDER_LIMIT_ERROR: "Rate Limit: please, use different rpc provider in your wallet",
@@ -169,6 +172,7 @@ var e = {
169
172
  LOW_LEVEL_CALL: "A technical issue occurred. Please contact the Hinkal team for assistance",
170
173
  YOU_CANCELED_REQUEST: "You canceled the request",
171
174
  YOU_CANCELED_TRANSACTION_REQUEST: "You cancelled the transaction request.",
175
+ USER_REJECTED_ACTION: "You cancelled the transaction",
172
176
  USER_REJECTED_SIGN2: "You canceled the request",
173
177
  USER_REJECTED_RPC: "You canceled the request",
174
178
  USER_DENIED_TRANSACTION_SIGNATURE: "You canceled the request",
@@ -226,14 +230,15 @@ var e = {
226
230
  NO_SWAP_QUOTES: "No swap route available for this token pair on the selected network at the moment. Please try again later or adjust the swap parameters.",
227
231
  TRON_ROOT_HASH_STALE: "Another transaction was processed just before yours. Please try again",
228
232
  TRON_TX_IN_FLIGHT: "Another transaction is currently being processed. Please try again in a few seconds",
233
+ TRON_ACCOUNT_NOT_ACTIVATED: "Ensure to first activate the TRON account you're connected with.",
229
234
  NO_LIFI_PRICE: "Li-Fi provider couldn't fetch the price. please, retry in a few seconds.",
230
235
  SOLANA_CONFIRMATION_TIMEOUT: "Network didn't confirm your transfer in time. It may still be confirmed - please, check Solscan before retrying.",
231
236
  BRIDGE_ARRIVAL_TIMEOUT: "The bridge is taking longer than usual. Your funds left the source chain and are not lost - once they arrive, claim them from Recovery Funds."
232
- }, s = {
237
+ }, s = /account\s*\[[^\]]*\]\s*does not exist/i, c = {
233
238
  UTXO_LIMITATIONS: "Your transaction exceeds the UTXO limit",
234
239
  INSUFFICIENT_BALANCE_FOR_FEES: "Fees are high right now and would consume a large portion of your balance. Consider reducing the amount or retrying later.",
235
240
  HIGH_FEE_WARNING: "Total fees exceed your available balance. Consider adding funds or retry later when fees decrease.",
236
241
  INSUFFICIENT_FUNDS_FOR_RECOVERY_FEES: "Insufficient funds to cover recovery fees"
237
242
  };
238
243
  //#endregion
239
- export { s as DIRECTLY_SHOW_MESSAGE_ERROR_CODES, o as UserFriendlyErrorCodes, n as gasErrorCodes, t as insufficientResourcesErrorCodes, r as transactionErrorCodes };
244
+ export { c as DIRECTLY_SHOW_MESSAGE_ERROR_CODES, s as TRON_ACCOUNT_NOT_ACTIVATED_PATTERN, o as UserFriendlyErrorCodes, n as gasErrorCodes, t as insufficientResourcesErrorCodes, r as transactionErrorCodes };
@@ -1 +1 @@
1
- const e=require(`./error-codes.constants.cjs`),t=require(`./customErrors/ErrorWithAmount.cjs`),n=require(`./customErrors/FeeOverTransactionValueError.cjs`),r=require(`./types.cjs`),i=require(`./customErrors/customErrors.helpers.cjs`);require(`./customErrors/index.cjs`);const a=require(`../types/transaction.types.cjs`);require(`../types/index.cjs`);const o=require(`./isInsufficientFundsError.cjs`);var s=(e,t)=>{let n=t.reduce((e,t)=>{if(!(typeof e!=`object`||!e||!(t in e)))return e[t]},e);return typeof n==`string`&&n?n:void 0},c=e=>{if(typeof e==`object`&&e){let t=s(e,[`response`,`data`,`message`])??s(e,[`response`,`data`,`detail`])??s(e,[`data`,`message`])??s(e,[`data`,`detail`]);if(t)return t;if(`message`in e&&typeof e.message==`string`&&e.message)return e.message;if(`error`in e&&typeof e.error==`string`&&e.error)return e.error}if(e instanceof Error)return e.message;if(typeof e==`string`)return e},l=t=>{switch(t){case r.ErrorCategory.DEPOSIT:return`Deposit failed`;case r.ErrorCategory.SWAP:return`Swap failed`;case r.ErrorCategory.BRIDGE:return`Bridge failed`;case r.ErrorCategory.WITHDRAW:return`Send failed`;case r.ErrorCategory.Fund:return`Unshield failed`;case r.ErrorCategory.Receive:return`Shield failed`;case r.ErrorCategory.DappTransaction:return`DApp transaction failed`;case r.ErrorCategory.Approve:return`Approval failed`;default:return e.transactionErrorCodes.UNKNOWN}},u=(r,a)=>{if(r instanceof n.FeeOverTransactionValueError)return i.getGenericFeeOverTransactionValueErrorMessage(r,a);if(r instanceof t.ErrorWithAmount)return r.message;let s=c(r);if(s&&o.isInsufficientFundsError(s))return e.insufficientResourcesErrorCodes.INSUFFICIENT_FUNDS;if(s){let t=s.toLowerCase(),n=Object.keys(e.transactionErrorCodes).find(n=>t===e.transactionErrorCodes[n].toLowerCase());if(n&&n in e.UserFriendlyErrorCodes)return e.UserFriendlyErrorCodes[n];let r=Object.entries(e.transactionErrorCodes).find(([e,n])=>t.includes(n.toLowerCase()));if(r)return e.UserFriendlyErrorCodes[r[0]]??r[1];if(Object.values(e.DIRECTLY_SHOW_MESSAGE_ERROR_CODES).find(e=>t.includes(e.toLowerCase())))return s}return a?l(a):e.transactionErrorCodes.UNKNOWN},d=(e,t)=>{let n;switch(t){case a.TransactionRequestType.Send:case a.TransactionRequestType.ProxySend:n=r.ErrorCategory.WITHDRAW;break;case a.TransactionRequestType.SwapTokens:case a.TransactionRequestType.ProxySwapTokens:n=r.ErrorCategory.SWAP;break;case a.TransactionRequestType.ReceiveFromShieldedAccount:n=r.ErrorCategory.Receive;break;case a.TransactionRequestType.Fund:n=r.ErrorCategory.Fund;break;case a.TransactionRequestType.PrivateTransactionFromProxy:n=r.ErrorCategory.DappTransaction;break;default:n=void 0;break}return u(e,n)};exports.extractMessage=c,exports.getErrorMessage=u,exports.getErrorMessageFromTransactionRequest=d;
1
+ const e=require(`./error-codes.constants.cjs`),t=require(`./customErrors/ErrorWithAmount.cjs`),n=require(`./customErrors/FeeOverTransactionValueError.cjs`),r=require(`./types.cjs`),i=require(`./customErrors/customErrors.helpers.cjs`);require(`./customErrors/index.cjs`);const a=require(`../types/transaction.types.cjs`);require(`../types/index.cjs`);const o=require(`./isInsufficientFundsError.cjs`);var s=(e,t)=>{let n=t.reduce((e,t)=>{if(!(typeof e!=`object`||!e||!(t in e)))return e[t]},e);return typeof n==`string`&&n?n:void 0},c=e=>{if(typeof e==`object`&&e){let t=s(e,[`response`,`data`,`message`])??s(e,[`response`,`data`,`detail`])??s(e,[`response`,`data`,`error`,`message`])??s(e,[`data`,`message`])??s(e,[`data`,`detail`])??s(e,[`data`,`error`,`message`]);if(t)return t;if(`message`in e&&typeof e.message==`string`&&e.message)return e.message;if(`error`in e&&typeof e.error==`string`&&e.error)return e.error}if(e instanceof Error)return e.message;if(typeof e==`string`)return e},l=t=>{switch(t){case r.ErrorCategory.DEPOSIT:return`Deposit failed`;case r.ErrorCategory.SWAP:return`Swap failed`;case r.ErrorCategory.BRIDGE:return`Bridge failed`;case r.ErrorCategory.WITHDRAW:return`Send failed`;case r.ErrorCategory.Fund:return`Unshield failed`;case r.ErrorCategory.Receive:return`Shield failed`;case r.ErrorCategory.DappTransaction:return`DApp transaction failed`;case r.ErrorCategory.Approve:return`Approval failed`;default:return e.transactionErrorCodes.UNKNOWN}},u=(r,a)=>{if(r instanceof n.FeeOverTransactionValueError)return i.getGenericFeeOverTransactionValueErrorMessage(r,a);if(r instanceof t.ErrorWithAmount)return r.message;let s=c(r);if(s&&o.isInsufficientFundsError(s))return e.insufficientResourcesErrorCodes.INSUFFICIENT_FUNDS;if(s&&e.TRON_ACCOUNT_NOT_ACTIVATED_PATTERN.test(s))return e.UserFriendlyErrorCodes.TRON_ACCOUNT_NOT_ACTIVATED;if(s){let t=s.toLowerCase(),n=Object.keys(e.transactionErrorCodes).find(n=>t===e.transactionErrorCodes[n].toLowerCase());if(n&&n in e.UserFriendlyErrorCodes)return e.UserFriendlyErrorCodes[n];let r=Object.entries(e.transactionErrorCodes).find(([e,n])=>t.includes(n.toLowerCase()));if(r)return e.UserFriendlyErrorCodes[r[0]]??r[1];if(Object.values(e.DIRECTLY_SHOW_MESSAGE_ERROR_CODES).find(e=>t.includes(e.toLowerCase())))return s}return a?l(a):e.transactionErrorCodes.UNKNOWN},d=(e,t)=>{let n;switch(t){case a.TransactionRequestType.Send:case a.TransactionRequestType.ProxySend:n=r.ErrorCategory.WITHDRAW;break;case a.TransactionRequestType.SwapTokens:case a.TransactionRequestType.ProxySwapTokens:n=r.ErrorCategory.SWAP;break;case a.TransactionRequestType.ReceiveFromShieldedAccount:n=r.ErrorCategory.Receive;break;case a.TransactionRequestType.Fund:n=r.ErrorCategory.Fund;break;case a.TransactionRequestType.PrivateTransactionFromProxy:n=r.ErrorCategory.DappTransaction;break;default:n=void 0;break}return u(e,n)};exports.extractMessage=c,exports.getErrorMessage=u,exports.getErrorMessageFromTransactionRequest=d;
@@ -1,85 +1,95 @@
1
- import { DIRECTLY_SHOW_MESSAGE_ERROR_CODES as e, UserFriendlyErrorCodes as t, insufficientResourcesErrorCodes as n, transactionErrorCodes as r } from "./error-codes.constants.mjs";
2
- import { ErrorWithAmount as i } from "./customErrors/ErrorWithAmount.mjs";
3
- import { FeeOverTransactionValueError as a } from "./customErrors/FeeOverTransactionValueError.mjs";
4
- import { ErrorCategory as o } from "./types.mjs";
5
- import { getGenericFeeOverTransactionValueErrorMessage as s } from "./customErrors/customErrors.helpers.mjs";
1
+ import { DIRECTLY_SHOW_MESSAGE_ERROR_CODES as e, TRON_ACCOUNT_NOT_ACTIVATED_PATTERN as t, UserFriendlyErrorCodes as n, insufficientResourcesErrorCodes as r, transactionErrorCodes as i } from "./error-codes.constants.mjs";
2
+ import { ErrorWithAmount as a } from "./customErrors/ErrorWithAmount.mjs";
3
+ import { FeeOverTransactionValueError as o } from "./customErrors/FeeOverTransactionValueError.mjs";
4
+ import { ErrorCategory as s } from "./types.mjs";
5
+ import { getGenericFeeOverTransactionValueErrorMessage as c } from "./customErrors/customErrors.helpers.mjs";
6
6
  import "./customErrors/index.mjs";
7
- import { TransactionRequestType as c } from "../types/transaction.types.mjs";
7
+ import { TransactionRequestType as l } from "../types/transaction.types.mjs";
8
8
  import "../types/index.mjs";
9
- import { isInsufficientFundsError as l } from "./isInsufficientFundsError.mjs";
9
+ import { isInsufficientFundsError as u } from "./isInsufficientFundsError.mjs";
10
10
  //#region libs/shared/common/src/error-handling/get-error.message.ts
11
- var u = (e, t) => {
11
+ var d = (e, t) => {
12
12
  let n = t.reduce((e, t) => {
13
13
  if (!(typeof e != "object" || !e || !(t in e))) return e[t];
14
14
  }, e);
15
15
  return typeof n == "string" && n ? n : void 0;
16
- }, d = (e) => {
16
+ }, f = (e) => {
17
17
  if (typeof e == "object" && e) {
18
- let t = u(e, [
18
+ let t = d(e, [
19
19
  "response",
20
20
  "data",
21
21
  "message"
22
- ]) ?? u(e, [
22
+ ]) ?? d(e, [
23
23
  "response",
24
24
  "data",
25
25
  "detail"
26
- ]) ?? u(e, ["data", "message"]) ?? u(e, ["data", "detail"]);
26
+ ]) ?? d(e, [
27
+ "response",
28
+ "data",
29
+ "error",
30
+ "message"
31
+ ]) ?? d(e, ["data", "message"]) ?? d(e, ["data", "detail"]) ?? d(e, [
32
+ "data",
33
+ "error",
34
+ "message"
35
+ ]);
27
36
  if (t) return t;
28
37
  if ("message" in e && typeof e.message == "string" && e.message) return e.message;
29
38
  if ("error" in e && typeof e.error == "string" && e.error) return e.error;
30
39
  }
31
40
  if (e instanceof Error) return e.message;
32
41
  if (typeof e == "string") return e;
33
- }, f = (e) => {
42
+ }, p = (e) => {
34
43
  switch (e) {
35
- case o.DEPOSIT: return "Deposit failed";
36
- case o.SWAP: return "Swap failed";
37
- case o.BRIDGE: return "Bridge failed";
38
- case o.WITHDRAW: return "Send failed";
39
- case o.Fund: return "Unshield failed";
40
- case o.Receive: return "Shield failed";
41
- case o.DappTransaction: return "DApp transaction failed";
42
- case o.Approve: return "Approval failed";
43
- default: return r.UNKNOWN;
44
+ case s.DEPOSIT: return "Deposit failed";
45
+ case s.SWAP: return "Swap failed";
46
+ case s.BRIDGE: return "Bridge failed";
47
+ case s.WITHDRAW: return "Send failed";
48
+ case s.Fund: return "Unshield failed";
49
+ case s.Receive: return "Shield failed";
50
+ case s.DappTransaction: return "DApp transaction failed";
51
+ case s.Approve: return "Approval failed";
52
+ default: return i.UNKNOWN;
44
53
  }
45
- }, p = (o, c) => {
46
- if (o instanceof a) return s(o, c);
47
- if (o instanceof i) return o.message;
48
- let u = d(o);
49
- if (u && l(u)) return n.INSUFFICIENT_FUNDS;
50
- if (u) {
51
- let n = u.toLowerCase(), i = Object.keys(r).find((e) => n === r[e].toLowerCase());
52
- if (i && i in t) return t[i];
53
- let a = Object.entries(r).find(([e, t]) => n.includes(t.toLowerCase()));
54
- if (a) return t[a[0]] ?? a[1];
55
- if (Object.values(e).find((e) => n.includes(e.toLowerCase()))) return u;
54
+ }, m = (s, l) => {
55
+ if (s instanceof o) return c(s, l);
56
+ if (s instanceof a) return s.message;
57
+ let d = f(s);
58
+ if (d && u(d)) return r.INSUFFICIENT_FUNDS;
59
+ if (d && t.test(d)) return n.TRON_ACCOUNT_NOT_ACTIVATED;
60
+ if (d) {
61
+ let t = d.toLowerCase(), r = Object.keys(i).find((e) => t === i[e].toLowerCase());
62
+ if (r && r in n) return n[r];
63
+ let a = Object.entries(i).find(([e, n]) => t.includes(n.toLowerCase()));
64
+ if (a) return n[a[0]] ?? a[1];
65
+ if (Object.values(e).find((e) => t.includes(e.toLowerCase()))) return d;
56
66
  }
57
- return c ? f(c) : r.UNKNOWN;
58
- }, m = (e, t) => {
67
+ return l ? p(l) : i.UNKNOWN;
68
+ }, h = (e, t) => {
59
69
  let n;
60
70
  switch (t) {
61
- case c.Send:
62
- case c.ProxySend:
63
- n = o.WITHDRAW;
71
+ case l.Send:
72
+ case l.ProxySend:
73
+ n = s.WITHDRAW;
64
74
  break;
65
- case c.SwapTokens:
66
- case c.ProxySwapTokens:
67
- n = o.SWAP;
75
+ case l.SwapTokens:
76
+ case l.ProxySwapTokens:
77
+ n = s.SWAP;
68
78
  break;
69
- case c.ReceiveFromShieldedAccount:
70
- n = o.Receive;
79
+ case l.ReceiveFromShieldedAccount:
80
+ n = s.Receive;
71
81
  break;
72
- case c.Fund:
73
- n = o.Fund;
82
+ case l.Fund:
83
+ n = s.Fund;
74
84
  break;
75
- case c.PrivateTransactionFromProxy:
76
- n = o.DappTransaction;
85
+ case l.PrivateTransactionFromProxy:
86
+ n = s.DappTransaction;
77
87
  break;
78
88
  default:
79
89
  n = void 0;
80
90
  break;
81
91
  }
82
- return p(e, n);
92
+ return m(e, n);
83
93
  };
84
94
  //#endregion
85
- export { d as extractMessage, p as getErrorMessage, m as getErrorMessageFromTransactionRequest };
95
+ export { f as extractMessage, m as getErrorMessage, h as getErrorMessageFromTransactionRequest };
@@ -1 +1 @@
1
- require(`./utils/abi.utils.cjs`),require(`./utils/serialize.utils.cjs`),require(`./utils/caseInsensitive.utils.cjs`),require(`./utils/amounts.utils.cjs`),require(`./web3/etherFunctions.cjs`),require(`./utils/time.utils.cjs`),require(`./utils/upToDateState.cjs`),require(`./utils/cacheFunctions.cjs`),require(`./utils/encodeTokenWithId.cjs`),require(`./utils/enclaveHandshakeService.cjs`),require(`./utils/encryptInputForEnclave.cjs`),require(`./utils/solanaMint.utils.cjs`),require(`./utils/serialize-utxos.utils.cjs`),require(`./utils/customEnclaveFunctionsRegister.cjs`),require(`./utils/tron.utils.cjs`),require(`./utils/addresses.cjs`),require(`./web3/events/getInputUtxoAndBalance.cjs`),require(`./utils/legacyKeys.cjs`),require(`./utils/auth.utils.cjs`),require(`./utils/string.utils.cjs`),require(`./utils/token-check.utils.cjs`),require(`./utils/map.utils.cjs`),require(`./utils/mutexes.utils.cjs`),require(`./utils/erc20tokenFunctions.cjs`),require(`./web3/events/getShieldedBalance.cjs`),require(`./pre-transaction/outputUtxoProcessing.cjs`),require(`./utils/external-action.utils.cjs`),require(`./snarkjs/common.snarkjs.cjs`),require(`./pre-transaction/solana.cjs`),require(`./snarkjs/signedMessageHash.cjs`),require(`./pre-transaction/process-gas-estimates.cjs`),require(`./pre-transaction/getVolatileTransferAmount.cjs`),require(`./pre-transaction/constructAdminData.cjs`),require(`./utils/create-provider.cjs`),require(`./pre-transaction/calculateSolanaNullifierCount.cjs`),require(`./pre-transaction/convert-okx-instructions.cjs`),require(`./utils/process.utils.cjs`),require(`./pre-transaction/sendV0Transaction.cjs`),require(`./utils/bytes32.utils.cjs`),require(`./pre-transaction/getFeeStructure.cjs`),require(`./pre-transaction/getExternalSwapAddress.cjs`),require(`./pre-transaction/speculativeUtxo.cjs`),require(`./pre-transaction/buildCommitmentValidationData.cjs`),require(`./pre-transaction/index.cjs`),require(`./snarkjs/generateZkProof.cjs`),require(`./snarkjs/generateMainAndCommitmentZkProof.cjs`),require(`./web3/getContractMetadata.cjs`),require(`./utils/solana-program.utils.cjs`),require(`./snarkjs/fetchOnChainRootHashes.cjs`),require(`./utils/getContractAddress.cjs`),require(`./private-wallet/emporium.helpers.cjs`),require(`./snarkjs/constructGeneralZkProof.cjs`),require(`./utils/getSignerFromContract.cjs`),require(`./utils/tronSimulation.utils.cjs`),require(`./utils/resolve-sync.utils.cjs`),require(`./utils/cacheDevice.utils.cjs`),require(`./utils/involves-permit2-op.cjs`),require(`./utils/convertEmporiumOpToCallInfo.cjs`),require(`./utils/getRecipientInfoFromUserKeys.cjs`),require(`./utils/publicBalance.utils.cjs`),require(`./utils/postToOffscreen.cjs`),require(`./utils/fees.utils.cjs`),require(`./utils/proxyAvatar.utils.cjs`),require(`./utils/enclave-utxo-storage.cjs`),require(`./utils/enclave-signature-storage.cjs`),require(`./utils/tx-confirmation.utils.cjs`),require(`./utils/bridge-arrival.utils.cjs`),require(`./utils/solana-sponsored.utils.cjs`),require(`./utils/temp-wallet.utils.cjs`),require(`./utils/mnemonics.cjs`),require(`./utils/nearIntents.utils.cjs`),require(`./utils/index.cjs`),require(`./web3/lifiAPI.cjs`),require(`./web3/okxAPI.cjs`),require(`./web3/index.cjs`),require(`./snarkjs/constructSolanaZkProof.cjs`),require(`./snarkjs/index.cjs`),require(`./private-wallet/emporium.swap.helpers.cjs`),require(`./private-wallet/index.cjs`),require(`./auto-deposit-back-helpers/get-tokens-to-deposit-back.cjs`),require(`./auto-deposit-back-helpers/get-gas-token-records.cjs`),require(`./auto-deposit-back-helpers/select-gas-token.cjs`),require(`./auto-deposit-back-helpers/update-hinkal.cjs`),require(`./auto-deposit-back-helpers/index.cjs`);
1
+ require(`./utils/abi.utils.cjs`),require(`./utils/serialize.utils.cjs`),require(`./utils/caseInsensitive.utils.cjs`),require(`./utils/amounts.utils.cjs`),require(`./web3/etherFunctions.cjs`),require(`./utils/time.utils.cjs`),require(`./utils/upToDateState.cjs`),require(`./utils/cacheFunctions.cjs`),require(`./utils/encodeTokenWithId.cjs`),require(`./utils/enclaveHandshakeService.cjs`),require(`./utils/encryptInputForEnclave.cjs`),require(`./utils/solanaMint.utils.cjs`),require(`./utils/serialize-utxos.utils.cjs`),require(`./utils/customEnclaveFunctionsRegister.cjs`),require(`./utils/tron.utils.cjs`),require(`./utils/addresses.cjs`),require(`./web3/events/getInputUtxoAndBalance.cjs`),require(`./utils/legacyKeys.cjs`),require(`./utils/auth.utils.cjs`),require(`./utils/create-provider.cjs`),require(`./web3/getContractMetadata.cjs`),require(`./utils/receive-vault-solana.utils.cjs`),require(`./utils/receive-vault.utils.cjs`),require(`./utils/string.utils.cjs`),require(`./utils/token-check.utils.cjs`),require(`./utils/map.utils.cjs`),require(`./utils/mutexes.utils.cjs`),require(`./utils/erc20tokenFunctions.cjs`),require(`./web3/events/getShieldedBalance.cjs`),require(`./pre-transaction/outputUtxoProcessing.cjs`),require(`./utils/external-action.utils.cjs`),require(`./snarkjs/common.snarkjs.cjs`),require(`./pre-transaction/solana.cjs`),require(`./snarkjs/signedMessageHash.cjs`),require(`./pre-transaction/process-gas-estimates.cjs`),require(`./pre-transaction/getVolatileTransferAmount.cjs`),require(`./pre-transaction/constructAdminData.cjs`),require(`./pre-transaction/calculateSolanaNullifierCount.cjs`),require(`./pre-transaction/convert-okx-instructions.cjs`),require(`./utils/process.utils.cjs`),require(`./pre-transaction/sendV0Transaction.cjs`),require(`./utils/bytes32.utils.cjs`),require(`./pre-transaction/getFeeStructure.cjs`),require(`./utils/gas-token.utils.cjs`),require(`./utils/fees.utils.cjs`),require(`./pre-transaction/getExternalSwapAddress.cjs`),require(`./pre-transaction/speculativeUtxo.cjs`),require(`./pre-transaction/buildCommitmentValidationData.cjs`),require(`./pre-transaction/index.cjs`),require(`./snarkjs/generateZkProof.cjs`),require(`./snarkjs/generateMainAndCommitmentZkProof.cjs`),require(`./utils/solana-program.utils.cjs`),require(`./snarkjs/fetchOnChainRootHashes.cjs`),require(`./utils/getContractAddress.cjs`),require(`./private-wallet/emporium.helpers.cjs`),require(`./snarkjs/constructGeneralZkProof.cjs`),require(`./utils/getSignerFromContract.cjs`),require(`./utils/tronSimulation.utils.cjs`),require(`./utils/resolve-sync.utils.cjs`),require(`./utils/admin-dimensions.cjs`),require(`./utils/cacheDevice.utils.cjs`),require(`./utils/involves-permit2-op.cjs`),require(`./utils/convertEmporiumOpToCallInfo.cjs`),require(`./utils/getRecipientInfoFromUserKeys.cjs`),require(`./utils/publicBalance.utils.cjs`),require(`./utils/wallet-token-discovery.utils.cjs`),require(`./utils/postToOffscreen.cjs`),require(`./utils/proxyAvatar.utils.cjs`),require(`./utils/enclave-utxo-storage.cjs`),require(`./utils/enclave-signature-storage.cjs`),require(`./utils/tx-confirmation.utils.cjs`),require(`./utils/bridge-arrival.utils.cjs`),require(`./utils/solana-sponsored.utils.cjs`),require(`./utils/temp-wallet.utils.cjs`),require(`./utils/mnemonics.cjs`),require(`./utils/nearIntents.utils.cjs`),require(`./utils/index.cjs`),require(`./web3/lifiAPI.cjs`),require(`./web3/okxAPI.cjs`),require(`./web3/index.cjs`),require(`./snarkjs/constructSolanaZkProof.cjs`),require(`./snarkjs/index.cjs`),require(`./private-wallet/emporium.swap.helpers.cjs`),require(`./private-wallet/index.cjs`),require(`./auto-deposit-back-helpers/get-tokens-to-deposit-back.cjs`),require(`./auto-deposit-back-helpers/get-gas-token-records.cjs`),require(`./auto-deposit-back-helpers/select-gas-token.cjs`),require(`./auto-deposit-back-helpers/update-hinkal.cjs`),require(`./auto-deposit-back-helpers/index.cjs`);
@@ -17,6 +17,10 @@ import "./utils/addresses.mjs";
17
17
  import "./web3/events/getInputUtxoAndBalance.mjs";
18
18
  import "./utils/legacyKeys.mjs";
19
19
  import "./utils/auth.utils.mjs";
20
+ import "./utils/create-provider.mjs";
21
+ import "./web3/getContractMetadata.mjs";
22
+ import "./utils/receive-vault-solana.utils.mjs";
23
+ import "./utils/receive-vault.utils.mjs";
20
24
  import "./utils/string.utils.mjs";
21
25
  import "./utils/token-check.utils.mjs";
22
26
  import "./utils/map.utils.mjs";
@@ -31,20 +35,20 @@ import "./snarkjs/signedMessageHash.mjs";
31
35
  import "./pre-transaction/process-gas-estimates.mjs";
32
36
  import "./pre-transaction/getVolatileTransferAmount.mjs";
33
37
  import "./pre-transaction/constructAdminData.mjs";
34
- import "./utils/create-provider.mjs";
35
38
  import "./pre-transaction/calculateSolanaNullifierCount.mjs";
36
39
  import "./pre-transaction/convert-okx-instructions.mjs";
37
40
  import "./utils/process.utils.mjs";
38
41
  import "./pre-transaction/sendV0Transaction.mjs";
39
42
  import "./utils/bytes32.utils.mjs";
40
43
  import "./pre-transaction/getFeeStructure.mjs";
44
+ import "./utils/gas-token.utils.mjs";
45
+ import "./utils/fees.utils.mjs";
41
46
  import "./pre-transaction/getExternalSwapAddress.mjs";
42
47
  import "./pre-transaction/speculativeUtxo.mjs";
43
48
  import "./pre-transaction/buildCommitmentValidationData.mjs";
44
49
  import "./pre-transaction/index.mjs";
45
50
  import "./snarkjs/generateZkProof.mjs";
46
51
  import "./snarkjs/generateMainAndCommitmentZkProof.mjs";
47
- import "./web3/getContractMetadata.mjs";
48
52
  import "./utils/solana-program.utils.mjs";
49
53
  import "./snarkjs/fetchOnChainRootHashes.mjs";
50
54
  import "./utils/getContractAddress.mjs";
@@ -53,13 +57,14 @@ import "./snarkjs/constructGeneralZkProof.mjs";
53
57
  import "./utils/getSignerFromContract.mjs";
54
58
  import "./utils/tronSimulation.utils.mjs";
55
59
  import "./utils/resolve-sync.utils.mjs";
60
+ import "./utils/admin-dimensions.mjs";
56
61
  import "./utils/cacheDevice.utils.mjs";
57
62
  import "./utils/involves-permit2-op.mjs";
58
63
  import "./utils/convertEmporiumOpToCallInfo.mjs";
59
64
  import "./utils/getRecipientInfoFromUserKeys.mjs";
60
65
  import "./utils/publicBalance.utils.mjs";
66
+ import "./utils/wallet-token-discovery.utils.mjs";
61
67
  import "./utils/postToOffscreen.mjs";
62
- import "./utils/fees.utils.mjs";
63
68
  import "./utils/proxyAvatar.utils.mjs";
64
69
  import "./utils/enclave-utxo-storage.mjs";
65
70
  import "./utils/enclave-signature-storage.mjs";
@@ -1,4 +1,5 @@
1
1
  import { AnchorProvider, Provider } from '@coral-xyz/anchor';
2
2
  import { Keypair, PublicKey } from '@solana/web3.js';
3
3
  export declare const getAddressLookupTableAccounts: (provider: AnchorProvider, addressLookupTableAccounts: string[] | undefined) => Promise<import('@solana/web3.js').AddressLookupTableAccount[] | undefined>;
4
+ export declare const extendAddressLookupTable: (provider: Provider, lookupTableAddress: PublicKey, accounts: PublicKey[], payer: Keypair) => Promise<void>;
4
5
  export declare const createAndExtendAddressLookupTable: (provider: Provider, accounts: PublicKey[], payer: Keypair) => Promise<PublicKey>;
@@ -0,0 +1 @@
1
+ require(`../../types/hinkal.types.cjs`),require(`../../error-handling/error-codes.constants.cjs`),require(`../utils/fees.utils.cjs`);
@@ -0,0 +1,4 @@
1
+ import { IHinkal } from '../../data-structures/Hinkal/IHinkal';
2
+ import { ERC20Token } from '../../types/token.types';
3
+ import { ProoflessFeeStructure } from '../../types/hinkal.types';
4
+ export declare const buildProoflessDepositFee: (hinkal: IHinkal, chainId: number, erc20Tokens: ERC20Token[], amountChanges: bigint[], variableRate: bigint) => Promise<ProoflessFeeStructure>;
@@ -0,0 +1,3 @@
1
+ import "../../types/hinkal.types.mjs";
2
+ import "../../error-handling/error-codes.constants.mjs";
3
+ import "../utils/fees.utils.mjs";
@@ -1 +1 @@
1
- require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../error-handling/logger.cjs`),n=require(`../web3/events/getShieldedBalance.cjs`),r=require(`./solana.cjs`),i=require(`../utils/create-provider.cjs`),a=require(`../snarkjs/constructTxEnclave.cjs`);let o=require(`@solana/web3.js`);var s=6,c=async(c,l,u,d)=>{if(!e.isSolanaLike(l)||u.length===0||d.length===0)return 0;if(c.generateProofRemotely)try{return await a.estimateNullifiersEnclaveCall(c,{chainId:l,mintAddresses:u,amountChanges:d})}catch(e){return t.Logger.error(`calculateSolanaNullifierCount: enclave estimate failed, charging maximum rent`,e),s}let f;try{f=(await n.addPaddingToUtxos(c,l,u,d,6)).flat().filter(e=>e.amount!==0n)}catch(e){return t.Logger.log(`Error during getting inputUtxos locally:`,e),s}if(f.length===0)return 0;try{let{contractData:t,rpcUrl:n}=e.networkRegistry[l],{originalDeployer:a,hinkalIdl:s}=t;if(!a)throw Error(`Original deployer not found for chain ID`);if(!s)throw Error(`Hinkal IDL not found for chain ID`);let c=i.createCustomSolanaConnection(n),u=new o.PublicKey(a),d=new o.PublicKey(s.address),p=f.map(e=>r.getNullifierAccount(BigInt(e.getNullifier()),u,d));return(await c.getMultipleAccountsInfo(p)).filter(e=>e===null).length}catch(e){return t.Logger.error(`calculateSolanaNullifierCount: nullifier probe failed, charging for every note`,e),f.length}};exports.calculateSolanaNullifierCount=c;
1
+ require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../error-handling/logger.cjs`),n=require(`../utils/create-provider.cjs`),r=require(`../web3/events/getShieldedBalance.cjs`),i=require(`./solana.cjs`),a=require(`../snarkjs/constructTxEnclave.cjs`);let o=require(`@solana/web3.js`);var s=6,c=async(c,l,u,d)=>{if(!e.isSolanaLike(l)||u.length===0||d.length===0)return 0;if(c.generateProofRemotely)try{return await a.estimateNullifiersEnclaveCall(c,{chainId:l,mintAddresses:u,amountChanges:d})}catch(e){return t.Logger.error(`calculateSolanaNullifierCount: enclave estimate failed, charging maximum rent`,e),s}let f;try{f=(await r.addPaddingToUtxos(c,l,u,d,6)).flat().filter(e=>e.amount!==0n)}catch(e){return t.Logger.log(`Error during getting inputUtxos locally:`,e),s}if(f.length===0)return 0;try{let{contractData:t,rpcUrl:r}=e.networkRegistry[l],{originalDeployer:a,hinkalIdl:s}=t;if(!a)throw Error(`Original deployer not found for chain ID`);if(!s)throw Error(`Hinkal IDL not found for chain ID`);let c=n.createCustomSolanaConnection(r),u=new o.PublicKey(a),d=new o.PublicKey(s.address),p=f.map(e=>i.getNullifierAccount(BigInt(e.getNullifier()),u,d));return(await c.getMultipleAccountsInfo(p)).filter(e=>e===null).length}catch(e){return t.Logger.error(`calculateSolanaNullifierCount: nullifier probe failed, charging for every note`,e),f.length}};exports.calculateSolanaNullifierCount=c;
@@ -1,8 +1,8 @@
1
1
  import { isSolanaLike as e, networkRegistry as t } from "../../constants/chains.constants.mjs";
2
2
  import { Logger as n } from "../../error-handling/logger.mjs";
3
- import { addPaddingToUtxos as r } from "../web3/events/getShieldedBalance.mjs";
4
- import { getNullifierAccount as i } from "./solana.mjs";
5
- import { createCustomSolanaConnection as a } from "../utils/create-provider.mjs";
3
+ import { createCustomSolanaConnection as r } from "../utils/create-provider.mjs";
4
+ import { addPaddingToUtxos as i } from "../web3/events/getShieldedBalance.mjs";
5
+ import { getNullifierAccount as a } from "./solana.mjs";
6
6
  import { estimateNullifiersEnclaveCall as o } from "../snarkjs/constructTxEnclave.mjs";
7
7
  import { PublicKey as s } from "@solana/web3.js";
8
8
  //#region libs/shared/common/src/functions/pre-transaction/calculateSolanaNullifierCount.ts
@@ -19,16 +19,16 @@ var c = 6, l = async (l, u, d, f) => {
19
19
  }
20
20
  let p;
21
21
  try {
22
- p = (await r(l, u, d, f, 6)).flat().filter((e) => e.amount !== 0n);
22
+ p = (await i(l, u, d, f, 6)).flat().filter((e) => e.amount !== 0n);
23
23
  } catch (e) {
24
24
  return n.log("Error during getting inputUtxos locally:", e), c;
25
25
  }
26
26
  if (p.length === 0) return 0;
27
27
  try {
28
- let { contractData: e, rpcUrl: n } = t[u], { originalDeployer: r, hinkalIdl: o } = e;
29
- if (!r) throw Error("Original deployer not found for chain ID");
28
+ let { contractData: e, rpcUrl: n } = t[u], { originalDeployer: i, hinkalIdl: o } = e;
29
+ if (!i) throw Error("Original deployer not found for chain ID");
30
30
  if (!o) throw Error("Hinkal IDL not found for chain ID");
31
- let c = a(n), l = new s(r), d = new s(o.address), f = p.map((e) => i(BigInt(e.getNullifier()), l, d));
31
+ let c = r(n), l = new s(i), d = new s(o.address), f = p.map((e) => a(BigInt(e.getNullifier()), l, d));
32
32
  return (await c.getMultipleAccountsInfo(f)).filter((e) => e === null).length;
33
33
  } catch (e) {
34
34
  return n.error("calculateSolanaNullifierCount: nullifier probe failed, charging for every note", e), p.length;
@@ -1 +1 @@
1
- const e=require(`../utils/addresses.cjs`);var t=(t,n,r,i,a,o)=>{if(!t)return;let s;return o&&(s={tokenIn:{symbol:o[0]?.symbol,address:o[0]?.erc20TokenAddress.toLowerCase()},tokenOut:{symbol:o[1]?.symbol,address:o[1]?.erc20TokenAddress.toLowerCase()}}),{hashedOwner:e.hashEthereumAddress(a),chainId:n,timestamp:Date.now(),action:t,erc20TokenAddresses:r,erc20TokenAmount:i.map(String),swapPair:s}};exports.constructAdminData=t;
1
+ const e=require(`../utils/addresses.cjs`);var t=(t,n,r,i,a,o)=>{if(!t)return;let s,c;return o&&(c=o[1]?.chainId,s={tokenIn:{symbol:o[0]?.symbol,address:o[0]?.erc20TokenAddress.toLowerCase()},tokenOut:{symbol:o[1]?.symbol,address:o[1]?.erc20TokenAddress.toLowerCase()}}),{hashedOwner:e.hashEthereumAddress(a),chainId:n,timestamp:Date.now(),action:t,erc20TokenAddresses:r,erc20TokenAmount:i.map(String),swapPair:s,destinationChainId:c||void 0}};exports.constructAdminData=t;