Generic logic of header package from celestia-node has to be extracted into separate repository (https://github.com/celestiaorg/go-header/). Current progress is visible in a draft PR: https://github.com/celestiaorg/celestia-node/pull/1304