-
Notifications
You must be signed in to change notification settings - Fork 2
How are IPFS links handled? #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@ntn-x2 Thanks for trying DID Lint! |
I just opened a Pull Request to update our driver. The latest version returns an additional context which defines exactly the properties that this tool was marking as missing or mistaken. The IPFS gateway address of the context is https://ipfs.io/ipfs/QmU7QkuTCPz7NmD5bD7Z7mQVz2UsSPaEK58B5sYnjnPRNW, but we only used |
I guess I got my answer. Our PR was merged, but the error has not gone away, despite the fact that the new terms have been defined in the IPFS-addressed context. |
Pasting the resulting DID Document from However, using the following context, it can be parsed nicely:
So this should answer the question on the format in context. Agree? |
Indeed, if the IPFS link is replaced with |
I would say that specifying the URL of the IPFS gateway is making an opinionated and less-decentralised choice. Probably not the right place to discuss about it here, but since more protocols are relying on decentralised storage infrastructure, forcing an HTTP URL in there is a stretch. |
Do I interpret this correctly that {
"@context": [
"https://w3id.org/security/v2",
{
"@protected": true,
"KiltPublishedCredentialCollectionV1": "https://github.com/KILTprotocol/spec-KiltPublishedCredentialCollectionV1",
"Sr25519VerificationKey2020": "https://github.com/KILTprotocol/spec-kilt-did#sr25519"
}
]
} In my understanding of https://www.w3.org/TR/did-spec-registries/#verification-method-types the correct "@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/suites/ed25519-2018/v1"
] or alternatively just omit the JSON-LD context all together and use the JSON representation to be compliant with the DID Core Specification. |
The point is that one of the main critics to JSON-LD is that it tries to mix data linking with digital signatures, which serve two different purposes. Hence, using only integrity-protected links somehow addresses some of the shortcomings of using HTTP links in a JSON-LD context. Yes, we do have some HTTPs links ourselves, for now, but following your suggestion, the |
Hi @ntn-x2 , I finally got to include JSON-LD validation based on https://www.npmjs.com/package/jsonld. For did:kilt this leads to a successful validation with the context
but ipfs:// is not yet supported as protocol by the jsonld npm package. As soon as it is supported there it will also validate here. |
I was trying to browse through the code but could not find an answer. If a context is linked with an IPFS link, in the form of
ipfs://<CID>
, is that supported by the app? Or would the link have to be an HTTP link via a browser, e.g.,https://ipfs.io/ipfs/<CID>
?The text was updated successfully, but these errors were encountered: