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

Verifiable Credentials Data Model v2.0 integration into Proof of Passport #160

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

CristopherAguilar10
Copy link

Description:
This pull request introduces the formatAsVC function to format attestation data as Verifiable Credentials (VC) according to the W3C Verifiable Credentials Data Model v2.0 standard. The following changes have been made:

New formatAsVC Function:

Added in common/src/utils/formatVC.ts.
Uses uuidv4 to generate a unique ID.
Formats attestation data as a VC.
formatAsVC Integration:

app/src/apps/sbt.tsx: Added an example of using the function within an existing function.
app/src/stores/userStore.ts: Created a generateAttestation function that uses formatAsVC to format passport data.
app/src/utils/registration.ts: Created a registerUser function that uses formatAsVC to format and register verifiable credentials.
Impact:
These changes enable Proof of Passport to comply with the W3C Verifiable Credentials Data Model v2.0 standard, improving interoperability and the ability to export proofs as VC.

- Add a test in sbt.tsx to verify correct functionality of formatAsVC."
Add the formatAsVC function to common/src/utils/formatVC.ts to format verifiable credential data.
Add the formatAsVC function to common/src/utils/formatVC.ts to format verifiable credential data.
Add generateAttestation function to format credential as Verifiable Credential

- Add `generateAttestation` function to `useUserStore` which formats passport data and attestation ID as a Verifiable Credential using `formatAsVC`.
- Include import of `formatAsVC` from `../../../common/src/utils/formatVC`.
- Update `UserState` store with the new function for better credential handling and formatting.
- Added `registerUser` function to create and log a Verifiable Credential.
- Function uses `formatAsVC` to format `passportData` and `PASSPORT_ATTESTATION_ID` into a credentialSubject.
- Added `generateInputs` function to create and log a Verifiable Credential.
- Function uses `formatAsVC` to format `passportData` and `PASSPORT_ATTESTATION_ID` into a credentialSubject.
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.

1 participant