Open oed opened 6 months ago
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).
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 *.car
.
...it says "codec optional". How does that get signalled? Is there a one-bit flag or similar?
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.
My understanding (please correct me) about what we need to update in the spec to support this is:
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.
secp256k1
andkeccak256
secp256k1
+sha256
p256
+sha256
ed25519
+sha256
The encoding follows this general format:![image](https://github.com/ChainAgnostic/varsig/assets/3909429/967d34e9-3776-424b-85be-ae1f059aff05)
Specifically for eip712 and secp256k1 signatures this format is used:![image](https://github.com/ChainAgnostic/varsig/assets/3909429/66a9b389-0e66-4b7b-87f5-8e6b35220135)