mirror of
https://github.com/aljazceru/nutshell.git
synced 2026-01-06 02:14:21 +01:00
extend and refactor nut11 sig_all message aggregation (#804)
This commit is contained in:
@@ -9,7 +9,7 @@ from ..core.errors import (
|
||||
TransactionError,
|
||||
)
|
||||
from ..core.htlc import HTLCSecret
|
||||
from ..core.nuts.nut14 import verify_htlc_spending_conditions
|
||||
from ..core.nuts import nut11, nut14
|
||||
from ..core.p2pk import (
|
||||
P2PKSecret,
|
||||
SigFlags,
|
||||
@@ -163,7 +163,7 @@ class LedgerSpendingConditions:
|
||||
# HTLC
|
||||
if SecretKind(secret.kind) == SecretKind.HTLC:
|
||||
htlc_secret = HTLCSecret.from_secret(secret)
|
||||
verify_htlc_spending_conditions(proof)
|
||||
nut14.verify_htlc_spending_conditions(proof)
|
||||
return self._verify_p2pk_sig_inputs(proof, htlc_secret)
|
||||
|
||||
# no spending condition present
|
||||
@@ -285,8 +285,8 @@ class LedgerSpendingConditions:
|
||||
if not pubkeys:
|
||||
return True
|
||||
|
||||
message_to_sign = message_to_sign or "".join(
|
||||
[p.secret for p in proofs] + [o.B_ for o in outputs]
|
||||
message_to_sign = message_to_sign or nut11.sigall_message_to_sign(
|
||||
proofs, outputs
|
||||
)
|
||||
|
||||
# validation
|
||||
|
||||
Reference in New Issue
Block a user