Skip to content

Conversation

@robwoodgate
Copy link
Contributor

@robwoodgate robwoodgate commented Nov 28, 2025

Closes #310

This PR codifies the new P2PK / HTLC rules agreed to bring us in line with Bitcoin HTLC contracts.

Tl;DR:
The main (locktime) pathway remains open. Either locktime or refund pathway can be used after locktime expiry.

@callebtc callebtc changed the title New P2PK/HTLC rules NUT-11/14: New P2PK/HTLC rules Nov 30, 2025
@callebtc callebtc changed the title NUT-11/14: New P2PK/HTLC rules NUT-11 + NUT-14: New P2PK/HTLC rules Nov 30, 2025
@thesimplekid
Copy link
Collaborator

This looks good. It would be nice if we could add some test vectors for this and make sure the current ones we have are up to date this this change.

@robwoodgate
Copy link
Contributor Author

This looks good. It would be nice if we could add some test vectors for this and make sure the current ones we have are up to date this this change.

Have added / tidied / checked test vectors and done some general typo/grammar fixes.

@robwoodgate

This comment was marked as outdated.

@robwoodgate
Copy link
Contributor Author

Further to meeting today, I've added a clarifying note that Locktime/Refund multisig conditions cannot be blended.

@thesimplekid
Copy link
Collaborator

CDK devs confirmed it is compliant with new rules already.

Was mistake. But have pr to bring us up to date cashubtc/cdk#1435

@robwoodgate
Copy link
Contributor Author

CDK devs confirmed it is compliant with new rules already.

Was mistake. But have pr to bring us up to date cashubtc/cdk#1435

Appreciate you taking care of it @thesimplekid

@d4rp4t
Copy link
Contributor

d4rp4t commented Dec 30, 2025

Wouldn't be cleaner if we moved multisig test vectors under sig_inputs?

@robwoodgate
Copy link
Contributor Author

robwoodgate commented Dec 30, 2025

Wouldn't be cleaner if we moved multisig test vectors under sig_inputs?

Although those tests are SIG_INPUTS, they are examples of general multisig conditions. Whether they are SIG_INPUTS or SIG_ALL doesn't change the examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ambiguities about the spending conditions in NUT-14 (HTLCs)

3 participants