import { ae as t, d as a } from "./address-CBux52Na.mjs";
const e = (r) => typeof r == "string" ? a.Buffer.from(r) : r;
function o(r, n) {
  return t.findProgramAddressSync(Array.isArray(r) ? r.map(e) : [e(r)], new t(n))[0];
}
function i(r, n) {
  return {
    pubkey: new t(r),
    isWritable: !0,
    isSigner: n
  };
}
function c(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 {
  c as a,
  o as d,
  s as g,
  i as n
};
