import{bt as f,bu as e,bv as s,bw as c,bx as O,by as A,P as o,bz as b,bA as d}from"../main.js";import{bB as h}from"../main.js";class p extends Error{constructor(r){super(r)}}class y extends p{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}const l=f([e("mintAuthorityOption"),s("mintAuthority"),c("supply"),O("decimals"),A("isInitialized"),e("freezeAuthorityOption"),s("freezeAuthority")]);l.span;async function E(t,r,n=!1,u=b,a=d){if(!n&&!o.isOnCurve(r.toBuffer()))throw new y;const[i]=await o.findProgramAddress([r.toBuffer(),u.toBuffer(),t.toBuffer()],a);return i}export{d as ASSOCIATED_TOKEN_PROGRAM_ID,l as MintLayout,h as TOKEN_2022_PROGRAM_ID,b as TOKEN_PROGRAM_ID,p as TokenError,y as TokenOwnerOffCurveError,E as getAssociatedTokenAddress};
