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.
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
: ImportedBearerDid
from@web5/dids
,createOrLoadDid
from./example/utils.js
, andVerifiableCredential
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 aBearerDid
instance, generates aVerifiableCredential
and signs it with theBearerDid
instance. The signed credential is then sent as a response.