@hinkal/common 0.2.19 → 0.2.21

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 (281) hide show
  1. package/API/API.cjs +1 -1
  2. package/API/API.d.ts +6 -1
  3. package/API/API.mjs +48 -41
  4. package/API/enclaveCalls.cjs +1 -1
  5. package/API/enclaveCalls.mjs +5 -4
  6. package/API/index.d.ts +1 -0
  7. package/API/proxyAccountsCalls.cjs +1 -1
  8. package/API/proxyAccountsCalls.d.ts +7 -2
  9. package/API/proxyAccountsCalls.mjs +26 -20
  10. package/API/temporaryWalletCalls.cjs +1 -0
  11. package/API/temporaryWalletCalls.d.ts +13 -0
  12. package/API/temporaryWalletCalls.mjs +20 -0
  13. package/API/unspent-utxos-calls.cjs +1 -1
  14. package/API/unspent-utxos-calls.d.ts +1 -1
  15. package/API/unspent-utxos-calls.mjs +16 -14
  16. package/README.md +36 -13
  17. package/constants/chains.constants.cjs +1 -1
  18. package/constants/chains.constants.d.ts +1 -1
  19. package/constants/chains.constants.mjs +69 -51
  20. package/constants/deploy-data/deploy-data-solana.json.cjs +1 -1
  21. package/constants/deploy-data/deploy-data-solana.json.mjs +28 -2
  22. package/constants/kyc.constants.cjs +1 -1
  23. package/constants/kyc.constants.mjs +39 -40
  24. package/constants/mediaUrls.constants.cjs +1 -1
  25. package/constants/mediaUrls.constants.d.ts +1 -0
  26. package/constants/mediaUrls.constants.mjs +2 -1
  27. package/constants/server.constants.cjs +1 -1
  28. package/constants/server.constants.d.ts +6 -1
  29. package/constants/server.constants.mjs +37 -32
  30. package/constants/token-data/polygonRegistry.json.cjs +1 -1
  31. package/constants/token-data/polygonRegistry.json.mjs +4 -4
  32. package/constants/token-data/polygonRegistryFixed.json.cjs +1 -1
  33. package/constants/token-data/polygonRegistryFixed.json.mjs +4 -4
  34. package/data-structures/AccountActions/AccountActions.cjs +1 -0
  35. package/data-structures/AccountActions/AccountActions.d.ts +18 -0
  36. package/data-structures/AccountActions/AccountActions.mjs +78 -0
  37. package/data-structures/AccountActions/index.d.ts +1 -0
  38. package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.cjs +1 -1
  39. package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.mjs +68 -71
  40. package/data-structures/BlockchainEvent/BlockchainEvent.cjs +1 -0
  41. package/data-structures/BlockchainEvent/BlockchainEvent.d.ts +14 -0
  42. package/data-structures/BlockchainEvent/BlockchainEvent.mjs +41 -0
  43. package/data-structures/Hinkal/Hinkal.cjs +1 -1
  44. package/data-structures/Hinkal/Hinkal.d.ts +14 -8
  45. package/data-structures/Hinkal/Hinkal.mjs +215 -179
  46. package/data-structures/Hinkal/IHinkal.d.ts +9 -6
  47. package/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
  48. package/data-structures/Hinkal/handleAutoDepositBack.mjs +47 -48
  49. package/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
  50. package/data-structures/Hinkal/hinkalActionReceive.mjs +25 -22
  51. package/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +1 -1
  52. package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +12 -12
  53. package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
  54. package/data-structures/Hinkal/hinkalDeposit.mjs +63 -63
  55. package/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
  56. package/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +60 -147
  57. package/data-structures/Hinkal/hinkalDepositOnChainUtxos.cjs +1 -0
  58. package/data-structures/Hinkal/hinkalDepositOnChainUtxos.d.ts +4 -0
  59. package/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +103 -0
  60. package/data-structures/Hinkal/hinkalDepostAndBridge.cjs +1 -0
  61. package/data-structures/Hinkal/hinkalDepostAndBridge.d.ts +4 -0
  62. package/data-structures/Hinkal/hinkalDepostAndBridge.mjs +214 -0
  63. package/data-structures/Hinkal/hinkalGetZkMeProvider.cjs +1 -1
  64. package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +4 -4
  65. package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
  66. package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +2 -2
  67. package/data-structures/Hinkal/hinkalPrivateWallet.mjs +103 -99
  68. package/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
  69. package/data-structures/Hinkal/hinkalProxySwap.mjs +44 -41
  70. package/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
  71. package/data-structures/Hinkal/hinkalProxyToPrivate.mjs +31 -28
  72. package/data-structures/Hinkal/hinkalSignSubAccount.cjs +1 -1
  73. package/data-structures/Hinkal/hinkalSignSubAccount.mjs +16 -13
  74. package/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
  75. package/data-structures/Hinkal/hinkalSolanaDeposit.mjs +34 -34
  76. package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
  77. package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +67 -65
  78. package/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
  79. package/data-structures/Hinkal/hinkalSolanaProxySend.mjs +35 -32
  80. package/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
  81. package/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +59 -56
  82. package/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
  83. package/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +35 -32
  84. package/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
  85. package/data-structures/Hinkal/hinkalSolanaSwap.mjs +10 -10
  86. package/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
  87. package/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +25 -25
  88. package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
  89. package/data-structures/Hinkal/hinkalSwap.mjs +34 -30
  90. package/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
  91. package/data-structures/Hinkal/hinkalTransfer.mjs +43 -39
  92. package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
  93. package/data-structures/Hinkal/hinkalWithdraw.mjs +47 -43
  94. package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
  95. package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +50 -46
  96. package/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
  97. package/data-structures/Hinkal/resetMerkleTrees.mjs +36 -34
  98. package/data-structures/IndexedDB/activity-db.cjs +1 -1
  99. package/data-structures/IndexedDB/activity-db.d.ts +1 -0
  100. package/data-structures/IndexedDB/activity-db.mjs +86 -70
  101. package/data-structures/IndexedDB/balances-db.cjs +1 -1
  102. package/data-structures/IndexedDB/balances-db.mjs +33 -30
  103. package/data-structures/IndexedDB/contact-db.cjs +1 -1
  104. package/data-structures/IndexedDB/contact-db.mjs +9 -6
  105. package/data-structures/PublicBalance/PublicBalanceWatcher.cjs +1 -0
  106. package/data-structures/PublicBalance/PublicBalanceWatcher.d.ts +20 -0
  107. package/data-structures/PublicBalance/PublicBalanceWatcher.mjs +124 -0
  108. package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.cjs +1 -0
  109. package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.d.ts +15 -0
  110. package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.mjs +64 -0
  111. package/data-structures/PublicBalance/index.d.ts +2 -0
  112. package/data-structures/TokenDBs/EventsPublicTokensDB.cjs +1 -1
  113. package/data-structures/TokenDBs/EventsPublicTokensDB.mjs +77 -78
  114. package/data-structures/crypto-keys/keys.cjs +1 -1
  115. package/data-structures/crypto-keys/keys.d.ts +0 -11
  116. package/data-structures/crypto-keys/keys.mjs +47 -107
  117. package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.cjs +1 -1
  118. package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.d.ts +3 -2
  119. package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.mjs +9 -9
  120. package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.cjs +1 -1
  121. package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.d.ts +3 -2
  122. package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.mjs +5 -5
  123. package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.cjs +1 -1
  124. package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.d.ts +3 -2
  125. package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.mjs +6 -6
  126. package/data-structures/event-service/evm/AbstractEventService.cjs +1 -1
  127. package/data-structures/event-service/evm/AbstractEventService.d.ts +3 -2
  128. package/data-structures/event-service/evm/AbstractEventService.mjs +16 -19
  129. package/data-structures/event-service/evm/AbstractNullifierSnapshotService.cjs +1 -1
  130. package/data-structures/event-service/evm/AbstractNullifierSnapshotService.d.ts +3 -3
  131. package/data-structures/event-service/evm/AbstractNullifierSnapshotService.mjs +6 -5
  132. package/data-structures/event-service/evm/AbstractSnapshotService.d.ts +1 -1
  133. package/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
  134. package/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +7 -4
  135. package/data-structures/event-service/evm/BlockchainEventEmitter.mjs +35 -34
  136. package/data-structures/event-service/evm/ClientBlockchainEventEmitter.cjs +1 -0
  137. package/data-structures/event-service/evm/ClientBlockchainEventEmitter.d.ts +11 -0
  138. package/data-structures/event-service/evm/ClientBlockchainEventEmitter.mjs +21 -0
  139. package/data-structures/event-service/evm/PollingBlockchainEventEmitter.cjs +1 -0
  140. package/data-structures/event-service/evm/PollingBlockchainEventEmitter.d.ts +6 -0
  141. package/data-structures/event-service/evm/PollingBlockchainEventEmitter.mjs +16 -0
  142. package/data-structures/event-service/helpers/ClientEventHelper.cjs +1 -0
  143. package/data-structures/event-service/helpers/ClientEventHelper.d.ts +11 -0
  144. package/data-structures/event-service/helpers/ClientEventHelper.mjs +26 -0
  145. package/data-structures/event-service/helpers/PollingEventHelper.cjs +1 -0
  146. package/data-structures/event-service/helpers/PollingEventHelper.d.ts +5 -0
  147. package/data-structures/event-service/helpers/PollingEventHelper.mjs +14 -0
  148. package/data-structures/event-service/index.d.ts +4 -0
  149. package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.cjs +1 -1
  150. package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.d.ts +3 -2
  151. package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.mjs +6 -6
  152. package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.cjs +1 -1
  153. package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.d.ts +4 -3
  154. package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +8 -8
  155. package/data-structures/event-service/solana/AbstractSolanaEventService.cjs +1 -1
  156. package/data-structures/event-service/solana/AbstractSolanaEventService.d.ts +3 -10
  157. package/data-structures/event-service/solana/AbstractSolanaEventService.mjs +5 -5
  158. package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.cjs +1 -1
  159. package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.d.ts +3 -2
  160. package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.mjs +1 -1
  161. package/data-structures/event-service/solana/AbstractSolanaSnapshotService.d.ts +1 -1
  162. package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.cjs +1 -0
  163. package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.d.ts +11 -0
  164. package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.mjs +22 -0
  165. package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.cjs +1 -0
  166. package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.d.ts +6 -0
  167. package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.mjs +16 -0
  168. package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.cjs +1 -1
  169. package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.d.ts +8 -14
  170. package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.mjs +68 -67
  171. package/data-structures/index.d.ts +3 -0
  172. package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +1 -1
  173. package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +5 -2
  174. package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.cjs +1 -1
  175. package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.mjs +5 -2
  176. package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs +1 -1
  177. package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +5 -2
  178. package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs +1 -1
  179. package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +5 -2
  180. package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs +1 -1
  181. package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +5 -2
  182. package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs +1 -1
  183. package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +5 -2
  184. package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs +1 -1
  185. package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +5 -2
  186. package/data-structures/utxo/Utxo.cjs +1 -1
  187. package/data-structures/utxo/Utxo.d.ts +1 -0
  188. package/data-structures/utxo/Utxo.mjs +18 -4
  189. package/error-handling/error-codes.constants.cjs +1 -1
  190. package/error-handling/error-codes.constants.mjs +2 -2
  191. package/functions/pre-transaction/getSolanaCalldataHash.cjs +1 -1
  192. package/functions/pre-transaction/getSolanaCalldataHash.mjs +22 -22
  193. package/functions/pre-transaction/sendV0Transaction.cjs +1 -1
  194. package/functions/pre-transaction/sendV0Transaction.mjs +53 -50
  195. package/functions/pre-transaction/solana.cjs +1 -1
  196. package/functions/pre-transaction/solana.mjs +93 -93
  197. package/functions/private-wallet/emporium.helpers.cjs +1 -1
  198. package/functions/private-wallet/emporium.helpers.d.ts +3 -2
  199. package/functions/private-wallet/emporium.helpers.mjs +118 -93
  200. package/functions/snarkjs/constructEmporiumProof.cjs +1 -1
  201. package/functions/snarkjs/constructEmporiumProof.d.ts +1 -2
  202. package/functions/snarkjs/constructEmporiumProof.mjs +89 -89
  203. package/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
  204. package/functions/snarkjs/constructSolanaZkProof.mjs +6 -2
  205. package/functions/utils/bytes32.utils.cjs +1 -1
  206. package/functions/utils/bytes32.utils.mjs +8 -7
  207. package/functions/utils/create-provider.cjs +1 -1
  208. package/functions/utils/create-provider.d.ts +1 -1
  209. package/functions/utils/create-provider.mjs +13 -9
  210. package/functions/utils/index.d.ts +0 -1
  211. package/functions/utils/prepareHinkal.cjs +1 -1
  212. package/functions/utils/prepareHinkal.d.ts +6 -7
  213. package/functions/utils/prepareHinkal.mjs +45 -53
  214. package/functions/utils/publicBalance.utils.cjs +1 -1
  215. package/functions/utils/publicBalance.utils.mjs +49 -54
  216. package/functions/utils/socket.utils.cjs +1 -0
  217. package/functions/utils/socket.utils.d.ts +1 -0
  218. package/functions/utils/socket.utils.mjs +12 -0
  219. package/functions/utils/string.utils.cjs +1 -1
  220. package/functions/utils/string.utils.d.ts +1 -0
  221. package/functions/utils/string.utils.mjs +18 -14
  222. package/functions/utils/walletBalances.utils.cjs +1 -1
  223. package/functions/utils/walletBalances.utils.d.ts +1 -1
  224. package/functions/utils/walletBalances.utils.mjs +4 -4
  225. package/functions/web3/crypto.cjs +1 -0
  226. package/functions/web3/crypto.d.ts +1 -0
  227. package/functions/web3/crypto.mjs +7 -0
  228. package/functions/web3/events/getApprovedBalance.cjs +1 -1
  229. package/functions/web3/events/getApprovedBalance.mjs +14 -14
  230. package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
  231. package/functions/web3/events/getInputUtxoAndBalance.mjs +61 -59
  232. package/functions/web3/events/getTransactionLogEvents.cjs +1 -1
  233. package/functions/web3/events/getTransactionLogEvents.mjs +32 -32
  234. package/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +1 -1
  235. package/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +6 -3
  236. package/functions/web3/functionCalls/approveToken.cjs +1 -1
  237. package/functions/web3/functionCalls/approveToken.mjs +17 -17
  238. package/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
  239. package/functions/web3/functionCalls/transactCallDirect.mjs +16 -16
  240. package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
  241. package/functions/web3/functionCalls/transactCallRelayer.mjs +13 -11
  242. package/functions/web3/getContractMetadata.cjs +1 -1
  243. package/functions/web3/getContractMetadata.mjs +17 -22
  244. package/functions/web3/getTokenHolder.cjs +1 -1
  245. package/functions/web3/getTokenHolder.mjs +20 -20
  246. package/functions/web3/index.d.ts +1 -0
  247. package/index.cjs +1 -1
  248. package/index.mjs +913 -890
  249. package/package.json +3 -2
  250. package/providers/EthersProviderAdapter.cjs +1 -1
  251. package/providers/EthersProviderAdapter.mjs +2 -5
  252. package/providers/prepareEthersHinkal.cjs +1 -1
  253. package/providers/prepareEthersHinkal.mjs +11 -4
  254. package/providers/prepareWagmiHinkal.cjs +1 -1
  255. package/providers/prepareWagmiHinkal.mjs +11 -4
  256. package/types/activities.types.d.ts +2 -0
  257. package/types/bridging-tx.types.d.ts +17 -0
  258. package/types/cache.types.cjs +1 -1
  259. package/types/cache.types.d.ts +5 -1
  260. package/types/cache.types.mjs +1 -1
  261. package/types/ethereum-network.types.d.ts +1 -0
  262. package/types/events.types.cjs +1 -0
  263. package/types/events.types.d.ts +9 -0
  264. package/types/events.types.mjs +5 -0
  265. package/types/index.d.ts +2 -0
  266. package/types/proxy.types.d.ts +11 -4
  267. package/types/sandbox.types.d.ts +2 -0
  268. package/types/solana.types.d.ts +8 -0
  269. package/types/token.types.d.ts +5 -0
  270. package/webworker/snarkjsWorker/snarkjsWorkerLauncher.cjs +1 -1
  271. package/webworker/snarkjsWorker/snarkjsWorkerLauncher.mjs +1 -1
  272. package/webworker/utxoWorker/utxoWorkerLauncher.cjs +1 -1
  273. package/webworker/utxoWorker/utxoWorkerLauncher.mjs +1 -1
  274. package/webworker/zkProofWorker/zkProofWorkerLauncher.cjs +1 -1
  275. package/webworker/zkProofWorker/zkProofWorkerLauncher.mjs +1 -1
  276. package/functions/kyc/authentoHelper.cjs +0 -1
  277. package/functions/kyc/authentoHelper.d.ts +0 -12
  278. package/functions/kyc/authentoHelper.mjs +0 -30
  279. package/functions/utils/get-hinkal-approvals.cjs +0 -1
  280. package/functions/utils/get-hinkal-approvals.d.ts +0 -3
  281. package/functions/utils/get-hinkal-approvals.mjs +0 -38
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hinkal/common",
3
- "version": "0.2.19",
3
+ "version": "0.2.21",
4
4
  "homepage": "hinkal.io",
5
5
  "author": {
6
6
  "name": "Hinkal Protocol"
@@ -71,7 +71,8 @@
71
71
  "process": "0.11.10",
72
72
  "ua-parser-js": "^1.0.37",
73
73
  "uuid": "^9.0.1",
74
- "node-forge": "^1.3.1"
74
+ "node-forge": "^1.3.1",
75
+ "socket.io-client": "^4.8.3"
75
76
  },
76
77
  "peerDependencies": {
77
78
  "wagmi": "2.13.3",
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../constants/chains.constants.cjs"),n=require("../error-handling/error-codes.constants.cjs"),o=require("ethers"),a=require("../functions/web3/getContractMetadata.cjs"),c=require("../functions/utils/create-provider.cjs");class i{signer;chainId;fetchProviders={};chainEventListener;constructor(){s.WALLET_SUPPORTED_CHAINS.forEach(r=>{const{fetchRpcUrl:e}=s.networkRegistry[r];if(!e)throw Error("No Fetch RPC URL In Provider Adapter");this.fetchProviders[r]=c.createCustomRpcProvider(e)})}initConnector(){}initSigner(r){this.signer=r}async init(r){if(r&&(this.chainId=r),!this.chainId)throw Error("No Chain Id In Provider Adapter")}async disconnectFromConnector(){}async connectToConnector(){return 0}async waitForTransaction(r,e,t){if((await this.fetchProviders[r]?.waitForTransaction(e,t))?.status)return!0;throw Error(n.transactionErrorCodes.TRANSACTION_NOT_CONFIRMED)}async signMessage(r){if(!this.signer)throw new Error("IllegalState: no signer");const e=await this.signer.signMessage(r);if(!e)throw new Error(n.transactionErrorCodes.SIGNING_FAILED);if(e.includes("error"))throw new Error(n.transactionErrorCodes.SIGNATURE_UNSUPPORTED_PERSONAL_SIGN);return e}async signTypedData(r,e,t){return this.signer._signTypedData(r,e,t)}async switchNetwork(r){const e=this.fetchProviders[r.chainId];if(!e)throw new Error("switchNetwork illegal state: no provider");this.signer=this.signer?.connect(e),this.chainEventListener?.onChainChanged(r.chainId)}async getAddress(){if(!this.signer)throw new Error("IllegalState: no signer");const r=await this.signer.getAddress();if(!r)throw new Error("IllegalState");return o.utils.getAddress(r)}setChainEventListener(r){this.chainEventListener=r}onAccountChanged(){return this.init()}onChainChanged(r){return this.init(r)}release(){this.removeListeners()}removeListeners(){this.chainEventListener=void 0}getContract(r,e,t=void 0){return a.getContract(e,r,t)}getContractWithSigner(r,e,t=void 0){if(!this.signer)throw new Error("IllegalState: no signer");return this.getContract(r,e,t).connect(this.signer)}getContractWithFetcher(r,e,t=void 0){if(!this.fetchProviders[r])throw new Error("fetchProvider not initialized");return this.getContract(r,e,t).connect(this.fetchProviders[r])}async sendTransaction(r){if(!this.signer)throw new Error("IllegalState: no signer");return await this.signer.sendTransaction(r)}async connectAndPatchProvider(){if(!this.signer)throw new Error("IllegalState: no signer");return await this.signer.getChainId()}isPermitterAvailable(){return!1}async getGasPrice(r){const e=await this.fetchProviders[r]?.getGasPrice();if(!e)throw Error("Could not fetch gas price in getGasPrice");return e.toBigInt()}}const h=new i,d=()=>new i;exports.EthersProviderAdapter=i;exports.default=d;exports.ethersProvierAdapter=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../constants/chains.constants.cjs"),n=require("../error-handling/error-codes.constants.cjs"),o=require("ethers"),a=require("../functions/web3/getContractMetadata.cjs"),c=require("../functions/utils/create-provider.cjs");class i{signer;chainId;fetchProviders={};chainEventListener;constructor(){s.WALLET_SUPPORTED_CHAINS.forEach(r=>{s.isSolanaLike(r)||(this.fetchProviders[r]=c.createCustomRpcProvider(r))})}initConnector(){}initSigner(r){this.signer=r}async init(r){if(r&&(this.chainId=r),!this.chainId)throw Error("No Chain Id In Provider Adapter")}async disconnectFromConnector(){}async connectToConnector(){return 0}async waitForTransaction(r,e,t){if((await this.fetchProviders[r]?.waitForTransaction(e,t))?.status)return!0;throw Error(n.transactionErrorCodes.TRANSACTION_NOT_CONFIRMED)}async signMessage(r){if(!this.signer)throw new Error("IllegalState: no signer");const e=await this.signer.signMessage(r);if(!e)throw new Error(n.transactionErrorCodes.SIGNING_FAILED);if(e.includes("error"))throw new Error(n.transactionErrorCodes.SIGNATURE_UNSUPPORTED_PERSONAL_SIGN);return e}async signTypedData(r,e,t){return this.signer._signTypedData(r,e,t)}async switchNetwork(r){const e=this.fetchProviders[r.chainId];if(!e)throw new Error("switchNetwork illegal state: no provider");this.signer=this.signer?.connect(e),this.chainEventListener?.onChainChanged(r.chainId)}async getAddress(){if(!this.signer)throw new Error("IllegalState: no signer");const r=await this.signer.getAddress();if(!r)throw new Error("IllegalState");return o.utils.getAddress(r)}setChainEventListener(r){this.chainEventListener=r}onAccountChanged(){return this.init()}onChainChanged(r){return this.init(r)}release(){this.removeListeners()}removeListeners(){this.chainEventListener=void 0}getContract(r,e,t=void 0){return a.getContract(e,r,t)}getContractWithSigner(r,e,t=void 0){if(!this.signer)throw new Error("IllegalState: no signer");return this.getContract(r,e,t).connect(this.signer)}getContractWithFetcher(r,e,t=void 0){if(!this.fetchProviders[r])throw new Error("fetchProvider not initialized");return this.getContract(r,e,t).connect(this.fetchProviders[r])}async sendTransaction(r){if(!this.signer)throw new Error("IllegalState: no signer");return await this.signer.sendTransaction(r)}async connectAndPatchProvider(){if(!this.signer)throw new Error("IllegalState: no signer");return await this.signer.getChainId()}isPermitterAvailable(){return!1}async getGasPrice(r){const e=await this.fetchProviders[r]?.getGasPrice();if(!e)throw Error("Could not fetch gas price in getGasPrice");return e.toBigInt()}}const h=new i,d=()=>new i;exports.EthersProviderAdapter=i;exports.default=d;exports.ethersProvierAdapter=h;
@@ -1,4 +1,4 @@
1
- import { WALLET_SUPPORTED_CHAINS as s, networkRegistry as o } from "../constants/chains.constants.mjs";
1
+ import { WALLET_SUPPORTED_CHAINS as s, isSolanaLike as o } from "../constants/chains.constants.mjs";
2
2
  import { transactionErrorCodes as i } from "../error-handling/error-codes.constants.mjs";
3
3
  import { utils as a } from "ethers";
4
4
  import { getContract as c } from "../functions/web3/getContractMetadata.mjs";
@@ -10,10 +10,7 @@ class n {
10
10
  chainEventListener;
11
11
  constructor() {
12
12
  s.forEach((r) => {
13
- const { fetchRpcUrl: t } = o[r];
14
- if (!t)
15
- throw Error("No Fetch RPC URL In Provider Adapter");
16
- this.fetchProviders[r] = h(t);
13
+ o(r) || (this.fetchProviders[r] = h(r));
17
14
  });
18
15
  }
19
16
  initConnector() {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("@solana/web3.js");require("circomlibjs-hinkal-fork");require("../constants/chains.constants.cjs");require("../error-handling/error-codes.constants.cjs");require("../data-structures/crypto-keys/keys.cjs");require("libsodium-wrappers");const q=require("../data-structures/Hinkal/Hinkal.cjs");require("../constants/vite.constants.cjs");require("../types/circom-data.types.cjs");require("node-forge");require("../data-structures/http/HttpClient.cjs");require("axios");require("../constants/token-data/index.cjs");require("idb-keyval");require("../functions/utils/convertIntegrationProviderToExternalActionId.cjs");require("../types/transactions.types.cjs");require("../types/activities.types.cjs");require("../constants/server.constants.cjs");require("../API/getServerURL.cjs");require("@coral-xyz/anchor");require("@solana/spl-token");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");require("../constants/coingecko.constants.cjs");require("../constants/reorg-depths.constants.cjs");require("../constants/addresses.constants.cjs");require("../constants/token.limits.constants.cjs");require("../constants/presale.constants.cjs");require("../constants/activity.constants.cjs");require("../constants/tasks.constants.cjs");require("../constants/events.constants.cjs");require("../functions/utils/userAgent.cjs");require("multiformats");require("async-mutex");require("../API/tenderly.api.cjs");const t=require("../crypto/preProcessing.cjs"),a=require("./EthersProviderAdapter.cjs");require("ethers-v6h");require("../functions/web3/events/getApprovedBalance.cjs");require("../functions/web3/getTokenHolder.cjs");require("../constants/save-depths.cjs");const n=async(i,u)=>{await t.preProcessing();const e=new q.Hinkal(u),r=a.default();return r.initSigner?.(i),await e.initProviderAdapter(void 0,r),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareEthersHinkal=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("@solana/web3.js");require("circomlibjs-hinkal-fork");require("../constants/chains.constants.cjs");require("../error-handling/error-codes.constants.cjs");require("../data-structures/crypto-keys/keys.cjs");require("libsodium-wrappers");const q=require("../data-structures/Hinkal/Hinkal.cjs");require("../constants/vite.constants.cjs");require("../types/circom-data.types.cjs");require("node-forge");require("../data-structures/http/HttpClient.cjs");require("axios");require("../constants/token-data/index.cjs");require("idb-keyval");require("../functions/utils/convertIntegrationProviderToExternalActionId.cjs");require("../types/transactions.types.cjs");require("../types/activities.types.cjs");require("../constants/server.constants.cjs");require("../API/getServerURL.cjs");require("@coral-xyz/anchor");require("@solana/spl-token");require("ethers-v6h");require("tweetnacl");require("bs58");require("buffer");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");require("../constants/coingecko.constants.cjs");require("../constants/reorg-depths.constants.cjs");require("../constants/addresses.constants.cjs");require("../constants/token.limits.constants.cjs");require("../constants/presale.constants.cjs");require("../constants/activity.constants.cjs");require("../constants/tasks.constants.cjs");require("../constants/events.constants.cjs");require("../functions/utils/userAgent.cjs");require("multiformats");require("../API/enclaveCalls.cjs");require("async-mutex");const t=require("../crypto/preProcessing.cjs"),a=require("./EthersProviderAdapter.cjs");require("../functions/web3/events/getInputUtxoAndBalance.cjs");require("../functions/web3/events/getApprovedBalance.cjs");require("../functions/web3/getTokenHolder.cjs");require("../constants/save-depths.cjs");require("socket.io-client");require("../data-structures/PublicBalance/PublicBalanceWatcher.cjs");require("../data-structures/PublicBalance/SolanaPublicBalancerWatcher.cjs");const n=async(i,u)=>{await t.preProcessing();const e=new q.Hinkal(u),r=a.default();return r.initSigner?.(i),await e.initProviderAdapter(void 0,r),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareEthersHinkal=n;
@@ -20,6 +20,10 @@ import "../constants/server.constants.mjs";
20
20
  import "../API/getServerURL.mjs";
21
21
  import "@coral-xyz/anchor";
22
22
  import "@solana/spl-token";
23
+ import "ethers-v6h";
24
+ import "tweetnacl";
25
+ import "bs58";
26
+ import "buffer";
23
27
  import "../constants/contracts.constants.mjs";
24
28
  import "../constants/kyc.constants.mjs";
25
29
  import "../constants/coingecko.constants.mjs";
@@ -32,19 +36,22 @@ import "../constants/tasks.constants.mjs";
32
36
  import "../constants/events.constants.mjs";
33
37
  import "../functions/utils/userAgent.mjs";
34
38
  import "multiformats";
39
+ import "../API/enclaveCalls.mjs";
35
40
  import "async-mutex";
36
- import "../API/tenderly.api.mjs";
37
41
  import { preProcessing as m } from "../crypto/preProcessing.mjs";
38
42
  import e from "./EthersProviderAdapter.mjs";
39
- import "ethers-v6h";
43
+ import "../functions/web3/events/getInputUtxoAndBalance.mjs";
40
44
  import "../functions/web3/events/getApprovedBalance.mjs";
41
45
  import "../functions/web3/getTokenHolder.mjs";
42
46
  import "../constants/save-depths.mjs";
43
- const X = async (t, o) => {
47
+ import "socket.io-client";
48
+ import "../data-structures/PublicBalance/PublicBalanceWatcher.mjs";
49
+ import "../data-structures/PublicBalance/SolanaPublicBalancerWatcher.mjs";
50
+ const tr = async (t, o) => {
44
51
  await m();
45
52
  const r = new p(o), i = e();
46
53
  return i.initSigner?.(t), await r.initProviderAdapter(void 0, i), await r.initUserKeys(), await r.resetMerkle(), r;
47
54
  };
48
55
  export {
49
- X as prepareEthersHinkal
56
+ tr as prepareEthersHinkal
50
57
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("@solana/web3.js");require("circomlibjs-hinkal-fork");require("../constants/chains.constants.cjs");require("../error-handling/error-codes.constants.cjs");require("../data-structures/crypto-keys/keys.cjs");require("libsodium-wrappers");const q=require("../data-structures/Hinkal/Hinkal.cjs");require("../constants/vite.constants.cjs");require("../types/circom-data.types.cjs");require("node-forge");require("../data-structures/http/HttpClient.cjs");require("axios");require("../constants/token-data/index.cjs");require("idb-keyval");require("../functions/utils/convertIntegrationProviderToExternalActionId.cjs");require("../types/transactions.types.cjs");require("../types/activities.types.cjs");require("../constants/server.constants.cjs");require("../API/getServerURL.cjs");require("@coral-xyz/anchor");require("@solana/spl-token");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");require("../constants/coingecko.constants.cjs");require("../constants/reorg-depths.constants.cjs");require("../constants/addresses.constants.cjs");require("../constants/token.limits.constants.cjs");require("../constants/presale.constants.cjs");require("../constants/activity.constants.cjs");require("../constants/tasks.constants.cjs");require("../constants/events.constants.cjs");require("../functions/utils/userAgent.cjs");require("multiformats");require("async-mutex");require("../API/tenderly.api.cjs");const a=require("../crypto/preProcessing.cjs");require("./EthersProviderAdapter.cjs");require("ethers-v6h");require("../functions/web3/events/getApprovedBalance.cjs");require("../functions/web3/getTokenHolder.cjs");require("../constants/save-depths.cjs");const r=require("./WagmiProviderAdapter.cjs"),t=async(i,u)=>{await a.preProcessing();const e=new q.Hinkal;return r.wagmiProviderAdapter.initConfig(u),await e.initProviderAdapter(i,r.wagmiProviderAdapter),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareWagmiHinkal=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("@solana/web3.js");require("circomlibjs-hinkal-fork");require("../constants/chains.constants.cjs");require("../error-handling/error-codes.constants.cjs");require("../data-structures/crypto-keys/keys.cjs");require("libsodium-wrappers");const q=require("../data-structures/Hinkal/Hinkal.cjs");require("../constants/vite.constants.cjs");require("../types/circom-data.types.cjs");require("node-forge");require("../data-structures/http/HttpClient.cjs");require("axios");require("../constants/token-data/index.cjs");require("idb-keyval");require("../functions/utils/convertIntegrationProviderToExternalActionId.cjs");require("../types/transactions.types.cjs");require("../types/activities.types.cjs");require("../constants/server.constants.cjs");require("../API/getServerURL.cjs");require("@coral-xyz/anchor");require("@solana/spl-token");require("ethers-v6h");require("tweetnacl");require("bs58");require("buffer");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");require("../constants/coingecko.constants.cjs");require("../constants/reorg-depths.constants.cjs");require("../constants/addresses.constants.cjs");require("../constants/token.limits.constants.cjs");require("../constants/presale.constants.cjs");require("../constants/activity.constants.cjs");require("../constants/tasks.constants.cjs");require("../constants/events.constants.cjs");require("../functions/utils/userAgent.cjs");require("multiformats");require("../API/enclaveCalls.cjs");require("async-mutex");const a=require("../crypto/preProcessing.cjs");require("./EthersProviderAdapter.cjs");require("../functions/web3/events/getInputUtxoAndBalance.cjs");require("../functions/web3/events/getApprovedBalance.cjs");require("../functions/web3/getTokenHolder.cjs");require("../constants/save-depths.cjs");require("socket.io-client");require("../data-structures/PublicBalance/PublicBalanceWatcher.cjs");require("../data-structures/PublicBalance/SolanaPublicBalancerWatcher.cjs");const r=require("./WagmiProviderAdapter.cjs"),t=async(i,u)=>{await a.preProcessing();const e=new q.Hinkal;return r.wagmiProviderAdapter.initConfig(u),await e.initProviderAdapter(i,r.wagmiProviderAdapter),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareWagmiHinkal=t;
@@ -20,6 +20,10 @@ import "../constants/server.constants.mjs";
20
20
  import "../API/getServerURL.mjs";
21
21
  import "@coral-xyz/anchor";
22
22
  import "@solana/spl-token";
23
+ import "ethers-v6h";
24
+ import "tweetnacl";
25
+ import "bs58";
26
+ import "buffer";
23
27
  import "../constants/contracts.constants.mjs";
24
28
  import "../constants/kyc.constants.mjs";
25
29
  import "../constants/coingecko.constants.mjs";
@@ -32,20 +36,23 @@ import "../constants/tasks.constants.mjs";
32
36
  import "../constants/events.constants.mjs";
33
37
  import "../functions/utils/userAgent.mjs";
34
38
  import "multiformats";
39
+ import "../API/enclaveCalls.mjs";
35
40
  import "async-mutex";
36
- import "../API/tenderly.api.mjs";
37
41
  import { preProcessing as m } from "../crypto/preProcessing.mjs";
38
42
  import "./EthersProviderAdapter.mjs";
39
- import "ethers-v6h";
43
+ import "../functions/web3/events/getInputUtxoAndBalance.mjs";
40
44
  import "../functions/web3/events/getApprovedBalance.mjs";
41
45
  import "../functions/web3/getTokenHolder.mjs";
42
46
  import "../constants/save-depths.mjs";
47
+ import "socket.io-client";
48
+ import "../data-structures/PublicBalance/PublicBalanceWatcher.mjs";
49
+ import "../data-structures/PublicBalance/SolanaPublicBalancerWatcher.mjs";
43
50
  import { wagmiProviderAdapter as r } from "./WagmiProviderAdapter.mjs";
44
- const X = async (t, o) => {
51
+ const ti = async (t, o) => {
45
52
  await m();
46
53
  const i = new p();
47
54
  return r.initConfig(o), await i.initProviderAdapter(t, r), await i.initUserKeys(), await i.resetMerkle(), i;
48
55
  };
49
56
  export {
50
- X as prepareWagmiHinkal
57
+ ti as prepareWagmiHinkal
51
58
  };
@@ -54,6 +54,7 @@ export interface ActivityAddRequest {
54
54
  gas?: BigNumber;
55
55
  gasPrice?: BigNumber;
56
56
  gasInDollar?: string;
57
+ extraNativeTokenFee?: string;
57
58
  tokensReceive?: TokenAmountInfo[];
58
59
  tokensSpend?: TokenAmountInfo[];
59
60
  tokensApprove?: TokenAmountInfo[];
@@ -63,6 +64,7 @@ export interface ActivityAddRequest {
63
64
  dappUrl?: string;
64
65
  dappName?: string;
65
66
  integrationProvider?: IntegrationProvider;
67
+ knownPartialSignature?: string;
66
68
  }
67
69
  export interface Activity extends ActivityAddRequest {
68
70
  id: string;
@@ -0,0 +1,17 @@
1
+ import { Utxo } from '../data-structures/utxo/Utxo';
2
+ import { TemporarySubAccount } from './proxy.types';
3
+ export interface BridgeQuote {
4
+ calldata: string;
5
+ expectedAmount: bigint;
6
+ nativeFee: bigint;
7
+ }
8
+ export interface BridgeRecipient {
9
+ recipientAddress: string;
10
+ bridgeAmount: bigint;
11
+ quote: BridgeQuote;
12
+ temporarySubAccount: TemporarySubAccount;
13
+ }
14
+ export interface BridgeRecipientUtxo extends BridgeRecipient {
15
+ utxo: Utxo;
16
+ nativeUtxo?: Utxo;
17
+ }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var E=(_=>(_.LAST_IGNORED_DEPOSIT_BALANCE_1K="lastIgnoredDepositBalance1K",_.LAST_IGNORED_DEPOSIT_BALANCE_10K="lastIgnoredDepositBalance10K",_.LAST_IGNORED_DEPOSIT_SCAM_TOKENS="lastIgnoredDepositScamTokens",_.LAST_IGNORED_DEPOSIT_TRANSACTIONS="lastIgnoredDepositTransactions",_.LOCAL_STORAGE_KEY_USER_ANALYTICS_CONSENT="userAnalyticsConsentPref",_.PASSWORD_HASH="passwordHash",_.LAST_ADDRESS="lastAddress",_.AUTO_LOCK_TIME="autoLockTime",_.TOKEN_REGISTRY="tokenRegistry",_.IS_BALANCE_HIDDEN="isBalanceHidden",_.SANDBOX_TRANSACTION_STATUS="sandboxTransactionStatus",_.SELECTED_SUB_ACCOUNT_ADDRESS="selectedSubAccountAddress",_.GENERATE_PROOF_REMOTELY="generateProofRemotely",_.IS_RELAYER_OFF="isRelayerOff",_.ONBOARDING_SHOWN="onboardingShown",_.GAS_COST_TOKEN="gasCostToken",_.PRIVATE_TOKENS="privateTokens",_.ALCHEMY_PUBLIC_TOKENS="alchemyPublicTokens",_.EVENTS_PUBLIC_TOKENS="eventsPublicTokens",_.ARC_PUBLIC_TOKENS="arcPublicTokens",_.PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS="publicTokensLastProcessedBlocks",_.ACCEPTED_TERMS_OF_SERVICES="acceptedTermsOfServices",_.SLIPPAGE_PERCENTAGE="slippagePercentage",_.IS_SLIPPAGE_PERCENTAGE_CUSTOM="isSlippagePercentageCustom",_.MNEMONIC_PHRASE="mnemonicPhrase",_.SOURCE_MNEMONIC_PHRASE="sourceMnemonicPhrase",_.SELECTED_WALLET_ENVIRONMENT="selectedWalletEnvironment",_.IS_TOOLTIPS_ON="isTooltipsOn",_.CONNECTED_ADDRESS="connectedAddress",_.CONNECTED_SOLANA_ADDRESS="connectedSolanaAddress",_.CONNECTED_SESSIONS="connectedSessions",_.TX_ACTIVITY="tx-activity",_.IS_TOR_ROUTING_ON="isTorRoutingOn",_.EVENTS_PUBLIC_APPROVALS="eventsPublicApprovals",_.PUBLIC_APPROVALS_LAST_PROCESSED_BLOCKS="publicApprovalsLastProcessedBlocks",_.ACTIVE_SUB_ACCOUNT="activeSubAccount",_.SIGNED_MESSAGES="signedMessages",_.AUTO_SHIELD_IS_ON="autoShieldIsOn",_.MAX_GAS_IN_DOLLAR="maxGasInDollar",_.PENDING_SOLANA_SIGNATURES="pendingSolanaSignatures",_.ONBOARDING_TEMPORARY_PASSWORD="onboardingTemporaryPassword",_.STORAGE_KEY_LAST_SEEN_VERSION="hinkalLastSeenVersion",_.X_REFERRAL_LAST_CLICK="xReferralLastClick",_.HINKAL_GOOGLE_SESSION="hinkalGoogleSession",_.IS_CREATE_NEW_PUBLIC_WALLET_ON="isCreateNewPublicWalletOn",_.ANNOUNCEMENT_BANNER_LAST_CLOSED="announcementBannerLastClosed",_))(E||{});exports.StorageKeys=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var E=(_=>(_.LAST_IGNORED_DEPOSIT_BALANCE_1K="lastIgnoredDepositBalance1K",_.LAST_IGNORED_DEPOSIT_BALANCE_10K="lastIgnoredDepositBalance10K",_.LAST_IGNORED_DEPOSIT_SCAM_TOKENS="lastIgnoredDepositScamTokens",_.LAST_IGNORED_DEPOSIT_TRANSACTIONS="lastIgnoredDepositTransactions",_.LOCAL_STORAGE_KEY_USER_ANALYTICS_CONSENT="userAnalyticsConsentPref",_.PASSWORD_HASH="passwordHash",_.LAST_ADDRESS="lastAddress",_.AUTO_LOCK_TIME="autoLockTime",_.TOKEN_REGISTRY="tokenRegistry",_.IS_BALANCE_HIDDEN="isBalanceHidden",_.SANDBOX_TRANSACTION_STATUS="sandboxTransactionStatus",_.SELECTED_SUB_ACCOUNT_ADDRESS="selectedSubAccountAddress",_.GENERATE_PROOF_REMOTELY="generateProofRemotely",_.IS_RELAYER_OFF="isRelayerOff",_.ONBOARDING_SHOWN="onboardingShown",_.GAS_COST_TOKEN="gasCostToken",_.PRIVATE_TOKENS="privateTokens",_.ALCHEMY_PUBLIC_TOKENS="alchemyPublicTokens",_.EVENTS_PUBLIC_TOKENS="eventsPublicTokens",_.ARC_PUBLIC_TOKENS="arcPublicTokens",_.PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS="publicTokensLastProcessedBlocks",_.ACCEPTED_TERMS_OF_SERVICES="acceptedTermsOfServices",_.SLIPPAGE_PERCENTAGE="slippagePercentage",_.IS_SLIPPAGE_PERCENTAGE_CUSTOM="isSlippagePercentageCustom",_.MNEMONIC_PHRASE="mnemonicPhrase",_.SOURCE_MNEMONIC_PHRASE="sourceMnemonicPhrase",_.SELECTED_WALLET_ENVIRONMENT="selectedWalletEnvironment",_.IS_TOOLTIPS_ON="isTooltipsOn",_.CONNECTED_ADDRESS="connectedAddress",_.CONNECTED_SOLANA_ADDRESS="connectedSolanaAddress",_.CONNECTED_SESSIONS="connectedSessions",_.TX_ACTIVITY="tx-activity",_.IS_TOR_ROUTING_ON="isTorRoutingOn",_.EVENTS_PUBLIC_APPROVALS="eventsPublicApprovals",_.PUBLIC_APPROVALS_LAST_PROCESSED_BLOCKS="publicApprovalsLastProcessedBlocks",_.ACTIVE_SUB_ACCOUNT="activeSubAccount",_.SIGNED_MESSAGES="signedMessages",_.AUTO_SHIELD_IS_ON="autoShieldIsOn",_.MAX_GAS_IN_DOLLAR="maxGasInDollar",_.PENDING_SOLANA_SIGNATURES="pendingSolanaSignatures",_.ONBOARDING_TEMPORARY_PASSWORD="onboardingTemporaryPassword",_.STORAGE_KEY_LAST_SEEN_VERSION="hinkalLastSeenVersion",_.X_REFERRAL_LAST_CLICK="xReferralLastClick",_.HINKAL_GOOGLE_SESSION="hinkalGoogleSession",_.IS_CREATE_NEW_PUBLIC_WALLET_ON="isCreateNewPublicWalletOn",_.DISGUISED_AS_METAMASK_HOSTS="disguisedAsMetamaskHosts",_.ANNOUNCEMENT_BANNER_LAST_CLOSED="announcementBannerLastClosed",_.CHAIN_ID_FILTER="chainIdFilter",_.SIGNATURE="signature",_.PUBLIC_ACCOUNT_DETAILS="publicAccountDetails",_))(E||{});exports.StorageKeys=E;
@@ -44,5 +44,9 @@ export declare enum StorageKeys {
44
44
  X_REFERRAL_LAST_CLICK = "xReferralLastClick",
45
45
  HINKAL_GOOGLE_SESSION = "hinkalGoogleSession",
46
46
  IS_CREATE_NEW_PUBLIC_WALLET_ON = "isCreateNewPublicWalletOn",
47
- ANNOUNCEMENT_BANNER_LAST_CLOSED = "announcementBannerLastClosed"
47
+ DISGUISED_AS_METAMASK_HOSTS = "disguisedAsMetamaskHosts",
48
+ ANNOUNCEMENT_BANNER_LAST_CLOSED = "announcementBannerLastClosed",
49
+ CHAIN_ID_FILTER = "chainIdFilter",
50
+ SIGNATURE = "signature",
51
+ PUBLIC_ACCOUNT_DETAILS = "publicAccountDetails"
48
52
  }
@@ -1,4 +1,4 @@
1
- var E = /* @__PURE__ */ ((_) => (_.LAST_IGNORED_DEPOSIT_BALANCE_1K = "lastIgnoredDepositBalance1K", _.LAST_IGNORED_DEPOSIT_BALANCE_10K = "lastIgnoredDepositBalance10K", _.LAST_IGNORED_DEPOSIT_SCAM_TOKENS = "lastIgnoredDepositScamTokens", _.LAST_IGNORED_DEPOSIT_TRANSACTIONS = "lastIgnoredDepositTransactions", _.LOCAL_STORAGE_KEY_USER_ANALYTICS_CONSENT = "userAnalyticsConsentPref", _.PASSWORD_HASH = "passwordHash", _.LAST_ADDRESS = "lastAddress", _.AUTO_LOCK_TIME = "autoLockTime", _.TOKEN_REGISTRY = "tokenRegistry", _.IS_BALANCE_HIDDEN = "isBalanceHidden", _.SANDBOX_TRANSACTION_STATUS = "sandboxTransactionStatus", _.SELECTED_SUB_ACCOUNT_ADDRESS = "selectedSubAccountAddress", _.GENERATE_PROOF_REMOTELY = "generateProofRemotely", _.IS_RELAYER_OFF = "isRelayerOff", _.ONBOARDING_SHOWN = "onboardingShown", _.GAS_COST_TOKEN = "gasCostToken", _.PRIVATE_TOKENS = "privateTokens", _.ALCHEMY_PUBLIC_TOKENS = "alchemyPublicTokens", _.EVENTS_PUBLIC_TOKENS = "eventsPublicTokens", _.ARC_PUBLIC_TOKENS = "arcPublicTokens", _.PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS = "publicTokensLastProcessedBlocks", _.ACCEPTED_TERMS_OF_SERVICES = "acceptedTermsOfServices", _.SLIPPAGE_PERCENTAGE = "slippagePercentage", _.IS_SLIPPAGE_PERCENTAGE_CUSTOM = "isSlippagePercentageCustom", _.MNEMONIC_PHRASE = "mnemonicPhrase", _.SOURCE_MNEMONIC_PHRASE = "sourceMnemonicPhrase", _.SELECTED_WALLET_ENVIRONMENT = "selectedWalletEnvironment", _.IS_TOOLTIPS_ON = "isTooltipsOn", _.CONNECTED_ADDRESS = "connectedAddress", _.CONNECTED_SOLANA_ADDRESS = "connectedSolanaAddress", _.CONNECTED_SESSIONS = "connectedSessions", _.TX_ACTIVITY = "tx-activity", _.IS_TOR_ROUTING_ON = "isTorRoutingOn", _.EVENTS_PUBLIC_APPROVALS = "eventsPublicApprovals", _.PUBLIC_APPROVALS_LAST_PROCESSED_BLOCKS = "publicApprovalsLastProcessedBlocks", _.ACTIVE_SUB_ACCOUNT = "activeSubAccount", _.SIGNED_MESSAGES = "signedMessages", _.AUTO_SHIELD_IS_ON = "autoShieldIsOn", _.MAX_GAS_IN_DOLLAR = "maxGasInDollar", _.PENDING_SOLANA_SIGNATURES = "pendingSolanaSignatures", _.ONBOARDING_TEMPORARY_PASSWORD = "onboardingTemporaryPassword", _.STORAGE_KEY_LAST_SEEN_VERSION = "hinkalLastSeenVersion", _.X_REFERRAL_LAST_CLICK = "xReferralLastClick", _.HINKAL_GOOGLE_SESSION = "hinkalGoogleSession", _.IS_CREATE_NEW_PUBLIC_WALLET_ON = "isCreateNewPublicWalletOn", _.ANNOUNCEMENT_BANNER_LAST_CLOSED = "announcementBannerLastClosed", _))(E || {});
1
+ var E = /* @__PURE__ */ ((_) => (_.LAST_IGNORED_DEPOSIT_BALANCE_1K = "lastIgnoredDepositBalance1K", _.LAST_IGNORED_DEPOSIT_BALANCE_10K = "lastIgnoredDepositBalance10K", _.LAST_IGNORED_DEPOSIT_SCAM_TOKENS = "lastIgnoredDepositScamTokens", _.LAST_IGNORED_DEPOSIT_TRANSACTIONS = "lastIgnoredDepositTransactions", _.LOCAL_STORAGE_KEY_USER_ANALYTICS_CONSENT = "userAnalyticsConsentPref", _.PASSWORD_HASH = "passwordHash", _.LAST_ADDRESS = "lastAddress", _.AUTO_LOCK_TIME = "autoLockTime", _.TOKEN_REGISTRY = "tokenRegistry", _.IS_BALANCE_HIDDEN = "isBalanceHidden", _.SANDBOX_TRANSACTION_STATUS = "sandboxTransactionStatus", _.SELECTED_SUB_ACCOUNT_ADDRESS = "selectedSubAccountAddress", _.GENERATE_PROOF_REMOTELY = "generateProofRemotely", _.IS_RELAYER_OFF = "isRelayerOff", _.ONBOARDING_SHOWN = "onboardingShown", _.GAS_COST_TOKEN = "gasCostToken", _.PRIVATE_TOKENS = "privateTokens", _.ALCHEMY_PUBLIC_TOKENS = "alchemyPublicTokens", _.EVENTS_PUBLIC_TOKENS = "eventsPublicTokens", _.ARC_PUBLIC_TOKENS = "arcPublicTokens", _.PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS = "publicTokensLastProcessedBlocks", _.ACCEPTED_TERMS_OF_SERVICES = "acceptedTermsOfServices", _.SLIPPAGE_PERCENTAGE = "slippagePercentage", _.IS_SLIPPAGE_PERCENTAGE_CUSTOM = "isSlippagePercentageCustom", _.MNEMONIC_PHRASE = "mnemonicPhrase", _.SOURCE_MNEMONIC_PHRASE = "sourceMnemonicPhrase", _.SELECTED_WALLET_ENVIRONMENT = "selectedWalletEnvironment", _.IS_TOOLTIPS_ON = "isTooltipsOn", _.CONNECTED_ADDRESS = "connectedAddress", _.CONNECTED_SOLANA_ADDRESS = "connectedSolanaAddress", _.CONNECTED_SESSIONS = "connectedSessions", _.TX_ACTIVITY = "tx-activity", _.IS_TOR_ROUTING_ON = "isTorRoutingOn", _.EVENTS_PUBLIC_APPROVALS = "eventsPublicApprovals", _.PUBLIC_APPROVALS_LAST_PROCESSED_BLOCKS = "publicApprovalsLastProcessedBlocks", _.ACTIVE_SUB_ACCOUNT = "activeSubAccount", _.SIGNED_MESSAGES = "signedMessages", _.AUTO_SHIELD_IS_ON = "autoShieldIsOn", _.MAX_GAS_IN_DOLLAR = "maxGasInDollar", _.PENDING_SOLANA_SIGNATURES = "pendingSolanaSignatures", _.ONBOARDING_TEMPORARY_PASSWORD = "onboardingTemporaryPassword", _.STORAGE_KEY_LAST_SEEN_VERSION = "hinkalLastSeenVersion", _.X_REFERRAL_LAST_CLICK = "xReferralLastClick", _.HINKAL_GOOGLE_SESSION = "hinkalGoogleSession", _.IS_CREATE_NEW_PUBLIC_WALLET_ON = "isCreateNewPublicWalletOn", _.DISGUISED_AS_METAMASK_HOSTS = "disguisedAsMetamaskHosts", _.ANNOUNCEMENT_BANNER_LAST_CLOSED = "announcementBannerLastClosed", _.CHAIN_ID_FILTER = "chainIdFilter", _.SIGNATURE = "signature", _.PUBLIC_ACCOUNT_DETAILS = "publicAccountDetails", _))(E || {});
2
2
  export {
3
3
  E as StorageKeys
4
4
  };
@@ -54,6 +54,7 @@ export interface EthereumNetwork {
54
54
  rpcUrl: string;
55
55
  maxPageSize?: number;
56
56
  fetchRpcUrl?: string;
57
+ wsRpcUrl?: string;
57
58
  privateMempoolRpcUrl?: string;
58
59
  contractData: ContractData;
59
60
  supported?: boolean;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e=(t=>(t.NewBlockchainEvents="NewBlockchainEvents",t))(e||{}),n=(t=>(t.MainContractEvents="MainContractEvents",t.AccessTokenContractEvents="AccessTokenContractEvents",t))(n||{});exports.EventCategory=n;exports.SocketIOEvents=e;
@@ -0,0 +1,9 @@
1
+ import { BlockchainEvent } from '../data-structures/BlockchainEvent/BlockchainEvent';
2
+ export type EventProcessorFunction = (events: BlockchainEvent[]) => Promise<number> | number;
3
+ export declare enum SocketIOEvents {
4
+ NewBlockchainEvents = "NewBlockchainEvents"
5
+ }
6
+ export declare enum EventCategory {
7
+ MainContractEvents = "MainContractEvents",
8
+ AccessTokenContractEvents = "AccessTokenContractEvents"
9
+ }
@@ -0,0 +1,5 @@
1
+ var t = /* @__PURE__ */ ((n) => (n.NewBlockchainEvents = "NewBlockchainEvents", n))(t || {}), e = /* @__PURE__ */ ((n) => (n.MainContractEvents = "MainContractEvents", n.AccessTokenContractEvents = "AccessTokenContractEvents", n))(e || {});
2
+ export {
3
+ e as EventCategory,
4
+ t as SocketIOEvents
5
+ };
package/types/index.d.ts CHANGED
@@ -48,4 +48,6 @@ export * from './okx.types';
48
48
  export * from './http.types';
49
49
  export * from './connector.types';
50
50
  export * from './scheduled-transactions.types';
51
+ export * from './bridging-tx.types';
51
52
  export * from './onramp.types';
53
+ export * from './events.types';
@@ -1,11 +1,18 @@
1
1
  export type SubAccount = {
2
2
  index: number | null;
3
- ethAddress: string;
4
- solanaAddress: string;
3
+ ethAddress?: string;
4
+ solanaAddress?: string;
5
5
  name: string;
6
6
  createdAt: string;
7
7
  isHidden: boolean;
8
- privateKey: string;
8
+ isFavorite: boolean;
9
+ privateKey?: string;
10
+ solanaPrivateKey?: string;
9
11
  isImported: boolean;
10
12
  };
11
- export type SubAccountLight = Omit<SubAccount, 'privateKey' | 'isImported'>;
13
+ export type SubAccountLight = Omit<SubAccount, 'privateKey' | 'solanaPrivateKey' | 'isImported'>;
14
+ export type TemporarySubAccount = {
15
+ index: number;
16
+ ethAddress: string;
17
+ privateKey: string;
18
+ };
@@ -113,6 +113,7 @@ export interface SwapTokensRequest {
113
113
  feeStructure?: FeeStructure;
114
114
  bridgedToken?: ERC20Token;
115
115
  bridgedTokenAmount?: bigint;
116
+ extraNativeTokenFee?: bigint;
116
117
  }
117
118
  export interface ProxySwapTokensRequest {
118
119
  type: SandboxRequestType.ProxySwapTokens;
@@ -129,6 +130,7 @@ export interface ProxySwapTokensRequest {
129
130
  feeStructure?: FeeStructure;
130
131
  bridgedToken?: ERC20Token;
131
132
  bridgedTokenAmount?: bigint;
133
+ extraNativeTokenFee?: bigint;
132
134
  autoDepositBack?: boolean;
133
135
  maxGasInDollar?: string;
134
136
  }
@@ -2,6 +2,14 @@ import { PublicKey, Transaction, VersionedTransaction } from '@solana/web3.js';
2
2
  import { DimDataType } from './circom-data.types';
3
3
  import { OKXAccount } from './okx.types';
4
4
  import { AdminDataType } from './admin.types';
5
+ export interface SolanaEvent {
6
+ signature: string;
7
+ slot: number;
8
+ blockTime: number;
9
+ programId: PublicKey;
10
+ data: any;
11
+ eventName: string;
12
+ }
5
13
  export type SolanaWallet = {
6
14
  publicKey: PublicKey;
7
15
  signTransaction<T extends Transaction | VersionedTransaction>(tx: T): Promise<T>;
@@ -81,3 +81,8 @@ export interface PrivateRecipientInfo {
81
81
  amount: bigint;
82
82
  token: ERC20Token;
83
83
  }
84
+ export interface TemporaryWalletBalance extends TokenBalanceWithUsdValue {
85
+ nonce: number;
86
+ ethAddress: string;
87
+ privateKey: string;
88
+ }
@@ -1 +1 @@
1
- "use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/snarkjsWorkerLauncher-DIIlV4Nb.js").href:new URL("../../assets/snarkjsWorkerLauncher-DIIlV4Nb.js",document.currentScript&&document.currentScript.src||document.baseURI).href);module.exports=e;
1
+ "use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/snarkjsWorkerLauncher-Be5av2bX.js").href:new URL("../../assets/snarkjsWorkerLauncher-Be5av2bX.js",document.currentScript&&document.currentScript.src||document.baseURI).href);module.exports=e;
@@ -1,4 +1,4 @@
1
- const r = "" + new URL("../../assets/snarkjsWorkerLauncher-DIIlV4Nb.js", import.meta.url).href;
1
+ const r = "" + new URL("../../assets/snarkjsWorkerLauncher-Be5av2bX.js", import.meta.url).href;
2
2
  export {
3
3
  r as default
4
4
  };
@@ -1 +1 @@
1
- "use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/utxoWorkerLauncher-D1WDmcKc.js").href:new URL("../../assets/utxoWorkerLauncher-D1WDmcKc.js",document.currentScript&&document.currentScript.src||document.baseURI).href);module.exports=e;
1
+ "use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/utxoWorkerLauncher-C9K_yMfB.js").href:new URL("../../assets/utxoWorkerLauncher-C9K_yMfB.js",document.currentScript&&document.currentScript.src||document.baseURI).href);module.exports=e;
@@ -1,4 +1,4 @@
1
- const e = "" + new URL("../../assets/utxoWorkerLauncher-D1WDmcKc.js", import.meta.url).href;
1
+ const e = "" + new URL("../../assets/utxoWorkerLauncher-C9K_yMfB.js", import.meta.url).href;
2
2
  export {
3
3
  e as default
4
4
  };
@@ -1 +1 @@
1
- "use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/zkProofWorkerLauncher-Bctpc1c6.js").href:new URL("../../assets/zkProofWorkerLauncher-Bctpc1c6.js",document.currentScript&&document.currentScript.src||document.baseURI).href);module.exports=e;
1
+ "use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/zkProofWorkerLauncher-Bbz8Z-5R.js").href:new URL("../../assets/zkProofWorkerLauncher-Bbz8Z-5R.js",document.currentScript&&document.currentScript.src||document.baseURI).href);module.exports=e;
@@ -1,4 +1,4 @@
1
- const r = "" + new URL("../../assets/zkProofWorkerLauncher-Bctpc1c6.js", import.meta.url).href;
1
+ const r = "" + new URL("../../assets/zkProofWorkerLauncher-Bbz8Z-5R.js", import.meta.url).href;
2
2
  export {
3
3
  r as default
4
4
  };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("uuid"),g=require("./openDefaultPassportWindow.cjs"),t={verifyMessageText:"Sign this message to prove your ownership of this address and proceed with the identity verification process.",domainName:"Hinkal",type:{Message:[{name:"content",type:"string"},{name:"for",type:"string"},{name:"timestamp",type:"string"},{name:"nonce",type:"string"}]}},l=async(n,r,a)=>{try{const{domainName:e,type:i}=t,s=u.v4(),o=Date.now().toString(),c={name:e},d={content:t.verifyMessageText,for:e,timestamp:o,nonce:s},p=await n.signTypedData(c,i,d),m=await n.getEthereumAddress(),y=`${a}verify/${e}?address=${m}&ts=${o}&nonce=${s}&signature=${p}&levelType=BASIC`;g.openDefaultPassportWindow(y,r,700,510)}catch(e){console.error("authentoHelper error: ",e)}};exports.AUTHENTO=t;exports.authentoKycHandler=l;
@@ -1,12 +0,0 @@
1
- import { IHinkal } from '../../data-structures/Hinkal/IHinkal';
2
- export declare const AUTHENTO: {
3
- verifyMessageText: string;
4
- domainName: string;
5
- type: {
6
- Message: {
7
- name: string;
8
- type: string;
9
- }[];
10
- };
11
- };
12
- export declare const authentoKycHandler: (hinkal: IHinkal, shortName: string, onboardURL: string) => Promise<void>;
@@ -1,30 +0,0 @@
1
- import { v4 as g } from "uuid";
2
- import { openDefaultPassportWindow as f } from "./openDefaultPassportWindow.mjs";
3
- const o = {
4
- verifyMessageText: "Sign this message to prove your ownership of this address and proceed with the identity verification process.",
5
- domainName: "Hinkal",
6
- type: {
7
- Message: [
8
- { name: "content", type: "string" },
9
- { name: "for", type: "string" },
10
- { name: "timestamp", type: "string" },
11
- { name: "nonce", type: "string" }
12
- ]
13
- }
14
- }, l = async (t, r, a) => {
15
- try {
16
- const { domainName: e, type: i } = o, n = g(), s = Date.now().toString(), c = { name: e }, m = {
17
- content: o.verifyMessageText,
18
- for: e,
19
- timestamp: s,
20
- nonce: n
21
- }, p = await t.signTypedData(c, i, m), d = await t.getEthereumAddress(), y = `${a}verify/${e}?address=${d}&ts=${s}&nonce=${n}&signature=${p}&levelType=BASIC`;
22
- f(y, r, 700, 510);
23
- } catch (e) {
24
- console.error("authentoHelper error: ", e);
25
- }
26
- };
27
- export {
28
- o as AUTHENTO,
29
- l as authentoKycHandler
30
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../API/getServerURL.cjs");require("axios");require("../../constants/coingecko.constants.cjs");require("../../constants/server.constants.cjs");require("../../data-structures/http/HttpClient.cjs");const a=require("../../API/API.cjs");require("../../API/tenderly.api.cjs");require("../../constants/token-data/index.cjs");require("../../constants/chains.constants.cjs");require("../../constants/contracts.constants.cjs");require("../../constants/kyc.constants.cjs");require("../../constants/vite.constants.cjs");require("../../constants/reorg-depths.constants.cjs");require("../../constants/addresses.constants.cjs");require("../../constants/token.limits.constants.cjs");require("../../constants/presale.constants.cjs");require("../../constants/activity.constants.cjs");require("../../constants/tasks.constants.cjs");require("../../constants/events.constants.cjs");const l=async(s,n)=>{const r=s.getApprovedUtxos(n);if(r.length===0)return[];const o=[...new Set(r.map(e=>e.tokenAddress.toLowerCase()))],i=(await a.API.tokensInfoCall(n,o)).filter(e=>!!e),u=new Map(i.map(e=>[e.erc20TokenAddress.toLowerCase(),e]));return r.map(e=>{const t=u.get(e.tokenAddress.toLowerCase());return t?{token:t,spenderAddress:e.interactionAddress,allowance:e.amount}:null}).filter(e=>e!==null&&e.allowance>0n)};exports.getHinkalApprovals=l;
@@ -1,3 +0,0 @@
1
- import { IHinkal } from '../../data-structures/Hinkal/IHinkal';
2
- import { TokenApproval } from '../../types';
3
- export declare const getHinkalApprovals: (hinkal: IHinkal, chainId: number) => Promise<TokenApproval[]>;
@@ -1,38 +0,0 @@
1
- import "../../API/getServerURL.mjs";
2
- import "axios";
3
- import "../../constants/coingecko.constants.mjs";
4
- import "../../constants/server.constants.mjs";
5
- import "../../data-structures/http/HttpClient.mjs";
6
- import { API as m } from "../../API/API.mjs";
7
- import "../../API/tenderly.api.mjs";
8
- import "../../constants/token-data/index.mjs";
9
- import "../../constants/chains.constants.mjs";
10
- import "../../constants/contracts.constants.mjs";
11
- import "../../constants/kyc.constants.mjs";
12
- import "../../constants/vite.constants.mjs";
13
- import "../../constants/reorg-depths.constants.mjs";
14
- import "../../constants/addresses.constants.mjs";
15
- import "../../constants/token.limits.constants.mjs";
16
- import "../../constants/presale.constants.mjs";
17
- import "../../constants/activity.constants.mjs";
18
- import "../../constants/tasks.constants.mjs";
19
- import "../../constants/events.constants.mjs";
20
- const H = async (n, r) => {
21
- const t = n.getApprovedUtxos(r);
22
- if (t.length === 0)
23
- return [];
24
- const p = [...new Set(t.map((o) => o.tokenAddress.toLowerCase()))], s = (await m.tokensInfoCall(r, p)).filter(
25
- (o) => !!o
26
- ), i = new Map(s.map((o) => [o.erc20TokenAddress.toLowerCase(), o]));
27
- return t.map((o) => {
28
- const e = i.get(o.tokenAddress.toLowerCase());
29
- return e ? {
30
- token: e,
31
- spenderAddress: o.interactionAddress,
32
- allowance: o.amount
33
- } : null;
34
- }).filter((o) => o !== null && o.allowance > 0n);
35
- };
36
- export {
37
- H as getHinkalApprovals
38
- };