Skip to content

NUT-14: add HTLC test vectors - #407

Open
robwoodgate wants to merge 3 commits into
mainfrom
nut14-test-vectors
Open

NUT-14: add HTLC test vectors#407
robwoodgate wants to merge 3 commits into
mainfrom
nut14-test-vectors

Conversation

@robwoodgate

Copy link
Copy Markdown
Collaborator

NUT-14 had no test vectors. Adds tests/14-test.md with preimage (valid and invalid), keyless hashlock, and SIG_ALL cases, signed by the well-known test key. All hashlocks commit to the familiar all-zeros-then-one preimage already used in the NUT-14 examples.

Builds on #404: the SIG_ALL vector uses the length-framed aggregation, so this contains #404's commits until it merges and should be reviewed for the tests/14-test.md addition only.

Re-encodes the SIG_ALL message to the domain-separated, length-framed
byte format used by NUT-20/29 (tag "Cashu_SigAllSig_v1"). The quote id
is framed directly after the tag and is empty for swaps, so one layout
serves both transaction types. Adds a normative signature validation
rule (ignore signatures that do not verify, count unique public keys)
and canonical message vectors in tests/11-test.md.
Removes the superseded string-concatenation SIG_ALL vectors so the
spec carries one canonical message aggregation, retitles the
length-framed vector set, and notes why the output keyset id is not
part of the message.
Preimage, keyless hashlock and SIG_ALL cases; the SIG_ALL vector uses
the length-framed NUT-11 aggregation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant