import{b5 as f,b6 as c,P as s,b7 as O,b8 as t,b9 as o,ba as b,bb as d,bc as A}from"../main.js";import{bd 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=O([t("mintAuthorityOption"),o("mintAuthority"),b("supply"),d("decimals"),A("isInitialized"),t("freezeAuthorityOption"),o("freezeAuthority")]);m.span;async function E(e,r,n=!1,a=f,u=c){if(!n&&!s.isOnCurve(r.toBuffer()))throw new l;const[i]=await s.findProgramAddress([r.toBuffer(),a.toBuffer(),e.toBuffer()],u);return i}export{c as ASSOCIATED_TOKEN_PROGRAM_ID,m as MintLayout,h as TOKEN_2022_PROGRAM_ID,f as TOKEN_PROGRAM_ID,p as TokenError,l as TokenOwnerOffCurveError,E as getAssociatedTokenAddress};
