@staticmethod
def verify_bitcoin(message, signature, address):
    ' Verifies a message signed using PrivateKey.sign_bitcoin()\n        or any of the bitcoin utils (e.g. bitcoin-cli, bx, etc.)\n\n        Args:\n            message(bytes): The message that the signature corresponds to.\n            signature (bytes or str): A Base64 encoded signature\n            address (str): Base58Check encoded address.\n\n        Returns:\n            bool: True if the signature verified properly, False otherwise.\n        '
    magic_sig = base64.b64decode(signature)
    magic = magic_sig[0]
    sig = Signature.from_bytes(magic_sig[1:])
    sig.recovery_id = ((magic - 27) & 3)
    compressed = (((magic - 27) & 4) != 0)
    msg = ((b'\x18Bitcoin Signed Message:\n' + bytes([len(message)])) + message)
    msg_hash = hashlib.sha256(msg).digest()
    derived_public_key = PublicKey.from_signature(msg_hash, sig)
    if (derived_public_key is None):
        raise ValueError('Could not recover public key from the provided signature.')
    n = base58.b58decode_check(address)
    version = n[0]
    h160 = n[1:]
    hash160 = derived_public_key.hash160(compressed)
    if (hash160 != h160):
        return False
    return derived_public_key.verify(msg_hash, sig)
Verifies a message signed using PrivateKey.sign_bitcoin()
or any of the bitcoin utils (e.g. bitcoin-cli, bx, etc.)

Args:
    message(bytes): The message that the signature corresponds to.
    signature (bytes or str): A Base64 encoded signature
    address (str): Base58Check encoded address.

Returns:
    bool: True if the signature verified properly, False otherwise.
@staticmethod
def verify_bitcoin(message, signature, address):
    ' Verifies a message signed using PrivateKey.sign_bitcoin()\n        or any of the bitcoin utils (e.g. bitcoin-cli, bx, etc.)\n\n        Args:\n            message(bytes): The message that the signature corresponds to.\n            signature (bytes or str): A Base64 encoded signature\n            address (str): Base58Check encoded address.\n\n        Returns:\n            bool: True if the signature verified properly, False otherwise.\n        '
    magic_sig = base64.b64decode(signature)
    magic = magic_sig[0]
    sig = Signature.from_bytes(magic_sig[1:])
    sig.recovery_id = ((magic - 27) & 3)
    compressed = (((magic - 27) & 4) != 0)
    msg = ((b'\x18Bitcoin Signed Message:\n' + bytes([len(message)])) + message)
    msg_hash = hashlib.sha256(msg).digest()
    derived_public_key = PublicKey.from_signature(msg_hash, sig)
    if (derived_public_key is None):
        raise ValueError('Could not recover public key from the provided signature.')
    n = base58.b58decode_check(address)
    version = n[0]
    h160 = n[1:]
    hash160 = derived_public_key.hash160(compressed)
    if (hash160 != h160):
        return False
    return derived_public_key.verify(msg_hash, sig)