import{bQ as f,bR as c,P as s,bS as O,bT as t,bU as o,bV as b,bW as d,bX as A}from"../main.js";import{bY as R}from"../main.js";class p extends Error{constructor(r){super(r)}}class l extends p{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}const m=O([t("mintAuthorityOption"),o("mintAuthority"),b("supply"),d("decimals"),A("isInitialized"),t("freezeAuthorityOption"),o("freezeAuthority")]);m.span;async function T(e,r,n=!1,u=f,a=c){if(!n&&!s.isOnCurve(r.toBuffer()))throw new l;const[i]=await s.findProgramAddress([r.toBuffer(),u.toBuffer(),e.toBuffer()],a);return i}export{c as ASSOCIATED_TOKEN_PROGRAM_ID,m as MintLayout,R as TOKEN_2022_PROGRAM_ID,f as TOKEN_PROGRAM_ID,p as TokenError,l as TokenOwnerOffCurveError,T as getAssociatedTokenAddress};
