@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/API/API.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./relayCalls.cjs"),l=require("./getTokenPrice.cjs"),r=require("./kycCalls.cjs"),P=require("./callOdosAPI.cjs"),U=require("./is-tx-stateless.cjs"),k=require("./simulate-batch-tx.cjs"),T=require("./token-calls.cjs"),y=require("./get-token-data.cjs"),A=require("./enclaveCalls.cjs"),c=require("./generate-trading-points.cjs"),e=require("./brotherhoodCalls.cjs"),i=require("./leaderboardCalls.cjs"),o=require("./referralsCalls.cjs"),d=require("./accessCodeCalls.cjs"),t=require("./rewardsUserCalls.cjs"),g=require("./weeklyAnalyticCalls.cjs"),B=require("./send-telegram-callback.cjs"),u=require("./proxyAccountsCalls.cjs"),p=require("./callMonitor.cjs"),a=require("./solana-calls.cjs"),q=require("./callRelayer.cjs"),s=require("./seedless-calls.cjs"),m=require("./scheduled-transactions-calls.cjs"),n=require("./unspent-utxos-calls.cjs"),h=require("./onrampCalls.cjs"),S=require("./get-token-price-chart-data.cjs"),f={getUserKycStatus:r.getUserKycStatus,setAiPriseVerificationUrl:r.setAiPriseVerificationUrl,getAccessTokenSignature:r.getAccessTokenSignature,getReclaimVerificationRequest:r.getReclaimVerificationRequest,getZkMeAccessToken:r.getZkMeAccessToken,getTokenPrices:l.getTokenPrices,getOdosPriceForToken:P.getOdosPriceForToken,getTokenPriceChartData:S.getTokenPriceChartData,getTokenPreviousDayPrices:l.getTokenPreviousDayPrices,getIdleRelay:C.getIdleRelay,generateTradingPoints:c.generateTradingPoints,generateAumPoints:c.generateAumPoints,getBrotherhoodUsers:e.getBrotherhoodUsers,getCurrentUserBrotherhoodUsers:e.getCurrentUserBrotherhoodUsers,getBrotherhood:e.getBrotherhood,editBrotherhood:e.editBrotherhood,createBrotherhood:e.createBrotherhood,getCurrentUserBrotherhood:e.getCurrentUserBrotherhood,getPublicBrotherhoods:e.getPublicBrotherhoods,leaveBrotherhood:e.leaveBrotherhood,joinBrotherhood:e.joinBrotherhood,getUserAnalytics:g.getUserAnalytics,getBrotherhoodAnalytics:g.getBrotherhoodAnalytics,connectRewardsUser:t.connectRewardsUser,updateRewardsUser:t.updateRewardsUser,disconnectSocialNetwork:t.disconnectSocialNetwork,getUserCurrentLeaderboard:i.getUserCurrentLeaderboard,getBrotherhoodsLeaderboard:i.getBrotherhoodsLeaderboard,getCurrentUserReferral:o.getCurrentUserReferral,submitReferralCode:o.submitReferralCode,getCurrentUserAppliedReferralCode:o.getCurrentUserAppliedReferralCode,submitAccessCode:d.submitAccessCode,getAccessCodeBenefits:d.getAccessCodeBenefits,isTxStateless:U.isTxStateless,simulateBatchTx:k.simulateBatchTx,tokensInfoCall:T.tokensInfoCall,getTokenData:y.getTokenData,decryptUtxoEnclaveCall:A.decryptUtxoEnclaveCall,sendTelegramCallback:B.sendTelegramCallback,getTasksProgress:t.getTasksProgress,getSwapStreak:t.getSwapStreak,getProxyAccounts:u.getProxyAccounts,updateProxyAccounts:u.updateProxyAccounts,getNftMultiplier:t.getNftMultiplier,monitor:p.monitor,generateProoflessDepositLimitless:a.generateProoflessDepositLimitless,generateMultiPaymentDepositLimitless:a.generateMultiPaymentDepositLimitless,generateAddAccessToken:a.generateAddAccessToken,callRelayerSolanaTransactBatchAPI:q.callRelayerSolanaTransactBatchAPI,seedlessInit:s.seedlessInit,seedlessBackup:s.seedlessBackup,seedlessCheckPassword:s.seedlessCheckPassword,seedlessStatus:s.seedlessStatus,seedlessSalt:s.seedlessSalt,getScheduledTransactions:m.getScheduledTransactions,storeUnspentUtxos:n.storeUnspentUtxos,deleteUnspentUtxos:n.deleteUnspentUtxos,getUnspentUtxos:n.getUnspentUtxos,encodeMoonPayBuyUrl:h.encodeMoonPayBuyUrl,generateMoonPayQuote:h.generateMoonPayQuote};exports.API=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./relayCalls.cjs"),i=require("./getTokenPrice.cjs"),r=require("./kycCalls.cjs"),P=require("./callOdosAPI.cjs"),U=require("./is-tx-stateless.cjs"),y=require("./simulate-batch-tx.cjs"),k=require("./token-calls.cjs"),p=require("./get-token-data.cjs"),A=require("./enclaveCalls.cjs"),d=require("./generate-trading-points.cjs"),e=require("./brotherhoodCalls.cjs"),g=require("./leaderboardCalls.cjs"),o=require("./referralsCalls.cjs"),u=require("./accessCodeCalls.cjs"),t=require("./rewardsUserCalls.cjs"),h=require("./weeklyAnalyticCalls.cjs"),m=require("./send-telegram-callback.cjs"),a=require("./proxyAccountsCalls.cjs"),B=require("./callMonitor.cjs"),n=require("./solana-calls.cjs"),q=require("./callRelayer.cjs"),s=require("./seedless-calls.cjs"),S=require("./scheduled-transactions-calls.cjs"),l=require("./unspent-utxos-calls.cjs"),c=require("./temporaryWalletCalls.cjs"),C=require("./onrampCalls.cjs"),f=require("./get-token-price-chart-data.cjs"),x={getUserKycStatus:r.getUserKycStatus,setAiPriseVerificationUrl:r.setAiPriseVerificationUrl,getAccessTokenSignature:r.getAccessTokenSignature,getReclaimVerificationRequest:r.getReclaimVerificationRequest,getZkMeAccessToken:r.getZkMeAccessToken,getTokenPrices:i.getTokenPrices,getOdosPriceForToken:P.getOdosPriceForToken,getTokenPriceChartData:f.getTokenPriceChartData,getTokenPreviousDayPrices:i.getTokenPreviousDayPrices,getIdleRelay:T.getIdleRelay,generateTradingPoints:d.generateTradingPoints,generateAumPoints:d.generateAumPoints,getBrotherhoodUsers:e.getBrotherhoodUsers,getCurrentUserBrotherhoodUsers:e.getCurrentUserBrotherhoodUsers,getBrotherhood:e.getBrotherhood,editBrotherhood:e.editBrotherhood,createBrotherhood:e.createBrotherhood,getCurrentUserBrotherhood:e.getCurrentUserBrotherhood,getPublicBrotherhoods:e.getPublicBrotherhoods,leaveBrotherhood:e.leaveBrotherhood,joinBrotherhood:e.joinBrotherhood,getUserAnalytics:h.getUserAnalytics,getBrotherhoodAnalytics:h.getBrotherhoodAnalytics,connectRewardsUser:t.connectRewardsUser,updateRewardsUser:t.updateRewardsUser,disconnectSocialNetwork:t.disconnectSocialNetwork,getUserCurrentLeaderboard:g.getUserCurrentLeaderboard,getBrotherhoodsLeaderboard:g.getBrotherhoodsLeaderboard,getCurrentUserReferral:o.getCurrentUserReferral,submitReferralCode:o.submitReferralCode,getCurrentUserAppliedReferralCode:o.getCurrentUserAppliedReferralCode,submitAccessCode:u.submitAccessCode,getAccessCodeBenefits:u.getAccessCodeBenefits,isTxStateless:U.isTxStateless,simulateBatchTx:y.simulateBatchTx,tokensInfoCall:k.tokensInfoCall,getTokenData:p.getTokenData,decryptUtxoEnclaveCall:A.decryptUtxoEnclaveCall,sendTelegramCallback:m.sendTelegramCallback,getTasksProgress:t.getTasksProgress,getSwapStreak:t.getSwapStreak,getProxyAccounts:a.getProxyAccounts,updateProxyAccounts:a.updateProxyAccounts,getNftMultiplier:t.getNftMultiplier,monitor:B.monitor,generateProoflessDepositLimitless:n.generateProoflessDepositLimitless,generateMultiPaymentDepositLimitless:n.generateMultiPaymentDepositLimitless,generateAddAccessToken:n.generateAddAccessToken,callRelayerSolanaTransactBatchAPI:q.callRelayerSolanaTransactBatchAPI,seedlessInit:s.seedlessInit,seedlessBackup:s.seedlessBackup,seedlessCheckPassword:s.seedlessCheckPassword,seedlessStatus:s.seedlessStatus,seedlessSalt:s.seedlessSalt,getScheduledTransactions:S.getScheduledTransactions,storeUnspentUtxos:l.storeUnspentUtxos,deleteUnspentUtxos:l.deleteUnspentUtxos,getUnspentUtxos:l.getUnspentUtxos,getTemporaryWalletNonces:c.getTemporaryWalletNonces,addTemporaryWalletNonce:c.addTemporaryWalletNonce,removeTemporaryWalletNonce:c.removeTemporaryWalletNonce,encodeMoonPayBuyUrl:C.encodeMoonPayBuyUrl,generateMoonPayQuote:C.generateMoonPayQuote,isVersion1Account:a.isVersion1Account};exports.API=x;
package/API/API.d.ts CHANGED
@@ -15,13 +15,14 @@ import { getAccessCodeBenefits, submitAccessCode } from './accessCodeCalls';
15
15
  import { connectRewardsUser, disconnectSocialNetwork, getNftMultiplier, getSwapStreak, getTasksProgress, updateRewardsUser } from './rewardsUserCalls';
16
16
  import { getBrotherhoodAnalytics, getUserAnalytics } from './weeklyAnalyticCalls';
17
17
  import { sendTelegramCallback } from './send-telegram-callback';
18
- import { getProxyAccounts, updateProxyAccounts } from './proxyAccountsCalls';
18
+ import { getProxyAccounts, isVersion1Account, updateProxyAccounts } from './proxyAccountsCalls';
19
19
  import { monitor } from './callMonitor';
20
20
  import { generateAddAccessToken, generateMultiPaymentDepositLimitless, generateProoflessDepositLimitless } from './solana-calls';
21
21
  import { callRelayerSolanaTransactBatchAPI } from './callRelayer';
22
22
  import { seedlessBackup, seedlessCheckPassword, seedlessInit, seedlessSalt, seedlessStatus } from './seedless-calls';
23
23
  import { getScheduledTransactions } from './scheduled-transactions-calls';
24
24
  import { deleteUnspentUtxos, getUnspentUtxos, storeUnspentUtxos } from './unspent-utxos-calls';
25
+ import { addTemporaryWalletNonce, getTemporaryWalletNonces, removeTemporaryWalletNonce } from './temporaryWalletCalls';
25
26
  import { encodeMoonPayBuyUrl, generateMoonPayQuote } from './onrampCalls';
26
27
  import { getTokenPriceChartData } from './get-token-price-chart-data';
27
28
  export type IAPI = {
@@ -83,7 +84,11 @@ export type IAPI = {
83
84
  storeUnspentUtxos: typeof storeUnspentUtxos;
84
85
  deleteUnspentUtxos: typeof deleteUnspentUtxos;
85
86
  getUnspentUtxos: typeof getUnspentUtxos;
87
+ getTemporaryWalletNonces: typeof getTemporaryWalletNonces;
88
+ addTemporaryWalletNonce: typeof addTemporaryWalletNonce;
89
+ removeTemporaryWalletNonce: typeof removeTemporaryWalletNonce;
86
90
  encodeMoonPayBuyUrl: typeof encodeMoonPayBuyUrl;
87
91
  generateMoonPayQuote: typeof generateMoonPayQuote;
92
+ isVersion1Account: typeof isVersion1Account;
88
93
  };
89
94
  export declare const API: IAPI;
package/API/API.mjs CHANGED
@@ -3,28 +3,29 @@ import { getTokenPrices as r, getTokenPreviousDayPrices as o } from "./getTokenP
3
3
  import { getUserKycStatus as t, setAiPriseVerificationUrl as s, getAccessTokenSignature as i, getReclaimVerificationRequest as a, getZkMeAccessToken as m } from "./kycCalls.mjs";
4
4
  import { getOdosPriceForToken as n } from "./callOdosAPI.mjs";
5
5
  import { isTxStateless as c } from "./is-tx-stateless.mjs";
6
- import { simulateBatchTx as d } from "./simulate-batch-tx.mjs";
7
- import { tokensInfoCall as l } from "./token-calls.mjs";
6
+ import { simulateBatchTx as l } from "./simulate-batch-tx.mjs";
7
+ import { tokensInfoCall as d } from "./token-calls.mjs";
8
8
  import { getTokenData as p } from "./get-token-data.mjs";
9
9
  import { decryptUtxoEnclaveCall as g } from "./enclaveCalls.mjs";
10
10
  import { generateTradingPoints as f, generateAumPoints as h } from "./generate-trading-points.mjs";
11
- import { getBrotherhoodUsers as u, getCurrentUserBrotherhoodUsers as U, getBrotherhood as P, editBrotherhood as k, createBrotherhood as B, getCurrentUserBrotherhood as A, getPublicBrotherhoods as T, leaveBrotherhood as C, joinBrotherhood as y } from "./brotherhoodCalls.mjs";
11
+ import { getBrotherhoodUsers as u, getCurrentUserBrotherhoodUsers as U, getBrotherhood as P, editBrotherhood as T, createBrotherhood as k, getCurrentUserBrotherhood as y, getPublicBrotherhoods as A, leaveBrotherhood as B, joinBrotherhood as C } from "./brotherhoodCalls.mjs";
12
12
  import { getUserCurrentLeaderboard as S, getBrotherhoodsLeaderboard as x } from "./leaderboardCalls.mjs";
13
13
  import { getCurrentUserReferral as R, submitReferralCode as b, getCurrentUserAppliedReferralCode as w } from "./referralsCalls.mjs";
14
14
  import { submitAccessCode as D, getAccessCodeBenefits as I } from "./accessCodeCalls.mjs";
15
- import { connectRewardsUser as M, updateRewardsUser as L, disconnectSocialNetwork as v, getTasksProgress as N, getSwapStreak as V, getNftMultiplier as j } from "./rewardsUserCalls.mjs";
16
- import { getUserAnalytics as q, getBrotherhoodAnalytics as E } from "./weeklyAnalyticCalls.mjs";
17
- import { sendTelegramCallback as F } from "./send-telegram-callback.mjs";
18
- import { getProxyAccounts as K, updateProxyAccounts as O } from "./proxyAccountsCalls.mjs";
15
+ import { connectRewardsUser as M, updateRewardsUser as N, disconnectSocialNetwork as v, getTasksProgress as L, getSwapStreak as V, getNftMultiplier as W } from "./rewardsUserCalls.mjs";
16
+ import { getUserAnalytics as j, getBrotherhoodAnalytics as q } from "./weeklyAnalyticCalls.mjs";
17
+ import { sendTelegramCallback as E } from "./send-telegram-callback.mjs";
18
+ import { getProxyAccounts as F, updateProxyAccounts as K, isVersion1Account as O } from "./proxyAccountsCalls.mjs";
19
19
  import { monitor as Q } from "./callMonitor.mjs";
20
20
  import { generateProoflessDepositLimitless as Z, generateMultiPaymentDepositLimitless as z, generateAddAccessToken as G } from "./solana-calls.mjs";
21
21
  import { callRelayerSolanaTransactBatchAPI as H } from "./callRelayer.mjs";
22
- import { seedlessInit as J, seedlessBackup as W, seedlessCheckPassword as X, seedlessStatus as Y, seedlessSalt as _ } from "./seedless-calls.mjs";
23
- import { getScheduledTransactions as $ } from "./scheduled-transactions-calls.mjs";
24
- import { storeUnspentUtxos as ee, deleteUnspentUtxos as re, getUnspentUtxos as oe } from "./unspent-utxos-calls.mjs";
25
- import { encodeMoonPayBuyUrl as te, generateMoonPayQuote as se } from "./onrampCalls.mjs";
26
- import { getTokenPriceChartData as ie } from "./get-token-price-chart-data.mjs";
27
- const Me = {
22
+ import { seedlessInit as J, seedlessBackup as X, seedlessCheckPassword as Y, seedlessStatus as _, seedlessSalt as $ } from "./seedless-calls.mjs";
23
+ import { getScheduledTransactions as ee } from "./scheduled-transactions-calls.mjs";
24
+ import { storeUnspentUtxos as re, deleteUnspentUtxos as oe, getUnspentUtxos as te } from "./unspent-utxos-calls.mjs";
25
+ import { getTemporaryWalletNonces as se, addTemporaryWalletNonce as ie, removeTemporaryWalletNonce as ae } from "./temporaryWalletCalls.mjs";
26
+ import { encodeMoonPayBuyUrl as me, generateMoonPayQuote as ne } from "./onrampCalls.mjs";
27
+ import { getTokenPriceChartData as ce } from "./get-token-price-chart-data.mjs";
28
+ const We = {
28
29
  // KYC
29
30
  getUserKycStatus: t,
30
31
  setAiPriseVerificationUrl: s,
@@ -34,7 +35,7 @@ const Me = {
34
35
  // Prices
35
36
  getTokenPrices: r,
36
37
  getOdosPriceForToken: n,
37
- getTokenPriceChartData: ie,
38
+ getTokenPriceChartData: ce,
38
39
  getTokenPreviousDayPrices: o,
39
40
  // relay
40
41
  getIdleRelay: e,
@@ -45,18 +46,18 @@ const Me = {
45
46
  getBrotherhoodUsers: u,
46
47
  getCurrentUserBrotherhoodUsers: U,
47
48
  getBrotherhood: P,
48
- editBrotherhood: k,
49
- createBrotherhood: B,
50
- getCurrentUserBrotherhood: A,
51
- getPublicBrotherhoods: T,
52
- leaveBrotherhood: C,
53
- joinBrotherhood: y,
49
+ editBrotherhood: T,
50
+ createBrotherhood: k,
51
+ getCurrentUserBrotherhood: y,
52
+ getPublicBrotherhoods: A,
53
+ leaveBrotherhood: B,
54
+ joinBrotherhood: C,
54
55
  // weekly analytics
55
- getUserAnalytics: q,
56
- getBrotherhoodAnalytics: E,
56
+ getUserAnalytics: j,
57
+ getBrotherhoodAnalytics: q,
57
58
  // rewards user
58
59
  connectRewardsUser: M,
59
- updateRewardsUser: L,
60
+ updateRewardsUser: N,
60
61
  disconnectSocialNetwork: v,
61
62
  // leaderboard
62
63
  getUserCurrentLeaderboard: S,
@@ -70,23 +71,23 @@ const Me = {
70
71
  getAccessCodeBenefits: I,
71
72
  // tenderly
72
73
  isTxStateless: c,
73
- simulateBatchTx: d,
74
+ simulateBatchTx: l,
74
75
  // token calls
75
- tokensInfoCall: l,
76
+ tokensInfoCall: d,
76
77
  getTokenData: p,
77
78
  // enclave
78
79
  decryptUtxoEnclaveCall: g,
79
80
  // callbacks
80
- sendTelegramCallback: F,
81
+ sendTelegramCallback: E,
81
82
  // tasks
82
- getTasksProgress: N,
83
+ getTasksProgress: L,
83
84
  // swap streak
84
85
  getSwapStreak: V,
85
86
  // proxy accounts
86
- getProxyAccounts: K,
87
- updateProxyAccounts: O,
87
+ getProxyAccounts: F,
88
+ updateProxyAccounts: K,
88
89
  // nft multiplier
89
- getNftMultiplier: j,
90
+ getNftMultiplier: W,
90
91
  // hexagate
91
92
  monitor: Q,
92
93
  // solana
@@ -96,20 +97,26 @@ const Me = {
96
97
  callRelayerSolanaTransactBatchAPI: H,
97
98
  // seedless
98
99
  seedlessInit: J,
99
- seedlessBackup: W,
100
- seedlessCheckPassword: X,
101
- seedlessStatus: Y,
102
- seedlessSalt: _,
100
+ seedlessBackup: X,
101
+ seedlessCheckPassword: Y,
102
+ seedlessStatus: _,
103
+ seedlessSalt: $,
103
104
  // scheduled transactions
104
- getScheduledTransactions: $,
105
+ getScheduledTransactions: ee,
105
106
  // unspent utxos
106
- storeUnspentUtxos: ee,
107
- deleteUnspentUtxos: re,
108
- getUnspentUtxos: oe,
107
+ storeUnspentUtxos: re,
108
+ deleteUnspentUtxos: oe,
109
+ getUnspentUtxos: te,
110
+ // temporary wallets
111
+ getTemporaryWalletNonces: se,
112
+ addTemporaryWalletNonce: ie,
113
+ removeTemporaryWalletNonce: ae,
109
114
  // onramp
110
- encodeMoonPayBuyUrl: te,
111
- generateMoonPayQuote: se
115
+ encodeMoonPayBuyUrl: me,
116
+ generateMoonPayQuote: ne,
117
+ // version1 account
118
+ isVersion1Account: O
112
119
  };
113
120
  export {
114
- Me as API
121
+ We as API
115
122
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../functions/snarkjs/constant.cjs"),o=require("../data-structures/http/HttpClient.cjs");require("axios");const r=async(e,t,n)=>await o.httpClient.post(`${c.ENCLAVE_EC2_URL}/decrypt-utxos`,{chainId:e,input:n,key:t});exports.decryptUtxoEnclaveCall=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../functions/snarkjs/constant.cjs"),r=require("../data-structures/http/HttpClient.cjs");require("axios");const s=require("async-mutex"),o=new s.Mutex,u=async(e,t,n)=>o.runExclusive(async()=>await r.httpClient.post(`${c.ENCLAVE_EC2_URL}/decrypt-utxos`,{chainId:e,input:n,key:t}));exports.decryptUtxoEnclaveCall=u;
@@ -1,11 +1,12 @@
1
1
  import { ENCLAVE_EC2_URL as n } from "../functions/snarkjs/constant.mjs";
2
- import { httpClient as p } from "../data-structures/http/HttpClient.mjs";
2
+ import { httpClient as r } from "../data-structures/http/HttpClient.mjs";
3
3
  import "axios";
4
- const i = async (t, e, o) => await p.post(`${n}/decrypt-utxos`, {
4
+ import { Mutex as p } from "async-mutex";
5
+ const s = new p(), m = async (t, e, o) => s.runExclusive(async () => await r.post(`${n}/decrypt-utxos`, {
5
6
  chainId: t,
6
7
  input: o,
7
8
  key: e
8
- });
9
+ }));
9
10
  export {
10
- i as decryptUtxoEnclaveCall
11
+ m as decryptUtxoEnclaveCall
11
12
  };
package/API/index.d.ts CHANGED
@@ -17,3 +17,4 @@ export * from './resolve-sns';
17
17
  export * from './seedless-calls';
18
18
  export * from './scheduled-transactions-calls';
19
19
  export * from './unspent-utxos-calls';
20
+ export * from './temporaryWalletCalls';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../constants/server.constants.cjs"),c=require("./getServerURL.cjs"),o=require("ethers"),y=require("../functions/utils/addresses.cjs"),u=require("../data-structures/http/HttpClient.cjs");require("axios");const i=(e,t)=>{const s=t.getShieldedPrivateKey(),r=`HinkalProxyAccounts|${e.toLowerCase()}|${s}`;return o.ethers.utils.keccak256(o.ethers.utils.toUtf8Bytes(r))},d=async(e,t)=>{const s=i(e,t);return await u.httpClient.get(`${c.SERVER_URL}${n.API_CONFIG.ROUTES.getProxyAccounts(s)}`)},P=async(e,t,s)=>{const r=i(e,t),a=y.hashEthereumAddress(e);return await u.httpClient.post(`${c.SERVER_URL}${n.API_CONFIG.ROUTES.updateProxyAccounts}`,{secureKey:r,hashedEthereumAddress:a,proxyAccounts:s})};exports.getProxyAccounts=d;exports.updateProxyAccounts=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../constants/server.constants.cjs"),n=require("./getServerURL.cjs"),a=require("ethers"),A=require("../functions/utils/addresses.cjs"),c=require("../data-structures/http/HttpClient.cjs");require("axios");const i=(e,t)=>{const s=t.getShieldedPrivateKey(),r=`HinkalProxyAccounts|${e.toLowerCase()}|${s}`;return a.ethers.utils.keccak256(a.ethers.utils.toUtf8Bytes(r))},p=async(e,t)=>{const s=i(e,t);return await c.httpClient.get(`${n.SERVER_URL}${o.API_CONFIG.ROUTES.getProxyAccounts(s)}`)},P=async(e,t,s,r,u)=>{const y=i(e,t),d=A.hashEthereumAddress(e);return await c.httpClient.post(`${n.SERVER_URL}${o.API_CONFIG.ROUTES.updateProxyAccounts}`,{secureKey:y,hashedEthereumAddress:d,proxyAccounts:s,...r!==void 0&&{username:r},...u!==void 0&&{profileImage:u}})},h=async(e,t)=>{const s=i(e,t);return(await c.httpClient.get(`${n.SERVER_URL}${o.API_CONFIG.ROUTES.isVersion1Account(s)}`)).isVersion1Account};exports.getProxyAccounts=p;exports.isVersion1Account=h;exports.updateProxyAccounts=P;
@@ -1,4 +1,9 @@
1
1
  import type { SubAccountLight } from '../types/proxy.types';
2
2
  import { UserKeys } from '../data-structures/crypto-keys';
3
- export declare const getProxyAccounts: (ethereumAddress: string, userKeys: UserKeys) => Promise<SubAccountLight[]>;
4
- export declare const updateProxyAccounts: (ethereumAddress: string, userKeys: UserKeys, proxyAccounts: SubAccountLight[]) => Promise<any>;
3
+ export declare const getProxyAccounts: (ethereumAddress: string, userKeys: UserKeys) => Promise<{
4
+ proxyAccounts: SubAccountLight[];
5
+ username?: string | undefined;
6
+ profileImage?: string | undefined;
7
+ }>;
8
+ export declare const updateProxyAccounts: (ethereumAddress: string, userKeys: UserKeys, proxyAccounts: SubAccountLight[], username?: string, profileImage?: string) => Promise<any>;
9
+ export declare const isVersion1Account: (ethereumAddress: string, userKeys: UserKeys) => Promise<boolean>;
@@ -1,26 +1,32 @@
1
- import { API_CONFIG as n } from "../constants/server.constants.mjs";
2
- import { SERVER_URL as c } from "./getServerURL.mjs";
3
- import { ethers as s } from "ethers";
4
- import { hashEthereumAddress as p } from "../functions/utils/addresses.mjs";
5
- import { httpClient as i } from "../data-structures/http/HttpClient.mjs";
1
+ import { API_CONFIG as r } from "../constants/server.constants.mjs";
2
+ import { SERVER_URL as n } from "./getServerURL.mjs";
3
+ import { ethers as a } from "ethers";
4
+ import { hashEthereumAddress as d } from "../functions/utils/addresses.mjs";
5
+ import { httpClient as c } from "../data-structures/http/HttpClient.mjs";
6
6
  import "axios";
7
- const a = (e, t) => {
8
- const o = t.getShieldedPrivateKey(), r = `HinkalProxyAccounts|${e.toLowerCase()}|${o}`;
9
- return s.utils.keccak256(s.utils.toUtf8Bytes(r));
10
- }, f = async (e, t) => {
11
- const o = a(e, t);
12
- return await i.get(
13
- `${c}${n.ROUTES.getProxyAccounts(o)}`
14
- );
15
- }, g = async (e, t, o) => {
16
- const r = a(e, t), u = p(e);
17
- return await i.post(`${c}${n.ROUTES.updateProxyAccounts}`, {
18
- secureKey: r,
19
- hashedEthereumAddress: u,
20
- proxyAccounts: o
7
+ const i = (t, e) => {
8
+ const o = e.getShieldedPrivateKey(), s = `HinkalProxyAccounts|${t.toLowerCase()}|${o}`;
9
+ return a.utils.keccak256(a.utils.toUtf8Bytes(s));
10
+ }, S = async (t, e) => {
11
+ const o = i(t, e);
12
+ return await c.get(`${n}${r.ROUTES.getProxyAccounts(o)}`);
13
+ }, g = async (t, e, o, s, u) => {
14
+ const p = i(t, e), y = d(t);
15
+ return await c.post(`${n}${r.ROUTES.updateProxyAccounts}`, {
16
+ secureKey: p,
17
+ hashedEthereumAddress: y,
18
+ proxyAccounts: o,
19
+ ...s !== void 0 && { username: s },
20
+ ...u !== void 0 && { profileImage: u }
21
21
  });
22
+ }, K = async (t, e) => {
23
+ const o = i(t, e);
24
+ return (await c.get(
25
+ `${n}${r.ROUTES.isVersion1Account(o)}`
26
+ )).isVersion1Account;
22
27
  };
23
28
  export {
24
- f as getProxyAccounts,
29
+ S as getProxyAccounts,
30
+ K as isVersion1Account,
25
31
  g as updateProxyAccounts
26
32
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../constants/server.constants.cjs"),n=require("../data-structures/http/HttpClient.cjs");require("axios");const a=require("./getServerURL.cjs"),l=async(e,t)=>n.httpClient.get(`${a.SERVER_URL}${o.API_CONFIG.ROUTES.getTemporaryWalletNonces(t,e)}`),c=async(e,t,r)=>n.httpClient.post(`${a.SERVER_URL}${o.API_CONFIG.ROUTES.addTemporaryWalletNonce}`,{hashedEthereumAddress:t,chainId:e,nonce:r}),s=async(e,t,r)=>n.httpClient.post(`${a.SERVER_URL}${o.API_CONFIG.ROUTES.removeTemporaryWalletNonce}`,{hashedEthereumAddress:t,chainId:e,nonce:r});exports.addTemporaryWalletNonce=c;exports.getTemporaryWalletNonces=l;exports.removeTemporaryWalletNonce=s;
@@ -0,0 +1,13 @@
1
+ interface IGetTemporaryWalletNonces {
2
+ nonces: number[];
3
+ }
4
+ export declare const getTemporaryWalletNonces: (chainId: number, hashedEthereumAddress: string) => Promise<IGetTemporaryWalletNonces>;
5
+ interface IAddTemporaryWalletNonce {
6
+ success: boolean;
7
+ }
8
+ export declare const addTemporaryWalletNonce: (chainId: number, hashedEthereumAddress: string, nonce: number) => Promise<IAddTemporaryWalletNonce>;
9
+ interface IRemoveTemporaryWalletNonce {
10
+ success: boolean;
11
+ }
12
+ export declare const removeTemporaryWalletNonce: (chainId: number, hashedEthereumAddress: string, nonce: number) => Promise<IRemoveTemporaryWalletNonce>;
13
+ export {};
@@ -0,0 +1,20 @@
1
+ import { API_CONFIG as t } from "../constants/server.constants.mjs";
2
+ import { httpClient as a } from "../data-structures/http/HttpClient.mjs";
3
+ import "axios";
4
+ import { SERVER_URL as n } from "./getServerURL.mjs";
5
+ const s = async (e, r) => a.get(
6
+ `${n}${t.ROUTES.getTemporaryWalletNonces(r, e)}`
7
+ ), y = async (e, r, o) => a.post(`${n}${t.ROUTES.addTemporaryWalletNonce}`, {
8
+ hashedEthereumAddress: r,
9
+ chainId: e,
10
+ nonce: o
11
+ }), T = async (e, r, o) => a.post(`${n}${t.ROUTES.removeTemporaryWalletNonce}`, {
12
+ hashedEthereumAddress: r,
13
+ chainId: e,
14
+ nonce: o
15
+ });
16
+ export {
17
+ y as addTemporaryWalletNonce,
18
+ s as getTemporaryWalletNonces,
19
+ T as removeTemporaryWalletNonce
20
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../constants/server.constants.cjs"),s=require("./getServerURL.cjs"),r=require("../data-structures/http/HttpClient.cjs"),U=t=>{const e=t.getConstructableParams();return{...e,amount:e.amount.toString(),randomization:e.randomization?.toString()}},a=t=>r.httpClient.post(`${s.RELAYER_URL}${n.RELAYER_CONFIG.storeUnspentUtxos}`,{hashedEthereumAddress:t.hashedEthereumAddress,chainId:t.chainId,utxos:t.utxos.map(e=>U(e))}),i=(t,e)=>r.httpClient.get(`${s.RELAYER_URL}${n.RELAYER_CONFIG.getUnspentUtxos(t,e)}`),p=(t,e,o)=>r.httpClient.delete(`${s.RELAYER_URL}${n.RELAYER_CONFIG.deleteUnspentUtxos}`,{data:{hashedEthereumAddress:e,nullifiers:o,chainId:t}});exports.deleteUnspentUtxos=p;exports.getUnspentUtxos=i;exports.storeUnspentUtxos=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../constants/server.constants.cjs"),o=require("./getServerURL.cjs"),r=require("../data-structures/http/HttpClient.cjs"),U=t=>{const e=t.getBasicUtxoParams(),n=t.getCommitment(),i=t.getNullifier();return{...e,amount:e.amount.toString(),randomization:e.randomization?.toString(),commitment:n,nullifier:i}},a=t=>r.httpClient.post(`${o.RELAYER_URL}${s.RELAYER_CONFIG.storeUnspentUtxos}`,{hashedEthereumAddress:t.hashedEthereumAddress,chainId:t.chainId,utxos:t.utxos.map(e=>U(e))}),p=(t,e)=>r.httpClient.get(`${o.RELAYER_URL}${s.RELAYER_CONFIG.getUnspentUtxos(t,e)}`),c=(t,e,n)=>r.httpClient.delete(`${o.RELAYER_URL}${s.RELAYER_CONFIG.deleteUnspentUtxos}`,{data:{hashedEthereumAddress:e,nullifiers:n,chainId:t}});exports.deleteUnspentUtxos=c;exports.getUnspentUtxos=p;exports.storeUnspentUtxos=a;
@@ -11,7 +11,7 @@ interface StoreUnspentUtxosResponse {
11
11
  export declare const storeUnspentUtxos: (body: StoreUnspentUtxosRequestBody) => Promise<StoreUnspentUtxosResponse>;
12
12
  interface UnspentUtxo {
13
13
  id: string;
14
- utxo: IUtxoConstructor<string>;
14
+ utxo: Omit<IUtxoConstructor<string>, 'shieldedPrivateKey' | 'encryptionKey'>;
15
15
  }
16
16
  interface GetUnspentUtxosResponse {
17
17
  status: string;
@@ -1,24 +1,26 @@
1
- import { RELAYER_CONFIG as n } from "../constants/server.constants.mjs";
2
- import { RELAYER_URL as o } from "./getServerURL.mjs";
3
- import { httpClient as s } from "../data-structures/http/HttpClient.mjs";
4
- const a = (t) => {
5
- const e = t.getConstructableParams();
1
+ import { RELAYER_CONFIG as o } from "../constants/server.constants.mjs";
2
+ import { RELAYER_URL as s } from "./getServerURL.mjs";
3
+ import { httpClient as r } from "../data-structures/http/HttpClient.mjs";
4
+ const m = (t) => {
5
+ const e = t.getBasicUtxoParams(), n = t.getCommitment(), i = t.getNullifier();
6
6
  return {
7
7
  ...e,
8
8
  amount: e.amount.toString(),
9
- randomization: e.randomization?.toString()
9
+ randomization: e.randomization?.toString(),
10
+ commitment: n,
11
+ nullifier: i
10
12
  };
11
- }, U = (t) => s.post(`${o}${n.storeUnspentUtxos}`, {
13
+ }, d = (t) => r.post(`${s}${o.storeUnspentUtxos}`, {
12
14
  hashedEthereumAddress: t.hashedEthereumAddress,
13
15
  chainId: t.chainId,
14
- utxos: t.utxos.map((e) => a(e))
15
- }), d = (t, e) => s.get(
16
- `${o}${n.getUnspentUtxos(t, e)}`
17
- ), u = (t, e, r) => s.delete(`${o}${n.deleteUnspentUtxos}`, {
18
- data: { hashedEthereumAddress: e, nullifiers: r, chainId: t }
16
+ utxos: t.utxos.map((e) => m(e))
17
+ }), c = (t, e) => r.get(
18
+ `${s}${o.getUnspentUtxos(t, e)}`
19
+ ), u = (t, e, n) => r.delete(`${s}${o.deleteUnspentUtxos}`, {
20
+ data: { hashedEthereumAddress: e, nullifiers: n, chainId: t }
19
21
  });
20
22
  export {
21
23
  u as deleteUnspentUtxos,
22
- d as getUnspentUtxos,
23
- U as storeUnspentUtxos
24
+ c as getUnspentUtxos,
25
+ d as storeUnspentUtxos
24
26
  };
package/README.md CHANGED
@@ -10,6 +10,13 @@ With Hinkal SDK, developers can:
10
10
  • Route transactions through Hinkal’s privacy contracts without exposing sender, recipient, or amounts
11
11
  • Maintain non-custodial control with optional compliance visibility via viewing keys
12
12
 
13
+ ## Compatibility
14
+
15
+ | Environment | Supported | Notes |
16
+ |-------------|-----------|-------|
17
+ | Node.js | ✅ | v18+ |
18
+ | Browser | ✅ | React, Next.js, vanilla JS |
19
+
13
20
  ## Installation
14
21
 
15
22
  Using npm:
@@ -55,23 +62,22 @@ const hinkal = await prepareWagmiHinkal(connector, wagmiConfig, hinkalConfig);
55
62
  The `hinkalConfig` is defined as follows:
56
63
  ```typescript
57
64
  type HinkalConfig = {
65
+ /** Disables caching in browser localStorage, storing data only in memory. Front-end only. Defaults to false. */
66
+ disableCaching?: boolean;
67
+
68
+ /** If true, allows caching in a file locally. Node.js only. Defaults to false. */
69
+ useFileCache?: boolean;
70
+
58
71
  /**
59
- * Path to the cache file used for storing temporary data.
60
- * It should be a valid file path string.
72
+ * Path to the cache file used for storing temporary data. Node.js only.
73
+ * It should be a valid file path string. Defaults to hinkalCache.json in the current working directory.
61
74
  */
62
75
  cacheFilePath?: string;
76
+
63
77
  /**
64
- * Indicator to use caching on a file level.
65
- * Node only.
66
- */
67
- useFileCache?: boolean;
68
- disableCaching?: boolean;
69
- serializedCache?: Record<string, string>;
70
- /**
71
- * Indicator controlling wether the proof should be constructed remotely in secure enclave.
78
+ * Indicator controlling wether the proof should be constructed remotely in secure enclave. Defaults to true.
72
79
  */
73
80
  generateProofRemotely?: boolean;
74
- disableMerkleTreeUpdates?: boolean;
75
81
  };
76
82
  ```
77
83
 
@@ -162,7 +168,7 @@ A user can perform a private transfer between public addresses using:
162
168
  ```typescript
163
169
  function depositAndWithdraw(
164
170
  erc20Token: ERC20Token,
165
- ecipientAmounts: bigint[],
171
+ recipientAmounts: bigint[],
166
172
  recipientAddresses: string[],
167
173
  txCompletionTime?: number,
168
174
  ): Promise<RelayerTransaction>;
@@ -229,7 +235,7 @@ The SDK lets you interact with any smart contract on the blockchain while keepin
229
235
  ```typescript
230
236
  function actionPrivateWallet(
231
237
  chainId:number,
232
- erc20Addresses: string[],
238
+ erc20Tokens: ERC20Token[],
233
239
  deltaAmounts: bigint[],
234
240
  onChainCreation: boolean[],
235
241
  ops: string[],
@@ -331,6 +337,23 @@ function getSupportedPassportLinks(): string[];
331
337
 
332
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.
333
339
 
340
+ ## Supported Chains
341
+
342
+ Hinkal SDK is available on the following blockchain networks:
343
+
344
+ | Chain | Chain ID | Status |
345
+ |-------|----------|--------|
346
+ | Ethereum | 1 | ✅ Live |
347
+ | Polygon | 137 | ✅ Live |
348
+ | Base | 8453 | ✅ Live |
349
+ | Arbitrum | 42161 | ✅ Live |
350
+ | Optimism | 10 | ✅ Live |
351
+ | Solana | - | 🚧 In Progress |
352
+
353
+ Each chain supports the full suite of Hinkal privacy features including shielding, transfers, and confidential interactions with DeFi protocols.
354
+
355
+
356
+
334
357
  ## References
335
358
 
336
359
  Wallet: [Hinkal Wallet](https://chromewebstore.google.com/detail/hinkal-wallet/khfjgapjfcdoffmklchibpepboholpbe)
@@ -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"),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"),o=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,s=a=>!![t.localhost].includes(a),E=a=>a?s(a)?n:a:n,i="X4IiEZsSzGOrJq8tzq7Y3",e=o.isNotProduction?i:"XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",F="https://mainnet.helius-rpc.com/?api-key=24718f72-c710-45d6-853e-d447cf530579",r={[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},...o.isDevelopment?{}:{}},L={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:r[n].quoterV2Address,uniswapV3FactoryAddress:r[n].uniswapV3FactoryAddress,priority:7};o.isDevelopment&&(r[t.localhost]=L);var p=(a=>(a.Mainnet="Mainnet",a.Testnet="Testnet",a.Local="Local",a))(p||{});const I={Mainnet:[t.polygon,t.arbMainnet,t.ethMainnet,t.bnbMainnet,t.optimism,t.avalanche,t.base],Testnet:[t.arcTestnet],Local:[t.localhost]},M=a=>[t.optimism,t.base].includes(a),U=a=>[t.solanaMainnet,t.solanaLocalnet].includes(a),g=t.ethMainnet,v=[t.ethMainnet,t.optimism,t.base,t.polygon,t.arbMainnet,t.arcTestnet];exports.ALCHEMY_API_KEY=e;exports.ALCHEMY_TEST_KEY=i;exports.EthereumNetworkType=p;exports.HELIUS_RPC_URL=F;exports.WALLET_INITIAL_CHAIN_ID=g;exports.WALLET_SUPPORTED_CHAINS=v;exports.chainIds=t;exports.chainIdsByType=I;exports.getNonLocalhostChainId=E;exports.isLocalNetwork=s;exports.isOptimismLike=M;exports.isSolanaLike=U;exports.localhostNetwork=n;exports.networkRegistry=r;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"),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;
@@ -32,5 +32,5 @@ export declare const chainIdsByType: {
32
32
  };
33
33
  export declare const isOptimismLike: (chainId: number) => boolean;
34
34
  export declare const isSolanaLike: (chainId: number) => boolean;
35
- export declare const WALLET_INITIAL_CHAIN_ID: number;
36
35
  export declare const WALLET_SUPPORTED_CHAINS: number[];
36
+ export declare const BRIDGE_SUPPORTED_CHAINS: number[];