import { aw as b, cU as f, d as y, cV as l, av as p, af as L } from "./address-CrYNZ_Nj.mjs";
const a = (o) => {
  const t = o.decode.bind(o), r = o.encode.bind(o);
  return { decode: t, encode: r };
}, m = (o) => (t) => {
  const r = b(o, t), { encode: u, decode: s } = a(r), e = r;
  return e.decode = (c, n) => {
    const d = s(c, n);
    return f(y.Buffer.from(d));
  }, e.encode = (c, n, d) => {
    const i = l(c, o);
    return u(i, n, d);
  }, e;
}, I = m(8), K = (o) => {
  const t = p(o), { encode: r, decode: u } = a(t), s = t;
  return s.decode = (e, c) => !!u(e, c), s.encode = (e, c, n) => {
    const d = Number(e);
    return r(d, c, n);
  }, s;
}, g = (o) => {
  const t = b(32, o), { encode: r, decode: u } = a(t), s = t;
  return s.decode = (e, c) => {
    const n = u(e, c);
    return new L(n);
  }, s.encode = (e, c, n) => {
    const d = e.toBuffer();
    return r(d, c, n);
  }, s;
};
export {
  K as b,
  g as p,
  I as u
};
