@ew-did-registry/claims
Version:
The package exposes functionality needed to create, inspect, approve, and verify Private and Public claims
37 lines (36 loc) • 1.34 kB
TypeScript
import { IDIDDocument } from '@ew-did-registry/did-resolver-interface';
export declare class ProofVerifier {
private _jwt;
private _didDocument;
constructor(didDocument: IDIDDocument);
/**
* @description checks that token was issued by identity represented by
* this verifier or his authentication delegate
*
* @param token
*
* @returns: DID of authenticated identity on successful verification or null otherwise
*/
verifyAuthenticationProof(token: string): Promise<string | null>;
/**
* @description Checks that token is issued by identity verification delegate
*
* @param token: JWT token to verify
* @returns: DID of the authenticated identity on successful verification or null otherwise
*/
verifyAssertionProof(token: string): Promise<string | null>;
/**
* @description Determines if a token was signed with an Ethereum signature
* by the address referenced by the id of the DID Document
* Note that JWT-compliant signatures can't be used to recover an ethereum
*/
private isIdentity;
private isAuthenticationDelegate;
private isVerificationDelegate;
private verifySignature;
private authenticationKeys;
private verificationKeys;
private areLinked;
private isSigAuth;
private isVeriKey;
}