vc-notarization
Version:
Notarize verifiable credentials on DLT for provability and order
35 lines (34 loc) • 1.78 kB
TypeScript
import { VerifiableCredential, NotarizationResponse } from "../types";
import { DLT } from '../enums.js';
/**
* Takes a hash string and notarizes it on the desired DLT specified by the DLT enum
*
* @param hash - Hash string that shall be notarized
* @param dlt - The DLT enum specifying the DLT on which the hash shall be notarized
* @returns The DLT transaction id
*/
export declare function notarizeHash(hash: string, dlt?: DLT): Promise<NotarizationResponse>;
/**
* Takes a hash string and tries to look up the timestamp of the notarization on the DLT specified by the DLT enum
*
* @param hash - Hash string for which the timestamp shall be retrieved
* @param dlt - The DLT enum of the DLT where the hash is notarized
* @returns The timestamp of the latest possible event creation
*/
export declare function getNotarizedTimestamp(hash: string, dlt?: DLT, proof?: any): Promise<Date>;
/**
* Takes a verifiable credential and notarizes it on the desired DLT specified by the DLT enum
*
* @param credential - The verifiable credential which shall be notarized
* @param dlt - The DLT enum of the DLT where the credential shall be notarized
* @returns The DLT transaction id
*/
export declare function notarizeVC(credential: VerifiableCredential, dlt?: DLT): Promise<NotarizationResponse>;
/**
* Takes a verifiable credential and tries to look up the timestamp of the notarization on the DLT specified by the DLT enum
*
* @param credential - Verifiable credential for which the timestamp shall be retrieved
* @param dlt - The DLT enum of the DLT where the hash is notarized
* @returns The timestamp of the latest possible event creation
*/
export declare function getNotarizedVCTimestamp(credential: VerifiableCredential, dlt?: DLT, proof?: any): Promise<Date>;