"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./unsignedTransaction-BwT180qj.js"),e=require("./address-DKM11kf_.js"),o=require("./web3-DgUW0FuE.js");class n extends Error{constructor(t){super(t)}}class u extends n{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}const i=e.struct([e.u32("mintAuthorityOption"),o.publicKey("mintAuthority"),o.u64("supply"),e.u8("decimals"),o.bool("isInitialized"),e.u32("freezeAuthorityOption"),o.publicKey("freezeAuthority")]);i.span;async function f(s,t,O=!1,c=r.TOKEN_PROGRAM_ID,A=r.ASSOCIATED_TOKEN_PROGRAM_ID){if(!O&&!e.PublicKey.isOnCurve(t.toBuffer()))throw new u;const[a]=await e.PublicKey.findProgramAddress([t.toBuffer(),c.toBuffer(),s.toBuffer()],A);return a}exports.ASSOCIATED_TOKEN_PROGRAM_ID=r.ASSOCIATED_TOKEN_PROGRAM_ID;exports.TOKEN_2022_PROGRAM_ID=r.TOKEN_2022_PROGRAM_ID;exports.TOKEN_PROGRAM_ID=r.TOKEN_PROGRAM_ID;exports.MintLayout=i;exports.TokenError=n;exports.TokenOwnerOffCurveError=u;exports.getAssociatedTokenAddress=f;
