import struct


def header_deserialize(raw_header):
	"""Deserialize raw bytes to header data"""
	return {
		'version': struct.unpack("<L", raw_header[:4])[0],
		'prev_block': raw_header[4:36][::-1].hex(),
		'merkle_root': raw_header[36:68][::-1].hex(),
		'timestamp': struct.unpack("<L", raw_header[68:72])[0],
		'bits': struct.unpack("<L", raw_header[72:76])[0],
		'nonce': struct.unpack("<L", raw_header[76:80])[0],
		'miner_pubkey': raw_header[80:113][::-1].hex()
	}