def solve(self, **kwargs):
        """
        The kwargs required depend upon the script type.
        hash160_lookup:
            dict-like structure that returns a secret exponent for a hash160
        sign_value:
            the integer value to sign (derived from the transaction hash)
        signature_type:
            usually SIGHASH_ALL (1)
        """
        # we need a hash160 => secret_exponent lookup
        db = kwargs.get("hash160_lookup")
        if db is None:
            raise SolvingError("missing hash160_lookup parameter")
        self.address()
        result = db.get(encoding.hash160(self.sec))
        if result is None:
            raise SolvingError(self.address() % "can't find secret exponent for %s")

        sign_value = kwargs.get("sign_value")
        signature_type = kwargs.get("signature_type")

        secret_exponent, public_pair, compressed = result

        solution = tools.bin_script([self._create_script_signature(
            secret_exponent, sign_value, signature_type)])
        return solution
dataset/ETHPy150Open richardkiss/pycoin/pycoin/tx/pay_to/ScriptPayToPublicKey.py/ScriptPayToPublicKey.solve/swapped operands of `%`