import{cE as c,cF as f,P as s,cG as t,cH as o,cI as O,cJ as d}from"../main.mjs";import{cK as _}from"../main.mjs";class p extends Error{constructor(r){super(r)}}class A extends p{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}const y=t.struct([t.u32("mintAuthorityOption"),o("mintAuthority"),O("supply"),t.u8("decimals"),d("isInitialized"),t.u32("freezeAuthorityOption"),o("freezeAuthority")]);y.span;async function l(e,r,u=!1,n=c,a=f){if(!u&&!s.isOnCurve(r.toBuffer()))throw new A;const[i]=await s.findProgramAddress([r.toBuffer(),n.toBuffer(),e.toBuffer()],a);return i}export{f as ASSOCIATED_TOKEN_PROGRAM_ID,y as MintLayout,_ as TOKEN_2022_PROGRAM_ID,c as TOKEN_PROGRAM_ID,p as TokenError,A as TokenOwnerOffCurveError,l as getAssociatedTokenAddress};
