import { VersionedTransaction as e } from "@solana/web3.js";
//#region libs/shared/common/src/functions/web3/signAndSendSerializedTransaction.ts
var t = async (t, n, r, i) => {
	let a = Buffer.from(n, "base64"), o = e.deserialize(a), { wallet: s, connection: c } = t;
	if (!s) throw Error("missing solana wallet");
	let l = await s.signTransaction(o), u = await c.sendTransaction(l);
	return await c.confirmTransaction({
		signature: u,
		blockhash: r,
		lastValidBlockHeight: i
	}, "confirmed"), u;
};
//#endregion
export { t as signAndSendSerializedTransaction };
