@combomethod<EOL><INDENT>def recoverHash(self, message_hash, vrs=None, signature=None):<DEDENT>
hash_bytes = HexBytes(message_hash)<EOL>if len(hash_bytes) != <NUM_LIT:32>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if vrs is not None:<EOL><INDENT>v, r, s = map(hexstr_if_str(to_int), vrs)<EOL>v_standard = to_standard_v(v)<EOL>signature_obj = self._keys.Signature(vrs=(v_standard, r, s))<EOL><DEDENT>elif signature is not None:<EOL><INDENT>signature_bytes = HexBytes(signature)<EOL>signature_bytes_standard = to_standard_signature_bytes(signature_bytes)<EOL>signature_obj = self._keys.Signature(signature_bytes=signature_bytes_standard)<EOL><DEDENT>else:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>pubkey = signature_obj.recover_public_key_from_msg_hash(hash_bytes)<EOL>return pubkey.to_checksum_address()<EOL>
Get the address of the account that signed the message with the given hash.
You must specify exactly one of: vrs or signature

:param message_hash: the hash of the message that you want to verify
:type message_hash: hex str or bytes or int
:param vrs: the three pieces generated by an elliptic curve signature
:type vrs: tuple(v, r, s), each element is hex str, bytes or int
:param signature: signature bytes concatenated as r+s+v
:type signature: hex str or bytes or int
:returns: address of signer, hex-encoded & checksummed
:rtype: str

.. code-block:: python

    >>> msg = "I♥SF"
    >>> msghash = '0x1476abb745d423bf09273f1afd887d951181d25adc66c4834a70491911b7f750'
    >>> vrs = (
          28,
          '0xe6ca9bba58c88611fad66a6ce8f996908195593807c4b38bd528d2cff09d4eb3',
          '0x3e5bfbbf4d3e39b1a2fd816a7680c19ebebaf3a141b239934ad43cb33fcec8ce')
    >>> Account.recoverHash(msghash, vrs=vrs)
    '0x5ce9454909639D2D17A3F753ce7d93fa0b9aB12E'

    # All of these recover calls are equivalent:

    # variations on msghash
    >>> msghash = b"\\x14v\\xab\\xb7E\\xd4#\\xbf\\t'?\\x1a\\xfd\\x88}\\x95\\x11\\x81\\xd2Z\\xdcf\\xc4\\x83JpI\\x19\\x11\\xb7\\xf7P"  # noqa: E501
    >>> Account.recoverHash(msghash, vrs=vrs)
    >>> msghash = 0x1476abb745d423bf09273f1afd887d951181d25adc66c4834a70491911b7f750
    >>> Account.recoverHash(msghash, vrs=vrs)

    # variations on vrs
    >>> vrs = (
          '0x1c',
          '0xe6ca9bba58c88611fad66a6ce8f996908195593807c4b38bd528d2cff09d4eb3',
          '0x3e5bfbbf4d3e39b1a2fd816a7680c19ebebaf3a141b239934ad43cb33fcec8ce')
    >>> Account.recoverHash(msghash, vrs=vrs)
    >>> vrs = (
          b'\\x1c',
          b'\\xe6\\xca\\x9b\\xbaX\\xc8\\x86\\x11\\xfa\\xd6jl\\xe8\\xf9\\x96\\x90\\x81\\x95Y8\\x07\\xc4\\xb3\\x8b\\xd5(\\xd2\\xcf\\xf0\\x9dN\\xb3',  # noqa: E501
          b'>[\\xfb\\xbfM>9\\xb1\\xa2\\xfd\\x81jv\\x80\\xc1\\x9e\\xbe\\xba\\xf3\\xa1A\\xb29\\x93J\\xd4<\\xb3?\\xce\\xc8\\xce')  # noqa: E501
    >>> Account.recoverHash(msghash, vrs=vrs)
    >>> vrs = (
          0x1c,
          0xe6ca9bba58c88611fad66a6ce8f996908195593807c4b38bd528d2cff09d4eb3,
          0x3e5bfbbf4d3e39b1a2fd816a7680c19ebebaf3a141b239934ad43cb33fcec8ce)
    >>> Account.recoverHash(msghash, vrs=vrs)

    # variations on signature
    >>> signature = '0xe6ca9bba58c88611fad66a6ce8f996908195593807c4b38bd528d2cff09d4eb33e5bfbbf4d3e39b1a2fd816a7680c19ebebaf3a141b239934ad43cb33fcec8ce1c'  # noqa: E501
    >>> Account.recoverHash(msghash, signature=signature)
    >>> signature = b'\\xe6\\xca\\x9b\\xbaX\\xc8\\x86\\x11\\xfa\\xd6jl\\xe8\\xf9\\x96\\x90\\x81\\x95Y8\\x07\\xc4\\xb3\\x8b\\xd5(\\xd2\\xcf\\xf0\\x9dN\\xb3>[\\xfb\\xbfM>9\\xb1\\xa2\\xfd\\x81jv\\x80\\xc1\\x9e\\xbe\\xba\\xf3\\xa1A\\xb29\\x93J\\xd4<\\xb3?\\xce\\xc8\\xce\\x1c'  # noqa: E501
    >>> Account.recoverHash(msghash, signature=signature)
    >>> signature = 0xe6ca9bba58c88611fad66a6ce8f996908195593807c4b38bd528d2cff09d4eb33e5bfbbf4d3e39b1a2fd816a7680c19ebebaf3a141b239934ad43cb33fcec8ce1c  # noqa: E501
    >>> Account.recoverHash(msghash, signature=signature)