import { isSolanaLike as e } from "../../constants/chains.constants.mjs";
import { validateAndGetChainId as t } from "../../functions/utils/token-check.utils.mjs";
import { getStealthAddressStructureFromUserKeys as n } from "../../functions/utils/getRecipientInfoFromUserKeys.mjs";
import { submitSolanaProoflessDeposit as r } from "./hinkalSolanaDeposit.mjs";
//#region libs/shared/common/src/data-structures/Hinkal/hinkalSolanaProoflessDeposit.ts
var i = async (i, a, o, s, c, l = !1) => {
	if (a.length === 0) throw Error("erc20Tokens must not be empty");
	if (a.length !== o.length) throw Error("erc20Tokens and amountChanges length mismatch");
	if (!e(t(a))) throw Error("hinkalSolanaProoflessDepositHash: non-Solana chain");
	let u = a[0];
	if (!a.every((e) => e.erc20TokenAddress === u.erc20TokenAddress)) throw Error("Solana prooflessDeposit supports one mint per transaction");
	if (s && s.length !== o.length) throw Error("Stealth address structures length mismatch");
	return r(i, u, o, s ?? o.map(() => n(i.userKeys)), c, l);
};
//#endregion
export { i as hinkalSolanaProoflessDeposit };
