import { calculateTotalFee as e } from "../../functions/utils/fees.utils.mjs";
import { buildOrderIdMemoInstruction as t } from "../../functions/utils/solana-memo.mjs";
import { buildMultiPaymentDepositBuilder as n, buildMultiPaymentDepositSetup as r } from "./hinkalSolanaDepositAndWithdraw.mjs";
import { TransactionMessage as i, VersionedTransaction as a } from "@solana/web3.js";
//#region libs/shared/common/src/data-structures/Hinkal/hinkalPalSolanaDepositPrepare.ts
var o = async (o, s, c, l, u, d) => {
	let f = l.map((t) => t + e(t, u)), p = r(o, s, c, f), m = await n(p).instruction(), h = t(d), { blockhash: g } = await p.program.provider.connection.getLatestBlockhash();
	return {
		unsignedTx: new a(new i({
			payerKey: p.publicKey,
			recentBlockhash: g,
			instructions: [m, h]
		}).compileToV0Message()),
		utxoAmounts: f
	};
};
//#endregion
export { o as hinkalPalSolanaDepositPrepare };
