@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.
- package/API/API.cjs +1 -1
- package/API/API.d.ts +6 -1
- package/API/API.mjs +48 -41
- package/API/enclaveCalls.cjs +1 -1
- package/API/enclaveCalls.mjs +5 -4
- package/API/index.d.ts +1 -0
- package/API/proxyAccountsCalls.cjs +1 -1
- package/API/proxyAccountsCalls.d.ts +7 -2
- package/API/proxyAccountsCalls.mjs +26 -20
- package/API/temporaryWalletCalls.cjs +1 -0
- package/API/temporaryWalletCalls.d.ts +13 -0
- package/API/temporaryWalletCalls.mjs +20 -0
- package/API/unspent-utxos-calls.cjs +1 -1
- package/API/unspent-utxos-calls.d.ts +1 -1
- package/API/unspent-utxos-calls.mjs +16 -14
- package/README.md +36 -13
- package/constants/chains.constants.cjs +1 -1
- package/constants/chains.constants.d.ts +1 -1
- package/constants/chains.constants.mjs +69 -51
- package/constants/deploy-data/deploy-data-solana.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-solana.json.mjs +28 -2
- package/constants/kyc.constants.cjs +1 -1
- package/constants/kyc.constants.mjs +39 -40
- package/constants/mediaUrls.constants.cjs +1 -1
- package/constants/mediaUrls.constants.d.ts +1 -0
- package/constants/mediaUrls.constants.mjs +2 -1
- package/constants/server.constants.cjs +1 -1
- package/constants/server.constants.d.ts +6 -1
- package/constants/server.constants.mjs +37 -32
- package/constants/token-data/polygonRegistry.json.cjs +1 -1
- package/constants/token-data/polygonRegistry.json.mjs +4 -4
- package/constants/token-data/polygonRegistryFixed.json.cjs +1 -1
- package/constants/token-data/polygonRegistryFixed.json.mjs +4 -4
- package/data-structures/AccountActions/AccountActions.cjs +1 -0
- package/data-structures/AccountActions/AccountActions.d.ts +18 -0
- package/data-structures/AccountActions/AccountActions.mjs +78 -0
- package/data-structures/AccountActions/index.d.ts +1 -0
- package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.cjs +1 -1
- package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.mjs +68 -71
- package/data-structures/BlockchainEvent/BlockchainEvent.cjs +1 -0
- package/data-structures/BlockchainEvent/BlockchainEvent.d.ts +14 -0
- package/data-structures/BlockchainEvent/BlockchainEvent.mjs +41 -0
- package/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +14 -8
- package/data-structures/Hinkal/Hinkal.mjs +215 -179
- package/data-structures/Hinkal/IHinkal.d.ts +9 -6
- package/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/data-structures/Hinkal/handleAutoDepositBack.mjs +47 -48
- package/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionReceive.mjs +25 -22
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +1 -1
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +12 -12
- package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalDeposit.mjs +63 -63
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +60 -147
- package/data-structures/Hinkal/hinkalDepositOnChainUtxos.cjs +1 -0
- package/data-structures/Hinkal/hinkalDepositOnChainUtxos.d.ts +4 -0
- package/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +103 -0
- package/data-structures/Hinkal/hinkalDepostAndBridge.cjs +1 -0
- package/data-structures/Hinkal/hinkalDepostAndBridge.d.ts +4 -0
- package/data-structures/Hinkal/hinkalDepostAndBridge.mjs +214 -0
- package/data-structures/Hinkal/hinkalGetZkMeProvider.cjs +1 -1
- package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +4 -4
- package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +2 -2
- package/data-structures/Hinkal/hinkalPrivateWallet.mjs +103 -99
- package/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalProxySwap.mjs +44 -41
- package/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
- package/data-structures/Hinkal/hinkalProxyToPrivate.mjs +31 -28
- package/data-structures/Hinkal/hinkalSignSubAccount.cjs +1 -1
- package/data-structures/Hinkal/hinkalSignSubAccount.mjs +16 -13
- package/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDeposit.mjs +34 -34
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +67 -65
- package/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySend.mjs +35 -32
- package/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +59 -56
- package/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +35 -32
- package/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaSwap.mjs +10 -10
- package/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +25 -25
- package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSwap.mjs +34 -30
- package/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/data-structures/Hinkal/hinkalTransfer.mjs +43 -39
- package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.mjs +47 -43
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +50 -46
- package/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/data-structures/Hinkal/resetMerkleTrees.mjs +36 -34
- package/data-structures/IndexedDB/activity-db.cjs +1 -1
- package/data-structures/IndexedDB/activity-db.d.ts +1 -0
- package/data-structures/IndexedDB/activity-db.mjs +86 -70
- package/data-structures/IndexedDB/balances-db.cjs +1 -1
- package/data-structures/IndexedDB/balances-db.mjs +33 -30
- package/data-structures/IndexedDB/contact-db.cjs +1 -1
- package/data-structures/IndexedDB/contact-db.mjs +9 -6
- package/data-structures/PublicBalance/PublicBalanceWatcher.cjs +1 -0
- package/data-structures/PublicBalance/PublicBalanceWatcher.d.ts +20 -0
- package/data-structures/PublicBalance/PublicBalanceWatcher.mjs +124 -0
- package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.cjs +1 -0
- package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.d.ts +15 -0
- package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.mjs +64 -0
- package/data-structures/PublicBalance/index.d.ts +2 -0
- package/data-structures/TokenDBs/EventsPublicTokensDB.cjs +1 -1
- package/data-structures/TokenDBs/EventsPublicTokensDB.mjs +77 -78
- package/data-structures/crypto-keys/keys.cjs +1 -1
- package/data-structures/crypto-keys/keys.d.ts +0 -11
- package/data-structures/crypto-keys/keys.mjs +47 -107
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.d.ts +3 -2
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.mjs +9 -9
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.d.ts +3 -2
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.mjs +5 -5
- package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.d.ts +3 -2
- package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.mjs +6 -6
- package/data-structures/event-service/evm/AbstractEventService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractEventService.d.ts +3 -2
- package/data-structures/event-service/evm/AbstractEventService.mjs +16 -19
- package/data-structures/event-service/evm/AbstractNullifierSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractNullifierSnapshotService.d.ts +3 -3
- package/data-structures/event-service/evm/AbstractNullifierSnapshotService.mjs +6 -5
- package/data-structures/event-service/evm/AbstractSnapshotService.d.ts +1 -1
- package/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +7 -4
- package/data-structures/event-service/evm/BlockchainEventEmitter.mjs +35 -34
- package/data-structures/event-service/evm/ClientBlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/evm/ClientBlockchainEventEmitter.d.ts +11 -0
- package/data-structures/event-service/evm/ClientBlockchainEventEmitter.mjs +21 -0
- package/data-structures/event-service/evm/PollingBlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/evm/PollingBlockchainEventEmitter.d.ts +6 -0
- package/data-structures/event-service/evm/PollingBlockchainEventEmitter.mjs +16 -0
- package/data-structures/event-service/helpers/ClientEventHelper.cjs +1 -0
- package/data-structures/event-service/helpers/ClientEventHelper.d.ts +11 -0
- package/data-structures/event-service/helpers/ClientEventHelper.mjs +26 -0
- package/data-structures/event-service/helpers/PollingEventHelper.cjs +1 -0
- package/data-structures/event-service/helpers/PollingEventHelper.d.ts +5 -0
- package/data-structures/event-service/helpers/PollingEventHelper.mjs +14 -0
- package/data-structures/event-service/index.d.ts +4 -0
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.d.ts +3 -2
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.mjs +6 -6
- package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.d.ts +4 -3
- package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +8 -8
- package/data-structures/event-service/solana/AbstractSolanaEventService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaEventService.d.ts +3 -10
- package/data-structures/event-service/solana/AbstractSolanaEventService.mjs +5 -5
- package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.d.ts +3 -2
- package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.mjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.d.ts +1 -1
- package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.d.ts +11 -0
- package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.mjs +22 -0
- package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.d.ts +6 -0
- package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.mjs +16 -0
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.d.ts +8 -14
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.mjs +68 -67
- package/data-structures/index.d.ts +3 -0
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +5 -2
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.mjs +5 -2
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +5 -2
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +5 -2
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +5 -2
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +5 -2
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +5 -2
- package/data-structures/utxo/Utxo.cjs +1 -1
- package/data-structures/utxo/Utxo.d.ts +1 -0
- package/data-structures/utxo/Utxo.mjs +18 -4
- package/error-handling/error-codes.constants.cjs +1 -1
- package/error-handling/error-codes.constants.mjs +2 -2
- package/functions/pre-transaction/getSolanaCalldataHash.cjs +1 -1
- package/functions/pre-transaction/getSolanaCalldataHash.mjs +22 -22
- package/functions/pre-transaction/sendV0Transaction.cjs +1 -1
- package/functions/pre-transaction/sendV0Transaction.mjs +53 -50
- package/functions/pre-transaction/solana.cjs +1 -1
- package/functions/pre-transaction/solana.mjs +93 -93
- package/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.helpers.d.ts +3 -2
- package/functions/private-wallet/emporium.helpers.mjs +118 -93
- package/functions/snarkjs/constructEmporiumProof.cjs +1 -1
- package/functions/snarkjs/constructEmporiumProof.d.ts +1 -2
- package/functions/snarkjs/constructEmporiumProof.mjs +89 -89
- package/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
- package/functions/snarkjs/constructSolanaZkProof.mjs +6 -2
- package/functions/utils/bytes32.utils.cjs +1 -1
- package/functions/utils/bytes32.utils.mjs +8 -7
- package/functions/utils/create-provider.cjs +1 -1
- package/functions/utils/create-provider.d.ts +1 -1
- package/functions/utils/create-provider.mjs +13 -9
- package/functions/utils/index.d.ts +0 -1
- package/functions/utils/prepareHinkal.cjs +1 -1
- package/functions/utils/prepareHinkal.d.ts +6 -7
- package/functions/utils/prepareHinkal.mjs +45 -53
- package/functions/utils/publicBalance.utils.cjs +1 -1
- package/functions/utils/publicBalance.utils.mjs +49 -54
- package/functions/utils/socket.utils.cjs +1 -0
- package/functions/utils/socket.utils.d.ts +1 -0
- package/functions/utils/socket.utils.mjs +12 -0
- package/functions/utils/string.utils.cjs +1 -1
- package/functions/utils/string.utils.d.ts +1 -0
- package/functions/utils/string.utils.mjs +18 -14
- package/functions/utils/walletBalances.utils.cjs +1 -1
- package/functions/utils/walletBalances.utils.d.ts +1 -1
- package/functions/utils/walletBalances.utils.mjs +4 -4
- package/functions/web3/crypto.cjs +1 -0
- package/functions/web3/crypto.d.ts +1 -0
- package/functions/web3/crypto.mjs +7 -0
- package/functions/web3/events/getApprovedBalance.cjs +1 -1
- package/functions/web3/events/getApprovedBalance.mjs +14 -14
- package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.mjs +61 -59
- package/functions/web3/events/getTransactionLogEvents.cjs +1 -1
- package/functions/web3/events/getTransactionLogEvents.mjs +32 -32
- package/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +1 -1
- package/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +6 -3
- package/functions/web3/functionCalls/approveToken.cjs +1 -1
- package/functions/web3/functionCalls/approveToken.mjs +17 -17
- package/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
- package/functions/web3/functionCalls/transactCallDirect.mjs +16 -16
- package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.mjs +13 -11
- package/functions/web3/getContractMetadata.cjs +1 -1
- package/functions/web3/getContractMetadata.mjs +17 -22
- package/functions/web3/getTokenHolder.cjs +1 -1
- package/functions/web3/getTokenHolder.mjs +20 -20
- package/functions/web3/index.d.ts +1 -0
- package/index.cjs +1 -1
- package/index.mjs +913 -890
- package/package.json +3 -2
- package/providers/EthersProviderAdapter.cjs +1 -1
- package/providers/EthersProviderAdapter.mjs +2 -5
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +11 -4
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +11 -4
- package/types/activities.types.d.ts +2 -0
- package/types/bridging-tx.types.d.ts +17 -0
- package/types/cache.types.cjs +1 -1
- package/types/cache.types.d.ts +5 -1
- package/types/cache.types.mjs +1 -1
- package/types/ethereum-network.types.d.ts +1 -0
- package/types/events.types.cjs +1 -0
- package/types/events.types.d.ts +9 -0
- package/types/events.types.mjs +5 -0
- package/types/index.d.ts +2 -0
- package/types/proxy.types.d.ts +11 -4
- package/types/sandbox.types.d.ts +2 -0
- package/types/solana.types.d.ts +8 -0
- package/types/token.types.d.ts +5 -0
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.cjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.mjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.cjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.mjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.cjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.mjs +1 -1
- package/functions/kyc/authentoHelper.cjs +0 -1
- package/functions/kyc/authentoHelper.d.ts +0 -12
- package/functions/kyc/authentoHelper.mjs +0 -30
- package/functions/utils/get-hinkal-approvals.cjs +0 -1
- package/functions/utils/get-hinkal-approvals.d.ts +0 -3
- package/functions/utils/get-hinkal-approvals.mjs +0 -38
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../../../data-structures/utxo/Utxo.cjs"),B=require("../../utils/upToDateState.cjs"),O=require("../../utils/cacheFunctions.cjs"),I=require("../../utils/caseInsensitive.utils.cjs"),q=require("../../utils/encodeTokenWithId.cjs"),K=require("./getInputUtxosEnclave.cjs"),L=require("../../utils/solanaMint.utils.cjs"),M=require("../../../constants/chains.constants.cjs"),N=require("../../utils/addresses.cjs"),R=require("../../../API/unspent-utxos-calls.cjs"),F=require("async-mutex"),z=new F.Mutex,k=async(t,e,s,r,o,a,c,n,d)=>z.runExclusive(async()=>{d+=1;const A=a.slice(d),{lastOutput:w,additionalEncryptedOutputs:f}=await t.utxoUtils.batchProcess(A,n,e,s),p=[...c,...f];return await B.checkAddressNotUpdated(t,r),O.setHinkalCache({lastOutput:w,encryptedOutputs:p},t,s,o),await t.utxoUtils.buildBatchProcess(p,e,s)}),S=async(t,e,s,r)=>{const{utxos:o,encryptedOutputs:a,lastOutput:c}=await K.getInputUtxosEnclave(t,s,e);return O.setHinkalCache({encryptedOutputs:a,lastOutput:c},t,s,r),o},h=async(t,e,s,r,o,a,c,n,d)=>{try{return await S(t,e,s,o)}catch{return k(t,e,s,r,o,a,c,n,d)}},H=t=>{if(Array.isArray(t))return t;if(t!==void 0)return[t]},_=async(t,e,s)=>await t.utxoUtils.batchFilterUtxosWithNullifier(e,s),G=(t,e,s,r,o,a,c)=>{for(t.sort((n,d)=>n.amount<=d.amount?1:-1);t.length<e||t.length>e&&t.length<6;)if(t.push(new P.Utxo({amount:0n,erc20TokenAddress:o,mintAddress:c,shieldedPrivateKey:r,tokenId:a})),s)for(;t.length>6;)t.splice(t.length-1)},b=async({hinkal:t,chainId:e,passedShieldedPublicKey:s=void 0,ethAddress:r=void 0,resetCacheBefore:o=!1,allowRemoteDecryption:a=!1})=>{const c=r??await t.getEthereumAddress(),n=s??t.userKeys.getShieldedPublicKey(),{userKeys:d}=t,A=t.encryptedOutputsByChain[e],w=t.nullifiersByChain[e],f=Array.from(A);o&&O.resetCache(t,e,n);let{encryptedOutputs:p,lastOutput:y}=O.getHinkalCache(t,e,n);await B.checkAddressNotUpdated(t,c);const x=y!=="",u=f.findIndex(T=>T.value===y),i=u>-1,l=!x&&u===-1,g=t.areMerkleTreeUpdatesDisabled(),U=!g&&(i||!a&&l),m=!g&&a&&l,E=!U&&!m;let v=[];return U?v=await k(t,d,e,c,n,f,p,y,u):m?v=await h(t,d,e,c,n,f,p,y,u):E&&(v=await t.utxoUtils.buildBatchProcess(p,d,e)),await B.checkAddressNotUpdated(t,c),{inputUtxos:(await _(t,v,w)).filter(T=>!T.isBlocked)}},C=async({hinkal:t,chainId:e,ethAddress:s=void 0})=>{const r=s??await t.getEthereumAddressByChain(e),o=N.hashEthereumAddress(r);return{inputUtxos:(await R.getUnspentUtxos(e,o)).utxos.map(({utxo:n})=>new P.Utxo({...n,amount:BigInt(n.amount),randomization:n.randomization?BigInt(n.randomization):void 0,shieldedPrivateKey:t.userKeys.getShieldedPrivateKey()}))}},j=async({hinkal:t,tokenWithId:e,minInput:s=2,sliceIfMore6:r=!0,chainId:o,passedShieldedPrivateKey:a=void 0,passedShieldedPublicKey:c=void 0,ethAddress:n=void 0,resetCacheBefore:d=!1,ensuredTokensWithId:A,useBlockedUtxos:w=!1})=>{const f=a??t.userKeys.getShieldedPrivateKey(),{inputUtxos:p}=w?await C({hinkal:t,chainId:o,ethAddress:n}):await b({hinkal:t,tokenWithId:e,minInput:s,sliceIfMore6:r,chainId:o,passedShieldedPrivateKey:a,passedShieldedPublicKey:c,ethAddress:n,resetCacheBefore:d}),y=H(e),x=new Map;p.forEach(u=>{const i=u.getTokenAddress(o);if(y&&!y.some(U=>I.caseInsensitiveEqual(U.erc20TokenAddress,i)&&U.tokenId===u.tokenId))return;const l=q.encodeTokenWithId(o,{erc20TokenAddress:i,tokenId:u.tokenId}),g=x.get(l)??[];x.set(l,[...g,u])}),A?.forEach(u=>{const i=q.encodeTokenWithId(o,{erc20TokenAddress:u.erc20TokenAddress,tokenId:u.tokenId});x.set(i,x.get(i)??[])});for(const[u,i]of x){const l=u.split("-")[0],g=Number(u.split("-")[1]),U=M.isSolanaLike(o),m=U?l:void 0,E=U?L.formatMintAddress(l).compressedAddress.toLowerCase():l.toLowerCase();G(i,s,r,f,E,g,m)}return x};exports.attemptGetInputUtxosRemotely=h;exports.getInputUtxoAndBalance=b;exports.getInputUtxoAndBalanceOfStuckUtxos=C;exports.getInputUtxoAndBalancePerToken=j;exports.getInputUtxosRemotely=S;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { Utxo as P } from "../../../data-structures/utxo/Utxo.mjs";
|
|
2
|
-
import { checkAddressNotUpdated as
|
|
3
|
-
import { setHinkalCache as
|
|
2
|
+
import { checkAddressNotUpdated as B } from "../../utils/upToDateState.mjs";
|
|
3
|
+
import { setHinkalCache as K, resetCache as C, getHinkalCache as S } from "../../utils/cacheFunctions.mjs";
|
|
4
4
|
import { caseInsensitiveEqual as L } from "../../utils/caseInsensitive.utils.mjs";
|
|
5
|
-
import { encodeTokenWithId as
|
|
5
|
+
import { encodeTokenWithId as T } from "../../utils/encodeTokenWithId.mjs";
|
|
6
6
|
import { getInputUtxosEnclave as k } from "./getInputUtxosEnclave.mjs";
|
|
7
7
|
import { formatMintAddress as N } from "../../utils/solanaMint.utils.mjs";
|
|
8
|
-
import { isSolanaLike as
|
|
9
|
-
import { hashEthereumAddress as
|
|
8
|
+
import { isSolanaLike as h } from "../../../constants/chains.constants.mjs";
|
|
9
|
+
import { hashEthereumAddress as z } from "../../utils/addresses.mjs";
|
|
10
10
|
import { getUnspentUtxos as F } from "../../../API/unspent-utxos-calls.mjs";
|
|
11
|
-
|
|
11
|
+
import { Mutex as M } from "async-mutex";
|
|
12
|
+
const R = new M(), b = async (t, e, s, n, o, a, c, r, d) => R.runExclusive(async () => {
|
|
12
13
|
d += 1;
|
|
13
|
-
const
|
|
14
|
-
|
|
14
|
+
const U = a.slice(d), { lastOutput: A, additionalEncryptedOutputs: x } = await t.utxoUtils.batchProcess(
|
|
15
|
+
U,
|
|
15
16
|
r,
|
|
16
17
|
e,
|
|
17
18
|
s
|
|
18
19
|
), l = [...c, ...x];
|
|
19
|
-
return await
|
|
20
|
+
return await B(t, n), K(
|
|
20
21
|
{
|
|
21
22
|
lastOutput: A,
|
|
22
23
|
encryptedOutputs: l
|
|
@@ -25,62 +26,62 @@ const C = async (t, e, s, n, o, u, c, r, d) => {
|
|
|
25
26
|
s,
|
|
26
27
|
o
|
|
27
28
|
), await t.utxoUtils.buildBatchProcess(l, e, s);
|
|
28
|
-
}, H = async (t, e, s, n) => {
|
|
29
|
+
}), H = async (t, e, s, n) => {
|
|
29
30
|
const {
|
|
30
31
|
utxos: o,
|
|
31
|
-
encryptedOutputs:
|
|
32
|
+
encryptedOutputs: a,
|
|
32
33
|
lastOutput: c
|
|
33
34
|
} = await k(t, s, e);
|
|
34
|
-
return
|
|
35
|
+
return K(
|
|
35
36
|
{
|
|
36
|
-
encryptedOutputs:
|
|
37
|
+
encryptedOutputs: a,
|
|
37
38
|
lastOutput: c
|
|
38
39
|
},
|
|
39
40
|
t,
|
|
40
41
|
s,
|
|
41
42
|
n
|
|
42
43
|
), o;
|
|
43
|
-
},
|
|
44
|
+
}, q = async (t, e, s, n, o, a, c, r, d) => {
|
|
44
45
|
try {
|
|
45
46
|
return await H(t, e, s, o);
|
|
46
47
|
} catch {
|
|
47
|
-
return
|
|
48
|
+
return b(
|
|
48
49
|
t,
|
|
49
50
|
e,
|
|
50
51
|
s,
|
|
51
52
|
n,
|
|
52
53
|
o,
|
|
53
|
-
|
|
54
|
+
a,
|
|
54
55
|
c,
|
|
55
56
|
r,
|
|
56
57
|
d
|
|
57
58
|
);
|
|
58
59
|
}
|
|
59
|
-
},
|
|
60
|
+
}, G = (t) => {
|
|
60
61
|
if (Array.isArray(t))
|
|
61
62
|
return t;
|
|
62
63
|
if (t !== void 0)
|
|
63
64
|
return [t];
|
|
64
|
-
},
|
|
65
|
+
}, j = async (t, e, s) => await t.utxoUtils.batchFilterUtxosWithNullifier(e, s), D = (t, e, s, n, o, a, c) => {
|
|
65
66
|
for (t.sort((r, d) => r.amount <= d.amount ? 1 : -1); t.length < e || t.length > e && t.length < 6; )
|
|
66
|
-
if (t.push(new P({ amount: 0n, erc20TokenAddress: o, mintAddress: c, shieldedPrivateKey: n, tokenId:
|
|
67
|
+
if (t.push(new P({ amount: 0n, erc20TokenAddress: o, mintAddress: c, shieldedPrivateKey: n, tokenId: a })), s)
|
|
67
68
|
for (; t.length > 6; )
|
|
68
69
|
t.splice(t.length - 1);
|
|
69
|
-
},
|
|
70
|
+
}, J = async ({
|
|
70
71
|
hinkal: t,
|
|
71
72
|
chainId: e,
|
|
72
73
|
passedShieldedPublicKey: s = void 0,
|
|
73
74
|
ethAddress: n = void 0,
|
|
74
75
|
resetCacheBefore: o = !1,
|
|
75
|
-
allowRemoteDecryption:
|
|
76
|
+
allowRemoteDecryption: a = !1
|
|
76
77
|
}) => {
|
|
77
|
-
const c = n ?? await t.getEthereumAddress(), r = s ?? t.userKeys.getShieldedPublicKey(), { userKeys: d } = t,
|
|
78
|
-
o &&
|
|
79
|
-
let { encryptedOutputs: l, lastOutput: m } =
|
|
80
|
-
await
|
|
81
|
-
const
|
|
78
|
+
const c = n ?? await t.getEthereumAddress(), r = s ?? t.userKeys.getShieldedPublicKey(), { userKeys: d } = t, U = t.encryptedOutputsByChain[e], A = t.nullifiersByChain[e], x = Array.from(U);
|
|
79
|
+
o && C(t, e, r);
|
|
80
|
+
let { encryptedOutputs: l, lastOutput: m } = S(t, e, r);
|
|
81
|
+
await B(t, c);
|
|
82
|
+
const y = m !== "", u = x.findIndex((E) => E.value === m), i = u > -1, p = !y && u === -1, w = t.areMerkleTreeUpdatesDisabled(), f = !w && (i || !a && p), g = !w && a && p, O = !f && !g;
|
|
82
83
|
let v = [];
|
|
83
|
-
return
|
|
84
|
+
return f ? v = await b(
|
|
84
85
|
t,
|
|
85
86
|
d,
|
|
86
87
|
e,
|
|
@@ -89,8 +90,8 @@ const C = async (t, e, s, n, o, u, c, r, d) => {
|
|
|
89
90
|
x,
|
|
90
91
|
l,
|
|
91
92
|
m,
|
|
92
|
-
|
|
93
|
-
) : g ? v = await
|
|
93
|
+
u
|
|
94
|
+
) : g ? v = await q(
|
|
94
95
|
t,
|
|
95
96
|
d,
|
|
96
97
|
e,
|
|
@@ -99,74 +100,75 @@ const C = async (t, e, s, n, o, u, c, r, d) => {
|
|
|
99
100
|
x,
|
|
100
101
|
l,
|
|
101
102
|
m,
|
|
102
|
-
|
|
103
|
-
) : O && (v = await t.utxoUtils.buildBatchProcess(l, d, e)), await
|
|
104
|
-
},
|
|
103
|
+
u
|
|
104
|
+
) : O && (v = await t.utxoUtils.buildBatchProcess(l, d, e)), await B(t, c), { inputUtxos: (await j(t, v, A)).filter((E) => !E.isBlocked) };
|
|
105
|
+
}, Q = async ({
|
|
105
106
|
hinkal: t,
|
|
106
107
|
chainId: e,
|
|
107
108
|
ethAddress: s = void 0
|
|
108
109
|
}) => {
|
|
109
|
-
const n = s ?? await t.
|
|
110
|
+
const n = s ?? await t.getEthereumAddressByChain(e), o = z(n);
|
|
110
111
|
return { inputUtxos: (await F(e, o)).utxos.map(
|
|
111
112
|
({ utxo: r }) => new P({
|
|
112
113
|
...r,
|
|
113
114
|
amount: BigInt(r.amount),
|
|
114
|
-
randomization: r.randomization ? BigInt(r.randomization) : void 0
|
|
115
|
+
randomization: r.randomization ? BigInt(r.randomization) : void 0,
|
|
116
|
+
shieldedPrivateKey: t.userKeys.getShieldedPrivateKey()
|
|
115
117
|
})
|
|
116
118
|
) };
|
|
117
|
-
},
|
|
119
|
+
}, nt = async ({
|
|
118
120
|
hinkal: t,
|
|
119
121
|
tokenWithId: e,
|
|
120
122
|
minInput: s = 2,
|
|
121
123
|
sliceIfMore6: n = !0,
|
|
122
124
|
chainId: o,
|
|
123
|
-
passedShieldedPrivateKey:
|
|
125
|
+
passedShieldedPrivateKey: a = void 0,
|
|
124
126
|
passedShieldedPublicKey: c = void 0,
|
|
125
127
|
ethAddress: r = void 0,
|
|
126
128
|
resetCacheBefore: d = !1,
|
|
127
|
-
ensuredTokensWithId:
|
|
129
|
+
ensuredTokensWithId: U,
|
|
128
130
|
useBlockedUtxos: A = !1
|
|
129
131
|
}) => {
|
|
130
|
-
const x =
|
|
132
|
+
const x = a ?? t.userKeys.getShieldedPrivateKey(), { inputUtxos: l } = A ? await Q({
|
|
131
133
|
hinkal: t,
|
|
132
134
|
chainId: o,
|
|
133
135
|
ethAddress: r
|
|
134
|
-
}) : await
|
|
136
|
+
}) : await J({
|
|
135
137
|
hinkal: t,
|
|
136
138
|
tokenWithId: e,
|
|
137
139
|
minInput: s,
|
|
138
140
|
sliceIfMore6: n,
|
|
139
141
|
chainId: o,
|
|
140
|
-
passedShieldedPrivateKey:
|
|
142
|
+
passedShieldedPrivateKey: a,
|
|
141
143
|
passedShieldedPublicKey: c,
|
|
142
144
|
ethAddress: r,
|
|
143
145
|
resetCacheBefore: d
|
|
144
|
-
}), m =
|
|
145
|
-
l.forEach((
|
|
146
|
-
const i =
|
|
146
|
+
}), m = G(e), y = /* @__PURE__ */ new Map();
|
|
147
|
+
l.forEach((u) => {
|
|
148
|
+
const i = u.getTokenAddress(o);
|
|
147
149
|
if (m && !m.some(
|
|
148
|
-
(
|
|
150
|
+
(f) => L(f.erc20TokenAddress, i) && f.tokenId === u.tokenId
|
|
149
151
|
))
|
|
150
152
|
return;
|
|
151
|
-
const p =
|
|
152
|
-
|
|
153
|
-
}),
|
|
154
|
-
const i =
|
|
155
|
-
erc20TokenAddress:
|
|
156
|
-
tokenId:
|
|
153
|
+
const p = T(o, { erc20TokenAddress: i, tokenId: u.tokenId }), w = y.get(p) ?? [];
|
|
154
|
+
y.set(p, [...w, u]);
|
|
155
|
+
}), U?.forEach((u) => {
|
|
156
|
+
const i = T(o, {
|
|
157
|
+
erc20TokenAddress: u.erc20TokenAddress,
|
|
158
|
+
tokenId: u.tokenId
|
|
157
159
|
});
|
|
158
|
-
|
|
160
|
+
y.set(i, y.get(i) ?? []);
|
|
159
161
|
});
|
|
160
|
-
for (const [
|
|
161
|
-
const p =
|
|
162
|
-
|
|
162
|
+
for (const [u, i] of y) {
|
|
163
|
+
const p = u.split("-")[0], w = Number(u.split("-")[1]), f = h(o), g = f ? p : void 0, O = f ? N(p).compressedAddress.toLowerCase() : p.toLowerCase();
|
|
164
|
+
D(i, s, n, x, O, w, g);
|
|
163
165
|
}
|
|
164
|
-
return
|
|
166
|
+
return y;
|
|
165
167
|
};
|
|
166
168
|
export {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
q as attemptGetInputUtxosRemotely,
|
|
170
|
+
J as getInputUtxoAndBalance,
|
|
171
|
+
Q as getInputUtxoAndBalanceOfStuckUtxos,
|
|
172
|
+
nt as getInputUtxoAndBalancePerToken,
|
|
171
173
|
H as getInputUtxosRemotely
|
|
172
174
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("ethers");require("idb-keyval");require("../../../constants/chains.constants.cjs");const q=require("../../utils/create-provider.cjs");require("../../../constants/token-data/index.cjs");require("../../../error-handling/error-codes.constants.cjs");require("../../utils/convertIntegrationProviderToExternalActionId.cjs");require("../../../types/circom-data.types.cjs");require("../../../types/transactions.types.cjs");require("../../../types/activities.types.cjs");require("circomlibjs-hinkal-fork");require("../../../data-structures/crypto-keys/keys.cjs");require("../../../constants/server.constants.cjs");require("../../../API/getServerURL.cjs");require("../../../data-structures/http/HttpClient.cjs");require("axios");require("../../../constants/vite.constants.cjs");require("@solana/web3.js");require("@coral-xyz/anchor");require("@solana/spl-token");require("ethers-v6h");require("tweetnacl");require("bs58");require("buffer");require("../../../constants/contracts.constants.cjs");require("../../../constants/kyc.constants.cjs");require("../../../constants/coingecko.constants.cjs");require("../../../constants/reorg-depths.constants.cjs");require("../../../constants/addresses.constants.cjs");require("../../../constants/token.limits.constants.cjs");require("../../../constants/presale.constants.cjs");require("../../../constants/activity.constants.cjs");require("../../../constants/tasks.constants.cjs");require("../../../constants/events.constants.cjs");require("../../utils/userAgent.cjs");require("libsodium-wrappers");require("multiformats");require("../../../API/enclaveCalls.cjs");require("async-mutex");require("process");require("../../../providers/EthersProviderAdapter.cjs");const c=(t,o)=>{const u=new a.ethers.utils.Interface(o);try{const e=u.parseLog(t);return{name:e.name,args:e.args}}catch{return console.warn("Could not decode log"),null}};async function l(t,o,u,e){try{const r=await q.createCustomRpcProvider(t).getTransactionReceipt(o);if(!r)throw new Error("Transaction receipt not found");if(r.status!==1)throw new Error("Transaction failed");const s=r.logs.filter(i=>i.address.toLowerCase()===u.toLowerCase()).map(i=>c(i,e)).filter(i=>i!==null);return{transactionHash:r.transactionHash,from:r.from,to:r.to,blockNumber:r.blockNumber,events:s}}catch(n){throw console.error("Error retrieving transaction events:",n),n}}exports.getTransactionLogEvents=l;
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
import "../../../constants/token-data/index.mjs";
|
|
2
|
-
import { networkRegistry as s } from "../../../constants/chains.constants.mjs";
|
|
3
|
-
import "../../../constants/contracts.constants.mjs";
|
|
4
|
-
import "../../../constants/kyc.constants.mjs";
|
|
5
|
-
import "../../../constants/server.constants.mjs";
|
|
6
|
-
import "../../../constants/vite.constants.mjs";
|
|
7
|
-
import "../../../constants/coingecko.constants.mjs";
|
|
8
|
-
import "../../../constants/reorg-depths.constants.mjs";
|
|
9
|
-
import "../../../constants/addresses.constants.mjs";
|
|
10
|
-
import "../../../constants/token.limits.constants.mjs";
|
|
11
|
-
import "../../../constants/presale.constants.mjs";
|
|
12
|
-
import "../../../constants/activity.constants.mjs";
|
|
13
|
-
import "../../../constants/tasks.constants.mjs";
|
|
14
|
-
import "../../../constants/events.constants.mjs";
|
|
15
1
|
import { ethers as a } from "ethers";
|
|
16
2
|
import "idb-keyval";
|
|
17
|
-
import
|
|
3
|
+
import "../../../constants/chains.constants.mjs";
|
|
4
|
+
import { createCustomRpcProvider as s } from "../../utils/create-provider.mjs";
|
|
5
|
+
import "../../../constants/token-data/index.mjs";
|
|
18
6
|
import "../../../error-handling/error-codes.constants.mjs";
|
|
19
7
|
import "../../utils/convertIntegrationProviderToExternalActionId.mjs";
|
|
20
8
|
import "../../../types/circom-data.types.mjs";
|
|
@@ -22,54 +10,66 @@ import "../../../types/transactions.types.mjs";
|
|
|
22
10
|
import "../../../types/activities.types.mjs";
|
|
23
11
|
import "circomlibjs-hinkal-fork";
|
|
24
12
|
import "../../../data-structures/crypto-keys/keys.mjs";
|
|
13
|
+
import "../../../constants/server.constants.mjs";
|
|
25
14
|
import "../../../API/getServerURL.mjs";
|
|
26
15
|
import "../../../data-structures/http/HttpClient.mjs";
|
|
27
16
|
import "axios";
|
|
17
|
+
import "../../../constants/vite.constants.mjs";
|
|
28
18
|
import "@solana/web3.js";
|
|
29
19
|
import "@coral-xyz/anchor";
|
|
30
20
|
import "@solana/spl-token";
|
|
21
|
+
import "ethers-v6h";
|
|
22
|
+
import "tweetnacl";
|
|
23
|
+
import "bs58";
|
|
24
|
+
import "buffer";
|
|
25
|
+
import "../../../constants/contracts.constants.mjs";
|
|
26
|
+
import "../../../constants/kyc.constants.mjs";
|
|
27
|
+
import "../../../constants/coingecko.constants.mjs";
|
|
28
|
+
import "../../../constants/reorg-depths.constants.mjs";
|
|
29
|
+
import "../../../constants/addresses.constants.mjs";
|
|
30
|
+
import "../../../constants/token.limits.constants.mjs";
|
|
31
|
+
import "../../../constants/presale.constants.mjs";
|
|
32
|
+
import "../../../constants/activity.constants.mjs";
|
|
33
|
+
import "../../../constants/tasks.constants.mjs";
|
|
34
|
+
import "../../../constants/events.constants.mjs";
|
|
31
35
|
import "../../utils/userAgent.mjs";
|
|
32
36
|
import "libsodium-wrappers";
|
|
33
37
|
import "multiformats";
|
|
38
|
+
import "../../../API/enclaveCalls.mjs";
|
|
34
39
|
import "async-mutex";
|
|
35
|
-
import "../../../API/tenderly.api.mjs";
|
|
36
40
|
import "process";
|
|
37
|
-
import "buffer";
|
|
38
41
|
import "../../../providers/EthersProviderAdapter.mjs";
|
|
39
|
-
const
|
|
40
|
-
const
|
|
42
|
+
const c = (i, e) => {
|
|
43
|
+
const m = new a.utils.Interface(e);
|
|
41
44
|
try {
|
|
42
|
-
const
|
|
45
|
+
const t = m.parseLog(i);
|
|
43
46
|
return {
|
|
44
|
-
name:
|
|
45
|
-
args:
|
|
47
|
+
name: t.name,
|
|
48
|
+
args: t.args
|
|
46
49
|
};
|
|
47
50
|
} catch {
|
|
48
51
|
return console.warn("Could not decode log"), null;
|
|
49
52
|
}
|
|
50
53
|
};
|
|
51
|
-
async function
|
|
54
|
+
async function _(i, e, m, t) {
|
|
52
55
|
try {
|
|
53
|
-
const
|
|
54
|
-
if (!t)
|
|
55
|
-
throw new Error("RPC URL not found for the specified chain ID");
|
|
56
|
-
const r = await c(t).getTransactionReceipt(n);
|
|
56
|
+
const r = await s(i).getTransactionReceipt(e);
|
|
57
57
|
if (!r)
|
|
58
58
|
throw new Error("Transaction receipt not found");
|
|
59
59
|
if (r.status !== 1)
|
|
60
60
|
throw new Error("Transaction failed");
|
|
61
|
-
const
|
|
61
|
+
const n = r.logs.filter((o) => o.address.toLowerCase() === m.toLowerCase()).map((o) => c(o, t)).filter((o) => o !== null);
|
|
62
62
|
return {
|
|
63
63
|
transactionHash: r.transactionHash,
|
|
64
64
|
from: r.from,
|
|
65
65
|
to: r.to,
|
|
66
66
|
blockNumber: r.blockNumber,
|
|
67
|
-
events:
|
|
67
|
+
events: n
|
|
68
68
|
};
|
|
69
|
-
} catch (
|
|
70
|
-
throw console.error("Error retrieving transaction events:",
|
|
69
|
+
} catch (p) {
|
|
70
|
+
throw console.error("Error retrieving transaction events:", p), p;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
export {
|
|
74
|
-
|
|
74
|
+
_ as getTransactionLogEvents
|
|
75
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("ethers");require("idb-keyval");require("../../constants/chains.constants.cjs");require("@solana/web3.js");require("../../data-structures/http/HttpClient.cjs");require("../../constants/vite.constants.cjs");require("../../constants/token-data/index.cjs");require("../../error-handling/error-codes.constants.cjs");require("../utils/convertIntegrationProviderToExternalActionId.cjs");require("../../types/circom-data.types.cjs");require("../../types/transactions.types.cjs");require("../../types/activities.types.cjs");require("circomlibjs-hinkal-fork");require("../../data-structures/crypto-keys/keys.cjs");require("../../constants/server.constants.cjs");require("../../API/getServerURL.cjs");require("axios");require("@coral-xyz/anchor");require("@solana/spl-token");const r=require("../utils/bytes32.utils.cjs");require("../../constants/contracts.constants.cjs");require("../../constants/kyc.constants.cjs");require("../../constants/coingecko.constants.cjs");require("../../constants/reorg-depths.constants.cjs");require("../../constants/addresses.constants.cjs");require("../../constants/token.limits.constants.cjs");require("../../constants/presale.constants.cjs");require("../../constants/activity.constants.cjs");require("../../constants/tasks.constants.cjs");require("../../constants/events.constants.cjs");require("../utils/userAgent.cjs");require("libsodium-wrappers");require("multiformats");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("ethers");require("idb-keyval");require("../../constants/chains.constants.cjs");require("@solana/web3.js");require("../../data-structures/http/HttpClient.cjs");require("../../constants/vite.constants.cjs");require("../../constants/token-data/index.cjs");require("../../error-handling/error-codes.constants.cjs");require("../utils/convertIntegrationProviderToExternalActionId.cjs");require("../../types/circom-data.types.cjs");require("../../types/transactions.types.cjs");require("../../types/activities.types.cjs");require("circomlibjs-hinkal-fork");require("../../data-structures/crypto-keys/keys.cjs");require("../../constants/server.constants.cjs");require("../../API/getServerURL.cjs");require("axios");require("@coral-xyz/anchor");require("@solana/spl-token");require("ethers-v6h");require("tweetnacl");require("bs58");const r=require("../utils/bytes32.utils.cjs");require("../../constants/contracts.constants.cjs");require("../../constants/kyc.constants.cjs");require("../../constants/coingecko.constants.cjs");require("../../constants/reorg-depths.constants.cjs");require("../../constants/addresses.constants.cjs");require("../../constants/token.limits.constants.cjs");require("../../constants/presale.constants.cjs");require("../../constants/activity.constants.cjs");require("../../constants/tasks.constants.cjs");require("../../constants/events.constants.cjs");require("../utils/userAgent.cjs");require("libsodium-wrappers");require("multiformats");require("../../API/enclaveCalls.cjs");require("async-mutex");require("process");require("buffer");require("../../providers/EthersProviderAdapter.cjs");const n=async(i,u)=>{const e=await i.account.merkle.fetch(u,"confirmed"),q=Number(r.convertBytes32ToBigInt(e.rootIndex)),t=e.roots.at(q-1);return o.ethers.BigNumber.from(r.convertBytes32ToBigInt(t).toString())};exports.fetchSolanaMerkleTreeRootHash=n;
|
|
@@ -17,6 +17,9 @@ import "../../API/getServerURL.mjs";
|
|
|
17
17
|
import "axios";
|
|
18
18
|
import "@coral-xyz/anchor";
|
|
19
19
|
import "@solana/spl-token";
|
|
20
|
+
import "ethers-v6h";
|
|
21
|
+
import "tweetnacl";
|
|
22
|
+
import "bs58";
|
|
20
23
|
import { convertBytes32ToBigInt as t } from "../utils/bytes32.utils.mjs";
|
|
21
24
|
import "../../constants/contracts.constants.mjs";
|
|
22
25
|
import "../../constants/kyc.constants.mjs";
|
|
@@ -31,15 +34,15 @@ import "../../constants/events.constants.mjs";
|
|
|
31
34
|
import "../utils/userAgent.mjs";
|
|
32
35
|
import "libsodium-wrappers";
|
|
33
36
|
import "multiformats";
|
|
37
|
+
import "../../API/enclaveCalls.mjs";
|
|
34
38
|
import "async-mutex";
|
|
35
|
-
import "../../API/tenderly.api.mjs";
|
|
36
39
|
import "process";
|
|
37
40
|
import "buffer";
|
|
38
41
|
import "../../providers/EthersProviderAdapter.mjs";
|
|
39
|
-
const
|
|
42
|
+
const W = async (r, m) => {
|
|
40
43
|
const o = await r.account.merkle.fetch(m, "confirmed"), i = Number(t(o.rootIndex)), p = o.roots.at(i - 1);
|
|
41
44
|
return e.BigNumber.from(t(p).toString());
|
|
42
45
|
};
|
|
43
46
|
export {
|
|
44
|
-
|
|
47
|
+
W as fetchSolanaMerkleTreeRootHash
|
|
45
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("ethers"),u=require("../../../constants/chains.constants.cjs"),x=require("../../../constants/protocol.constants.cjs"),p=require("../../../types/token.types.cjs"),y=require("../../../types/ethereum-network.types.cjs"),F=require("./recoverTransactionFromError.cjs"),q=async(e,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("ethers"),u=require("../../../constants/chains.constants.cjs"),x=require("../../../constants/protocol.constants.cjs"),p=require("../../../types/token.types.cjs"),y=require("../../../types/ethereum-network.types.cjs"),F=require("./recoverTransactionFromError.cjs"),q=async(r,e,a)=>BigInt(await a.allowance(await a.signer.getAddress(),e.address))>=r,E=async(r,e,a,c,n)=>{if(u.getNonLocalhostChainId(e)!==u.chainIds.ethMainnet||c.symbol.toLowerCase()!=="usdt"||BigInt(await n.allowance(await n.signer.getAddress(),a.address))===0n)return;const i=await n.approve(a.address,0n);i&&"hash"in i&&await r.waitForTransaction(e,i.hash)},P=async(r,e,a,c,n)=>{const d=r.getContractWithSigner(e,y.ContractType.ERC20Contract,n.erc20TokenAddress),i=n.approvalType??p.ApprovalType.Classic;if(i===p.ApprovalType.Classic||!r.isPermitterAvailable(e)){if(await q(c,a,d))return;await E(r,e,a,n,d);const T=e===u.chainIds.base?2:1;try{const o=await d.approve(a.address,c);o&&"hash"in o&&await r.waitForTransaction(e,o.hash,T)}catch(o){if(!o?.transactionHash)throw o;const{provider:b}=d;if(!await F.recoverTransactionFromError(b,o.transactionHash,T))throw o}return}const l=await r.getEthereumAddressByChain(e),g=r.getContract(e,y.ContractType.PermitterContract),C=await r.getContractWithFetcher(e,y.ContractType.ContractWithNonces,n.erc20TokenAddress).nonces(l),w=BigInt(Date.now()+x.permitSignatureValidFor)/1000n,t={owner:l,holder:l,spender:g.address,value:c,nonce:C,deadline:w,expiry:w,allowed:!0},{v:m,r:v,s:f}=s.ethers.utils.splitSignature(await r.signTypedData({name:await d.name(),chainId:e,version:"1",verifyingContract:n.erc20TokenAddress},{Permit:i===p.ApprovalType.ERC20Permit?[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]:[{name:"holder",type:"address"},{name:"spender",type:"address"},{name:"nonce",type:"uint256"},{name:"expiry",type:"uint256"},{name:"allowed",type:"bool"}]},t));if(i===p.ApprovalType.ERC20Permit){const h=new s.ethers.utils.Interface(["function permit(address owner,address spender,uint256 value,uint256 deadline,uint8 v,bytes32 r,bytes32 s) external"]);return s.ethers.utils.arrayify(h.encodeFunctionData("permit",[t.owner,t.spender,t.value,t.deadline,m,s.ethers.utils.arrayify(v),s.ethers.utils.arrayify(f)])).slice(4)}const A=new s.ethers.utils.Interface(["function permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed,uint8 v,bytes32 r,bytes32 s) external"]);return s.ethers.utils.arrayify(A.encodeFunctionData("permit",[t.holder,t.spender,t.nonce,t.expiry,t.allowed,m,s.ethers.utils.arrayify(v),s.ethers.utils.arrayify(f)])).slice(4)};exports.approveTokenToHinkal=P;
|
|
@@ -4,29 +4,29 @@ import { permitSignatureValidFor as F } from "../../../constants/protocol.consta
|
|
|
4
4
|
import { ApprovalType as l } from "../../../types/token.types.mjs";
|
|
5
5
|
import { ContractType as y } from "../../../types/ethereum-network.types.mjs";
|
|
6
6
|
import { recoverTransactionFromError as E } from "./recoverTransactionFromError.mjs";
|
|
7
|
-
const P = async (
|
|
8
|
-
await a.allowance(await a.signer.getAddress(),
|
|
9
|
-
) >=
|
|
10
|
-
if (b(
|
|
7
|
+
const P = async (r, e, a) => BigInt(
|
|
8
|
+
await a.allowance(await a.signer.getAddress(), e.address)
|
|
9
|
+
) >= r, B = async (r, e, a, c, n) => {
|
|
10
|
+
if (b(e) !== C.ethMainnet || c.symbol.toLowerCase() !== "usdt" || BigInt(
|
|
11
11
|
await n.allowance(await n.signer.getAddress(), a.address)
|
|
12
12
|
) === 0n)
|
|
13
13
|
return;
|
|
14
14
|
const o = await n.approve(a.address, 0n);
|
|
15
|
-
o && "hash" in o && await
|
|
16
|
-
}, M = async (
|
|
17
|
-
const d =
|
|
18
|
-
if (o === l.Classic || !
|
|
15
|
+
o && "hash" in o && await r.waitForTransaction(e, o.hash);
|
|
16
|
+
}, M = async (r, e, a, c, n) => {
|
|
17
|
+
const d = r.getContractWithSigner(e, y.ERC20Contract, n.erc20TokenAddress), o = n.approvalType ?? l.Classic;
|
|
18
|
+
if (o === l.Classic || !r.isPermitterAvailable(e)) {
|
|
19
19
|
if (await P(c, a, d))
|
|
20
20
|
return;
|
|
21
|
-
await
|
|
22
|
-
const g =
|
|
21
|
+
await B(r, e, a, n, d);
|
|
22
|
+
const g = e === C.base ? 2 : 1;
|
|
23
23
|
try {
|
|
24
24
|
const i = await d.approve(
|
|
25
25
|
a.address,
|
|
26
26
|
c
|
|
27
27
|
// { gasLimit: 10000000 }
|
|
28
28
|
);
|
|
29
|
-
i && "hash" in i && await
|
|
29
|
+
i && "hash" in i && await r.waitForTransaction(e, i.hash, g);
|
|
30
30
|
} catch (i) {
|
|
31
31
|
if (!i?.transactionHash)
|
|
32
32
|
throw i;
|
|
@@ -36,24 +36,24 @@ const P = async (e, r, a) => BigInt(
|
|
|
36
36
|
}
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
const p = await
|
|
40
|
-
|
|
39
|
+
const p = await r.getEthereumAddressByChain(e), T = r.getContract(e, y.PermitterContract), h = await r.getContractWithFetcher(
|
|
40
|
+
e,
|
|
41
41
|
y.ContractWithNonces,
|
|
42
42
|
n.erc20TokenAddress
|
|
43
43
|
).nonces(p), u = BigInt(Date.now() + F) / 1000n, t = {
|
|
44
44
|
owner: p,
|
|
45
45
|
holder: p,
|
|
46
|
-
spender:
|
|
46
|
+
spender: T.address,
|
|
47
47
|
value: c,
|
|
48
|
-
nonce:
|
|
48
|
+
nonce: h,
|
|
49
49
|
deadline: u,
|
|
50
50
|
expiry: u,
|
|
51
51
|
allowed: !0
|
|
52
52
|
}, { v: m, r: w, s: f } = s.utils.splitSignature(
|
|
53
|
-
await
|
|
53
|
+
await r.signTypedData(
|
|
54
54
|
{
|
|
55
55
|
name: await d.name(),
|
|
56
|
-
chainId:
|
|
56
|
+
chainId: e,
|
|
57
57
|
version: "1",
|
|
58
58
|
verifyingContract: n.erc20TokenAddress
|
|
59
59
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../../../constants/protocol.constants.cjs"),F=require("../../../types/ethereum-network.types.cjs"),S=require("../../utils/time.utils.cjs"),_=require("./approveTokensToHinkal.cjs"),z=require("./constructBatchCall.cjs"),G=require("./recoverTransactionFromError.cjs"),L=async(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../../../constants/protocol.constants.cjs"),F=require("../../../types/ethereum-network.types.cjs"),S=require("../../utils/time.utils.cjs"),_=require("./approveTokensToHinkal.cjs"),z=require("./constructBatchCall.cjs"),G=require("./recoverTransactionFromError.cjs"),L=async(o,r,i,d,s,v,A,q,B)=>{const n=Array.isArray(i)?i:[i],e=Array.isArray(d)?d:[d];if(n.length!==e.length)throw new Error("token and amount length mismatch");const g=o.getContractWithSigner(r,F.ContractType.HinkalContract),b=await o.getEthereumAddressByChain(r),T=q??g,a=B??g,y="transact",C=e.findIndex(({erc20TokenAddress:t})=>t===x.zeroAddress),H=e.some(({erc20TokenAddress:t})=>t!==x.zeroAddress),l=C===-1?0n:n[C],u=o.getProviderAdapter(r);if(H&&await u.supportsBatchCall?.(r)&&u.sendBatchCallsTransaction){const t=e.map(E=>E.erc20TokenAddress),h=z.buildApproveAndTransactCalls(t,n,T.address,a,s,A,v,l);return await u.sendBatchCallsTransaction(r,h)}await _.approveTokensToHinkal(o,r,T,e,n);const w={value:l>0n?BigInt(l).toString():void 0};let c;const f=[s[0],s[1],s[2],A,v,{...w,from:b}];try{c=(await a.estimateGas[y](...f)).toNumber()}catch(t){console.log("hinkalDeposit: gas estimation error",{err:t})}const k=c&&c>=0?Math.ceil(c*12/10):void 0;w.gasLimit=k,await S.waitLittle();let p;try{p=await a[y](...f)}catch(t){if(!t?.transactionHash)throw t;const{provider:h}=a,m=await G.recoverTransactionFromError(h,t.transactionHash);if(!m)throw t;p=m}return p};exports.transactCallDirect=L;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { zeroAddress as
|
|
1
|
+
import { zeroAddress as x } from "../../../constants/protocol.constants.mjs";
|
|
2
2
|
import { ContractType as L } from "../../../types/ethereum-network.types.mjs";
|
|
3
3
|
import { waitLittle as S } from "../../utils/time.utils.mjs";
|
|
4
4
|
import { approveTokensToHinkal as k } from "./approveTokensToHinkal.mjs";
|
|
5
5
|
import { buildApproveAndTransactCalls as z } from "./constructBatchCall.mjs";
|
|
6
6
|
import { recoverTransactionFromError as M } from "./recoverTransactionFromError.mjs";
|
|
7
|
-
const
|
|
8
|
-
const a = Array.isArray(i) ? i : [i],
|
|
9
|
-
if (a.length !==
|
|
7
|
+
const K = async (s, r, i, d, e, g, v, B, H) => {
|
|
8
|
+
const a = Array.isArray(i) ? i : [i], o = Array.isArray(d) ? d : [d];
|
|
9
|
+
if (a.length !== o.length)
|
|
10
10
|
throw new Error("token and amount length mismatch");
|
|
11
|
-
const f =
|
|
12
|
-
if (E && await l.supportsBatchCall?.(
|
|
13
|
-
const t =
|
|
11
|
+
const f = s.getContractWithSigner(r, L.HinkalContract), b = await s.getEthereumAddressByChain(r), w = B ?? f, n = H ?? f, C = "transact", u = o.findIndex(({ erc20TokenAddress: t }) => t === x), E = o.some(({ erc20TokenAddress: t }) => t !== x), m = u === -1 ? 0n : a[u], l = s.getProviderAdapter(r);
|
|
12
|
+
if (E && await l.supportsBatchCall?.(r) && l.sendBatchCallsTransaction) {
|
|
13
|
+
const t = o.map((G) => G.erc20TokenAddress), h = z(
|
|
14
14
|
t,
|
|
15
15
|
a,
|
|
16
16
|
w.address,
|
|
@@ -20,31 +20,31 @@ const J = async (o, s, i, d, e, g, v, B, H) => {
|
|
|
20
20
|
g,
|
|
21
21
|
m
|
|
22
22
|
);
|
|
23
|
-
return await l.sendBatchCallsTransaction(
|
|
23
|
+
return await l.sendBatchCallsTransaction(r, h);
|
|
24
24
|
}
|
|
25
|
-
await k(
|
|
26
|
-
const
|
|
25
|
+
await k(s, r, w, o, a);
|
|
26
|
+
const y = {
|
|
27
27
|
value: m > 0n ? BigInt(m).toString() : void 0
|
|
28
28
|
};
|
|
29
29
|
let c;
|
|
30
|
-
const
|
|
30
|
+
const T = [
|
|
31
31
|
e[0],
|
|
32
32
|
e[1],
|
|
33
33
|
e[2],
|
|
34
34
|
v,
|
|
35
35
|
g,
|
|
36
|
-
{ ...
|
|
36
|
+
{ ...y, from: b }
|
|
37
37
|
];
|
|
38
38
|
try {
|
|
39
|
-
c = (await n.estimateGas[
|
|
39
|
+
c = (await n.estimateGas[C](...T)).toNumber();
|
|
40
40
|
} catch (t) {
|
|
41
41
|
console.log("hinkalDeposit: gas estimation error", { err: t });
|
|
42
42
|
}
|
|
43
43
|
const F = c && c >= 0 ? Math.ceil(c * 12 / 10) : void 0;
|
|
44
|
-
|
|
44
|
+
y.gasLimit = F, await S();
|
|
45
45
|
let p;
|
|
46
46
|
try {
|
|
47
|
-
p = await n[
|
|
47
|
+
p = await n[C](...T);
|
|
48
48
|
} catch (t) {
|
|
49
49
|
if (!t?.transactionHash)
|
|
50
50
|
throw t;
|
|
@@ -56,5 +56,5 @@ const J = async (o, s, i, d, e, g, v, B, H) => {
|
|
|
56
56
|
return p;
|
|
57
57
|
};
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
K as transactCallDirect
|
|
60
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../../error-handling/error-codes.constants.cjs");require("ethers");const y=require("../../../error-handling/customErrors/ErrorWithTx.cjs");require("../../../types/circom-data.types.cjs");require("../../../types/transactions.types.cjs");require("../../../types/activities.types.cjs");require("../../../constants/vite.constants.cjs");const u=require("../../../API/callRelayer.cjs");require("../../../constants/chains.constants.cjs");require("circomlibjs-hinkal-fork");require("../../../data-structures/crypto-keys/keys.cjs");const l=require("../../snarkjs/common.snarkjs.cjs");require("node-forge");require("libsodium-wrappers");const R=require("../../../data-structures/http/HttpClient.cjs");require("axios");require("../../../constants/token-data/index.cjs");require("idb-keyval");require("@solana/web3.js");require("../../utils/convertIntegrationProviderToExternalActionId.cjs");const C=require("../../../constants/server.constants.cjs"),w=require("../../../API/getServerURL.cjs");require("@coral-xyz/anchor");require("@solana/spl-token");require("../../../constants/contracts.constants.cjs");require("../../../constants/kyc.constants.cjs");require("../../../constants/coingecko.constants.cjs");require("../../../constants/reorg-depths.constants.cjs");require("../../../constants/addresses.constants.cjs");require("../../../constants/token.limits.constants.cjs");require("../../../constants/presale.constants.cjs");require("../../../constants/activity.constants.cjs");require("../../../constants/tasks.constants.cjs");require("../../../constants/events.constants.cjs");require("../../utils/userAgent.cjs");require("multiformats");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../../error-handling/error-codes.constants.cjs");require("ethers");const y=require("../../../error-handling/customErrors/ErrorWithTx.cjs");require("../../../types/circom-data.types.cjs");require("../../../types/transactions.types.cjs");require("../../../types/activities.types.cjs");require("../../../constants/vite.constants.cjs");const u=require("../../../API/callRelayer.cjs");require("../../../constants/chains.constants.cjs");require("circomlibjs-hinkal-fork");require("../../../data-structures/crypto-keys/keys.cjs");const l=require("../../snarkjs/common.snarkjs.cjs");require("node-forge");require("libsodium-wrappers");const R=require("../../../data-structures/http/HttpClient.cjs");require("axios");require("../../../constants/token-data/index.cjs");require("idb-keyval");require("@solana/web3.js");require("../../utils/convertIntegrationProviderToExternalActionId.cjs");const C=require("../../../constants/server.constants.cjs"),w=require("../../../API/getServerURL.cjs");require("@coral-xyz/anchor");require("@solana/spl-token");require("ethers-v6h");require("tweetnacl");require("bs58");require("buffer");require("../../../constants/contracts.constants.cjs");require("../../../constants/kyc.constants.cjs");require("../../../constants/coingecko.constants.cjs");require("../../../constants/reorg-depths.constants.cjs");require("../../../constants/addresses.constants.cjs");require("../../../constants/token.limits.constants.cjs");require("../../../constants/presale.constants.cjs");require("../../../constants/activity.constants.cjs");require("../../../constants/tasks.constants.cjs");require("../../../constants/events.constants.cjs");require("../../utils/userAgent.cjs");require("multiformats");require("../../../API/enclaveCalls.cjs");require("async-mutex");require("process");require("../../../providers/EthersProviderAdapter.cjs");const q=r=>{if(r.status==="success")return r.message;throw r.message&&r.error?new y.ErrorWithRelayerTransaction(r.error,r.message):new Error(r.error)},D=async(r,a,t,i,c,s,o,e)=>{const n=l.serializeCircomData(i),h=await u.callRelayerTransactAPI({chainId:r,a:a[0],b:a[1],c:a[2],dimData:t,circomData:n,withPrivateMempool:c,withUniswapWorkAround:s,authorizationData:o,adminData:e});return q(h)},T=async r=>{const a=await R.httpClient.post(`${w.RELAYER_URL}${C.RELAYER_CONFIG.SOLANA_TRANSACT}`,r);return q(a)},m=r=>{if(r.status==="success")return r.message.scheduleId;throw new Error(r.error||"Batch transaction failed")},d=async(r,a,t,i)=>{const c=a.map(e=>l.serializeCircomData(e.circomData)),s={chainId:r,transactions:a.map((e,n)=>({chainId:r,a:e.zkCallData[0],b:e.zkCallData[1],c:e.zkCallData[2],dimData:e.dimData,circomData:c[n],withPrivateMempool:e.withPrivateMempool,withUniswapWorkAround:e.withUniswapWorkAround,authorizationData:e.authorizationData,adminData:e.adminData})),txCompletionTime:i,hashedEthereumAddress:t},o=await u.callRelayerTransactBatchAPI(s);return m(o)},A=async(r,a,t,i)=>{const c={chainId:r,transactions:a,hashedEthereumAddress:t,txCompletionTime:i},s=await u.callRelayerSolanaTransactBatchAPI(c);return m(s)};exports.solanaTransactCallRelayer=T;exports.solanaTransactCallRelayerBatch=A;exports.transactCallRelayer=D;exports.transactCallRelayerBatch=d;
|