const e=require(`../../../../_virtual/_rolldown/runtime.cjs`);require(`./keys.cjs`),require(`../utxo/Utxo.cjs`);let t=require(`ethers`),n=require(`@solana/web3.js`),r=require(`libsodium-wrappers`);r=e.__toESM(r);var i=e=>e.startsWith(`0x`)?e:`0x${e}`,a=e=>{let a=[Buffer.from(t.ethers.toBeHex(e.amount)),Buffer.from(i(e.erc20TokenAddress)),Buffer.from(t.ethers.toBeHex(e.randomization)),Buffer.from(i(e.getStealthAddress())),Buffer.from(t.ethers.toBeHex(BigInt(e.timeStamp))),Buffer.from(t.ethers.toBeHex(BigInt(e.tokenId??0)))];if(e.mintAddress){let r=new n.PublicKey(e.mintAddress),i=t.ethers.hexlify(r.toBytes());a.push(Buffer.from(i))}let o=Buffer.concat(a);return r.default.crypto_box_seal(o,t.ethers.getBytes(e.getEncryptionKey()))};exports.encryptUtxo=a;