"use strict";const r=require("./unsignedTransaction-DA4tlY5u.js"),d=require("./platform-CCG_jgOO.js"),A=require("./mint-CxQ6P5lT.js");exports.TokenInstruction=void 0;(function(e){e[e.InitializeMint=0]="InitializeMint",e[e.InitializeAccount=1]="InitializeAccount",e[e.InitializeMultisig=2]="InitializeMultisig",e[e.Transfer=3]="Transfer",e[e.Approve=4]="Approve",e[e.Revoke=5]="Revoke",e[e.SetAuthority=6]="SetAuthority",e[e.MintTo=7]="MintTo",e[e.Burn=8]="Burn",e[e.CloseAccount=9]="CloseAccount",e[e.FreezeAccount=10]="FreezeAccount",e[e.ThawAccount=11]="ThawAccount",e[e.TransferChecked=12]="TransferChecked",e[e.ApproveChecked=13]="ApproveChecked",e[e.MintToChecked=14]="MintToChecked",e[e.BurnChecked=15]="BurnChecked",e[e.InitializeAccount2=16]="InitializeAccount2",e[e.SyncNative=17]="SyncNative",e[e.InitializeAccount3=18]="InitializeAccount3",e[e.InitializeMultisig2=19]="InitializeMultisig2",e[e.InitializeMint2=20]="InitializeMint2",e[e.GetAccountDataSize=21]="GetAccountDataSize",e[e.InitializeImmutableOwner=22]="InitializeImmutableOwner",e[e.AmountToUiAmount=23]="AmountToUiAmount",e[e.UiAmountToAmount=24]="UiAmountToAmount",e[e.InitializeMintCloseAuthority=25]="InitializeMintCloseAuthority",e[e.TransferFeeExtension=26]="TransferFeeExtension",e[e.ConfidentialTransferExtension=27]="ConfidentialTransferExtension",e[e.DefaultAccountStateExtension=28]="DefaultAccountStateExtension",e[e.Reallocate=29]="Reallocate",e[e.MemoTransferExtension=30]="MemoTransferExtension",e[e.CreateNativeMint=31]="CreateNativeMint",e[e.InitializeNonTransferableMint=32]="InitializeNonTransferableMint",e[e.InterestBearingMintExtension=33]="InterestBearingMintExtension",e[e.CpiGuardExtension=34]="CpiGuardExtension",e[e.InitializePermanentDelegate=35]="InitializePermanentDelegate",e[e.TransferHookExtension=36]="TransferHookExtension",e[e.MetadataPointerExtension=39]="MetadataPointerExtension"})(exports.TokenInstruction||(exports.TokenInstruction={}));function z(e,a,l){if(l.length){e.push({pubkey:a,isSigner:!1,isWritable:!1});for(const i of l)e.push({pubkey:i instanceof r.PublicKey?i:i.publicKey,isSigner:!0,isWritable:!1})}else e.push({pubkey:a,isSigner:!0,isWritable:!1});return e}function b(e,a,l,i,t=A.TOKEN_PROGRAM_ID,f=A.ASSOCIATED_TOKEN_PROGRAM_ID){return s(e,a,l,i,d.Buffer.alloc(0),t,f)}function E(e,a,l,i,t=A.TOKEN_PROGRAM_ID,f=A.ASSOCIATED_TOKEN_PROGRAM_ID){return s(e,a,l,i,d.Buffer.from([1]),t,f)}function s(e,a,l,i,t,f=A.TOKEN_PROGRAM_ID,M=A.ASSOCIATED_TOKEN_PROGRAM_ID){const p=[{pubkey:e,isSigner:!0,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:l,isSigner:!1,isWritable:!1},{pubkey:i,isSigner:!1,isWritable:!1},{pubkey:r.SystemProgram.programId,isSigner:!1,isWritable:!1},{pubkey:f,isSigner:!1,isWritable:!1}];return new r.TransactionInstruction({keys:p,programId:M,data:t})}exports.addSigners=z;exports.createAssociatedTokenAccountIdempotentInstruction=E;exports.createAssociatedTokenAccountInstruction=b;
