import AnchoredOperationModel from '../../models/AnchoredOperationModel'; import NamedAnchoredOperationModel from '../../models/NamedAnchoredOperationModel'; import Operation from './Operation'; /** * A class that represents an anchored Sidetree operation. */ export default class AnchoredOperation extends Operation implements NamedAnchoredOperationModel { /** The index this operation was assigned to in the batch. */ readonly operationIndex: number; /** The transaction number of the transaction this operation was batched within. */ readonly transactionNumber: number; /** The logical blockchain time that this opeartion was anchored on the blockchain */ readonly transactionTime: number; /** * Constructs an anchored peration if the operation buffer passes schema validation, throws error otherwise. */ private constructor(); /** * Validates and creates an anchored operation that has been anchored on the blockchain. * @throws Error if given operation buffer fails any validation. */ static createAnchoredOperation(anchoredOperationModel: AnchoredOperationModel): AnchoredOperation; }