Closed kimdhamilton closed 8 years ago
This is mentioned in the #developers channel, but we've hit a problem the JSON-LD normalization. Our existing v1.2 certs aren't valid JSON-LD because of a design constraint where @type
and type
are treated as the same key.
https://github.com/json-ld/json-ld.org/issues/402
As such, the javascript implementation of the JSON-LD toolset complains that v1.2 certificates have colliding keywords.
Found the root issue. Our format currently adds an extra "@type" key to the receipt
block. That's a Chainpoint v2 receipt, and their json-ld schema follows the emerging standard of aliasing "type" to "@type". Since we're trying to use that standard, the problem isn't with the JSON-LD parser or the schema, but instead with how we're creating the certificates. Indeed, v1.2 certificates we've created so far will (correctly) fail JSON-LD parsing.
On the plus side, the WKWebKit bridge I'm using to run jsonld.js
totally works as a stop-gap measure until we invest time in an iOS native JSON-LD library. It's been incorporated into the validation mechanism and tested with a v1.2 certificate that has been modified to pass JSON-LD parsing. Unfortunately, that's not a fully conclusive test, since it (correctly) fails validation comparing local to signed hashes.
I'm going to leave this issue open until I can manually verify a published certificate.
We need the ability to perform JSON LD normalization in order to perform the v1.2 local hash. This doesn't appear to be available for Flask yet.