/// import DidPublicKeyModel from '../../lib/core/versions/latest/models/DidPublicKeyModel'; import JwsModel from '../../lib/core/versions/latest/models/JwsModel'; import { PrivateKey } from 'did-auth-jose-kenhuang'; /** * A class that can generate valid operations. * Mainly useful for testing purposes. */ export default class OperationGenerator { /** * Creates a Create Operation with valid signature. * @param didDocumentTemplate A DID Document used as the template. Must contain at least one public-key. */ static generateCreateOperation(didDocumentTemplate: any, publicKey: DidPublicKeyModel, privateKey: string | PrivateKey): Promise; /** * Creates a Create Operation buffer with valid signature. * @param didDocumentTemplate A DID Document used as the template. Must contain at least one public-key. */ static generateCreateOperationBuffer(didDocumentTemplate: any, publicKey: DidPublicKeyModel, privateKey: string | PrivateKey): Promise; /** * Generates an Update Operation buffer with valid signature. */ static generateUpdateOperationBuffer(updatePayload: object, keyId: string, privateKey: string | PrivateKey): Promise; /** * Generates an Update Operation buffer with valid signature. */ static generateUpdateOperation(updatePayload: object, keyId: string, privateKey: string | PrivateKey): Promise; /** * Generates a Delete Operation buffer. */ static generateDeleteOperationBuffer(didUniqueSuffix: string, keyId: string, privateKey: string | PrivateKey): Promise; /** * Generates a Delete Operation. */ static generateDeleteOperation(didUniqueSuffix: string, keyId: string, privateKey: string | PrivateKey): Promise; }