import{T as c,A as f}from"./signer-BRan8q4C.js";import{c as k}from"./signer-BRan8q4C.js";import{P as e,ck as p,cl as s,cm as o,cn as O,co as m,cp as A}from"../main.js";import"./chain-Du7paeNG.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,k as TOKEN_2022_PROGRAM_ID,c as TOKEN_PROGRAM_ID,d as TokenError,l as TokenOwnerOffCurveError,h as getAssociatedTokenAddress};
