1.0.0 • Published 6 months ago

@quarkid/vc-verifier v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
6 months ago

Extrimian - VS Verifier

This package provides the functionality to verify a verifiable credential.

VCVerifierService

To verify a credential you can initialize a VCVerifierService

constructor(private params: {
        didDocumentResolver: (did: string) => Promise<DIDDocument>
}) {

}

This service requires a callback to resolve a DID. You need to implement the callback so that given a did returns a DIDDocument

Verify Method

Then you can call verify method to verify the credential

async verify(vc: VerifiableCredential | string, purpose: Purpose): Promise<{ result: boolean, errors?: string[] }> {

}
  • vc: Verifiable credential (with proofs) to verify
  • purpose: purpose to verify (this is checked using the did document)