import{T as c,A as f}from"./signer-7-tpWjBV.js";import{c as I}from"./signer-7-tpWjBV.js";import{P as e,cl as p,cm as s,cn as o,co as O,cp as m,cq as A}from"../main.js";import"./chain-DF9mIQM9.js";class d extends Error{constructor(r){super(r)}}class l extends d{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}const y=p([s("mintAuthorityOption"),o("mintAuthority"),O("supply"),m("decimals"),A("isInitialized"),s("freezeAuthorityOption"),o("freezeAuthority")]);y.span;async function h(t,r,n=!1,i=c,u=f){if(!n&&!e.isOnCurve(r.toBuffer()))throw new l;const[a]=await e.findProgramAddress([r.toBuffer(),i.toBuffer(),t.toBuffer()],u);return a}export{f as ASSOCIATED_TOKEN_PROGRAM_ID,y as MintLayout,I as TOKEN_2022_PROGRAM_ID,c as TOKEN_PROGRAM_ID,d as TokenError,l as TokenOwnerOffCurveError,h as getAssociatedTokenAddress};
