import{P as t,f as s}from"./errors-Dd6zfYtp.mjs";import{a5 as i,a6 as a}from"./paths-BH8W4zMc.mjs";class e{async init(){if(!this.api)throw new t("Auth flow has no API instance");let{nonce:s,expires_at:a}=await this.api.post(i,{});return{nonce:s,expiresAt:a}}async authenticate(){if(!this.message||!this.signature||!this.fid)throw new t("Auth flow has no message, signature, or fid");if(!this.api)throw new t("Auth flow has no API instance");try{let s=await this.api.post(a,{message:this.message,signature:this.signature,fid:this.fid});if(!s)throw new t("No response from authentication");return s}catch(t){throw s(t)}}async link(){throw Error("Not implemented")}setAuthData({message:t,signature:s,fid:i}){this.message=t,this.signature=s,this.fid=i}constructor(){this.meta={}}}export{e as F};
//# sourceMappingURL=frame-DtizlaLu.mjs.map
