UNPKG

@cronstamp/clientlib

Version:

Client library for cronstamp, a blockchain-based document timestamping and verification service.

35 lines 1.63 kB
import { VerificationProcess } from '../lifecycle/verify.js'; import { ResultData } from '../lifecycle/manager.js'; import { BlockchainName } from './blockchains.js'; import { Log } from '../util/logger.js'; export declare abstract class BlockchainBase { protected log: Log; constructor(log?: Log); /** * Checks, if a root hash is contained in the blockchain for the specified transaction and checks the provided timestamp matches the transaction * @param rootHash * @param transactionTimestamp * @param transactionHash * @param verificationProcess * @returns ResultData containing success, only if verifying the blockchain was fully successful. */ abstract verifyRootHash(rootHash: string, transactionTimestamp: number, transactionHash: string, verificationProcess: VerificationProcess): Promise<ResultData>; /** * @param blockTimestamp Timestamp in time units of this blockchain / this is the value stored in the certificate * @returns unix timestamp in milliseconds */ abstract getTransactionUnixTimestamp(blockTimestamp: number): number; /** * @param blockTimestamp Timestamp in time units of this blockchain / this is the value stored in the certificate */ abstract getTransactionDate(blockTimestamp: number): Date; /** * @returns Name of the blockchain used to identify it in request and validate processes */ abstract getName(): BlockchainName; /** * @returns Name of the blockchain for use in user interfaces */ abstract getDisplayName(): string; } //# sourceMappingURL=blockchainBase.d.ts.map