mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-24 03:54:21 +01:00
SIG_ALL signature flag for P2PK (#735)
* n_sigs_refund working, tests added * update requirements * wip sigall * wip * sigall works * add signatures for refund * add mint p2pk tests * add more p2pk tests * fix tests * sign htlc pubkeys as well * fix htlc and add new test * fix regtest * fix new tests with deprecated * remove asserts * comments * new wallet p2pk tests * getting there * add more tests * fixes * refactor htlc and p2pk validation * reduce code * melt with sigall * fix htlcs * fix deprecated api tests * Update cashu/mint/conditions.py Co-authored-by: lollerfirst <43107113+lollerfirst@users.noreply.github.com> * refactor sigall validation --------- Co-authored-by: lollerfirst <43107113+lollerfirst@users.noreply.github.com>
This commit is contained in:
@@ -987,6 +987,12 @@ class Ledger(LedgerVerification, LedgerSpendingConditions, LedgerTasks, LedgerFe
|
||||
# we don't need to set it here, _set_melt_quote_pending will set it in the db
|
||||
melt_quote.outputs = outputs
|
||||
|
||||
# verify SIG_ALL signatures
|
||||
message_to_sign = (
|
||||
"".join([p.secret for p in proofs] + [o.B_ for o in outputs or []]) + quote
|
||||
)
|
||||
self._verify_sigall_spending_conditions(proofs, outputs or [], message_to_sign)
|
||||
|
||||
# verify that the amount of the input proofs is equal to the amount of the quote
|
||||
total_provided = sum_proofs(proofs)
|
||||
input_fees = self.get_fees_for_proofs(proofs)
|
||||
|
||||
Reference in New Issue
Block a user