const e=require(`../utils/amounts.utils.cjs`),t=require(`../../error-handling/error-codes.constants.cjs`),n=require(`../../data-structures/utxo/Utxo.cjs`);var r=(r,i,a,o,s,c=!0,l,u)=>{let d=e.countTotalAmountInUtxos(i),{erc20TokenAddress:f,mintAddress:p}=i[0];if(c&&a<0n&&d+a<0n)throw Error(t.transactionErrorCodes.INSUFFICIENT_FUNDS_TO_TRANSACT);let m=[new n.Utxo({amount:e.bigintMax(d+a,0n),erc20TokenAddress:f,mintAddress:p,shieldedPrivateKey:r.getShieldedPrivateKey(),timeStamp:o,tokenId:s})];if(l!==void 0&&u!==void 0){let[e,t,r]=l.split(`,`);m.push(new n.Utxo({amount:u,erc20TokenAddress:f,randomization:BigInt(e),stealthAddress:t,encryptionKey:r,timeStamp:o}))}return{outputUtxos:m}};exports.outputUtxoProcessing=r;