Add support for bitcoin::hash_types references and NonZeroU8