|
|
|
@ -66,7 +66,7 @@ def generate_proof(
|
|
|
|
|
def verify_nonownership(
|
|
|
|
|
proof: bytes,
|
|
|
|
|
script_pubkey: bytes,
|
|
|
|
|
commitment_data: bytes,
|
|
|
|
|
commitment_data: Optional[bytes],
|
|
|
|
|
keychain: Keychain,
|
|
|
|
|
coin: CoinInfo,
|
|
|
|
|
) -> bool:
|
|
|
|
@ -92,7 +92,8 @@ def verify_nonownership(
|
|
|
|
|
proof_body = proof[: r.offset]
|
|
|
|
|
sighash = hashlib.sha256(proof_body)
|
|
|
|
|
sighash.update(script_pubkey)
|
|
|
|
|
sighash.update(commitment_data)
|
|
|
|
|
if commitment_data:
|
|
|
|
|
sighash.update(commitment_data)
|
|
|
|
|
script_sig, witness = read_bip322_signature_proof(r)
|
|
|
|
|
|
|
|
|
|
# We don't call verifier.ensure_hash_type() to avoid possible compatibility
|
|
|
|
|