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