const e=require(`../AccountActions/AccountActions.cjs`);require(`../AccountActions/index.cjs`);var t=async(t,n,r,i)=>{let a,o=e.AccountActions.getPrivateKeyFromSubAccount(t,i);if(!o)throw Error(`Private key is not available`);if(r)a=await e.AccountActions.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.AccountActions.signMessageFromPrivateKey(t,o,n)}return a};exports.hinkalSignSubAccount=t;