Node.js
Our Verifier Toolkit is a library for Node.js developers integrating with GlobaliD as a verifier. Be sure to check out the overview for verifiers.
Usage
Installation
createPresentationRequestUrl
createPresentationRequestUrl
The createPresentationRequestUrl
function creates a deep link into the GlobaliD mobile app. It accepts a single parameter, which is a CreatePresentationRequestUrlParams
object with the following properties:
clientId
(string) - your Developer App's ID (client_id
)initiationUrl
(string) - corresponds to the deep link'sproof_request_url
trackingId
(string; optional) - correlation ID appended toinitiationUrl
as atracking_id
query parameterredirectUrl
(string; optional) - location to redirect users on their mobile device after responding to your presentation request
The return value is a URL
-string
pair of the generated deep link and the corresponding tracking ID.
createGidVerifierClient
createGidVerifierClient
The createGidVerifierClient
function creates instances the GidVerifierClient
class. It accepts a GidVerifierClientOptions
object, which has the following properties:
clientId
(string) - your Developer App's ID (client_id
)clientSecret
(string) - your Developer App's client secret
GidVerifierClient
GidVerifierClient
The GidVerifierClient
class facilitates communicating with GlobaliD's API. Instances are created via the createGidVerifierClient
factory function.
createPresentationRequest
createPresentationRequest
The createPresentationRequest
method creates a presentation request. It accepts a CreatePresentationRequestDto
parameter, which has the following properties:
presentationRequirements
(PresentationRequirements
) - Submit Requirement Feature object defining the requirements of the credential you like the holder to presenttrackingId
(string) - ID used to correlate presentation requestswebhookUrl
(string) - URL for receiving a holder response
The return value is a PresentationRequestResponseDto
, which should be returned to the holder.
verifySignature
verifySignature
The verifySignature
method verifies a message signature.
TypeScript
The toolkit is written in TypeScript and type declarations are bundled with it.
Demo
Check out our GitHub repo for a reference implementation of a verifier utilizing out toolkit.
Last updated