src/types/hexadecimal.js
function Hash (validator, serializer, factory) {
  const size = HASH_LENGTH
  const name = 'Hash'

  validator = validator.bind(null, name, size)
  serializer = serializer(validator)

  const hasher = function (value) {
    return validator(value) && value
  }

  return Object.defineProperty(factory(serializer, size, name),
    'hash',
    {
      value: hasher
    })
}
function Hash (validator, serializer, factory) {
  const size = HASH_LENGTH
  const name = 'Hash'

  validator = validator.bind(null, name, size)
  serializer = serializer(validator)

  const hasher = function (value) {
    return validator(value) && value
  }

  return Object.defineProperty(factory(serializer, size, name),
    'hash',
    {
      value: hasher
    })
}
function Hash ( validator , serializer , factory ) { const size = HASH_LENGTH const name = 'Hash' validator = validator . bind ( null , name , size ) serializer = serializer ( validator ) const hasher = function ( value ) { return validator ( value ) && value } return Object . defineProperty ( factory ( serializer , size , name ) , 'hash' , { value : hasher } ) }
Hash type factory

@param {function(name, size, value)} validator hexadecimal validator
@param {function(validator, value, buffer, from)} encoder function accepting validator, value, buffer, position and returns modified buffer
@param {function(serizalizer, size, name)} factory type builder factory
@returns {Object} hex type
@private
Hash type factory