@hinkal/common 0.2.20 → 0.2.22

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 (516) hide show
  1. package/API/API.cjs +1 -1
  2. package/API/API.d.ts +14 -14
  3. package/API/API.mjs +88 -87
  4. package/API/admin-calls.cjs +1 -1
  5. package/API/admin-calls.d.ts +1 -1
  6. package/API/admin-calls.mjs +4 -4
  7. package/API/ai-calls.cjs +1 -0
  8. package/API/ai-calls.d.ts +17 -0
  9. package/API/ai-calls.mjs +21 -0
  10. package/API/callLifiAPI.cjs +1 -1
  11. package/API/callLifiAPI.d.ts +1 -1
  12. package/API/callLifiAPI.mjs +5 -5
  13. package/API/callMonitor.cjs +1 -1
  14. package/API/callMonitor.d.ts +1 -1
  15. package/API/callMonitor.mjs +7 -7
  16. package/API/callOdosAPI.cjs +1 -1
  17. package/API/callOdosAPI.mjs +11 -11
  18. package/API/callOkxAPI.cjs +1 -1
  19. package/API/callOkxAPI.d.ts +1 -1
  20. package/API/callOkxAPI.mjs +5 -5
  21. package/API/callOneInchAPI.cjs +1 -1
  22. package/API/callOneInchAPI.mjs +11 -10
  23. package/API/callRelayer.cjs +1 -1
  24. package/API/callRelayer.d.ts +5 -6
  25. package/API/callRelayer.mjs +11 -11
  26. package/API/checkRisk.cjs +1 -1
  27. package/API/checkRisk.d.ts +1 -1
  28. package/API/checkRisk.mjs +4 -4
  29. package/API/deposit-and-withdraw-status-calls.cjs +1 -0
  30. package/API/deposit-and-withdraw-status-calls.d.ts +20 -0
  31. package/API/deposit-and-withdraw-status-calls.mjs +18 -0
  32. package/API/duneAPI.cjs +1 -0
  33. package/API/duneAPI.d.ts +11 -0
  34. package/API/duneAPI.mjs +25 -0
  35. package/API/enclaveCalls.cjs +1 -1
  36. package/API/enclaveCalls.mjs +4 -5
  37. package/API/fetchCommitmentsCache.cjs +1 -1
  38. package/API/fetchCommitmentsCache.mjs +9 -9
  39. package/API/get-token-data.cjs +1 -1
  40. package/API/get-token-data.d.ts +1 -1
  41. package/API/get-token-data.mjs +5 -5
  42. package/API/getBridgeProtocols.cjs +1 -0
  43. package/API/getBridgeProtocols.d.ts +7 -0
  44. package/API/getBridgeProtocols.mjs +8 -0
  45. package/API/getGasEstimates.cjs +1 -1
  46. package/API/getGasEstimates.mjs +9 -9
  47. package/API/getLifiStatus.cjs +1 -0
  48. package/API/getLifiStatus.d.ts +24 -0
  49. package/API/getLifiStatus.mjs +15 -0
  50. package/API/getRelayerURL.cjs +1 -0
  51. package/API/getRelayerURL.d.ts +1 -0
  52. package/API/getRelayerURL.mjs +10 -0
  53. package/API/getServerURL.cjs +1 -1
  54. package/API/getServerURL.d.ts +3 -3
  55. package/API/getServerURL.mjs +67 -51
  56. package/API/getTokenPrice.cjs +1 -1
  57. package/API/getTokenPrice.d.ts +0 -5
  58. package/API/getTokenPrice.mjs +7 -14
  59. package/API/index.d.ts +3 -1
  60. package/API/is-tx-stateless.cjs +1 -1
  61. package/API/is-tx-stateless.d.ts +1 -1
  62. package/API/is-tx-stateless.mjs +12 -10
  63. package/API/kycCalls.cjs +1 -1
  64. package/API/kycCalls.d.ts +8 -4
  65. package/API/kycCalls.mjs +26 -23
  66. package/API/passwordCalls.cjs +1 -0
  67. package/API/passwordCalls.d.ts +9 -0
  68. package/API/passwordCalls.mjs +13 -0
  69. package/API/proxyAccountsCalls.cjs +1 -1
  70. package/API/proxyAccountsCalls.d.ts +2 -7
  71. package/API/proxyAccountsCalls.mjs +21 -27
  72. package/API/relayCalls.cjs +1 -1
  73. package/API/relayCalls.mjs +4 -4
  74. package/API/restoreSnapshots.cjs +1 -0
  75. package/API/restoreSnapshots.d.ts +1 -0
  76. package/API/restoreSnapshots.mjs +10 -0
  77. package/API/scheduled-transactions-calls.cjs +1 -1
  78. package/API/scheduled-transactions-calls.d.ts +9 -1
  79. package/API/scheduled-transactions-calls.mjs +9 -5
  80. package/API/simulate-batch-tx.cjs +1 -1
  81. package/API/simulate-batch-tx.d.ts +2 -2
  82. package/API/simulate-batch-tx.mjs +6 -7
  83. package/API/solana-calls.cjs +1 -1
  84. package/API/solana-calls.d.ts +3 -6
  85. package/API/solana-calls.mjs +15 -15
  86. package/API/temporaryWalletCalls.cjs +1 -1
  87. package/API/temporaryWalletCalls.mjs +19 -13
  88. package/API/token-calls.cjs +1 -1
  89. package/API/token-calls.mjs +5 -6
  90. package/README.md +61 -32
  91. package/constants/chains.constants.cjs +1 -1
  92. package/constants/chains.constants.d.ts +6 -0
  93. package/constants/chains.constants.mjs +52 -58
  94. package/constants/coingecko.constants.cjs +1 -1
  95. package/constants/coingecko.constants.d.ts +0 -1
  96. package/constants/coingecko.constants.mjs +10 -11
  97. package/constants/deploy-data/deploy-data-solana.json.cjs +1 -1
  98. package/constants/deploy-data/deploy-data-solana.json.mjs +2 -28
  99. package/constants/function-signatures.constants.cjs +1 -1
  100. package/constants/function-signatures.constants.d.ts +1 -0
  101. package/constants/function-signatures.constants.mjs +4 -3
  102. package/constants/kyc.constants.cjs +1 -1
  103. package/constants/kyc.constants.mjs +40 -39
  104. package/constants/mediaUrls.constants.cjs +1 -1
  105. package/constants/mediaUrls.constants.d.ts +0 -1
  106. package/constants/mediaUrls.constants.mjs +1 -2
  107. package/constants/permit2.constants.cjs +1 -1
  108. package/constants/permit2.constants.d.ts +1 -0
  109. package/constants/permit2.constants.mjs +11 -10
  110. package/constants/server.constants.cjs +1 -1
  111. package/constants/server.constants.d.ts +123 -19
  112. package/constants/server.constants.mjs +142 -38
  113. package/constants/vite.constants.cjs +1 -1
  114. package/constants/vite.constants.mjs +13 -36
  115. package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.cjs +1 -1
  116. package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.mjs +71 -68
  117. package/data-structures/Hinkal/Hinkal.cjs +1 -1
  118. package/data-structures/Hinkal/Hinkal.d.ts +56 -45
  119. package/data-structures/Hinkal/Hinkal.mjs +348 -314
  120. package/data-structures/Hinkal/IHinkal.d.ts +54 -40
  121. package/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
  122. package/data-structures/Hinkal/handleAutoDepositBack.d.ts +1 -1
  123. package/data-structures/Hinkal/handleAutoDepositBack.mjs +49 -48
  124. package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.cjs +1 -0
  125. package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.d.ts +7 -0
  126. package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.mjs +42 -0
  127. package/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
  128. package/data-structures/Hinkal/hinkalActionReceive.mjs +24 -29
  129. package/data-structures/Hinkal/hinkalApprove.cjs +1 -0
  130. package/data-structures/Hinkal/hinkalApprove.d.ts +3 -0
  131. package/data-structures/Hinkal/hinkalApprove.mjs +114 -0
  132. package/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +1 -1
  133. package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +20 -20
  134. package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
  135. package/data-structures/Hinkal/hinkalDeposit.mjs +84 -88
  136. package/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
  137. package/data-structures/Hinkal/hinkalDepositAndWithdraw.d.ts +1 -1
  138. package/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +96 -77
  139. package/data-structures/Hinkal/hinkalDepositOnChainUtxos.cjs +1 -1
  140. package/data-structures/Hinkal/hinkalDepositOnChainUtxos.d.ts +4 -1
  141. package/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +80 -75
  142. package/data-structures/Hinkal/hinkalDepostAndBridge.cjs +1 -1
  143. package/data-structures/Hinkal/hinkalDepostAndBridge.d.ts +1 -1
  144. package/data-structures/Hinkal/hinkalDepostAndBridge.mjs +150 -138
  145. package/data-structures/Hinkal/hinkalGetZkMeProvider.cjs +1 -1
  146. package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +5 -4
  147. package/data-structures/Hinkal/hinkalInsideTransact.cjs +1 -0
  148. package/data-structures/Hinkal/hinkalInsideTransact.d.ts +4 -0
  149. package/data-structures/Hinkal/hinkalInsideTransact.mjs +119 -0
  150. package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
  151. package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +2 -2
  152. package/data-structures/Hinkal/hinkalPrivateWallet.mjs +118 -114
  153. package/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -1
  154. package/data-structures/Hinkal/hinkalProoflessDeposit.mjs +34 -36
  155. package/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
  156. package/data-structures/Hinkal/hinkalProxySwap.mjs +36 -40
  157. package/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
  158. package/data-structures/Hinkal/hinkalProxyToPrivate.mjs +32 -37
  159. package/data-structures/Hinkal/hinkalSignSubAccount.cjs +1 -1
  160. package/data-structures/Hinkal/hinkalSignSubAccount.d.ts +2 -1
  161. package/data-structures/Hinkal/hinkalSignSubAccount.mjs +15 -17
  162. package/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
  163. package/data-structures/Hinkal/hinkalSolanaDeposit.d.ts +3 -4
  164. package/data-structures/Hinkal/hinkalSolanaDeposit.mjs +95 -84
  165. package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
  166. package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +1 -2
  167. package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +182 -155
  168. package/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
  169. package/data-structures/Hinkal/hinkalSolanaProxySend.d.ts +3 -2
  170. package/data-structures/Hinkal/hinkalSolanaProxySend.mjs +40 -43
  171. package/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
  172. package/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +67 -71
  173. package/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
  174. package/data-structures/Hinkal/hinkalSolanaProxySwap.d.ts +1 -1
  175. package/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +59 -63
  176. package/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
  177. package/data-structures/Hinkal/hinkalSolanaSwap.mjs +45 -48
  178. package/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
  179. package/data-structures/Hinkal/hinkalSolanaTransfer.mjs +48 -49
  180. package/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
  181. package/data-structures/Hinkal/hinkalSolanaWithdraw.d.ts +1 -2
  182. package/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +68 -71
  183. package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
  184. package/data-structures/Hinkal/hinkalSwap.mjs +78 -71
  185. package/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
  186. package/data-structures/Hinkal/hinkalTransfer.mjs +70 -71
  187. package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
  188. package/data-structures/Hinkal/hinkalWithdraw.mjs +79 -81
  189. package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
  190. package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +103 -105
  191. package/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
  192. package/data-structures/Hinkal/resetMerkleTrees.d.ts +1 -1
  193. package/data-structures/Hinkal/resetMerkleTrees.mjs +53 -107
  194. package/data-structures/IndexedDB/activity-db.cjs +1 -1
  195. package/data-structures/IndexedDB/activity-db.d.ts +0 -1
  196. package/data-structures/IndexedDB/activity-db.mjs +75 -91
  197. package/data-structures/IndexedDB/balances-db.cjs +1 -1
  198. package/data-structures/IndexedDB/balances-db.mjs +37 -40
  199. package/data-structures/IndexedDB/contact-db.cjs +1 -1
  200. package/data-structures/IndexedDB/contact-db.mjs +13 -16
  201. package/data-structures/IndexedDB/signatures-db.cjs +1 -1
  202. package/data-structures/IndexedDB/signatures-db.mjs +40 -25
  203. package/data-structures/TokenDBs/EventsPublicTokensDB.cjs +1 -1
  204. package/data-structures/TokenDBs/EventsPublicTokensDB.mjs +84 -82
  205. package/data-structures/TokenDBs/token-visibility-db.cjs +1 -1
  206. package/data-structures/TokenDBs/token-visibility-db.mjs +36 -22
  207. package/data-structures/crypto-keys/keys.cjs +1 -1
  208. package/data-structures/crypto-keys/keys.d.ts +11 -0
  209. package/data-structures/crypto-keys/keys.mjs +107 -47
  210. package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.cjs +1 -1
  211. package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.d.ts +2 -3
  212. package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.mjs +9 -9
  213. package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.cjs +1 -1
  214. package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.d.ts +2 -3
  215. package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.mjs +5 -5
  216. package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.cjs +1 -1
  217. package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.d.ts +2 -3
  218. package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.mjs +6 -6
  219. package/data-structures/event-service/evm/AbstractEventService.cjs +1 -1
  220. package/data-structures/event-service/evm/AbstractEventService.d.ts +2 -4
  221. package/data-structures/event-service/evm/AbstractEventService.mjs +19 -19
  222. package/data-structures/event-service/evm/AbstractNullifierSnapshotService.cjs +1 -1
  223. package/data-structures/event-service/evm/AbstractNullifierSnapshotService.d.ts +3 -3
  224. package/data-structures/event-service/evm/AbstractNullifierSnapshotService.mjs +5 -6
  225. package/data-structures/event-service/evm/AbstractSnapshotService.cjs +1 -1
  226. package/data-structures/event-service/evm/AbstractSnapshotService.d.ts +2 -1
  227. package/data-structures/event-service/evm/AbstractSnapshotService.mjs +4 -3
  228. package/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
  229. package/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +5 -10
  230. package/data-structures/event-service/evm/BlockchainEventEmitter.mjs +35 -39
  231. package/data-structures/event-service/index.d.ts +0 -4
  232. package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.cjs +1 -1
  233. package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.d.ts +2 -3
  234. package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.mjs +6 -6
  235. package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.cjs +1 -1
  236. package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.d.ts +3 -4
  237. package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +8 -8
  238. package/data-structures/event-service/solana/AbstractSolanaEventService.cjs +1 -1
  239. package/data-structures/event-service/solana/AbstractSolanaEventService.d.ts +10 -4
  240. package/data-structures/event-service/solana/AbstractSolanaEventService.mjs +7 -10
  241. package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.cjs +1 -1
  242. package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.d.ts +2 -3
  243. package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.mjs +1 -1
  244. package/data-structures/event-service/solana/AbstractSolanaSnapshotService.cjs +1 -1
  245. package/data-structures/event-service/solana/AbstractSolanaSnapshotService.d.ts +2 -1
  246. package/data-structures/event-service/solana/AbstractSolanaSnapshotService.mjs +2 -1
  247. package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.cjs +1 -1
  248. package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.d.ts +16 -11
  249. package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.mjs +66 -64
  250. package/data-structures/index.d.ts +0 -3
  251. package/data-structures/provider-adapter/IProviderAdapter.d.ts +13 -8
  252. package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +1 -1
  253. package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +4 -6
  254. package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.cjs +1 -1
  255. package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.mjs +4 -6
  256. package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs +1 -1
  257. package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +4 -6
  258. package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs +1 -1
  259. package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +4 -6
  260. package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs +1 -1
  261. package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +4 -6
  262. package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs +1 -1
  263. package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +4 -5
  264. package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs +1 -1
  265. package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +4 -6
  266. package/error-handling/error-codes.constants.cjs +1 -1
  267. package/error-handling/error-codes.constants.d.ts +0 -1
  268. package/error-handling/error-codes.constants.mjs +3 -4
  269. package/error-handling/get-error.message.cjs +1 -1
  270. package/error-handling/get-error.message.mjs +27 -21
  271. package/error-handling/handleErrorRestore.cjs +1 -0
  272. package/error-handling/handleErrorRestore.d.ts +2 -0
  273. package/error-handling/handleErrorRestore.mjs +11 -0
  274. package/error-handling/index.d.ts +1 -0
  275. package/functions/kyc/authentoHelper.cjs +1 -0
  276. package/functions/kyc/authentoHelper.d.ts +12 -0
  277. package/functions/kyc/authentoHelper.mjs +30 -0
  278. package/functions/kyc/zkMeHelper.cjs +1 -1
  279. package/functions/kyc/zkMeHelper.mjs +17 -18
  280. package/functions/pre-transaction/constructAdminData.cjs +1 -1
  281. package/functions/pre-transaction/constructAdminData.d.ts +2 -2
  282. package/functions/pre-transaction/constructAdminData.mjs +18 -12
  283. package/functions/pre-transaction/getExternalSwapAddress.cjs +1 -1
  284. package/functions/pre-transaction/getExternalSwapAddress.d.ts +2 -1
  285. package/functions/pre-transaction/getExternalSwapAddress.mjs +8 -8
  286. package/functions/pre-transaction/getVolatileTransferAmount.cjs +1 -1
  287. package/functions/pre-transaction/getVolatileTransferAmount.mjs +36 -21
  288. package/functions/pre-transaction/merge-with-fee-structure-emporium.cjs +1 -1
  289. package/functions/pre-transaction/merge-with-fee-structure-emporium.d.ts +1 -1
  290. package/functions/pre-transaction/merge-with-fee-structure-emporium.mjs +17 -17
  291. package/functions/pre-transaction/outputApprovalDataProcessing.cjs +1 -1
  292. package/functions/pre-transaction/outputApprovalDataProcessing.d.ts +9 -1
  293. package/functions/pre-transaction/outputApprovalDataProcessing.mjs +34 -19
  294. package/functions/pre-transaction/sendV0Transaction.cjs +1 -1
  295. package/functions/pre-transaction/sendV0Transaction.mjs +50 -53
  296. package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.cjs +1 -1
  297. package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.d.ts +1 -1
  298. package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.mjs +4 -4
  299. package/functions/private-wallet/emporium.helpers.cjs +1 -1
  300. package/functions/private-wallet/emporium.helpers.d.ts +6 -3
  301. package/functions/private-wallet/emporium.helpers.mjs +127 -89
  302. package/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
  303. package/functions/private-wallet/emporium.swap.helpers.d.ts +4 -1
  304. package/functions/private-wallet/emporium.swap.helpers.mjs +102 -100
  305. package/functions/snarkjs/constructEmporiumProof.cjs +1 -1
  306. package/functions/snarkjs/constructEmporiumProof.mjs +49 -49
  307. package/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
  308. package/functions/snarkjs/constructSolanaZkProof.mjs +20 -18
  309. package/functions/snarkjs/fetchMerkleTreeSiblings.cjs +1 -1
  310. package/functions/snarkjs/fetchMerkleTreeSiblings.mjs +10 -11
  311. package/functions/utils/addresses.cjs +1 -1
  312. package/functions/utils/addresses.d.ts +0 -1
  313. package/functions/utils/addresses.mjs +12 -13
  314. package/functions/utils/cacheFunctions.cjs +1 -1
  315. package/functions/utils/cacheFunctions.mjs +2 -2
  316. package/functions/utils/create-provider.cjs +1 -1
  317. package/functions/utils/create-provider.d.ts +1 -1
  318. package/functions/utils/create-provider.mjs +9 -13
  319. package/functions/utils/get-hinkal-approvals.cjs +1 -0
  320. package/functions/utils/get-hinkal-approvals.d.ts +3 -0
  321. package/functions/utils/get-hinkal-approvals.mjs +38 -0
  322. package/functions/utils/getUtxosFromReceipt.utils.cjs +1 -1
  323. package/functions/utils/getUtxosFromReceipt.utils.d.ts +1 -1
  324. package/functions/utils/getUtxosFromReceipt.utils.mjs +11 -11
  325. package/functions/utils/index.d.ts +1 -0
  326. package/functions/utils/involves-permit2-op.cjs +1 -1
  327. package/functions/utils/involves-permit2-op.d.ts +1 -0
  328. package/functions/utils/involves-permit2-op.mjs +6 -4
  329. package/functions/utils/mutexes.utils.cjs +1 -1
  330. package/functions/utils/mutexes.utils.d.ts +1 -1
  331. package/functions/utils/mutexes.utils.mjs +3 -3
  332. package/functions/utils/nftTokenFunctions.cjs +1 -1
  333. package/functions/utils/nftTokenFunctions.mjs +23 -8
  334. package/functions/utils/prepareHinkal.cjs +1 -1
  335. package/functions/utils/prepareHinkal.d.ts +13 -6
  336. package/functions/utils/prepareHinkal.mjs +72 -45
  337. package/functions/utils/publicBalance.utils.cjs +1 -1
  338. package/functions/utils/publicBalance.utils.mjs +54 -49
  339. package/functions/utils/replaceAddressInCalldata.cjs +1 -0
  340. package/functions/utils/replaceAddressInCalldata.d.ts +1 -0
  341. package/functions/utils/replaceAddressInCalldata.mjs +7 -0
  342. package/functions/utils/string.utils.cjs +1 -1
  343. package/functions/utils/string.utils.d.ts +0 -1
  344. package/functions/utils/string.utils.mjs +14 -18
  345. package/functions/utils/token-check.utils.cjs +1 -1
  346. package/functions/utils/token-check.utils.d.ts +0 -3
  347. package/functions/utils/token-check.utils.mjs +7 -18
  348. package/functions/utils/upToDateState.cjs +1 -1
  349. package/functions/utils/upToDateState.d.ts +1 -1
  350. package/functions/utils/upToDateState.mjs +4 -4
  351. package/functions/utils/walletBalances.utils.cjs +1 -1
  352. package/functions/utils/walletBalances.utils.d.ts +17 -2
  353. package/functions/utils/walletBalances.utils.mjs +36 -5
  354. package/functions/web3/events/getApprovedBalance.cjs +1 -1
  355. package/functions/web3/events/getApprovedBalance.d.ts +4 -3
  356. package/functions/web3/events/getApprovedBalance.mjs +44 -39
  357. package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
  358. package/functions/web3/events/getInputUtxoAndBalance.d.ts +3 -3
  359. package/functions/web3/events/getInputUtxoAndBalance.mjs +150 -129
  360. package/functions/web3/events/getShieldedBalance.cjs +2 -2
  361. package/functions/web3/events/getShieldedBalance.d.ts +1 -1
  362. package/functions/web3/events/getShieldedBalance.mjs +75 -73
  363. package/functions/web3/events/getTransactionLogEvents.cjs +1 -1
  364. package/functions/web3/events/getTransactionLogEvents.mjs +38 -38
  365. package/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +1 -1
  366. package/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +10 -13
  367. package/functions/web3/functionCalls/accessTokenCalls.cjs +1 -1
  368. package/functions/web3/functionCalls/accessTokenCalls.d.ts +6 -1
  369. package/functions/web3/functionCalls/accessTokenCalls.mjs +21 -12
  370. package/functions/web3/functionCalls/approveToken.cjs +1 -1
  371. package/functions/web3/functionCalls/approveToken.d.ts +1 -1
  372. package/functions/web3/functionCalls/approveToken.mjs +46 -50
  373. package/functions/web3/functionCalls/approveTokensToHinkal.cjs +1 -1
  374. package/functions/web3/functionCalls/approveTokensToHinkal.d.ts +1 -1
  375. package/functions/web3/functionCalls/approveTokensToHinkal.mjs +6 -6
  376. package/functions/web3/functionCalls/estimateGasRelayer.cjs +1 -1
  377. package/functions/web3/functionCalls/estimateGasRelayer.d.ts +2 -1
  378. package/functions/web3/functionCalls/estimateGasRelayer.mjs +10 -10
  379. package/functions/web3/functionCalls/inHinkalApprovalCalls.cjs +1 -0
  380. package/functions/web3/functionCalls/inHinkalApprovalCalls.d.ts +5 -0
  381. package/functions/web3/functionCalls/inHinkalApprovalCalls.mjs +32 -0
  382. package/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
  383. package/functions/web3/functionCalls/transactCallDirect.d.ts +1 -1
  384. package/functions/web3/functionCalls/transactCallDirect.mjs +40 -36
  385. package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
  386. package/functions/web3/functionCalls/transactCallRelayer.d.ts +3 -3
  387. package/functions/web3/functionCalls/transactCallRelayer.mjs +54 -54
  388. package/functions/web3/getContractMetadata.cjs +1 -1
  389. package/functions/web3/getContractMetadata.mjs +22 -17
  390. package/functions/web3/getPublicAddressBalance.cjs +1 -1
  391. package/functions/web3/getPublicAddressBalance.d.ts +1 -1
  392. package/functions/web3/getPublicAddressBalance.mjs +6 -6
  393. package/functions/web3/getTokenHolder.cjs +1 -1
  394. package/functions/web3/getTokenHolder.mjs +27 -27
  395. package/functions/web3/index.d.ts +0 -1
  396. package/functions/web3/lifiAPI.cjs +1 -1
  397. package/functions/web3/lifiAPI.d.ts +1 -1
  398. package/functions/web3/lifiAPI.mjs +12 -12
  399. package/functions/web3/odosAPI.cjs +1 -1
  400. package/functions/web3/odosAPI.mjs +19 -6
  401. package/functions/web3/okxAPI.cjs +1 -1
  402. package/functions/web3/okxAPI.mjs +13 -13
  403. package/functions/web3/oneInchAPI.cjs +1 -1
  404. package/functions/web3/oneInchAPI.mjs +20 -7
  405. package/functions/web3/runContractFunction.cjs +1 -1
  406. package/functions/web3/runContractFunction.mjs +56 -38
  407. package/functions/web3/uniswapAPI.cjs +1 -1
  408. package/functions/web3/uniswapAPI.mjs +34 -22
  409. package/index.cjs +1 -1
  410. package/index.mjs +922 -920
  411. package/package.json +2 -3
  412. package/providers/EthersProviderAdapter.cjs +1 -1
  413. package/providers/EthersProviderAdapter.d.ts +17 -10
  414. package/providers/EthersProviderAdapter.mjs +76 -45
  415. package/providers/SolanaProviderAdapter.cjs +1 -1
  416. package/providers/SolanaProviderAdapter.d.ts +11 -7
  417. package/providers/SolanaProviderAdapter.mjs +31 -16
  418. package/providers/WagmiProviderAdapter.cjs +1 -1
  419. package/providers/WagmiProviderAdapter.d.ts +17 -11
  420. package/providers/WagmiProviderAdapter.mjs +117 -86
  421. package/providers/prepareEthersHinkal.cjs +1 -1
  422. package/providers/prepareEthersHinkal.mjs +9 -14
  423. package/providers/prepareWagmiHinkal.cjs +1 -1
  424. package/providers/prepareWagmiHinkal.mjs +9 -15
  425. package/types/TransactionSimulator.types.d.ts +9 -2
  426. package/types/activities.types.d.ts +0 -2
  427. package/types/admin.types.cjs +1 -1
  428. package/types/admin.types.d.ts +6 -0
  429. package/types/admin.types.mjs +2 -2
  430. package/types/balances.types.d.ts +1 -0
  431. package/types/bridging.types.d.ts +29 -0
  432. package/types/cache.types.cjs +1 -1
  433. package/types/cache.types.d.ts +3 -6
  434. package/types/cache.types.mjs +1 -1
  435. package/types/coingecko.types.d.ts +0 -5
  436. package/types/duneAPI.types.d.ts +9 -0
  437. package/types/ethereum-network.types.d.ts +0 -1
  438. package/types/hinkal.types.cjs +1 -1
  439. package/types/hinkal.types.d.ts +1 -1
  440. package/types/hinkal.types.mjs +18 -18
  441. package/types/index.d.ts +2 -2
  442. package/types/proxy.types.d.ts +3 -6
  443. package/types/sandbox.types.cjs +1 -1
  444. package/types/sandbox.types.d.ts +39 -10
  445. package/types/sandbox.types.mjs +2 -2
  446. package/types/scheduled-transactions.types.cjs +1 -1
  447. package/types/scheduled-transactions.types.d.ts +6 -0
  448. package/types/scheduled-transactions.types.mjs +3 -2
  449. package/types/session.types.d.ts +0 -2
  450. package/types/solana.types.d.ts +0 -9
  451. package/types/token-prices.types.cjs +1 -1
  452. package/types/token-prices.types.d.ts +0 -7
  453. package/types/token-prices.types.mjs +2 -4
  454. package/webworker/snarkjsWorker/snarkjsWorkerLauncher.cjs +1 -1
  455. package/webworker/snarkjsWorker/snarkjsWorkerLauncher.mjs +1 -1
  456. package/webworker/utxoWorker/utxoWorkerLauncher.cjs +1 -1
  457. package/webworker/utxoWorker/utxoWorkerLauncher.mjs +1 -1
  458. package/webworker/viteWorkerURL.constant.cjs +3 -3
  459. package/webworker/viteWorkerURL.constant.mjs +3 -3
  460. package/webworker/zkProofWorker/zkProofWorkerLauncher.cjs +1 -1
  461. package/webworker/zkProofWorker/zkProofWorkerLauncher.mjs +1 -1
  462. package/API/get-token-price-chart-data.cjs +0 -1
  463. package/API/get-token-price-chart-data.d.ts +0 -16
  464. package/API/get-token-price-chart-data.mjs +0 -13
  465. package/API/onrampCalls.cjs +0 -1
  466. package/API/onrampCalls.d.ts +0 -20
  467. package/API/onrampCalls.mjs +0 -15
  468. package/API/unspent-utxos-calls.cjs +0 -1
  469. package/API/unspent-utxos-calls.d.ts +0 -26
  470. package/API/unspent-utxos-calls.mjs +0 -26
  471. package/data-structures/AccountActions/AccountActions.cjs +0 -1
  472. package/data-structures/AccountActions/AccountActions.d.ts +0 -18
  473. package/data-structures/AccountActions/AccountActions.mjs +0 -78
  474. package/data-structures/AccountActions/index.d.ts +0 -1
  475. package/data-structures/BlockchainEvent/BlockchainEvent.cjs +0 -1
  476. package/data-structures/BlockchainEvent/BlockchainEvent.d.ts +0 -14
  477. package/data-structures/BlockchainEvent/BlockchainEvent.mjs +0 -41
  478. package/data-structures/PublicBalance/PublicBalanceWatcher.cjs +0 -1
  479. package/data-structures/PublicBalance/PublicBalanceWatcher.d.ts +0 -20
  480. package/data-structures/PublicBalance/PublicBalanceWatcher.mjs +0 -124
  481. package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.cjs +0 -1
  482. package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.d.ts +0 -15
  483. package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.mjs +0 -64
  484. package/data-structures/PublicBalance/index.d.ts +0 -2
  485. package/data-structures/event-service/evm/ClientBlockchainEventEmitter.cjs +0 -1
  486. package/data-structures/event-service/evm/ClientBlockchainEventEmitter.d.ts +0 -11
  487. package/data-structures/event-service/evm/ClientBlockchainEventEmitter.mjs +0 -21
  488. package/data-structures/event-service/evm/PollingBlockchainEventEmitter.cjs +0 -1
  489. package/data-structures/event-service/evm/PollingBlockchainEventEmitter.d.ts +0 -6
  490. package/data-structures/event-service/evm/PollingBlockchainEventEmitter.mjs +0 -16
  491. package/data-structures/event-service/helpers/ClientEventHelper.cjs +0 -1
  492. package/data-structures/event-service/helpers/ClientEventHelper.d.ts +0 -11
  493. package/data-structures/event-service/helpers/ClientEventHelper.mjs +0 -26
  494. package/data-structures/event-service/helpers/PollingEventHelper.cjs +0 -1
  495. package/data-structures/event-service/helpers/PollingEventHelper.d.ts +0 -5
  496. package/data-structures/event-service/helpers/PollingEventHelper.mjs +0 -14
  497. package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.cjs +0 -1
  498. package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.d.ts +0 -11
  499. package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.mjs +0 -22
  500. package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.cjs +0 -1
  501. package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.d.ts +0 -6
  502. package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.mjs +0 -16
  503. package/functions/utils/enum.utils.cjs +0 -1
  504. package/functions/utils/enum.utils.mjs +0 -14
  505. package/functions/utils/socket.utils.cjs +0 -1
  506. package/functions/utils/socket.utils.d.ts +0 -1
  507. package/functions/utils/socket.utils.mjs +0 -12
  508. package/functions/web3/crypto.cjs +0 -1
  509. package/functions/web3/crypto.d.ts +0 -1
  510. package/functions/web3/crypto.mjs +0 -7
  511. package/types/events.types.cjs +0 -1
  512. package/types/events.types.d.ts +0 -9
  513. package/types/events.types.mjs +0 -5
  514. package/types/onramp.types.cjs +0 -1
  515. package/types/onramp.types.d.ts +0 -58
  516. package/types/onramp.types.mjs +0 -4
package/README.md CHANGED
@@ -12,9 +12,9 @@ With Hinkal SDK, developers can:
12
12
 
13
13
  ## Compatibility
14
14
 
15
- | Environment | Supported | Notes |
16
- |-------------|-----------|-------|
17
- | Node.js | ✅ | v18+ |
15
+ | Environment | Supported | Notes |
16
+ | ----------- | --------- | -------------------------- |
17
+ | Node.js | ✅ | v18+ |
18
18
  | Browser | ✅ | React, Next.js, vanilla JS |
19
19
 
20
20
  ## Installation
@@ -38,11 +38,11 @@ yarn add @hinkal/common
38
38
  To begin using Hinkal in your application, you'll need to initialize the SDK with your preferred Web3 connection library. Hinkal supports multiple popular libraries out of the box, allowing seamless integration with your existing wallet connection setup.
39
39
 
40
40
  Initializing the SDK creates a `Hinkal` object that encapsulates:
41
+
41
42
  - The user's shielded balances
42
43
  - Actions the user can perform, such as shielding (depositing), transfers, and swapping
43
44
  - Cryptographic keys for privacy-preserving operations
44
45
 
45
-
46
46
  **ethers.js:**
47
47
 
48
48
  ```typescript
@@ -59,12 +59,14 @@ import { prepareWagmiHinkal } from '@hinkal/common/providers/prepareWagmiHinkal'
59
59
  // wagmiConfig: wagmi.Config
60
60
  const hinkal = await prepareWagmiHinkal(connector, wagmiConfig, hinkalConfig);
61
61
  ```
62
+
62
63
  The `hinkalConfig` is defined as follows:
64
+
63
65
  ```typescript
64
66
  type HinkalConfig = {
65
67
  /** Disables caching in browser localStorage, storing data only in memory. Front-end only. Defaults to false. */
66
68
  disableCaching?: boolean;
67
-
69
+
68
70
  /** If true, allows caching in a file locally. Node.js only. Defaults to false. */
69
71
  useFileCache?: boolean;
70
72
 
@@ -86,15 +88,14 @@ type HinkalConfig = {
86
88
  Shielded balances are encrypted token holdings stored within the Hinkal protocol. Unlike regular blockchain balances that are publicly visible, shielded balances are hidden from external observers, providing privacy for your assets. After initializing the Hinkal object, you can access and calculate your shielded balances:
87
89
 
88
90
  ```typescript
89
- const balances: Promise<Map<string, TokenBalance>> = await hinkal.getBalances();
91
+ const balances: Promise<Map<string, TokenBalance>> = await hinkal.getBalances();
90
92
  ```
91
93
 
92
94
  This returns a map from token address to balance for all tokens held by the user, including ERC20 and ERC721 tokens.
93
95
 
94
-
95
96
  ### Shielding: depositing funds to the shielded balance
96
97
 
97
- Shielding is the process of moving your tokens from a public blockchain address into a private, encrypted balance. Once shielded, your tokens are no longer visible on-chain to external observers. This provides privacy for your holdings and subsequent transactions.
98
+ Shielding is the process of moving your tokens from a public blockchain address into a private, encrypted balance. Once shielded, your tokens are no longer visible on-chain to external observers. This provides privacy for your holdings and subsequent transactions.
98
99
 
99
100
  A user can deposit funds to their shielded address using:
100
101
 
@@ -103,6 +104,7 @@ function deposit(erc20Tokens: ERC20Token[], amountChanges: bigint[]): Promise<et
103
104
  ```
104
105
 
105
106
  where:
107
+
106
108
  - `erc20Tokens` is an array of tokens to deposit
107
109
  - `amountChanges` represents the corresponding token amounts for the deposit
108
110
 
@@ -130,13 +132,14 @@ function withdraw(
130
132
  deltaAmounts: bigint[],
131
133
  recipientAddress: string,
132
134
  isRelayerOff: boolean,
133
- ): Promise<RelayerTransaction>;
135
+ ): Promise<string>;
134
136
  ```
135
137
 
136
138
  where:
139
+
137
140
  - `recipientAddress` is the public address that will receive the withdrawn funds
138
141
  - `isRelayerOff` determines whether to use a relayer for the transaction (when `false`, a relayer handles gas fees; when `true`, the user pays gas directly)
139
- - `RelayerTransaction` type represents the transaction response from the relayer service.
142
+ - `string` type represents the transaction response from the relayer service.
140
143
 
141
144
  ### Private Send to Private Address: transfering funds from shielded balance
142
145
 
@@ -145,13 +148,11 @@ Private Send to Private Address enables fully confidential transfers between shi
145
148
  A user can transfer tokens from their shielded balance to another shielded address using:
146
149
 
147
150
  ```typescript
148
- function transfer(
149
- erc20Tokens: ERC20Token[],
150
- deltaAmounts: bigint[],
151
- privateRecipientAddress: string,
152
- ): Promise<RelayerTransaction>;
151
+ function transfer(erc20Tokens: ERC20Token[], deltaAmounts: bigint[], privateRecipientAddress: string): Promise<string>;
153
152
  ```
153
+
154
154
  where:
155
+
155
156
  - `privateRecipientAddress` is the recipient's private address, formatted as a comma-separated string with five components:
156
157
  - `randomization` - a random value for privacy
157
158
  - `stealthAddress` - the recipient's stealth address (hex format starting with `0x`)
@@ -171,16 +172,16 @@ function depositAndWithdraw(
171
172
  recipientAmounts: bigint[],
172
173
  recipientAddresses: string[],
173
174
  txCompletionTime?: number,
174
- ): Promise<RelayerTransaction>;
175
+ ): Promise<string>;
175
176
  ```
176
177
 
177
178
  where:
179
+
178
180
  - `erc20Token` is the token to transfer (only single token transfers are supported for this method)
179
181
  - `recipientAmounts` is an array of amounts to send to each recipient (in the token's smallest unit)
180
182
  - `recipientAddresses` is an array of public addresses that will receive the funds
181
183
  - `txCompletionTime` (optional) specifies a delay in milliseconds before the withdrawal completes
182
184
 
183
-
184
185
  ### Swapping tokens from the shielded balance
185
186
 
186
187
  Swapping allows you to exchange tokens directly from your shielded balance without revealing your identity. The swap is executed through integrated DEX protocols (Uniswap, 1Inch, Odos) while keeping your transaction private. Your tokens are withdrawn from your shielded balance, swapped through the specified protocol, and the resulting tokens are deposited back into your shielded balance—all in a single private transaction.
@@ -193,10 +194,11 @@ function swap(
193
194
  deltaAmounts: bigint[],
194
195
  externalActionId: ExternalActionId,
195
196
  swapData: string,
196
- ): Promise<RelayerTransaction>;
197
+ ): Promise<string>;
197
198
  ```
198
199
 
199
200
  where:
201
+
200
202
  - `externalActionId` identifies the external swap protocol to use. Possible values include:
201
203
  - `ExternalActionId.Uniswap` - for Uniswap swaps
202
204
  - `ExternalActionId.OneInch` - for 1Inch swaps
@@ -209,8 +211,8 @@ To obtain the swap calldata using the Hinkal SDK, you can use the built-in swap
209
211
 
210
212
  To get swap data for 1Inch, you can use the `getOneInchPrice` function. This function fetches a quote from the 1Inch aggregator and returns both the expected output amount and the encoded swap data that can be passed to the `swap` function:
211
213
 
212
-
213
214
  **1Inch:**
215
+
214
216
  ```typescript
215
217
  function getOneInchPrice(
216
218
  chainId: number,
@@ -219,11 +221,13 @@ function getOneInchPrice(
219
221
  inSwapAmount: string,
220
222
  slippagePercentage?: number,
221
223
  ): Promise<{
222
- outSwapAmountValue: bigint;
223
- oneInchDataValue: string;
224
- }>
224
+ outSwapAmountValue: bigint;
225
+ oneInchDataValue: string;
226
+ }>;
225
227
  ```
228
+
226
229
  Similar functions are available for other supported swap protocols:
230
+
227
231
  - **Uniswap:** `getUniswapPrice`
228
232
  - **Odos:** `getOdosPrice`
229
233
  - **LiFi:** `getLifiPrice`
@@ -234,15 +238,16 @@ The SDK lets you interact with any smart contract on the blockchain while keepin
234
238
 
235
239
  ```typescript
236
240
  function actionPrivateWallet(
237
- chainId:number,
241
+ chainId: number,
238
242
  erc20Tokens: ERC20Token[],
239
243
  deltaAmounts: bigint[],
240
244
  onChainCreation: boolean[],
241
245
  ops: string[],
242
- ): Promise<RelayerTransaction>;
246
+ ): Promise<string>;
243
247
  ```
244
248
 
245
249
  Parameters:
250
+
246
251
  - `chainId` - the blockchain network identifier
247
252
  - `onChainCreation` - array of booleans indicating the direction of token changes: `true` for positive changes (tokens received), `false` for negative changes (tokens spent)
248
253
  - `ops` - array of encoded user operations to execute (see User operations below)
@@ -259,10 +264,11 @@ function emporiumOp(
259
264
  callDataString?: string;
260
265
  invokeWallet?: boolean;
261
266
  value?: bigint;
262
- ): Promise<RelayerTransaction>;
267
+ ): Promise<string>;
263
268
  ```
264
269
 
265
270
  The function accepts the following arguments:
271
+
266
272
  1. `contract` _(required)_ - target address or contract instance (with address). The contract instance will be used to properly encode the call function, if any, in the custom operation.
267
273
  2. `func` _(optional)_ - the name of the function to be called on the target address.
268
274
  3. `args` _(optional)_ - arguments of the function to be called on the target address.
@@ -270,7 +276,6 @@ The function accepts the following arguments:
270
276
  5. `invokeWallet` _(optional)_ - boolean flag that determines the type of interaction (see the stateless/stateful interactions below).
271
277
  6. `value` _(optional)_ - the value field to the user operation call.
272
278
 
273
-
274
279
  When the Emporium contract executes a user operation, it receives the data in this format:
275
280
 
276
281
  ```solidity
@@ -296,23 +301,31 @@ const operations = [
296
301
  emporiumOp({ contract: wethContractInstance, func: 'withdraw', args: [amountOut] }),
297
302
  ];
298
303
  ```
304
+
299
305
  In this example:
306
+
300
307
  - First operation approves the swap router to spend USDC tokens
301
308
  - Second operation executes the swap from USDC to WETH
302
309
  - Third operation unwraps WETH to ETH
303
310
 
304
-
305
- **Stateful interactions** are operations where the target protocol needs to track the account's history for future calculations, such as staking rewards, voting power, or checkpoints. In these cases, set `invokeWallet: true` to ensure the operation is executed from a persistent wallet address that the protocol can track.
311
+ **Stateful interactions** are operations where the target protocol needs to track the account's history for future calculations, such as staking rewards, voting power, or checkpoints. In these cases, set `invokeWallet: true` to ensure the operation is executed from a persistent wallet address that the protocol can track.
306
312
 
307
313
  Consider a scenario where you have already staked Curve LP tokens and want to claim your rewards. The gauge contract needs to track your staking history to calculate accumulated rewards, so it must recognize the same wallet address across multiple interactions.
308
314
 
309
315
  ```typescript
310
316
  const operations = [
311
- emporiumOp({ contract: lpTokenInstance, func: 'approve', args: [gaugeAddressInstance, amount], invokeWallet: true }),
312
- emporiumOp({ contract: gaugeAddressInstance, func: 'deposit', args: [amount, invokeWalletAddress], invokeWallet: true }),
317
+ emporiumOp({ contract: lpTokenInstance, func: 'approve', args: [gaugeAddressInstance, amount], invokeWallet: true }),
318
+ emporiumOp({
319
+ contract: gaugeAddressInstance,
320
+ func: 'deposit',
321
+ args: [amount, invokeWalletAddress],
322
+ invokeWallet: true,
323
+ }),
313
324
  ];
314
325
  ```
326
+
315
327
  In this example:
328
+
316
329
  - First operation approves the gauge contract to spend LP tokens, executed from the persistent wallet
317
330
  - Second operation deposits LP tokens into the gauge, with the wallet address as the recipient for reward tracking
318
331
 
@@ -331,16 +344,32 @@ function checkAccessToken(): Promise<boolean>;
331
344
  If the user does not have an access token, they need to complete a compliance verification through one of Hinkal's supported compliance providers. This is a one-time process that verifies the user meets regulatory requirements before they can use the privacy features.
332
345
 
333
346
  To get a list of all available compliance providers that can be used for verification:
347
+
334
348
  ```typescript
335
349
  function getSupportedPassportLinks(): string[];
336
350
  ```
337
351
 
338
- After passing the compliance check with one of the supported providers, the access token will be automatically minted during the user's first transaction with Hinkal. This token is stored on-chain and grants the user permission to interact with Hinkal's privacy contracts.
352
+ After passing the compliance check with one of the supported providers, the access token will be automatically minted during the user's first transaction with Hinkal. This token is stored on-chain and grants the user permission to interact with Hinkal's privacy contracts.
353
+
354
+ ## Supported Chains
355
+
356
+ Hinkal SDK is available on the following blockchain networks:
357
+
358
+ | Chain | Chain ID | Status |
359
+ | -------- | -------- | -------------- |
360
+ | Ethereum | 1 | ✅ Live |
361
+ | Polygon | 137 | ✅ Live |
362
+ | Base | 8453 | ✅ Live |
363
+ | Arbitrum | 42161 | ✅ Live |
364
+ | Optimism | 10 | ✅ Live |
365
+ | Solana | - | 🚧 In Progress |
366
+
367
+ Each chain supports the full suite of Hinkal privacy features including shielding, transfers, and confidential interactions with DeFi protocols.
339
368
 
340
369
  ## References
341
370
 
342
371
  Wallet: [Hinkal Wallet](https://chromewebstore.google.com/detail/hinkal-wallet/khfjgapjfcdoffmklchibpepboholpbe)
343
372
 
344
- Application: [Private Send](https://send.hinkal.io)
373
+ Application: [Private Send](https://send.hinkal.io)
345
374
 
346
375
  Docs: [Hinkal Documentation](https://hinkal-team.gitbook.io/hinkal)
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./deploy-data/deploy-data-bnbMainnet.json.cjs"),d=require("./deploy-data/deploy-data-arbMainnet.json.cjs"),m=require("./deploy-data/deploy-data-ethMainnet.json.cjs"),h=require("./deploy-data/deploy-data-optimism.json.cjs"),u=require("./deploy-data/deploy-data-polygon.json.cjs"),y=require("./deploy-data/deploy-data-avalanche.json.cjs"),b=require("./deploy-data/deploy-data-base.json.cjs"),f=require("./deploy-data/deploy-data-localhost.json.cjs"),A=require("./deploy-data/deploy-data-arcTestnet.json.cjs"),o=require("./deploy-data/deploy-data-solana.json.cjs"),s=require("./vite.constants.cjs"),t={polygon:137,arbMainnet:42161,ethMainnet:1,avalanche:43114,bnbMainnet:56,optimism:10,base:8453,localhost:31337,arcTestnet:5042002,solanaMainnet:501,solanaLocalnet:102},D="4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ",n=t.ethMainnet,r=e=>!![t.localhost].includes(e),g=e=>e?r(e)?n:e:n,i="X4IiEZsSzGOrJq8tzq7Y3",a=s.isNotProduction?i:"XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",E="https://mainnet.helius-rpc.com/?api-key=24718f72-c710-45d6-853e-d447cf530579",c={[t.ethMainnet]:{name:"Ethereum",chainId:t.ethMainnet,rpcUrl:"https://rpc.ankr.com/eth",fetchRpcUrl:`https://eth-mainnet.g.alchemy.com/v2/${a}`,wsRpcUrl:`wss://eth-mainnet.g.alchemy.com/v2/${a}`,supported:!0,contractData:m.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",priority:1,privateMempoolRpcUrl:"https://relay.flashbots.net",maxPageSize:9e5},[t.arbMainnet]:{name:"Arbitrum",chainId:t.arbMainnet,rpcUrl:"https://endpoints.omniatech.io/v1/arbitrum/one/public",fetchRpcUrl:`https://arb-mainnet.g.alchemy.com/v2/${a}`,wsRpcUrl:`wss://arb-mainnet.g.alchemy.com/v2/${a}`,supported:!0,contractData:d.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",priority:2,maxPageSize:5e5},[t.optimism]:{name:"Optimism",chainId:t.optimism,rpcUrl:"https://optimism-mainnet.infura.io/v3/c26b99456bb6464bb498926ff5162903",fetchRpcUrl:`https://opt-mainnet.g.alchemy.com/v2/${a}`,wsRpcUrl:`wss://opt-mainnet.g.alchemy.com/v2/${a}`,supported:!0,contractData:h.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",priority:3,maxPageSize:9e5},[t.polygon]:{name:"Polygon",chainId:t.polygon,rpcUrl:"https://polygon-rpc.com",fetchRpcUrl:`https://polygon-mainnet.g.alchemy.com/v2/${a}`,wsRpcUrl:`wss://polygon-mainnet.g.alchemy.com/v2/${a}`,supported:!0,contractData:u.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",priority:4,maxPageSize:9e5},[t.avalanche]:{name:"Avalanche",chainId:t.avalanche,rpcUrl:"https://api.avax.network/ext/bc/C/rpc",fetchRpcUrl:`https://avax-mainnet.g.alchemy.com/v2/${a}`,wsRpcUrl:`wss://avax-mainnet.g.alchemy.com/v2/${a}`,supported:!0,contractData:y.default,quoterV2Address:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",uniswapV3FactoryAddress:"0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD",priority:5},[t.bnbMainnet]:{name:"BNB Chain",chainId:t.bnbMainnet,rpcUrl:"https://bsc-dataseed.binance.org",fetchRpcUrl:`https://bnb-mainnet.g.alchemy.com/v2/${a}`,wsRpcUrl:`wss://bnb-mainnet.g.alchemy.com/v2/${a}`,supported:!0,contractData:l.default,quoterV2Address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",uniswapV3FactoryAddress:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",priority:6},[t.base]:{name:"Base",chainId:t.base,rpcUrl:"https://mainnet.base.org/",fetchRpcUrl:`https://base-mainnet.g.alchemy.com/v2/${a}`,wsRpcUrl:`wss://base-mainnet.g.alchemy.com/v2/${a}`,supported:!0,contractData:b.default,quoterV2Address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",uniswapV3FactoryAddress:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",priority:7,maxPageSize:5e5},[t.arcTestnet]:{name:"Arc Testnet",chainId:t.arcTestnet,rpcUrl:`https://arc-testnet.g.alchemy.com/v2/${a}`,fetchRpcUrl:`https://arc-testnet.g.alchemy.com/v2/${a}`,wsRpcUrl:`wss://arc-testnet.g.alchemy.com/v2/${a}`,supported:!0,contractData:A.default,priority:8,maxPageSize:9999},[t.solanaMainnet]:{name:"Solana",chainId:t.solanaMainnet,rpcUrl:"https://api.mainnet-beta.solana.com",fetchRpcUrl:"https://mainnet.helius-rpc.com/?api-key=54ad9ec9-dad6-41de-b961-e3e8ea7a7188",supported:!0,contractData:o.default,priority:8},[t.solanaLocalnet]:{name:"Solana Localnet",chainId:t.solanaLocalnet,rpcUrl:"http://127.0.0.1:8899",fetchRpcUrl:"http://127.0.0.1:8899",supported:!0,contractData:o.default,priority:9},...s.isDevelopment?{}:{}},U={name:"Localhost",chainId:t.localhost,rpcUrl:"http://127.0.0.1:8545",fetchRpcUrl:"http://127.0.0.1:8545",supported:!0,contractData:f.default,quoterV2Address:c[n].quoterV2Address,uniswapV3FactoryAddress:c[n].uniswapV3FactoryAddress,priority:7};s.isDevelopment&&(c[t.localhost]=U);var p=(e=>(e.Mainnet="Mainnet",e.Testnet="Testnet",e.Local="Local",e))(p||{});const F={Mainnet:[t.polygon,t.arbMainnet,t.ethMainnet,t.bnbMainnet,t.optimism,t.avalanche,t.base],Testnet:[t.arcTestnet],Local:[t.localhost]},M=e=>[t.optimism,t.base].includes(e),v=e=>[t.solanaMainnet,t.solanaLocalnet].includes(e),w=[t.ethMainnet,t.optimism,t.base,t.polygon,t.arbMainnet,t.arcTestnet,t.solanaMainnet],R=[t.ethMainnet,t.optimism,t.base,t.polygon,t.arbMainnet];exports.ALCHEMY_API_KEY=a;exports.ALCHEMY_TEST_KEY=i;exports.BRIDGE_SUPPORTED_CHAINS=R;exports.EthereumNetworkType=p;exports.HELIUS_RPC_URL=E;exports.WALLET_SUPPORTED_CHAINS=w;exports.chainIds=t;exports.chainIdsByType=F;exports.getNonLocalhostChainId=g;exports.isLocalNetwork=r;exports.isOptimismLike=M;exports.isSolanaLike=v;exports.localhostNetwork=n;exports.networkRegistry=c;exports.solanaChainIdStr=D;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./deploy-data/deploy-data-bnbMainnet.json.cjs"),d=require("./deploy-data/deploy-data-arbMainnet.json.cjs"),h=require("./deploy-data/deploy-data-ethMainnet.json.cjs"),u=require("./deploy-data/deploy-data-optimism.json.cjs"),m=require("./deploy-data/deploy-data-polygon.json.cjs"),b=require("./deploy-data/deploy-data-avalanche.json.cjs"),y=require("./deploy-data/deploy-data-base.json.cjs"),A=require("./deploy-data/deploy-data-localhost.json.cjs"),f=require("./deploy-data/deploy-data-arcTestnet.json.cjs"),c=require("./deploy-data/deploy-data-solana.json.cjs"),r=require("./vite.constants.cjs"),t={polygon:137,arbMainnet:42161,ethMainnet:1,avalanche:43114,bnbMainnet:56,optimism:10,base:8453,bnbTestnet:97,polygonMumbai:80001,mainnetSepolia:11155111,optimismSepolia:11155420,localhost:31337,hardhat:31337,arcTestnet:5042002,solanaMainnet:501,solanaLocalnet:102},D="4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ",n=t.ethMainnet,s=a=>!![t.localhost].includes(a),E=a=>a?s(a)?n:a:n,i="X4IiEZsSzGOrJq8tzq7Y3",e=r.isNotProduction?i:"XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",F="https://mainnet.helius-rpc.com/?api-key=24718f72-c710-45d6-853e-d447cf530579",o={[t.ethMainnet]:{name:"Ethereum",chainId:t.ethMainnet,rpcUrl:"https://rpc.ankr.com/eth",fetchRpcUrl:`https://eth-mainnet.g.alchemy.com/v2/${e}`,supported:!0,contractData:h.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",priority:1,privateMempoolRpcUrl:"https://relay.flashbots.net"},[t.arbMainnet]:{name:"Arbitrum",chainId:t.arbMainnet,rpcUrl:"https://endpoints.omniatech.io/v1/arbitrum/one/public",fetchRpcUrl:`https://arb-mainnet.g.alchemy.com/v2/${e}`,supported:!0,contractData:d.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",priority:2},[t.optimism]:{name:"Optimism",chainId:t.optimism,rpcUrl:"https://optimism-mainnet.infura.io/v3/c26b99456bb6464bb498926ff5162903",fetchRpcUrl:`https://opt-mainnet.g.alchemy.com/v2/${e}`,supported:!0,contractData:u.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",priority:3},[t.polygon]:{name:"Polygon",chainId:t.polygon,rpcUrl:"https://polygon-rpc.com",fetchRpcUrl:`https://polygon-mainnet.g.alchemy.com/v2/${e}`,supported:!0,contractData:m.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",priority:4,maxPageSize:1e6},[t.avalanche]:{name:"Avalanche",chainId:t.avalanche,rpcUrl:"https://api.avax.network/ext/bc/C/rpc",fetchRpcUrl:`https://avax-mainnet.g.alchemy.com/v2/${e}`,supported:!0,contractData:b.default,quoterV2Address:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",uniswapV3FactoryAddress:"0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD",priority:5},[t.bnbMainnet]:{name:"BNB Chain",chainId:t.bnbMainnet,rpcUrl:"https://bsc-dataseed.binance.org",fetchRpcUrl:`https://bnb-mainnet.g.alchemy.com/v2/${e}`,supported:!0,contractData:l.default,quoterV2Address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",uniswapV3FactoryAddress:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",priority:6},[t.base]:{name:"Base",chainId:t.base,rpcUrl:"https://mainnet.base.org/",fetchRpcUrl:`https://base-mainnet.g.alchemy.com/v2/${e}`,supported:!0,contractData:y.default,quoterV2Address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",uniswapV3FactoryAddress:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",priority:7},[t.arcTestnet]:{name:"Arc Testnet",chainId:t.arcTestnet,rpcUrl:`https://arc-testnet.g.alchemy.com/v2/${e}`,fetchRpcUrl:`https://arc-testnet.g.alchemy.com/v2/${e}`,supported:!0,contractData:f.default,priority:8,maxPageSize:9999},[t.solanaMainnet]:{name:"Solana",chainId:t.solanaMainnet,rpcUrl:"https://api.mainnet-beta.solana.com",fetchRpcUrl:"https://wider-side-sunset.solana-mainnet.quiknode.pro/61054262c1a2b13dd570243c5fdd017c05cf7fe1",supported:!0,contractData:c.default,priority:8},[t.solanaLocalnet]:{name:"Solana Localnet",chainId:t.solanaLocalnet,rpcUrl:"http://127.0.0.1:8899",fetchRpcUrl:"http://127.0.0.1:8899",supported:!0,contractData:c.default,priority:9},...r.isDevelopment?{}:{}},I={name:"Localhost",chainId:t.localhost,rpcUrl:"http://127.0.0.1:8545",fetchRpcUrl:"http://127.0.0.1:8545",supported:!0,contractData:A.default,quoterV2Address:o[n].quoterV2Address,uniswapV3FactoryAddress:o[n].uniswapV3FactoryAddress,priority:7};r.isDevelopment&&(o[t.localhost]=I);var p=(a=>(a.Mainnet="Mainnet",a.Testnet="Testnet",a.Local="Local",a))(p||{});const L={Mainnet:[t.polygon,t.arbMainnet,t.ethMainnet,t.bnbMainnet,t.optimism,t.avalanche,t.base],Testnet:[t.bnbTestnet,t.polygonMumbai,t.arcTestnet],Local:[t.localhost]},M=a=>[t.optimism,t.base].includes(a),U=a=>[t.solanaMainnet,t.solanaLocalnet].includes(a),g=t.ethMainnet,T=[t.ethMainnet,t.optimism,t.base,t.polygon,t.arbMainnet,t.arcTestnet],C=[t.ethMainnet,t.optimism,t.base,t.polygon,t.arbMainnet];exports.ALCHEMY_API_KEY=e;exports.ALCHEMY_TEST_KEY=i;exports.BRIDGE_SUPPORTED_CHAINS=C;exports.EthereumNetworkType=p;exports.HELIUS_RPC_URL=F;exports.WALLET_INITIAL_CHAIN_ID=g;exports.WALLET_SUPPORTED_CHAINS=T;exports.chainIds=t;exports.chainIdsByType=L;exports.getNonLocalhostChainId=E;exports.isLocalNetwork=s;exports.isOptimismLike=M;exports.isSolanaLike=U;exports.localhostNetwork=n;exports.networkRegistry=o;exports.solanaChainIdStr=D;
@@ -7,7 +7,12 @@ export declare const chainIds: {
7
7
  bnbMainnet: number;
8
8
  optimism: number;
9
9
  base: number;
10
+ bnbTestnet: number;
11
+ polygonMumbai: number;
12
+ mainnetSepolia: number;
13
+ optimismSepolia: number;
10
14
  localhost: number;
15
+ hardhat: number;
11
16
  arcTestnet: number;
12
17
  solanaMainnet: number;
13
18
  solanaLocalnet: number;
@@ -32,5 +37,6 @@ export declare const chainIdsByType: {
32
37
  };
33
38
  export declare const isOptimismLike: (chainId: number) => boolean;
34
39
  export declare const isSolanaLike: (chainId: number) => boolean;
40
+ export declare const WALLET_INITIAL_CHAIN_ID: number;
35
41
  export declare const WALLET_SUPPORTED_CHAINS: number[];
36
42
  export declare const BRIDGE_SUPPORTED_CHAINS: number[];
@@ -1,14 +1,14 @@
1
1
  import s from "./deploy-data/deploy-data-bnbMainnet.json.mjs";
2
2
  import i from "./deploy-data/deploy-data-arbMainnet.json.mjs";
3
3
  import p from "./deploy-data/deploy-data-ethMainnet.json.mjs";
4
- import m from "./deploy-data/deploy-data-optimism.json.mjs";
5
- import l from "./deploy-data/deploy-data-polygon.json.mjs";
4
+ import l from "./deploy-data/deploy-data-optimism.json.mjs";
5
+ import m from "./deploy-data/deploy-data-polygon.json.mjs";
6
6
  import h from "./deploy-data/deploy-data-avalanche.json.mjs";
7
7
  import d from "./deploy-data/deploy-data-base.json.mjs";
8
8
  import b from "./deploy-data/deploy-data-localhost.json.mjs";
9
9
  import u from "./deploy-data/deploy-data-arcTestnet.json.mjs";
10
10
  import r from "./deploy-data/deploy-data-solana.json.mjs";
11
- import { isDevelopment as o, isNotProduction as y } from "./vite.constants.mjs";
11
+ import { isDevelopment as c, isNotProduction as f } from "./vite.constants.mjs";
12
12
  const t = {
13
13
  polygon: 137,
14
14
  arbMainnet: 42161,
@@ -17,73 +17,70 @@ const t = {
17
17
  bnbMainnet: 56,
18
18
  optimism: 10,
19
19
  base: 8453,
20
+ bnbTestnet: 97,
21
+ polygonMumbai: 80001,
22
+ mainnetSepolia: 11155111,
23
+ optimismSepolia: 11155420,
20
24
  localhost: 31337,
25
+ hardhat: 31337,
21
26
  arcTestnet: 5042002,
22
27
  // Custom numeric IDs reserved for Solana clusters to avoid collision with any EVM chain IDs
23
28
  // These values are chosen from the commonly referenced Solana cluster identifiers and
24
29
  // are not used by any known EVM networks in this codebase
25
30
  solanaMainnet: 501,
26
31
  solanaLocalnet: 102
27
- }, C = "4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ", n = t.ethMainnet, f = (e) => !![t.localhost].includes(e), S = (e) => e ? f(e) ? n : e : n, D = "X4IiEZsSzGOrJq8tzq7Y3", a = y ? D : "XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9", V = "https://mainnet.helius-rpc.com/?api-key=24718f72-c710-45d6-853e-d447cf530579", c = {
32
+ }, R = "4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ", n = t.ethMainnet, y = (a) => !![t.localhost].includes(a), V = (a) => a ? y(a) ? n : a : n, A = "X4IiEZsSzGOrJq8tzq7Y3", e = f ? A : "XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9", S = "https://mainnet.helius-rpc.com/?api-key=24718f72-c710-45d6-853e-d447cf530579", o = {
28
33
  [t.ethMainnet]: {
29
34
  name: "Ethereum",
30
35
  chainId: t.ethMainnet,
31
36
  rpcUrl: "https://rpc.ankr.com/eth",
32
- fetchRpcUrl: `https://eth-mainnet.g.alchemy.com/v2/${a}`,
33
- wsRpcUrl: `wss://eth-mainnet.g.alchemy.com/v2/${a}`,
37
+ fetchRpcUrl: `https://eth-mainnet.g.alchemy.com/v2/${e}`,
34
38
  supported: !0,
35
39
  contractData: p,
36
40
  quoterV2Address: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
37
41
  uniswapV3FactoryAddress: "0x1F98431c8aD98523631AE4a59f267346ea31F984",
38
42
  priority: 1,
39
- privateMempoolRpcUrl: "https://relay.flashbots.net",
40
- maxPageSize: 9e5
43
+ privateMempoolRpcUrl: "https://relay.flashbots.net"
41
44
  },
42
45
  [t.arbMainnet]: {
43
46
  name: "Arbitrum",
44
47
  chainId: t.arbMainnet,
45
48
  rpcUrl: "https://endpoints.omniatech.io/v1/arbitrum/one/public",
46
- fetchRpcUrl: `https://arb-mainnet.g.alchemy.com/v2/${a}`,
47
- wsRpcUrl: `wss://arb-mainnet.g.alchemy.com/v2/${a}`,
49
+ fetchRpcUrl: `https://arb-mainnet.g.alchemy.com/v2/${e}`,
48
50
  supported: !0,
49
51
  contractData: i,
50
52
  quoterV2Address: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
51
53
  uniswapV3FactoryAddress: "0x1F98431c8aD98523631AE4a59f267346ea31F984",
52
- priority: 2,
53
- maxPageSize: 5e5
54
+ priority: 2
54
55
  },
55
56
  [t.optimism]: {
56
57
  name: "Optimism",
57
58
  chainId: t.optimism,
58
59
  rpcUrl: "https://optimism-mainnet.infura.io/v3/c26b99456bb6464bb498926ff5162903",
59
- fetchRpcUrl: `https://opt-mainnet.g.alchemy.com/v2/${a}`,
60
- wsRpcUrl: `wss://opt-mainnet.g.alchemy.com/v2/${a}`,
60
+ fetchRpcUrl: `https://opt-mainnet.g.alchemy.com/v2/${e}`,
61
61
  supported: !0,
62
- contractData: m,
62
+ contractData: l,
63
63
  quoterV2Address: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
64
64
  uniswapV3FactoryAddress: "0x1F98431c8aD98523631AE4a59f267346ea31F984",
65
- priority: 3,
66
- maxPageSize: 9e5
65
+ priority: 3
67
66
  },
68
67
  [t.polygon]: {
69
68
  name: "Polygon",
70
69
  chainId: t.polygon,
71
70
  rpcUrl: "https://polygon-rpc.com",
72
- fetchRpcUrl: `https://polygon-mainnet.g.alchemy.com/v2/${a}`,
73
- wsRpcUrl: `wss://polygon-mainnet.g.alchemy.com/v2/${a}`,
71
+ fetchRpcUrl: `https://polygon-mainnet.g.alchemy.com/v2/${e}`,
74
72
  supported: !0,
75
- contractData: l,
73
+ contractData: m,
76
74
  quoterV2Address: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
77
75
  uniswapV3FactoryAddress: "0x1F98431c8aD98523631AE4a59f267346ea31F984",
78
76
  priority: 4,
79
- maxPageSize: 9e5
77
+ maxPageSize: 1e6
80
78
  },
81
79
  [t.avalanche]: {
82
80
  name: "Avalanche",
83
81
  chainId: t.avalanche,
84
82
  rpcUrl: "https://api.avax.network/ext/bc/C/rpc",
85
- fetchRpcUrl: `https://avax-mainnet.g.alchemy.com/v2/${a}`,
86
- wsRpcUrl: `wss://avax-mainnet.g.alchemy.com/v2/${a}`,
83
+ fetchRpcUrl: `https://avax-mainnet.g.alchemy.com/v2/${e}`,
87
84
  supported: !0,
88
85
  contractData: h,
89
86
  quoterV2Address: "0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",
@@ -95,8 +92,7 @@ const t = {
95
92
  chainId: t.bnbMainnet,
96
93
  rpcUrl: "https://bsc-dataseed.binance.org",
97
94
  // maxPageSize: 1000,
98
- fetchRpcUrl: `https://bnb-mainnet.g.alchemy.com/v2/${a}`,
99
- wsRpcUrl: `wss://bnb-mainnet.g.alchemy.com/v2/${a}`,
95
+ fetchRpcUrl: `https://bnb-mainnet.g.alchemy.com/v2/${e}`,
100
96
  supported: !0,
101
97
  contractData: s,
102
98
  quoterV2Address: "0x78D78E420Da98ad378D7799bE8f4AF69033EB077",
@@ -108,21 +104,18 @@ const t = {
108
104
  chainId: t.base,
109
105
  rpcUrl: "https://mainnet.base.org/",
110
106
  // maxPageSize: 1000,
111
- fetchRpcUrl: `https://base-mainnet.g.alchemy.com/v2/${a}`,
112
- wsRpcUrl: `wss://base-mainnet.g.alchemy.com/v2/${a}`,
107
+ fetchRpcUrl: `https://base-mainnet.g.alchemy.com/v2/${e}`,
113
108
  supported: !0,
114
109
  contractData: d,
115
110
  quoterV2Address: "0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",
116
111
  uniswapV3FactoryAddress: "0x33128a8fC17869897dcE68Ed026d694621f6FDfD",
117
- priority: 7,
118
- maxPageSize: 5e5
112
+ priority: 7
119
113
  },
120
114
  [t.arcTestnet]: {
121
115
  name: "Arc Testnet",
122
116
  chainId: t.arcTestnet,
123
- rpcUrl: `https://arc-testnet.g.alchemy.com/v2/${a}`,
124
- fetchRpcUrl: `https://arc-testnet.g.alchemy.com/v2/${a}`,
125
- wsRpcUrl: `wss://arc-testnet.g.alchemy.com/v2/${a}`,
117
+ rpcUrl: `https://arc-testnet.g.alchemy.com/v2/${e}`,
118
+ fetchRpcUrl: `https://arc-testnet.g.alchemy.com/v2/${e}`,
126
119
  supported: !0,
127
120
  contractData: u,
128
121
  priority: 8,
@@ -132,7 +125,7 @@ const t = {
132
125
  name: "Solana",
133
126
  chainId: t.solanaMainnet,
134
127
  rpcUrl: "https://api.mainnet-beta.solana.com",
135
- fetchRpcUrl: "https://mainnet.helius-rpc.com/?api-key=54ad9ec9-dad6-41de-b961-e3e8ea7a7188",
128
+ fetchRpcUrl: "https://wider-side-sunset.solana-mainnet.quiknode.pro/61054262c1a2b13dd570243c5fdd017c05cf7fe1",
136
129
  supported: !0,
137
130
  contractData: r,
138
131
  priority: 8
@@ -146,21 +139,21 @@ const t = {
146
139
  contractData: r,
147
140
  priority: 9
148
141
  },
149
- ...o ? {} : {}
150
- }, g = {
142
+ ...c ? {} : {}
143
+ }, D = {
151
144
  name: "Localhost",
152
145
  chainId: t.localhost,
153
146
  rpcUrl: "http://127.0.0.1:8545",
154
147
  fetchRpcUrl: "http://127.0.0.1:8545",
155
148
  supported: !0,
156
149
  contractData: b,
157
- quoterV2Address: c[n].quoterV2Address,
158
- uniswapV3FactoryAddress: c[n].uniswapV3FactoryAddress,
150
+ quoterV2Address: o[n].quoterV2Address,
151
+ uniswapV3FactoryAddress: o[n].uniswapV3FactoryAddress,
159
152
  priority: 7
160
153
  };
161
- o && (c[t.localhost] = g);
162
- var A = /* @__PURE__ */ ((e) => (e.Mainnet = "Mainnet", e.Testnet = "Testnet", e.Local = "Local", e))(A || {});
163
- const $ = {
154
+ c && (o[t.localhost] = D);
155
+ var F = /* @__PURE__ */ ((a) => (a.Mainnet = "Mainnet", a.Testnet = "Testnet", a.Local = "Local", a))(F || {});
156
+ const w = {
164
157
  Mainnet: [
165
158
  t.polygon,
166
159
  t.arbMainnet,
@@ -170,17 +163,17 @@ const $ = {
170
163
  t.avalanche,
171
164
  t.base
172
165
  ],
173
- Testnet: [t.arcTestnet],
166
+ Testnet: [t.bnbTestnet, t.polygonMumbai, t.arcTestnet],
174
167
  Local: [t.localhost]
175
- }, T = (e) => [t.optimism, t.base].includes(e), P = (e) => [t.solanaMainnet, t.solanaLocalnet].includes(e), q = [
168
+ }, q = (a) => [t.optimism, t.base].includes(a), _ = (a) => [t.solanaMainnet, t.solanaLocalnet].includes(a), k = t.ethMainnet, P = [
176
169
  t.ethMainnet,
177
170
  t.optimism,
178
171
  t.base,
179
172
  t.polygon,
180
173
  t.arbMainnet,
181
- t.arcTestnet,
182
- t.solanaMainnet
183
- ], z = [
174
+ t.arcTestnet
175
+ // chainIds.solanaMainnet,
176
+ ], N = [
184
177
  t.ethMainnet,
185
178
  t.optimism,
186
179
  t.base,
@@ -188,19 +181,20 @@ const $ = {
188
181
  t.arbMainnet
189
182
  ];
190
183
  export {
191
- a as ALCHEMY_API_KEY,
192
- D as ALCHEMY_TEST_KEY,
193
- z as BRIDGE_SUPPORTED_CHAINS,
194
- A as EthereumNetworkType,
195
- V as HELIUS_RPC_URL,
196
- q as WALLET_SUPPORTED_CHAINS,
184
+ e as ALCHEMY_API_KEY,
185
+ A as ALCHEMY_TEST_KEY,
186
+ N as BRIDGE_SUPPORTED_CHAINS,
187
+ F as EthereumNetworkType,
188
+ S as HELIUS_RPC_URL,
189
+ k as WALLET_INITIAL_CHAIN_ID,
190
+ P as WALLET_SUPPORTED_CHAINS,
197
191
  t as chainIds,
198
- $ as chainIdsByType,
199
- S as getNonLocalhostChainId,
200
- f as isLocalNetwork,
201
- T as isOptimismLike,
202
- P as isSolanaLike,
192
+ w as chainIdsByType,
193
+ V as getNonLocalhostChainId,
194
+ y as isLocalNetwork,
195
+ q as isOptimismLike,
196
+ _ as isSolanaLike,
203
197
  n as localhostNetwork,
204
- c as networkRegistry,
205
- C as solanaChainIdStr
198
+ o as networkRegistry,
199
+ R as solanaChainIdStr
206
200
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./chains.constants.cjs"),s="https://api.coingecko.com/api/v3",o="https://pro-api.coingecko.com/api/v3",i=typeof window<"u"?"":process.env.COINGECKO_API_KEY,t="x-cg-pro-api-key",c=i?o:s,r=e=>`${c}/simple/price?ids=${e}&vs_currencies=USD,ETH`,h=(e,a)=>`${c}/simple/token_price/${a}?contract_addresses=${e}&vs_currencies=USD`,d=e=>`${c}/coins/${e}`,l=e=>`${c}/search?query=${encodeURIComponent(e)}`,I=(e,a)=>`${o}/coins/${e}/contract/${a}`,g=(e,a)=>`${o}/coins/${e}/market_chart?vs_currency=usd&days=${a}&interval=daily`,m=`${o}/coins/list`,u={[n.chainIds.arbMainnet]:"ethereum",[n.chainIds.localhost]:"ethereum",[n.chainIds.ethMainnet]:"ethereum",[n.chainIds.optimism]:"ethereum",[n.chainIds.avalanche]:"avalanche-2",[n.chainIds.polygon]:"matic-network",[n.chainIds.bnbMainnet]:"binancecoin",[n.chainIds.base]:"ethereum",[n.chainIds.solanaMainnet]:"solana",[n.chainIds.solanaLocalnet]:"solana"},p=e=>{switch(n.getNonLocalhostChainId(e)){case n.chainIds.ethMainnet:return"ethereum";case n.chainIds.polygon:return"polygon-pos";case n.chainIds.bnbMainnet:return"binance-smart-chain";case n.chainIds.optimism:return"optimistic-ethereum";case n.chainIds.arbMainnet:return"arbitrum-one";case n.chainIds.avalanche:return"avalanche";case n.chainIds.base:return"base";case n.chainIds.solanaMainnet:case n.chainIds.solanaLocalnet:return"solana";default:return"ethereum"}},k={[n.chainIds.polygon]:"polygon-pos",[n.chainIds.arbMainnet]:"arbitrum-one",[n.chainIds.ethMainnet]:"ethereum",[n.chainIds.avalanche]:"avalanche",[n.chainIds.bnbMainnet]:"binance-smart-chain",[n.chainIds.optimism]:"optimistic-ethereum",[n.chainIds.base]:"base",[n.chainIds.solanaMainnet]:"solana",[n.chainIds.solanaLocalnet]:"solana"};exports.COINGECKO_API_KEY=i;exports.CoinGeckoChainLabels=k;exports.coingeckoPriceUrl=r;exports.coingeckoPriceUrl2=h;exports.coingeckoTokenListUrl=m;exports.getCoinByAddress=I;exports.getCoinById=d;exports.getCoinMarketChartByTokenId=g;exports.getCoingeckoIdForNativeTokens=u;exports.getCoingeckoPlatform=p;exports.proCoingeckoUrl=o;exports.proHeader=t;exports.searchBySymbol=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./chains.constants.cjs"),i="https://api.coingecko.com/api/v3",c="https://pro-api.coingecko.com/api/v3",s=typeof window<"u"?"":process.env.COINGECKO_API_KEY,t="x-cg-pro-api-key",o=s?c:i,r=e=>`${o}/simple/price?ids=${e}&vs_currencies=USD,ETH`,h=(e,a)=>`${o}/simple/token_price/${a}?contract_addresses=${e}&vs_currencies=USD`,l=e=>`${o}/coins/${e}`,d=e=>`${o}/search?query=${encodeURIComponent(e)}`,I=(e,a)=>`${i}/coins/${e}/contract/${a}`,m=`${c}/coins/list`,p={[n.chainIds.arbMainnet]:"ethereum",[n.chainIds.localhost]:"ethereum",[n.chainIds.ethMainnet]:"ethereum",[n.chainIds.optimism]:"ethereum",[n.chainIds.avalanche]:"avalanche-2",[n.chainIds.polygon]:"matic-network",[n.chainIds.bnbMainnet]:"binancecoin",[n.chainIds.base]:"ethereum",[n.chainIds.solanaMainnet]:"solana",[n.chainIds.solanaLocalnet]:"solana"},g=e=>{switch(n.getNonLocalhostChainId(e)){case n.chainIds.ethMainnet:return"ethereum";case n.chainIds.polygon:return"polygon-pos";case n.chainIds.bnbMainnet:return"binance-smart-chain";case n.chainIds.optimism:return"optimistic-ethereum";case n.chainIds.arbMainnet:return"arbitrum-one";case n.chainIds.avalanche:return"avalanche";case n.chainIds.base:return"base";case n.chainIds.solanaMainnet:case n.chainIds.solanaLocalnet:return"solana";default:return"ethereum"}},u={[n.chainIds.polygon]:"polygon-pos",[n.chainIds.arbMainnet]:"arbitrum-one",[n.chainIds.ethMainnet]:"ethereum",[n.chainIds.avalanche]:"avalanche",[n.chainIds.bnbMainnet]:"binance-smart-chain",[n.chainIds.optimism]:"optimistic-ethereum",[n.chainIds.base]:"base",[n.chainIds.solanaMainnet]:"solana",[n.chainIds.solanaLocalnet]:"solana"};exports.COINGECKO_API_KEY=s;exports.CoinGeckoChainLabels=u;exports.coingeckoPriceUrl=r;exports.coingeckoPriceUrl2=h;exports.coingeckoTokenListUrl=m;exports.getCoinByAddress=I;exports.getCoinById=l;exports.getCoingeckoIdForNativeTokens=p;exports.getCoingeckoPlatform=g;exports.proCoingeckoUrl=c;exports.proHeader=t;exports.searchBySymbol=d;
@@ -6,7 +6,6 @@ export declare const coingeckoPriceUrl2: (tokenAddress: string, platform: string
6
6
  export declare const getCoinById: (tokenId: string) => string;
7
7
  export declare const searchBySymbol: (tokenSymbol: string) => string;
8
8
  export declare const getCoinByAddress: (currentNetwork: string, tokenAddress: string) => string;
9
- export declare const getCoinMarketChartByTokenId: (tokenId: string, days: string) => string;
10
9
  export declare const coingeckoTokenListUrl = "https://pro-api.coingecko.com/api/v3/coins/list";
11
10
  export declare const getCoingeckoIdForNativeTokens: {
12
11
  [x: number]: string;
@@ -1,5 +1,5 @@
1
- import { chainIds as e, getNonLocalhostChainId as c } from "./chains.constants.mjs";
2
- const s = "https://api.coingecko.com/api/v3", o = "https://pro-api.coingecko.com/api/v3", r = typeof window < "u" ? "" : process.env.COINGECKO_API_KEY, l = "x-cg-pro-api-key", t = r ? o : s, h = (n) => `${t}/simple/price?ids=${n}&vs_currencies=USD,ETH`, m = (n, a) => `${t}/simple/token_price/${a}?contract_addresses=${n}&vs_currencies=USD`, p = (n) => `${t}/coins/${n}`, u = (n) => `${t}/search?query=${encodeURIComponent(n)}`, b = (n, a) => `${o}/coins/${n}/contract/${a}`, d = (n, a) => `${o}/coins/${n}/market_chart?vs_currency=usd&days=${a}&interval=daily`, g = `${o}/coins/list`, k = {
1
+ import { chainIds as e, getNonLocalhostChainId as s } from "./chains.constants.mjs";
2
+ const t = "https://api.coingecko.com/api/v3", c = "https://pro-api.coingecko.com/api/v3", i = typeof window < "u" ? "" : process.env.COINGECKO_API_KEY, l = "x-cg-pro-api-key", a = i ? c : t, h = (n) => `${a}/simple/price?ids=${n}&vs_currencies=USD,ETH`, m = (n, o) => `${a}/simple/token_price/${o}?contract_addresses=${n}&vs_currencies=USD`, p = (n) => `${a}/coins/${n}`, u = (n) => `${a}/search?query=${encodeURIComponent(n)}`, b = (n, o) => `${t}/coins/${n}/contract/${o}`, g = `${c}/coins/list`, d = {
3
3
  [e.arbMainnet]: "ethereum",
4
4
  [e.localhost]: "ethereum",
5
5
  [e.ethMainnet]: "ethereum",
@@ -10,8 +10,8 @@ const s = "https://api.coingecko.com/api/v3", o = "https://pro-api.coingecko.com
10
10
  [e.base]: "ethereum",
11
11
  [e.solanaMainnet]: "solana",
12
12
  [e.solanaLocalnet]: "solana"
13
- }, C = (n) => {
14
- switch (c(n)) {
13
+ }, k = (n) => {
14
+ switch (s(n)) {
15
15
  case e.ethMainnet:
16
16
  return "ethereum";
17
17
  case e.polygon:
@@ -32,7 +32,7 @@ const s = "https://api.coingecko.com/api/v3", o = "https://pro-api.coingecko.com
32
32
  default:
33
33
  return "ethereum";
34
34
  }
35
- }, y = {
35
+ }, C = {
36
36
  [e.polygon]: "polygon-pos",
37
37
  [e.arbMainnet]: "arbitrum-one",
38
38
  [e.ethMainnet]: "ethereum",
@@ -44,17 +44,16 @@ const s = "https://api.coingecko.com/api/v3", o = "https://pro-api.coingecko.com
44
44
  [e.solanaLocalnet]: "solana"
45
45
  };
46
46
  export {
47
- r as COINGECKO_API_KEY,
48
- y as CoinGeckoChainLabels,
47
+ i as COINGECKO_API_KEY,
48
+ C as CoinGeckoChainLabels,
49
49
  h as coingeckoPriceUrl,
50
50
  m as coingeckoPriceUrl2,
51
51
  g as coingeckoTokenListUrl,
52
52
  b as getCoinByAddress,
53
53
  p as getCoinById,
54
- d as getCoinMarketChartByTokenId,
55
- k as getCoingeckoIdForNativeTokens,
56
- C as getCoingeckoPlatform,
57
- o as proCoingeckoUrl,
54
+ d as getCoingeckoIdForNativeTokens,
55
+ k as getCoingeckoPlatform,
56
+ c as proCoingeckoUrl,
58
57
  l as proHeader,
59
58
  u as searchBySymbol
60
59
  };