API Reference
This page contains the complete auto-generated API reference for the Verifier SDK. The API is organized by the role of each component.
Core Components
The primary entry points for creating and using the SDK.
Function: createCredentialVerifier()
createCredentialVerifier<
Handlers>(options):CredentialVerifier
Defined in: packages/verifier/src/credential-verifier.ts:142
Parameters
options
CredentialVerifierOptions
& object
Interface: CredentialVerifier
Methods
createRequest()
createRequest(
options):Promise<link:PresentationRequest.md>
Creates a presentation request.
verify()
verify(
presentation,request,handlerOptions?):Promise<link:VerificationResult.md<undefined>>
Verifies a presentation.
Parameters
======= presentation
unknown
The presentation to verify.
======= request
The presentation request.
======= handlerOptions?
Omit<VerificationHandlerOptions,
"request" | "logger">
Optional handler-specific options (request and logger are provided automatically).
Returns
Promise<link:VerificationResult.md<undefined>>
A promise that resolves to the verification result.
@the-hashgraph-group-ag/verifier / VerificationHandler
Interface: VerificationHandler<Result>
Interface for a verification handler.
Methods
Handlers
Handlers are responsible for verifying credentials in a specific format (e.g., LDP, JWT).
@the-hashgraph-group-ag/verifier / VerificationHandler
Interface: VerificationHandler<Result>
Interface for a verification handler.
Methods
Policies
Policies are reusable classes that enforce business rules on the credential claims during verification.
@the-hashgraph-group-ag/verifier / CredentialPolicy
Interface: CredentialPolicy<PolicyData, ResultData>
Properties
Methods
execute()
execute(
input): link:PolicyResult.md<ResultData> |Promise<link:PolicyResult.md<ResultData>>
Logic to verify the policy compliance against the given credential.
Type Definitions
These interfaces define the shape of the data structures used throughout the SDK, such as requests, results, and options.
@the-hashgraph-group-ag/verifier / CredentialVerifierOptions
Interface: CredentialVerifierOptions
Properties
handlers
handlers: link:VerificationHandler.md<
Record<string,unknown>>[]
The handlers that will be used to handle credential formats.
policies
policies: link:CredentialPolicy.md<
Record<string,unknown>,undefined>[]
The policies that will be used to verify the presentation.
@the-hashgraph-group-ag/verifier / VerificationInput
Type Alias: VerificationInput
VerificationInput =
unknown
@the-hashgraph-group-ag/verifier / VerificationResult
Interface: VerificationResult<ResultData>
Properties
policyResults?
optionalpolicyResults?:Record<string, link:PolicyResult.md<ResultData>>
The results of the policies that were used to verify the presentation.
verified
verified:
true
Whether the presentation is verified or not.
@the-hashgraph-group-ag/verifier / PresentationRequest
Interface: PresentationRequest
Properties
policies
policies:
string[]
The names of the policies that will be used to verify the presentation.
@the-hashgraph-group-ag/verifier / HandlerResult