@gurge/sdk 0.3.13 → 0.3.15

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 (321) hide show
  1. package/README.md +184 -32
  2. package/common/src/API/API.cjs +1 -1
  3. package/common/src/API/API.d.ts +0 -5
  4. package/common/src/API/API.mjs +114 -119
  5. package/common/src/API/TokenCallsCachedHelper.cjs +1 -0
  6. package/common/src/API/TokenCallsCachedHelper.d.ts +15 -0
  7. package/common/src/API/TokenCallsCachedHelper.mjs +62 -0
  8. package/common/src/API/callLifiAPI.cjs +1 -1
  9. package/common/src/API/callLifiAPI.mjs +2 -7
  10. package/common/src/API/enclaveUtxoCalls.cjs +1 -1
  11. package/common/src/API/enclaveUtxoCalls.mjs +6 -7
  12. package/common/src/API/getServerURL.cjs +1 -1
  13. package/common/src/API/getServerURL.mjs +2 -2
  14. package/common/src/API/scheduled-transactions-calls.cjs +1 -1
  15. package/common/src/API/scheduled-transactions-calls.mjs +3 -3
  16. package/common/src/API/token-calls.cjs +1 -1
  17. package/common/src/API/token-calls.d.ts +1 -1
  18. package/common/src/API/token-calls.mjs +3 -13
  19. package/common/src/constants/chains.constants.cjs +1 -1
  20. package/common/src/constants/chains.constants.d.ts +1 -0
  21. package/common/src/constants/chains.constants.mjs +3 -2
  22. package/common/src/constants/deploy-data/mergeDeployData.cjs +1 -1
  23. package/common/src/constants/deploy-data/mergeDeployData.mjs +11 -10
  24. package/common/src/constants/deploy-data/shared-deploy-data-tron.json.cjs +1 -1
  25. package/common/src/constants/deploy-data/shared-deploy-data-tron.json.mjs +60 -3517
  26. package/common/src/constants/events.constants.cjs +1 -1
  27. package/common/src/constants/events.constants.mjs +3 -1
  28. package/common/src/constants/index.cjs +1 -1
  29. package/common/src/constants/index.d.ts +0 -3
  30. package/common/src/constants/index.mjs +0 -3
  31. package/common/src/constants/lifi.constants.cjs +1 -1
  32. package/common/src/constants/lifi.constants.mjs +3 -6
  33. package/common/src/constants/mediaUrls.constants.d.ts +0 -1
  34. package/common/src/constants/rewards.constants.d.ts +0 -2
  35. package/common/src/constants/server.constants.cjs +1 -1
  36. package/common/src/constants/server.constants.d.ts +1 -5
  37. package/common/src/constants/server.constants.mjs +3 -8
  38. package/common/src/constants/vite.constants.cjs +1 -1
  39. package/common/src/constants/vite.constants.d.ts +1 -0
  40. package/common/src/constants/vite.constants.mjs +3 -3
  41. package/common/src/crypto/BabyJubRN.cjs +1 -0
  42. package/common/src/crypto/BabyJubRN.d.ts +18 -0
  43. package/common/src/crypto/BabyJubRN.mjs +33 -0
  44. package/common/src/crypto/babyJub.cjs +1 -1
  45. package/common/src/crypto/babyJub.mjs +7 -5
  46. package/common/src/crypto/poseidon.cjs +1 -1
  47. package/common/src/crypto/poseidon.mjs +22 -12
  48. package/common/src/data-structures/Hinkal/Hinkal.cjs +1 -1
  49. package/common/src/data-structures/Hinkal/Hinkal.d.ts +10 -6
  50. package/common/src/data-structures/Hinkal/Hinkal.mjs +104 -113
  51. package/common/src/data-structures/Hinkal/IHinkal.d.ts +9 -5
  52. package/common/src/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
  53. package/common/src/data-structures/Hinkal/handleAutoDepositBack.mjs +37 -37
  54. package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.cjs +1 -1
  55. package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.d.ts +2 -2
  56. package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.mjs +8 -5
  57. package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
  58. package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.d.ts +2 -2
  59. package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +4 -1
  60. package/common/src/data-structures/Hinkal/hinkalNearDepositAndBridge.cjs +1 -1
  61. package/common/src/data-structures/Hinkal/hinkalNearDepositAndBridge.mjs +1 -1
  62. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -1
  63. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.mjs +4 -4
  64. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.cjs +1 -1
  65. package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.mjs +3 -3
  66. package/common/src/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.cjs +1 -1
  67. package/common/src/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.mjs +15 -15
  68. package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
  69. package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +2 -2
  70. package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +4 -1
  71. package/common/src/data-structures/Hinkal/index.d.ts +0 -1
  72. package/common/src/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.cjs +1 -1
  73. package/common/src/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.mjs +1 -1
  74. package/common/src/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
  75. package/common/src/data-structures/Hinkal/resetMerkleTrees.mjs +29 -31
  76. package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.cjs +1 -1
  77. package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +7 -6
  78. package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.cjs +1 -1
  79. package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.mjs +18 -18
  80. package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.cjs +1 -1
  81. package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.mjs +43 -43
  82. package/common/src/data-structures/TokenDBs/PublicTokensDB.cjs +1 -1
  83. package/common/src/data-structures/TokenDBs/PublicTokensDB.mjs +23 -20
  84. package/common/src/data-structures/TokenDBs/TempoPublicTokensDB.cjs +1 -0
  85. package/common/src/data-structures/TokenDBs/TempoPublicTokensDB.d.ts +9 -0
  86. package/common/src/data-structures/TokenDBs/TempoPublicTokensDB.mjs +41 -0
  87. package/common/src/data-structures/TokenDBs/TronPublicTokensDB.cjs +1 -0
  88. package/common/src/data-structures/TokenDBs/TronPublicTokensDB.d.ts +9 -0
  89. package/common/src/data-structures/TokenDBs/TronPublicTokensDB.mjs +47 -0
  90. package/common/src/data-structures/TokenDBs/index.cjs +1 -1
  91. package/common/src/data-structures/TokenDBs/index.d.ts +2 -0
  92. package/common/src/data-structures/TokenDBs/index.mjs +2 -0
  93. package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +3 -3
  94. package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.d.ts +2 -2
  95. package/common/src/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.d.ts +2 -2
  96. package/common/src/data-structures/event-service/solana/SolanaBlockchainEventEmitter.d.ts +3 -3
  97. package/common/src/data-structures/index.d.ts +1 -0
  98. package/common/src/data-structures/private-balances/BalanceChangedHandler.cjs +1 -0
  99. package/common/src/data-structures/private-balances/BalanceChangedHandler.d.ts +9 -0
  100. package/common/src/data-structures/private-balances/BalanceChangedHandler.mjs +12 -0
  101. package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.cjs +1 -0
  102. package/common/src/data-structures/{Hinkal → private-balances}/HinkalPrivateBalanceController.d.ts +4 -2
  103. package/common/src/data-structures/{Hinkal → private-balances}/HinkalPrivateBalanceController.mjs +34 -90
  104. package/common/src/data-structures/private-balances/index.cjs +1 -0
  105. package/common/src/data-structures/private-balances/index.d.ts +3 -0
  106. package/common/src/data-structures/private-balances/index.mjs +3 -0
  107. package/common/src/data-structures/private-balances/privateBalancesReducer.cjs +1 -0
  108. package/common/src/data-structures/private-balances/privateBalancesReducer.d.ts +2 -0
  109. package/common/src/data-structures/private-balances/privateBalancesReducer.mjs +73 -0
  110. package/common/src/data-structures/token-price-fetcher/TokenChecker.cjs +1 -1
  111. package/common/src/data-structures/token-price-fetcher/TokenChecker.mjs +5 -5
  112. package/common/src/error-handling/error-codes.constants.cjs +1 -1
  113. package/common/src/error-handling/error-codes.constants.d.ts +2 -5
  114. package/common/src/error-handling/error-codes.constants.mjs +3 -6
  115. package/common/src/externalABIs/index.cjs +1 -1
  116. package/common/src/externalABIs/index.d.ts +1 -36
  117. package/common/src/externalABIs/index.mjs +3 -5
  118. package/common/src/functions/index.cjs +1 -1
  119. package/common/src/functions/index.d.ts +0 -1
  120. package/common/src/functions/index.mjs +4 -5
  121. package/common/src/functions/pre-transaction/buildCommitmentValidationData.cjs +1 -1
  122. package/common/src/functions/pre-transaction/buildCommitmentValidationData.mjs +37 -36
  123. package/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.cjs +1 -1
  124. package/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.mjs +4 -4
  125. package/common/src/functions/pre-transaction/sendV0Transaction.cjs +2 -2
  126. package/common/src/functions/pre-transaction/sendV0Transaction.mjs +54 -42
  127. package/common/src/functions/private-wallet/emporium.helpers.cjs +1 -1
  128. package/common/src/functions/private-wallet/emporium.helpers.mjs +17 -17
  129. package/common/src/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
  130. package/common/src/functions/private-wallet/emporium.swap.helpers.mjs +16 -16
  131. package/common/src/functions/snarkjs/common.snarkjs.cjs +1 -1
  132. package/common/src/functions/snarkjs/common.snarkjs.d.ts +9 -1
  133. package/common/src/functions/snarkjs/common.snarkjs.mjs +13 -9
  134. package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.cjs +1 -1
  135. package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.d.ts +2 -3
  136. package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +49 -32
  137. package/common/src/functions/utils/abi.utils.cjs +1 -0
  138. package/common/src/functions/utils/abi.utils.d.ts +3 -0
  139. package/common/src/functions/utils/abi.utils.mjs +5 -0
  140. package/common/src/functions/utils/bigint-math.utils.cjs +1 -0
  141. package/common/src/functions/utils/bigint-math.utils.d.ts +2 -0
  142. package/common/src/functions/utils/bigint-math.utils.mjs +12 -0
  143. package/common/src/functions/utils/dispatchBalanceRefreshes.cjs +1 -1
  144. package/common/src/functions/utils/dispatchBalanceRefreshes.mjs +1 -1
  145. package/common/src/functions/utils/enclaveHandshakeService.cjs +1 -0
  146. package/common/src/functions/utils/enclaveHandshakeService.d.ts +10 -0
  147. package/common/src/functions/utils/enclaveHandshakeService.mjs +22 -0
  148. package/common/src/functions/utils/encryptInputForEnclave.cjs +1 -1
  149. package/common/src/functions/utils/encryptInputForEnclave.mjs +23 -25
  150. package/common/src/functions/utils/erc20tokenFunctions.cjs +1 -1
  151. package/common/src/functions/utils/erc20tokenFunctions.d.ts +4 -1
  152. package/common/src/functions/utils/erc20tokenFunctions.mjs +28 -12
  153. package/common/src/functions/utils/evmNetworkFunctions.cjs +1 -1
  154. package/common/src/functions/utils/evmNetworkFunctions.d.ts +1 -0
  155. package/common/src/functions/utils/evmNetworkFunctions.mjs +4 -0
  156. package/common/src/functions/utils/getUtxosFromReceipt.utils.cjs +1 -1
  157. package/common/src/functions/utils/getUtxosFromReceipt.utils.mjs +10 -10
  158. package/common/src/functions/utils/index.cjs +1 -1
  159. package/common/src/functions/utils/index.d.ts +4 -0
  160. package/common/src/functions/utils/index.mjs +4 -0
  161. package/common/src/functions/utils/map.utils.cjs +1 -0
  162. package/common/src/functions/utils/map.utils.d.ts +1 -0
  163. package/common/src/functions/utils/map.utils.mjs +9 -0
  164. package/common/src/functions/utils/mutexes.utils.cjs +1 -1
  165. package/common/src/functions/utils/mutexes.utils.d.ts +2 -2
  166. package/common/src/functions/utils/mutexes.utils.mjs +4 -3
  167. package/common/src/functions/utils/process.utils.cjs +1 -1
  168. package/common/src/functions/utils/process.utils.d.ts +1 -0
  169. package/common/src/functions/utils/process.utils.mjs +7 -2
  170. package/common/src/functions/utils/tron.utils.cjs +1 -1
  171. package/common/src/functions/utils/tron.utils.d.ts +1 -0
  172. package/common/src/functions/utils/tron.utils.mjs +1 -1
  173. package/common/src/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
  174. package/common/src/functions/web3/events/getInputUtxoAndBalance.mjs +26 -26
  175. package/common/src/functions/web3/events/getShieldedBalance.cjs +1 -1
  176. package/common/src/functions/web3/events/getShieldedBalance.mjs +29 -11
  177. package/common/src/functions/web3/events/index.cjs +1 -1
  178. package/common/src/functions/web3/events/index.d.ts +0 -1
  179. package/common/src/functions/web3/events/index.mjs +0 -1
  180. package/common/src/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
  181. package/common/src/functions/web3/functionCalls/transactCallDirect.mjs +4 -4
  182. package/common/src/functions/web3/functionCalls/waitForErc20Approvals.cjs +1 -1
  183. package/common/src/functions/web3/functionCalls/waitForErc20Approvals.mjs +10 -10
  184. package/common/src/functions/web3/index.cjs +1 -1
  185. package/common/src/functions/web3/index.mjs +0 -1
  186. package/common/src/functions/web3/lifiAPI.cjs +1 -1
  187. package/common/src/functions/web3/lifiAPI.mjs +7 -38
  188. package/common/src/functions/web3/oneInchAPI.cjs +1 -1
  189. package/common/src/functions/web3/oneInchAPI.mjs +10 -10
  190. package/common/src/functions/web3/uniswapAPI.cjs +1 -1
  191. package/common/src/functions/web3/uniswapAPI.mjs +16 -16
  192. package/common/src/mutexes/chainBalanceRwLock.cjs +1 -0
  193. package/common/src/mutexes/chainBalanceRwLock.d.ts +18 -0
  194. package/common/src/mutexes/chainBalanceRwLock.mjs +31 -0
  195. package/common/src/mutexes/index.d.ts +1 -0
  196. package/common/src/types/cache.types.cjs +1 -1
  197. package/common/src/types/cache.types.d.ts +2 -0
  198. package/common/src/types/cache.types.mjs +1 -1
  199. package/common/src/types/commitments.types.d.ts +0 -10
  200. package/common/src/types/hinkal.types.cjs +1 -1
  201. package/common/src/types/hinkal.types.d.ts +4 -7
  202. package/common/src/types/hinkal.types.mjs +1 -1
  203. package/common/src/types/index.cjs +1 -1
  204. package/common/src/types/index.d.ts +0 -1
  205. package/common/src/types/index.mjs +1 -2
  206. package/common/src/types/new-rewards.type.cjs +1 -1
  207. package/common/src/types/new-rewards.type.d.ts +0 -1
  208. package/common/src/types/new-rewards.type.mjs +1 -1
  209. package/common/src/types/scheduled-transactions.types.d.ts +5 -0
  210. package/common/src/webworker/logError-BTCYh_YM.js +2 -0
  211. package/common/src/webworker/package.json +34 -4
  212. package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.cjs +1 -1
  213. package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.mjs +1 -1
  214. package/common/src/webworker/snarkjsWorkerNode.cjs +1 -1
  215. package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
  216. package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +1 -1
  217. package/common/src/webworker/utxoWorkerNode.cjs +1 -1
  218. package/common/src/webworker/viteWorkerURL.constant.cjs +4 -4
  219. package/common/src/webworker/viteWorkerURL.constant.mjs +4 -4
  220. package/common/src/webworker/workerFactory.cjs +1 -1
  221. package/common/src/webworker/workerFactory.d.ts +1 -0
  222. package/common/src/webworker/workerFactory.mjs +3 -2
  223. package/common/src/webworker/workerProxy-DPeuP2Mg.js +1 -0
  224. package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
  225. package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +1 -1
  226. package/common/src/webworker/zkProofWorkerNode.cjs +1 -1
  227. package/functions/index.cjs +1 -1
  228. package/functions/index.mjs +0 -4
  229. package/functions/integrations/index.cjs +1 -1
  230. package/functions/integrations/index.mjs +0 -4
  231. package/functions/integrations/swapApi.cjs +1 -1
  232. package/functions/integrations/swapApi.d.ts +21 -7
  233. package/functions/integrations/swapApi.mjs +29 -10
  234. package/functions/utils/refreshBalance.cjs +1 -1
  235. package/functions/utils/refreshBalance.mjs +2 -2
  236. package/index.cjs +1 -1
  237. package/index.mjs +4 -8
  238. package/internal/token.utils.cjs +1 -1
  239. package/internal/token.utils.d.ts +1 -3
  240. package/internal/token.utils.mjs +10 -21
  241. package/package.json +34 -4
  242. package/react-native/HinkalWebViewWorker.cjs +98 -0
  243. package/react-native/HinkalWebViewWorker.d.ts +2 -0
  244. package/react-native/HinkalWebViewWorker.mjs +174 -0
  245. package/react-native/bridge/HinkalRNWorker.cjs +1 -0
  246. package/react-native/bridge/HinkalRNWorker.d.ts +13 -0
  247. package/react-native/bridge/HinkalRNWorker.mjs +26 -0
  248. package/react-native/bridge/serialization.utils.cjs +1 -0
  249. package/react-native/bridge/serialization.utils.d.ts +3 -0
  250. package/react-native/bridge/serialization.utils.mjs +13 -0
  251. package/react-native/metro-config.js +90 -0
  252. package/react-native/shims/circomlibjs-hinkal-fork.js +14 -0
  253. package/react-native/shims/circomlibjs.js +15 -0
  254. package/react-native/shims/constants.js +7 -0
  255. package/react-native/shims/crypto.js +103 -0
  256. package/react-native/shims/ffjavascript.js +5 -0
  257. package/react-native/shims/fs.js +5 -0
  258. package/react-native/shims/globals.js +10 -0
  259. package/react-native/shims/idb-keyval.js +75 -0
  260. package/react-native/shims/multiformats.js +1 -0
  261. package/react-native/shims/os.js +7 -0
  262. package/react-native/shims/path.js +11 -0
  263. package/react-native/shims/readline.js +6 -0
  264. package/react-native/shims/snarkjs.js +21 -0
  265. package/react-native/shims/url.js +5 -0
  266. package/react-native/shims/web-worker.js +7 -0
  267. package/react-native/shims/worker_threads.js +6 -0
  268. package/react-native/shims.d.ts +16 -0
  269. package/react-native/workerCDNUrls.cjs +1 -0
  270. package/react-native/workerCDNUrls.d.ts +2 -0
  271. package/react-native/workerCDNUrls.mjs +14 -0
  272. package/sdk/package.json.cjs +1 -0
  273. package/sdk/package.json.mjs +130 -0
  274. package/services/Hinkal.cjs +1 -1
  275. package/services/Hinkal.d.ts +6 -5
  276. package/services/Hinkal.mjs +50 -48
  277. package/types/IHinkal.d.ts +6 -5
  278. package/common/src/API/kycCalls.cjs +0 -1
  279. package/common/src/API/kycCalls.d.ts +0 -14
  280. package/common/src/API/kycCalls.mjs +0 -26
  281. package/common/src/constants/assets.constants.cjs +0 -1
  282. package/common/src/constants/assets.constants.d.ts +0 -13
  283. package/common/src/constants/assets.constants.mjs +0 -4
  284. package/common/src/constants/kyc.constants.cjs +0 -1
  285. package/common/src/constants/kyc.constants.d.ts +0 -29
  286. package/common/src/constants/kyc.constants.mjs +0 -126
  287. package/common/src/constants/token.limits.constants.cjs +0 -1
  288. package/common/src/constants/token.limits.constants.d.ts +0 -5
  289. package/common/src/constants/token.limits.constants.mjs +0 -3
  290. package/common/src/data-structures/Hinkal/HinkalPrivateBalanceController.cjs +0 -1
  291. package/common/src/data-structures/Hinkal/hinkalGetZkMeProvider.cjs +0 -1
  292. package/common/src/data-structures/Hinkal/hinkalGetZkMeProvider.d.ts +0 -28
  293. package/common/src/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +0 -22
  294. package/common/src/externalABIs/BabPassport.json.cjs +0 -1
  295. package/common/src/externalABIs/BabPassport.json.mjs +0 -20
  296. package/common/src/externalABIs/GalxePassport.json.cjs +0 -1
  297. package/common/src/externalABIs/GalxePassport.json.mjs +0 -37
  298. package/common/src/functions/kyc/aiPriseHelper.d.ts +0 -0
  299. package/common/src/functions/kyc/checkTokenLimitsUSD.cjs +0 -1
  300. package/common/src/functions/kyc/checkTokenLimitsUSD.d.ts +0 -1
  301. package/common/src/functions/kyc/checkTokenLimitsUSD.mjs +0 -29
  302. package/common/src/functions/kyc/index.cjs +0 -1
  303. package/common/src/functions/kyc/index.d.ts +0 -3
  304. package/common/src/functions/kyc/index.mjs +0 -3
  305. package/common/src/functions/kyc/openDefaultPassportWindow.cjs +0 -1
  306. package/common/src/functions/kyc/openDefaultPassportWindow.d.ts +0 -1
  307. package/common/src/functions/kyc/openDefaultPassportWindow.mjs +0 -7
  308. package/common/src/functions/kyc/passportHelper.cjs +0 -1
  309. package/common/src/functions/kyc/passportHelper.d.ts +0 -3
  310. package/common/src/functions/kyc/passportHelper.mjs +0 -1
  311. package/common/src/functions/kyc/zkMeHelper.cjs +0 -1
  312. package/common/src/functions/kyc/zkMeHelper.d.ts +0 -4
  313. package/common/src/functions/kyc/zkMeHelper.mjs +0 -42
  314. package/common/src/functions/web3/events/balanceChangedHandler.cjs +0 -1
  315. package/common/src/functions/web3/events/balanceChangedHandler.d.ts +0 -5
  316. package/common/src/functions/web3/events/balanceChangedHandler.mjs +0 -21
  317. package/common/src/types/kyc.types.cjs +0 -1
  318. package/common/src/types/kyc.types.d.ts +0 -41
  319. package/common/src/types/kyc.types.mjs +0 -10
  320. package/common/src/webworker/logError-CmD5XYI9.js +0 -2
  321. package/common/src/webworker/workerProxy-C49-EPZz.js +0 -1
@@ -0,0 +1,47 @@
1
+ import { zeroAddress as e } from "../../constants/protocol.constants.mjs";
2
+ import { lowerCaseIncludes as t } from "../../functions/utils/caseInsensitive.utils.mjs";
3
+ import { StorageKeys as n } from "../../types/cache.types.mjs";
4
+ import { httpClient as r } from "../http/HttpClient.mjs";
5
+ import "../http/index.mjs";
6
+ import { addressToHexFormat as i, getTronWalletRpcUrl as a, toTronBase58IfHex as o } from "../../functions/utils/tron.utils.mjs";
7
+ import { API as s } from "../../API/API.mjs";
8
+ import { getStateKey as c } from "../../functions/utils/string.utils.mjs";
9
+ import { tokenVisibilityStorage as l } from "./token-visibility-db.mjs";
10
+ import { overlayTokensWithRegistryData as u } from "../../functions/utils/erc20tokenFunctions.mjs";
11
+ import { get as d, update as f } from "idb-keyval";
12
+ //#region libs/shared/common/src/data-structures/TokenDBs/TronPublicTokensDB.ts
13
+ var p = class {
14
+ fetchedTokens = {};
15
+ async getPublicTokens(e, t) {
16
+ let r = c(e, t);
17
+ return u((await d(n.TRON_PUBLIC_TOKENS))?.[r] || [], t);
18
+ }
19
+ async getFetchedTokens(e, t) {
20
+ let n = c(e, t);
21
+ return u(this.fetchedTokens[n] || [], t);
22
+ }
23
+ async fetchAndUpdatePublicTokens(e, r) {
24
+ let i = c(e, r), a = await this.getHeldTokenAddresses(e, r);
25
+ if (!a.length) return;
26
+ let o = (await s.tokensInfoCall(r, a)).filter((e) => !!e), u = await l.hideSpamsAndFetchHiddenTokensAddresses(r, o), d = o.filter((e) => !t(u, e.erc20TokenAddress));
27
+ await f(n.TRON_PUBLIC_TOKENS, (e = {}) => {
28
+ let t = {
29
+ ...e,
30
+ [i]: d
31
+ };
32
+ return this.fetchedTokens = t, t;
33
+ });
34
+ }
35
+ async getHeldTokenAddresses(t, n) {
36
+ let s = o(t), c = `${a(n)}/v1/accounts/${s}`, l = (await r.get(c))?.data?.[0];
37
+ if (!l) return [];
38
+ let u = [];
39
+ return l.balance && l.balance > 0 && u.push(e), (l.trc20 ?? []).forEach((e) => {
40
+ Object.entries(e).forEach(([e, t]) => {
41
+ BigInt(t) > 0n && u.push(i(e));
42
+ });
43
+ }), Array.from(new Set(u));
44
+ }
45
+ }, m = new p();
46
+ //#endregion
47
+ export { p as TronPublicTokensDB, m as tronPublicTokensDB };
@@ -1 +1 @@
1
- require(`./token-visibility-db.cjs`),require(`./PrivateTokensDB.cjs`),require(`./ArcPublicTokensDB.cjs`),require(`./PublicTokensDB.cjs`);
1
+ require(`./token-visibility-db.cjs`),require(`./PrivateTokensDB.cjs`),require(`./ArcPublicTokensDB.cjs`),require(`./TronPublicTokensDB.cjs`),require(`./TempoPublicTokensDB.cjs`),require(`./PublicTokensDB.cjs`);
@@ -2,3 +2,5 @@ export * from './PrivateTokensDB';
2
2
  export * from './PublicTokensDB';
3
3
  export * from './token-visibility-db';
4
4
  export * from './ArcPublicTokensDB';
5
+ export * from './TronPublicTokensDB';
6
+ export * from './TempoPublicTokensDB';
@@ -1,4 +1,6 @@
1
1
  import "./token-visibility-db.mjs";
2
2
  import "./PrivateTokensDB.mjs";
3
3
  import "./ArcPublicTokensDB.mjs";
4
+ import "./TronPublicTokensDB.mjs";
5
+ import "./TempoPublicTokensDB.mjs";
4
6
  import "./PublicTokensDB.mjs";
@@ -1,5 +1,5 @@
1
1
  import { ethers } from 'ethers';
2
- import { Mutex } from 'async-mutex';
2
+ import { ChainBalanceFetchingLock } from '../../../mutexes/chainBalanceRwLock';
3
3
  import { EventProcessorFunction } from '../../../types/events.types';
4
4
  import { BlockchainEvent } from '../../BlockchainEvent/BlockchainEvent';
5
5
  export declare abstract class BlockchainEventEmitter {
@@ -16,8 +16,8 @@ export declare abstract class BlockchainEventEmitter {
16
16
  private _isReady;
17
17
  protected isServer: boolean;
18
18
  private inProgress;
19
- protected eventsFetchingMutex: Mutex;
20
- constructor(chainId: number, contract: ethers.Contract, initialBlockNumber: number, isServer: boolean, eventsFetchingMutex: Mutex, maxPageSize?: number, depositOnChainUtxosContract?: ethers.Contract);
19
+ protected eventsFetchingMutex: ChainBalanceFetchingLock;
20
+ constructor(chainId: number, contract: ethers.Contract, initialBlockNumber: number, isServer: boolean, eventsFetchingMutex: ChainBalanceFetchingLock, maxPageSize?: number, depositOnChainUtxosContract?: ethers.Contract);
21
21
  get latestBlockNumber(): number;
22
22
  get chainId(): number;
23
23
  get isReady(): boolean;
@@ -1,11 +1,11 @@
1
1
  import { ethers } from 'ethers';
2
2
  import { EventCategory } from '../../../types/events.types';
3
3
  import { BlockchainEventEmitter } from './BlockchainEventEmitter';
4
- import { Mutex } from 'async-mutex';
4
+ import { ChainBalanceFetchingLock } from '../../../mutexes/chainBalanceRwLock';
5
5
  import { ClientEventHelper } from '../helpers/ClientEventHelper';
6
6
  export declare class ClientBlockchainEventEmitter extends BlockchainEventEmitter {
7
7
  clientEventHelper: ClientEventHelper;
8
- constructor(eventCategory: EventCategory, chainId: number, contract: ethers.Contract, initialBlockNumber: number, eventsFetchingMutex: Mutex, maxPageSize?: number, depositOnChainUtxosContract?: ethers.Contract);
8
+ constructor(eventCategory: EventCategory, chainId: number, contract: ethers.Contract, initialBlockNumber: number, eventsFetchingMutex: ChainBalanceFetchingLock, maxPageSize?: number, depositOnChainUtxosContract?: ethers.Contract);
9
9
  protected clear(): void;
10
10
  protected startUpdateListener(): void;
11
11
  }
@@ -1,11 +1,11 @@
1
1
  import { Connection, PublicKey } from '@solana/web3.js';
2
2
  import { Idl } from '@coral-xyz/anchor';
3
3
  import { SolanaBlockchainEventEmitter } from './SolanaBlockchainEventEmitter';
4
- import { Mutex } from 'async-mutex';
4
+ import { ChainBalanceFetchingLock } from '../../../mutexes/chainBalanceRwLock';
5
5
  import { ClientEventHelper } from '../helpers/ClientEventHelper';
6
6
  export declare class ClientSolanaBlockchainEventEmitter extends SolanaBlockchainEventEmitter {
7
7
  clientEventHelper: ClientEventHelper;
8
- constructor(chainId: number, connection: Connection, programId: PublicKey, initialSlot: number, eventsFetchingMutex: Mutex, maxPageSize?: number, idl?: Idl);
8
+ constructor(chainId: number, connection: Connection, programId: PublicKey, initialSlot: number, eventsFetchingMutex: ChainBalanceFetchingLock, maxPageSize?: number, idl?: Idl);
9
9
  protected clear(): void;
10
10
  protected startUpdateListener(): void;
11
11
  }
@@ -1,6 +1,6 @@
1
1
  import { Connection, PublicKey } from '@solana/web3.js';
2
2
  import { Idl } from '@coral-xyz/anchor';
3
- import { Mutex } from 'async-mutex';
3
+ import { ChainBalanceFetchingLock } from '../../../mutexes/chainBalanceRwLock';
4
4
  import { EventProcessorFunction } from '../../../types/events.types';
5
5
  import { BlockchainEvent } from '../../BlockchainEvent/BlockchainEvent';
6
6
  export declare abstract class SolanaBlockchainEventEmitter {
@@ -17,8 +17,8 @@ export declare abstract class SolanaBlockchainEventEmitter {
17
17
  private inProgress;
18
18
  private anchorParser?;
19
19
  private anchorCoder?;
20
- protected eventsFetchingMutex: Mutex;
21
- constructor(chainId: number, connection: Connection, programId: PublicKey, initialSlot: number, isServer: boolean, eventsFetchingMutex: Mutex, maxPageSize?: number);
20
+ protected eventsFetchingMutex: ChainBalanceFetchingLock;
21
+ constructor(chainId: number, connection: Connection, programId: PublicKey, initialSlot: number, isServer: boolean, eventsFetchingMutex: ChainBalanceFetchingLock, maxPageSize?: number);
22
22
  get chainId(): number;
23
23
  get latestBlockNumber(): number;
24
24
  get isReady(): boolean;
@@ -1,6 +1,7 @@
1
1
  export * from './ValueCache';
2
2
  export * from './crypto-keys';
3
3
  export * from './Hinkal';
4
+ export * from './private-balances';
4
5
  export * from './merkle-tree';
5
6
  export * from './provider-adapter/IProviderAdapter';
6
7
  export * from './event-service';
@@ -0,0 +1 @@
1
+ var e=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}dispatch(e){this.listeners.forEach(t=>t(e))}},t=new e;exports.BalanceChangedHandler=e,exports.balanceChangedHandler=t;
@@ -0,0 +1,9 @@
1
+ import { PrivateBalanceUpdateEventType } from '../../types';
2
+ type BalanceChangeListener = (detail?: PrivateBalanceUpdateEventType) => void;
3
+ export declare class BalanceChangedHandler {
4
+ private readonly listeners;
5
+ subscribe(listener: BalanceChangeListener): () => void;
6
+ dispatch(detail: PrivateBalanceUpdateEventType): void;
7
+ }
8
+ export declare const balanceChangedHandler: BalanceChangedHandler;
9
+ export {};
@@ -0,0 +1,12 @@
1
+ //#region libs/shared/common/src/data-structures/private-balances/BalanceChangedHandler.ts
2
+ var e = class {
3
+ listeners = /* @__PURE__ */ new Set();
4
+ subscribe(e) {
5
+ return this.listeners.add(e), () => this.listeners.delete(e);
6
+ }
7
+ dispatch(e) {
8
+ this.listeners.forEach((t) => t(e));
9
+ }
10
+ }, t = new e();
11
+ //#endregion
12
+ export { e as BalanceChangedHandler, t as balanceChangedHandler };
@@ -0,0 +1 @@
1
+ const e=require(`../../functions/web3/etherFunctions.cjs`),t=require(`../../functions/utils/upToDateState.cjs`),n=require(`../../types/balances.types.cjs`),r=require(`../../error-handling/logger.cjs`),i=require(`../../functions/utils/string.utils.cjs`),a=require(`./BalanceChangedHandler.cjs`),o=require(`../IndexedDB/private-balances-db.cjs`),s=require(`../IndexedDB/prices-db.cjs`),c=require(`./privateBalancesReducer.cjs`);var l=class{privateBalancesState={};privateBalancesListeners=new Set;hinkal;unsubscribeBalanceChange;constructor(e){this.hinkal=e,this.unsubscribeBalanceChange=a.balanceChangedHandler.subscribe(e=>{this.applyRefreshFromBalanceChangeEvent(e).catch(e=>{r.Logger.error(`Private balance refresh from balance change failed:`,e)})})}getSnapshot(){return this.privateBalancesState}onPrivateBalancesWithUSDChange(e){return this.privateBalancesListeners.add(e),()=>this.privateBalancesListeners.delete(e)}dispose(){this.unsubscribeBalanceChange(),this.privateBalancesListeners.clear()}async applyRefreshFromBalanceChangeEvent(e){if(!e){await this.refreshInternal(n.PrivateBalanceUpdateType.FreshWithoutLoader);return}let{updateType:t,balanceChangeState:r,chainIdToUpdate:i,resetCacheBefore:a,updateTokensListBefore:o}=e;await this.refreshInternal(t,r,a,o,i)}dispatch(e){this.privateBalancesState=c.privateBalancesReducer(this.privateBalancesState,e);let t=this.privateBalancesState;this.privateBalancesListeners.forEach(e=>e(t))}async getAddressAndChain(e){try{return{ethAdd:e?.ethereumAddress??await this.hinkal.getEthereumAddress(),userKeys:e?.userKeys??this.hinkal.userKeys}}catch{return{ethAdd:void 0,userKeys:void 0}}}async hasCache(e,t){return await o.privateBalancesStorage.getBalancesByWallet(e,t)!==void 0}async getBalancesWithUsdValues(t,n){try{if(!n)return[];let r=t.map(e=>e.token.erc20TokenAddress);if(!r.length)return[];let i=await s.pricesStorage.getAndUpdatePrices(n,r),a=new Map(r.map((e,t)=>[e,i[t]]));return[...t.map(t=>{try{let n=t.token.erc20TokenAddress,r=a.get(n)??0,i=t.balance,o=Number(e.getAmountInToken(t.token,i))*r;return{...t,usdValue:o}}catch{return{...t,usdValue:0}}})]}catch{return r.Logger.log(`Error fetching private token balances`),[]}}handleCached=async(n,a)=>{try{await t.checkAddressNotUpdated(this.hinkal,n),this.dispatch({type:`SET_BALANCES`,chainId:a,balances:void 0});let r=await o.privateBalancesStorage.getBalancesByWallet(n,a),c=await s.pricesStorage.getPrices();if(await t.checkAddressNotUpdated(this.hinkal,n),!r||(this.dispatch({type:`SET_BALANCES`,chainId:a,balances:r}),!c))return;let l=r.map(t=>{let n=i.getTokenStateKey(t.token.erc20TokenAddress,a);return{...t,usdValue:c[n]?Number(e.getAmountInToken(t.token,t.balance))*c[n]:0}});this.dispatch({type:`SET_USD_BALANCES`,chainId:a,balances:l})}catch(e){r.Logger.error(`Error refreshing cached private balance:`,e)}};handleFresh=async(e,n,i,a,s,c)=>{let l=s;try{await t.checkAddressNotUpdated(this.hinkal,e);let r=await this.hasCache(e,n);await t.checkAddressNotUpdated(this.hinkal,e),l=s||!r,l&&this.dispatch({type:`SET_LOADING`,chainId:n,newValue:!0}),await t.checkAddressNotUpdated(this.hinkal,e),a&&await this.hinkal.resetMerkle([n]);let u=await this.hinkal.getTotalBalance(n,i,e,a,c);await t.checkAddressNotUpdated(this.hinkal,e);let d=u.filter(e=>e.balance>0n);this.dispatch({type:`SET_BALANCES`,chainId:n,balances:d}),await o.privateBalancesStorage.setBalances(e,n,d),await t.checkAddressNotUpdated(this.hinkal,e),l&&(this.dispatch({type:`SET_USD_LOADING`,chainId:n,newValue:!0}),this.dispatch({type:`SET_LOADING`,chainId:n,newValue:!1})),await t.checkAddressNotUpdated(this.hinkal,e);let f=await this.getBalancesWithUsdValues(d,n);await t.checkAddressNotUpdated(this.hinkal,e),f.length>0&&this.dispatch({type:`SET_USD_BALANCES`,chainId:n,balances:f})}catch(e){r.Logger.error(`Error refreshing private balance:`,e)}finally{l&&(this.dispatch({type:`SET_LOADING`,chainId:n,newValue:!1}),this.dispatch({type:`SET_USD_LOADING`,chainId:n,newValue:!1}))}};getSupportedChainsToUpdate(e){let t=this.hinkal.getSupportedChains();return e?t.includes(e)?[e]:[]:t}async refreshInternal(e=n.PrivateBalanceUpdateType.FreshWithoutLoader,t,r=!1,i=!1,a){let{ethAdd:o,userKeys:s}=await this.getAddressAndChain(t);!o||!s?.getShieldedPublicKey()||await Promise.all(this.getSupportedChainsToUpdate(a).map(async t=>{switch(e){case n.PrivateBalanceUpdateType.OnlyCache:await this.handleCached(o,t);break;case n.PrivateBalanceUpdateType.Fresh:await this.handleFresh(o,t,s,r,!0,i);break;case n.PrivateBalanceUpdateType.FreshWithoutLoader:await this.handleFresh(o,t,s,r,!1,i);break;default:break}}))}};exports.HinkalPrivateBalanceController=l;
@@ -1,12 +1,14 @@
1
1
  import { PrivateBalancesState } from '../../types/balances.types';
2
- import { IHinkal } from './IHinkal';
2
+ import { IHinkal } from '../Hinkal/IHinkal';
3
3
  export declare class HinkalPrivateBalanceController {
4
- private readonly hinkal;
5
4
  private privateBalancesState;
6
5
  private readonly privateBalancesListeners;
6
+ private readonly hinkal;
7
+ private readonly unsubscribeBalanceChange;
7
8
  constructor(hinkal: IHinkal);
8
9
  getSnapshot(): PrivateBalancesState;
9
10
  onPrivateBalancesWithUSDChange(callback: (state: PrivateBalancesState) => void): () => void;
11
+ dispose(): void;
10
12
  private applyRefreshFromBalanceChangeEvent;
11
13
  private dispatch;
12
14
  private getAddressAndChain;
@@ -3,84 +3,18 @@ import { checkAddressNotUpdated as t } from "../../functions/utils/upToDateState
3
3
  import { PrivateBalanceUpdateType as n } from "../../types/balances.types.mjs";
4
4
  import { Logger as r } from "../../error-handling/logger.mjs";
5
5
  import { getTokenStateKey as i } from "../../functions/utils/string.utils.mjs";
6
- import { isSameERC20Token as a } from "../../functions/utils/token-check.utils.mjs";
7
- import { subscribeToBalanceChange as o } from "../../functions/web3/events/balanceChangedHandler.mjs";
8
- import { privateBalancesStorage as s } from "../IndexedDB/private-balances-db.mjs";
9
- import { pricesStorage as c } from "../IndexedDB/prices-db.mjs";
10
- //#region libs/shared/common/src/data-structures/Hinkal/HinkalPrivateBalanceController.ts
11
- var l = (e, t) => {
12
- switch (t.type) {
13
- case "SET_BALANCES": {
14
- let n = e[t.chainId];
15
- if (t.balances === void 0) {
16
- let n = { ...e };
17
- return delete n[t.chainId], Object.keys(n).length > 0 ? n : {};
18
- }
19
- if (n === void 0) return {
20
- ...e,
21
- [t.chainId]: t.balances
22
- };
23
- let r = t.balances, i = r.filter((e) => !n.some((t) => a(e.token, t.token))), o = n.map((e) => ({
24
- ...e,
25
- balance: r.find((t) => a(t.token, e.token))?.balance ?? 0n
26
- })).filter((e) => e.balance > 0n);
27
- return o = [...o, ...i], {
28
- ...e,
29
- [t.chainId]: o
30
- };
31
- }
32
- case "SET_USD_BALANCES": {
33
- let n = e[t.chainId];
34
- if (n === void 0 || t.balances === void 0) return e;
35
- let r = t.balances, i = n.map((e) => ({
36
- ...e,
37
- usdValue: r.find((t) => a(t.token, e.token))?.usdValue ?? 0
38
- }));
39
- return {
40
- ...e,
41
- [t.chainId]: i
42
- };
43
- }
44
- case "CLEAR_BALANCES": {
45
- if (t.chainId === void 0) return {};
46
- let n = { ...e };
47
- return delete n[t.chainId], Object.keys(n).length > 0 ? n : {};
48
- }
49
- case "SET_LOADING": {
50
- let n = e[t.chainId];
51
- if (n === void 0) return e;
52
- if (n.length === 0 && t.newValue) return {
53
- ...e,
54
- [t.chainId]: void 0
55
- };
56
- let r = n.map((e) => ({
57
- ...e,
58
- isBalanceLoading: t.newValue
59
- }));
60
- return {
61
- ...e,
62
- [t.chainId]: r
63
- };
64
- }
65
- case "SET_USD_LOADING": {
66
- let n = e[t.chainId];
67
- if (n === void 0) return e;
68
- let r = n.map((e) => ({
69
- ...e,
70
- isUsdValueLoading: t.newValue
71
- }));
72
- return {
73
- ...e,
74
- [t.chainId]: r
75
- };
76
- }
77
- default: return e;
78
- }
79
- }, u = class {
6
+ import { balanceChangedHandler as a } from "./BalanceChangedHandler.mjs";
7
+ import { privateBalancesStorage as o } from "../IndexedDB/private-balances-db.mjs";
8
+ import { pricesStorage as s } from "../IndexedDB/prices-db.mjs";
9
+ import { privateBalancesReducer as c } from "./privateBalancesReducer.mjs";
10
+ //#region libs/shared/common/src/data-structures/private-balances/HinkalPrivateBalanceController.ts
11
+ var l = class {
80
12
  privateBalancesState = {};
81
13
  privateBalancesListeners = /* @__PURE__ */ new Set();
14
+ hinkal;
15
+ unsubscribeBalanceChange;
82
16
  constructor(e) {
83
- this.hinkal = e, o((e) => {
17
+ this.hinkal = e, this.unsubscribeBalanceChange = a.subscribe((e) => {
84
18
  this.applyRefreshFromBalanceChangeEvent(e).catch((e) => {
85
19
  r.error("Private balance refresh from balance change failed:", e);
86
20
  });
@@ -92,6 +26,9 @@ var l = (e, t) => {
92
26
  onPrivateBalancesWithUSDChange(e) {
93
27
  return this.privateBalancesListeners.add(e), () => this.privateBalancesListeners.delete(e);
94
28
  }
29
+ dispose() {
30
+ this.unsubscribeBalanceChange(), this.privateBalancesListeners.clear();
31
+ }
95
32
  async applyRefreshFromBalanceChangeEvent(e) {
96
33
  if (!e) {
97
34
  await this.refreshInternal(n.FreshWithoutLoader);
@@ -101,25 +38,32 @@ var l = (e, t) => {
101
38
  await this.refreshInternal(t, r, a, o, i);
102
39
  }
103
40
  dispatch(e) {
104
- this.privateBalancesState = l(this.privateBalancesState, e);
41
+ this.privateBalancesState = c(this.privateBalancesState, e);
105
42
  let t = this.privateBalancesState;
106
43
  this.privateBalancesListeners.forEach((e) => e(t));
107
44
  }
108
45
  async getAddressAndChain(e) {
109
- return {
110
- ethAdd: e?.ethereumAddress ?? await this.hinkal.getEthereumAddress(),
111
- userKeys: e?.userKeys ?? this.hinkal.userKeys
112
- };
46
+ try {
47
+ return {
48
+ ethAdd: e?.ethereumAddress ?? await this.hinkal.getEthereumAddress(),
49
+ userKeys: e?.userKeys ?? this.hinkal.userKeys
50
+ };
51
+ } catch {
52
+ return {
53
+ ethAdd: void 0,
54
+ userKeys: void 0
55
+ };
56
+ }
113
57
  }
114
58
  async hasCache(e, t) {
115
- return await s.getBalancesByWallet(e, t) !== void 0;
59
+ return await o.getBalancesByWallet(e, t) !== void 0;
116
60
  }
117
61
  async getBalancesWithUsdValues(t, n) {
118
62
  try {
119
63
  if (!n) return [];
120
64
  let r = t.map((e) => e.token.erc20TokenAddress);
121
65
  if (!r.length) return [];
122
- let i = await c.getAndUpdatePrices(n, r), a = new Map(r.map((e, t) => [e, i[t]]));
66
+ let i = await s.getAndUpdatePrices(n, r), a = new Map(r.map((e, t) => [e, i[t]]));
123
67
  return [...t.map((t) => {
124
68
  try {
125
69
  let n = t.token.erc20TokenAddress, r = a.get(n) ?? 0, i = t.balance, o = Number(e(t.token, i)) * r;
@@ -145,17 +89,17 @@ var l = (e, t) => {
145
89
  chainId: a,
146
90
  balances: void 0
147
91
  });
148
- let r = await s.getBalancesByWallet(n, a), o = await c.getPrices();
92
+ let r = await o.getBalancesByWallet(n, a), c = await s.getPrices();
149
93
  if (await t(this.hinkal, n), !r || (this.dispatch({
150
94
  type: "SET_BALANCES",
151
95
  chainId: a,
152
96
  balances: r
153
- }), !o)) return;
97
+ }), !c)) return;
154
98
  let l = r.map((t) => {
155
99
  let n = i(t.token.erc20TokenAddress, a);
156
100
  return {
157
101
  ...t,
158
- usdValue: o[n] ? Number(e(t.token, t.balance)) * o[n] : 0
102
+ usdValue: c[n] ? Number(e(t.token, t.balance)) * c[n] : 0
159
103
  };
160
104
  });
161
105
  this.dispatch({
@@ -167,12 +111,12 @@ var l = (e, t) => {
167
111
  r.error("Error refreshing cached private balance:", e);
168
112
  }
169
113
  };
170
- handleFresh = async (e, n, i, a, o, c) => {
171
- let l = o;
114
+ handleFresh = async (e, n, i, a, s, c) => {
115
+ let l = s;
172
116
  try {
173
117
  await t(this.hinkal, e);
174
118
  let r = await this.hasCache(e, n);
175
- await t(this.hinkal, e), l = o || !r, l && this.dispatch({
119
+ await t(this.hinkal, e), l = s || !r, l && this.dispatch({
176
120
  type: "SET_LOADING",
177
121
  chainId: n,
178
122
  newValue: !0
@@ -184,7 +128,7 @@ var l = (e, t) => {
184
128
  type: "SET_BALANCES",
185
129
  chainId: n,
186
130
  balances: d
187
- }), await s.setBalances(e, n, d), await t(this.hinkal, e), l && (this.dispatch({
131
+ }), await o.setBalances(e, n, d), await t(this.hinkal, e), l && (this.dispatch({
188
132
  type: "SET_USD_LOADING",
189
133
  chainId: n,
190
134
  newValue: !0
@@ -236,4 +180,4 @@ var l = (e, t) => {
236
180
  }
237
181
  };
238
182
  //#endregion
239
- export { u as HinkalPrivateBalanceController };
183
+ export { l as HinkalPrivateBalanceController };
@@ -0,0 +1 @@
1
+ require(`./BalanceChangedHandler.cjs`),require(`./privateBalancesReducer.cjs`),require(`./HinkalPrivateBalanceController.cjs`);
@@ -0,0 +1,3 @@
1
+ export * from './BalanceChangedHandler';
2
+ export * from './HinkalPrivateBalanceController';
3
+ export * from './privateBalancesReducer';
@@ -0,0 +1,3 @@
1
+ import "./BalanceChangedHandler.mjs";
2
+ import "./privateBalancesReducer.mjs";
3
+ import "./HinkalPrivateBalanceController.mjs";
@@ -0,0 +1 @@
1
+ const e=require(`../../functions/utils/token-check.utils.cjs`);var t=(t,n)=>{switch(n.type){case`SET_BALANCES`:{let r=t[n.chainId];if(n.balances===void 0){let e={...t};return delete e[n.chainId],Object.keys(e).length>0?e:{}}if(r===void 0)return{...t,[n.chainId]:n.balances};let i=n.balances,a=i.filter(t=>!r.some(n=>e.isSameERC20Token(t.token,n.token))),o=r.map(t=>({...t,balance:i.find(n=>e.isSameERC20Token(n.token,t.token))?.balance??0n})).filter(e=>e.balance>0n);return o=[...o,...a],{...t,[n.chainId]:o}}case`SET_USD_BALANCES`:{let r=t[n.chainId];if(r===void 0||n.balances===void 0)return t;let i=n.balances,a=r.map(t=>({...t,usdValue:i.find(n=>e.isSameERC20Token(n.token,t.token))?.usdValue??0}));return{...t,[n.chainId]:a}}case`CLEAR_BALANCES`:{if(n.chainId===void 0)return{};let e={...t};return delete e[n.chainId],Object.keys(e).length>0?e:{}}case`SET_LOADING`:{let e=t[n.chainId];if(e===void 0)return t;if(e.length===0&&n.newValue)return{...t,[n.chainId]:void 0};let r=e.map(e=>({...e,isBalanceLoading:n.newValue}));return{...t,[n.chainId]:r}}case`SET_USD_LOADING`:{let e=t[n.chainId];if(e===void 0)return t;let r=e.map(e=>({...e,isUsdValueLoading:n.newValue}));return{...t,[n.chainId]:r}}default:return t}};exports.privateBalancesReducer=t;
@@ -0,0 +1,2 @@
1
+ import { PrivateBalancesAction, PrivateBalancesState } from '../../types/balances.types';
2
+ export declare const privateBalancesReducer: (currentState: PrivateBalancesState, action: PrivateBalancesAction) => PrivateBalancesState;
@@ -0,0 +1,73 @@
1
+ import { isSameERC20Token as e } from "../../functions/utils/token-check.utils.mjs";
2
+ //#region libs/shared/common/src/data-structures/private-balances/privateBalancesReducer.ts
3
+ var t = (t, n) => {
4
+ switch (n.type) {
5
+ case "SET_BALANCES": {
6
+ let r = t[n.chainId];
7
+ if (n.balances === void 0) {
8
+ let e = { ...t };
9
+ return delete e[n.chainId], Object.keys(e).length > 0 ? e : {};
10
+ }
11
+ if (r === void 0) return {
12
+ ...t,
13
+ [n.chainId]: n.balances
14
+ };
15
+ let i = n.balances, a = i.filter((t) => !r.some((n) => e(t.token, n.token))), o = r.map((t) => ({
16
+ ...t,
17
+ balance: i.find((n) => e(n.token, t.token))?.balance ?? 0n
18
+ })).filter((e) => e.balance > 0n);
19
+ return o = [...o, ...a], {
20
+ ...t,
21
+ [n.chainId]: o
22
+ };
23
+ }
24
+ case "SET_USD_BALANCES": {
25
+ let r = t[n.chainId];
26
+ if (r === void 0 || n.balances === void 0) return t;
27
+ let i = n.balances, a = r.map((t) => ({
28
+ ...t,
29
+ usdValue: i.find((n) => e(n.token, t.token))?.usdValue ?? 0
30
+ }));
31
+ return {
32
+ ...t,
33
+ [n.chainId]: a
34
+ };
35
+ }
36
+ case "CLEAR_BALANCES": {
37
+ if (n.chainId === void 0) return {};
38
+ let e = { ...t };
39
+ return delete e[n.chainId], Object.keys(e).length > 0 ? e : {};
40
+ }
41
+ case "SET_LOADING": {
42
+ let e = t[n.chainId];
43
+ if (e === void 0) return t;
44
+ if (e.length === 0 && n.newValue) return {
45
+ ...t,
46
+ [n.chainId]: void 0
47
+ };
48
+ let r = e.map((e) => ({
49
+ ...e,
50
+ isBalanceLoading: n.newValue
51
+ }));
52
+ return {
53
+ ...t,
54
+ [n.chainId]: r
55
+ };
56
+ }
57
+ case "SET_USD_LOADING": {
58
+ let e = t[n.chainId];
59
+ if (e === void 0) return t;
60
+ let r = e.map((e) => ({
61
+ ...e,
62
+ isUsdValueLoading: n.newValue
63
+ }));
64
+ return {
65
+ ...t,
66
+ [n.chainId]: r
67
+ };
68
+ }
69
+ default: return t;
70
+ }
71
+ };
72
+ //#endregion
73
+ export { t as privateBalancesReducer };
@@ -1 +1 @@
1
- const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`);var n=class{static isBeefyStakeToken=e=>e.name.includes(`-Boost`)&&e.symbol.includes(`-Boost`);static isStakeToken=e=>this.isBeefyStakeToken(e);static isAaveToken=e=>e.aaveToken;static isKinzaToken=e=>e.name.startsWith(`Kinza`);static isPotentiallyVolatile=n=>n.erc20TokenAddress===t.zeroAddress?!1:n.isVolatile||!e.isSolanaLike(n.chainId)&&(n.balanceStorageOffset===void 0||n.allowanceStorageOffset===void 0);static isPotentiallySpamToken(e){let{name:t,symbol:n}=e,r=`${t} ${n}`,i=/(?:https?:\/\/|www\.)/i,a=/\.(?:com|io|app|org|net|co|xyz|link|site|top|in|ru|cn|me|biz|info|online|club|tech|to|cloud)(?=[^\w]|$)/i,o=/\b(?:t\.me|discord\.(?:gg|com)|twitter\.com|x\.com|telegram\.(?:me|org))\b/i,s=/@[^\s]+\.[^\s]+/i,c=/\p{Extended_Pictographic}/u,l=/[\u{1F1E6}-\u{1F1FF}]{2}/u,u=/[#*0-9]\uFE0F?\u20E3/u,d=i.test(r),f=a.test(r),p=o.test(r),m=s.test(r),h=c.test(r)||l.test(r)||u.test(r);return d||f||p||m||h}};exports.TokenChecker=n;
1
+ const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`);var n=class{static isBeefyStakeToken=e=>e.name.includes(`-Boost`)&&e.symbol.includes(`-Boost`);static isStakeToken=e=>this.isBeefyStakeToken(e);static isAaveToken=e=>e.aaveToken;static isKinzaToken=e=>e.name.startsWith(`Kinza`);static isPotentiallyVolatile=n=>n.erc20TokenAddress===t.zeroAddress?!1:n.isVolatile||!e.isSolanaLike(n.chainId)&&!e.isTronLike(n.chainId)&&(n.balanceStorageOffset===void 0||n.allowanceStorageOffset===void 0);static isPotentiallySpamToken(e){let{name:t,symbol:n}=e,r=`${t} ${n}`,i=/(?:https?:\/\/|www\.)/i,a=/\.(?:com|io|app|org|net|co|xyz|link|site|top|in|ru|cn|me|biz|info|online|club|tech|to|cloud)(?=[^\w]|$)/i,o=/\b(?:t\.me|discord\.(?:gg|com)|twitter\.com|x\.com|telegram\.(?:me|org))\b/i,s=/@[^\s]+\.[^\s]+/i,c=/\p{Extended_Pictographic}/u,l=/[\u{1F1E6}-\u{1F1FF}]{2}/u,u=/[#*0-9]\uFE0F?\u20E3/u,d=i.test(r),f=a.test(r),p=o.test(r),m=s.test(r),h=c.test(r)||l.test(r)||u.test(r);return d||f||p||m||h}};exports.TokenChecker=n;
@@ -1,16 +1,16 @@
1
- import { isSolanaLike as e } from "../../constants/chains.constants.mjs";
2
- import { zeroAddress as t } from "../../constants/protocol.constants.mjs";
1
+ import { isSolanaLike as e, isTronLike as t } from "../../constants/chains.constants.mjs";
2
+ import { zeroAddress as n } from "../../constants/protocol.constants.mjs";
3
3
  //#region libs/shared/common/src/data-structures/token-price-fetcher/TokenChecker.ts
4
- var n = class {
4
+ var r = class {
5
5
  static isBeefyStakeToken = (e) => e.name.includes("-Boost") && e.symbol.includes("-Boost");
6
6
  static isStakeToken = (e) => this.isBeefyStakeToken(e);
7
7
  static isAaveToken = (e) => e.aaveToken;
8
8
  static isKinzaToken = (e) => e.name.startsWith("Kinza");
9
- static isPotentiallyVolatile = (n) => n.erc20TokenAddress === t ? !1 : n.isVolatile || !e(n.chainId) && (n.balanceStorageOffset === void 0 || n.allowanceStorageOffset === void 0);
9
+ static isPotentiallyVolatile = (r) => r.erc20TokenAddress === n ? !1 : r.isVolatile || !e(r.chainId) && !t(r.chainId) && (r.balanceStorageOffset === void 0 || r.allowanceStorageOffset === void 0);
10
10
  static isPotentiallySpamToken(e) {
11
11
  let { name: t, symbol: n } = e, r = `${t} ${n}`, i = /(?:https?:\/\/|www\.)/i, a = /\.(?:com|io|app|org|net|co|xyz|link|site|top|in|ru|cn|me|biz|info|online|club|tech|to|cloud)(?=[^\w]|$)/i, o = /\b(?:t\.me|discord\.(?:gg|com)|twitter\.com|x\.com|telegram\.(?:me|org))\b/i, s = /@[^\s]+\.[^\s]+/i, c = /\p{Extended_Pictographic}/u, l = /[\u{1F1E6}-\u{1F1FF}]{2}/u, u = /[#*0-9]\uFE0F?\u20E3/u, d = i.test(r), f = a.test(r), p = o.test(r), m = s.test(r), h = c.test(r) || l.test(r) || u.test(r);
12
12
  return d || f || p || m || h;
13
13
  }
14
14
  };
15
15
  //#endregion
16
- export { n as TokenChecker };
16
+ export { r as TokenChecker };
@@ -1,2 +1,2 @@
1
1
  var e={CANNOT_CERTIFY_FOR_PAST_WEEK:`Certification for the past week is not available`,CYCLICAL_REFERRALS_FORBIDDEN:`Cyclical referrals are forbidden`,USER_IS_UNRANKED:`Please certify transactions to see rank`},t={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`},n={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`},r={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.`},i={...e,...t,...n,...r,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`,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.`,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`,HAS_TOKEN:`User already has an access token`,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`,UNVERIFIED_USER:`Please, pass KYC verification`,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`,ODOS_FETCH:`Odos API Fetch Error`,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`,UNISWAP_NOT_ENOUGH_LIQUIDITY:`Not Enough Liquidity`,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`,ACCESS_TOKEN_INVALID_HASH:`Access Token not minted`,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.`,ODOS_SWAP_FAILED:`Odos swap call failed`,ONEINCH_SWAP_FAILED:`One inch swap failed`,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_UNISWAP_PRICE:`Cannot get Uniswap Price`,NO_ODOS_PRICE:`Cannot get Odos Price`,NO_ONEINCH_PRICE:`Cannot get OneInch Price`,NO_LIFI_PRICE:`Cannot get LiFi Price`,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`,KYC_PRICE_FETCH_FAILED:`We’re having trouble verifying your wallet address. Please try again.`,BLACKLISTED_INPUT_COMMITMENT_ADDRESS:`One of the source addresses is restricted from private transactions`,ACCOUNT_RESOURCE_INSUFFICIENT_ERROR:`Account resource insufficient error`},a=`Not enough memory. Please, close some tabs/applications to free up memory and try again`,o=`Your transaction didn’t go through due to price slippage. Try increasing your slippage tolerance`,s={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`,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`,ODOS_FETCH:`Current Odos price is unavailable. Please try again`,ODOS_SWAP_FAILED:`Your Odos Swap transaction didn’t go through. Please try again`,ONEINCH_SWAP_FAILED:`Your 1inch Swap transaction didn’t go through. Please try again`,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:o,OKX_MIN_RETURN_NOT_REACHED:o,SOLANA_RECEIVED_LOWER_THAN_EXPECTED:o,MIN_RETURNED_NOT_REACHED:o,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:a,OUT_OF_MEMORY2:a,OUT_OF_MEMORY3:a,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.`,KYC_PRICE_FETCH_FAILED:`We’re having trouble verifying your wallet address. Please try again.`,BLACKLISTED_INPUT_COMMITMENT_ADDRESS:`The funds you’re trying to use have been flagged as sanctioned.`},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.`};exports.DIRECTLY_SHOW_MESSAGE_ERROR_CODES=c,exports.UserFriendlyErrorCodes=s,exports.gasErrorCodes=r,exports.insufficientResourcesErrorCodes=n,exports.transactionErrorCodes=i;
2
+ version`,CONNECTION_PROBLEM:`Failed to connect wallet. Please try again.`,REQUEST_PENDING:`request of type 'wallet_requestpermissions' already pending for origin`},n={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`},r={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.`},i={...e,...t,...n,...r,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`,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.`,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`,ODOS_FETCH:`Odos API Fetch Error`,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`,UNISWAP_NOT_ENOUGH_LIQUIDITY:`Not Enough Liquidity`,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.`,ODOS_SWAP_FAILED:`Odos swap call failed`,ONEINCH_SWAP_FAILED:`One inch swap failed`,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`,NO_UNISWAP_PRICE:`Cannot get Uniswap Price`,NO_ODOS_PRICE:`Cannot get Odos Price`,NO_ONEINCH_PRICE:`Cannot get OneInch Price`,NO_LIFI_PRICE:`Cannot get LiFi Price`,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`},a=`Not enough memory. Please, close some tabs/applications to free up memory and try again`,o=`Your transaction didn’t go through due to price slippage. Try increasing your slippage tolerance`,s={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`,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`,ODOS_FETCH:`Current Odos price is unavailable. Please try again`,ODOS_SWAP_FAILED:`Your Odos Swap transaction didn’t go through. Please try again`,ONEINCH_SWAP_FAILED:`Your 1inch Swap transaction didn’t go through. Please try again`,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:o,OKX_MIN_RETURN_NOT_REACHED:o,SOLANA_RECEIVED_LOWER_THAN_EXPECTED:o,MIN_RETURNED_NOT_REACHED:o,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:a,OUT_OF_MEMORY2:a,OUT_OF_MEMORY3:a,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.`},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.`};exports.DIRECTLY_SHOW_MESSAGE_ERROR_CODES=c,exports.UserFriendlyErrorCodes=s,exports.gasErrorCodes=r,exports.insufficientResourcesErrorCodes=n,exports.transactionErrorCodes=i;