Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Expose an API endpoint to access the issuer and get a VC #51

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

chris-tbd
Copy link
Contributor

@chris-tbd chris-tbd commented Jun 17, 2024

This PR is to expand the functionality of the hosted PFI instance of this repo to enable requests to work by allowing remote users to get the VC they need.

This pull request primarily focuses on the addition of new functionalities in the src/main.ts file. The changes involve the importation of new modules and the creation of a new HTTP POST endpoint.

Here are the key changes:

Imports:

  • src/main.ts: Imported BearerDid from @web5/dids, createOrLoadDid from ./example/utils.js, and VerifiableCredential from @web5/credentials to be used in the newly created endpoint.

New Endpoint:

  • src/main.ts: Added a new HTTP POST endpoint '/get-vc'. This endpoint creates a BearerDid instance, generates a VerifiableCredential and signs it with the BearerDid instance. The signed credential is then sent as a response.

@chris-tbd chris-tbd merged commit 3f294e7 into main Jun 17, 2024
2 of 4 checks passed
@chris-tbd chris-tbd deleted the expose-issuer branch June 17, 2024 18:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant