Add hex encoding-transfer
Minor refactor with type hints