require(`../../constants/protocol.constants.cjs`);const e=require(`./solana.cjs`),t=require(`./sendV0Transaction.cjs`);var n=async(n,r,i,a,o,s,c,l,u,d)=>{let f=e.getEncryptedOutputsAccountPublicKey(r.programId,a,i.publicKey,o),p=s.length;await Promise.all(s.map(async(e,s)=>t.sendV0Transaction(n,[await r.methods.storeEncryptedOutputs(Number(o),Buffer.from(e),s,p).accounts({originalDeployer:a,signer:i.publicKey,encryptedOutputsAccount:f}).instruction()],i,[i])));let m=e.getProofAccountPart1PublicKey(r.programId,a,i.publicKey,o);await t.sendV0Transaction(n,[await r.methods.storeProofPart1(Number(o),c,l,u,d.slice(0,15)).accounts({originalDeployer:a,signer:i.publicKey,proofAccountPart1:m}).instruction()],i,[i]);let h=e.getProofAccountPart2PublicKey(r.programId,a,i.publicKey,o);return await t.sendV0Transaction(n,[await r.methods.storeProofPart2(Number(o),d.slice(15)).accounts({originalDeployer:a,signer:i.publicKey,proofAccountPart2:h}).instruction()],i,[i]),{proofAccountPart1:m,proofAccountPart2:h,encryptedOutputsAccount:f}};exports.storeProof=n;