Conversation
There was a problem hiding this comment.
Huzzah test vectors 👏 Approved! I'm also very happy that there's JWS in here.
Either in this PR or one to follow, we should include a /test-vectors/README.md that explains to inspect with explore.ipld.io. (Also possibly worth noting that explore.ipld.io wouldn't let me upload the CAR files without modifying the file extension. Seems odd).
@oed and I had a discussion in Discord about 1. where these should live (I think here is a great place), and 2. any changes that need to be made to the spec.
In this picture...
...it says "codec optional". How does that get signalled? Is there a one-bit flag or similar?
My understanding (please correct me) about what we need to update in the spec to support this is:
- Add an entry for EIP-712
- Add text
RECOMMENDing that encoding info be at the end of a varsig header, for consistency & implementation ease. - Clarify that there's a header and a signature, in case you want to use the header separately (there's a use case in UCAN)
Is that about right?
Good point. I can update this PR! Strange it doesn't let you upload, it definitely works for me. What do you need to change the extension to? It should already be
I think this is supposed to depend on the key codec, the key type would basically dictate if it's needed or not. But in our test cases we actually include it for all key codecs.
Yes, the spec needs to be updated in a few places. I will follow up on that as soon as I have some spare cycles. |
This PR adds two test vector CAR files for JWS and eip712 varsigs. The content of these files can be explored through the https://explore.ipld.io/ interface.
secp256k1andkeccak256secp256k1+sha256p256+sha256ed25519+sha256The encoding follows this general format:

Specifically for eip712 and secp256k1 signatures this format is used:
