import { fromHex, toHex } from '@pezkuwi/papi-utils';
import { createCodec, Bytes } from 'scale-ts';

const enc$1 = (nBytes) => {
  const _enc = Bytes.enc(nBytes);
  return (value) => _enc(fromHex(value));
};
const dec$1 = (nBytes) => {
  const _dec = Bytes.dec(nBytes);
  return (value) => toHex(_dec(value));
};
const Hex = (nBytes) => createCodec(enc$1(nBytes), dec$1(nBytes));
Hex.enc = enc$1;
Hex.dec = dec$1;

export { Hex };
//# sourceMappingURL=Hex.mjs.map
