import { AccountActions as e } from "../AccountActions/AccountActions.mjs";
import "../AccountActions/index.mjs";
//#region libs/shared/common/src/data-structures/Hinkal/hinkalSignSubAccount.ts
var t = async (t, n, r, i) => {
	let a, o = e.getPrivateKeyFromSubAccount(t, i);
	if (!o) throw Error("Private key is not available");
	if (r) a = await e.signTypedDataFromPrivateKey(t, o, r.domain, r.types, r.value);
	else {
		if (!n) throw Error("dataHash must be provided if typedData is not provided");
		a = await e.signMessageFromPrivateKey(t, o, n);
	}
	return a;
};
//#endregion
export { t as hinkalSignSubAccount };
