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

proof chain tests #67

Open
aljones15 opened this issue Jul 16, 2024 · 2 comments
Open

proof chain tests #67

aljones15 opened this issue Jul 16, 2024 · 2 comments
Assignees

Comments

@aljones15
Copy link
Contributor

aljones15 commented Jul 16, 2024

Start with:

previousProof
An OPTIONAL string value or unordered list of string values. Each value identifies another data integrity proof that MUST verify before the current proof is processed. If an unordered list, all referenced proofs in the array MUST verify. This property is used in Section 2.1.2 Proof Chains.

https://w3c.github.io/vc-data-integrity/#proof-chains

has an example.

There is an existing generator that adds a proofId:

const proofId = 'urn:uuid:no-proof-type-test';
suite.proof = {id: proofId};
selectiveSuite._cryptosuite.options.proofId = proofId;
selectiveSuite.type = proofType;

@aljones15
Copy link
Contributor Author

additionally: Whenever this algorithm encodes strings, it MUST use UTF-8 encoding.

@aljones15
Copy link
Contributor Author

aljones15 commented Jul 16, 2024

If options has a previousProof item that is a string, add the element from allProofs with an id attribute matching previousProof to matchingProofs. If a proof with id equal to previousProof does not exist in allProofs, an error MUST be raised and SHOULD convey an error type of PROOF_GENERATION_ERROR.

If options has a previousProof item that is an array, add each element from allProofs with an id attribute that matches an element of that array. If any element of previousProof array has an id attribute that does not match the id attribute of any element of allProofs, an error MUST be raised and SHOULD convey an error type of PROOF_GENERATION_ERROR.

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

No branches or pull requests

2 participants