import{b1 as f,b2 as s,b3 as t,b4 as c,b5 as O,b6 as b,P as o,b7 as d,b8 as A}from"../main.js";import{b9 as h}from"../main.js";class p extends Error{constructor(r){super(r)}}class l extends p{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}const m=f([s("mintAuthorityOption"),t("mintAuthority"),c("supply"),O("decimals"),b("isInitialized"),s("freezeAuthorityOption"),t("freezeAuthority")]);m.span;async function E(e,r,n=!1,u=d,a=A){if(!n&&!o.isOnCurve(r.toBuffer()))throw new l;const[i]=await o.findProgramAddress([r.toBuffer(),u.toBuffer(),e.toBuffer()],a);return i}export{A as ASSOCIATED_TOKEN_PROGRAM_ID,m as MintLayout,h as TOKEN_2022_PROGRAM_ID,d as TOKEN_PROGRAM_ID,p as TokenError,l as TokenOwnerOffCurveError,E as getAssociatedTokenAddress};
