import { blockHeader } from '@polkadot-api/substrate-bindings';
import { getCallData, unsignedExtrinsic } from '../codecs.js';
import { runtimeBlockHeader } from './slot-utils.js';

const paraInherentEnterInherent = async (_chain, parentBlock) => {
  const parent_header = runtimeBlockHeader.dec(
    blockHeader.enc(parentBlock.header)
  );
  const callData = await getCallData(parentBlock, "ParaInherent", "enter", {
    data: {
      bitfields: [],
      backed_candidates: [],
      disputes: [],
      parent_header
    }
  });
  return callData ? unsignedExtrinsic(callData) : null;
};

export { paraInherentEnterInherent };
//# sourceMappingURL=para-enter.js.map
