import { P as s, S as d, T as g } from "./unsignedTransaction-DCDxTFq8.mjs";
import { C as m } from "./platform-Cil_UtAQ.mjs";
import { T as r, A as p } from "./mint-CoNdQTGM.mjs";
var t;
(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";
})(t || (t = {}));
function h(e, i, l) {
  if (l.length) {
    e.push({ pubkey: i, isSigner: !1, isWritable: !1 });
    for (const a of l)
      e.push({
        pubkey: a instanceof s ? a : a.publicKey,
        isSigner: !0,
        isWritable: !1
      });
  } else
    e.push({ pubkey: i, isSigner: !0, isWritable: !1 });
  return e;
}
function x(e, i, l, a, f = r, A = p) {
  return b(e, i, l, a, m.alloc(0), f, A);
}
function y(e, i, l, a, f = r, A = p) {
  return b(e, i, l, a, m.from([1]), f, A);
}
function b(e, i, l, a, f, A = r, z = p) {
  const M = [
    { pubkey: e, isSigner: !0, isWritable: !0 },
    { pubkey: i, isSigner: !1, isWritable: !0 },
    { pubkey: l, isSigner: !1, isWritable: !1 },
    { pubkey: a, isSigner: !1, isWritable: !1 },
    { pubkey: d.programId, isSigner: !1, isWritable: !1 },
    { pubkey: A, isSigner: !1, isWritable: !1 }
  ];
  return new g({
    keys: M,
    programId: z,
    data: f
  });
}
export {
  t as T,
  h as a,
  x as b,
  y as c
};
