Skip to content
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

Referencing VC #504

Merged
merged 2 commits into from
Jul 26, 2022
Merged

Referencing VC #504

merged 2 commits into from
Jul 26, 2022

Conversation

vivienfan
Copy link
Contributor

Related issue: #374

Replacing directly embed credential with a hashlink which points to the hosted VCs

Hashlink is prefered over Evidence and Related Link because:

  1. it makes sure the data being referenced is the same

    • in the case of Events, Products should stay the same (ie, size, amount, manufactuer, etc.)
    • Hashlink makes sure the content returned by the link is the same as when it's generated, otherwise the hash would change
    • Evidence and Related Link can only meet this requirement if reference/target is Hashlink
  2. it describes the relationship between Products and Events in a dry way

    • in the case of Transform Events, there are 2 types of Products - newly created & consumed/used products
    • Hashlink is replacing the directly embed credential in the structure, which already describes the type of Products
    • Evidence does not describe the type of credential being referenced
    • Related Link has a field LinkRelationship to meet this requirement, but the solution is more complicated and harder to read

term: product
'@id': https://schema.org/Product
term: products
'@id': https://w3c-ccg.github.io/hashlink/#hl-url-params
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not look like a products definition?

@nissimsan
Copy link
Collaborator

@vivienfan, so the intention is because there are multiple events for the same product, you don't want to repeat the product data? That's a good intention.
Signing a link doesn't seem very valuable, though. I would suggest signing over the product's id instead?

@vivienfan
Copy link
Contributor Author

@vivienfan, so the intention is because there are multiple events for the same product, you don't want to repeat the product data? That's a good intention. Signing a link doesn't seem very valuable, though. I would suggest signing over the product's id instead?

@nissimsan, the link here would be a Get request endpoint which returns the product VC, and the hash would make sure the product is the exact same product when the event VC was issued.

@nissimsan
Copy link
Collaborator

@vivienfan I see. That's a new pattern, but I won't stand in the way. :) Thanks for elaborating.

@nissimsan nissimsan self-requested a review July 26, 2022 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants