import { C as a } from "./platform-Cil_UtAQ.mjs";
import { P as t } from "./unsignedTransaction-DCDxTFq8.mjs";
const e = (r) => typeof r == "string" ? a.from(r) : r;
function i(r, n) {
  return t.findProgramAddressSync(Array.isArray(r) ? r.map(e) : [e(r)], new t(n))[0];
}
function c(r, n) {
  return {
    pubkey: new t(r),
    isWritable: !0,
    isSigner: n
  };
}
function f(r, n) {
  return {
    pubkey: new t(r),
    isWritable: !1,
    isSigner: n
  };
}
function s(r) {
  if (r === null)
    throw Error("account info is null");
  return r.data;
}
export {
  f as a,
  i as d,
  s as g,
  c as n
};
