/// /// /** * Provide all features to sign and verify payloads. */ export interface IPayloadSigner { /** * Get the signature of a payload as a string * * @param payload The payload to sign * @param passphrase The passphrase to use to sign the payload */ sign(passphrase: string): string; /** * Verify the signature a designated payload * * @param payload The payload we want to verify the signature * @param signature The signature to check * @param publicKey The public to check the signature emitter */ verify(signature: Buffer | string, publicKey: string): boolean; } export declare abstract class AbstractPayloadSigner implements IPayloadSigner { protected payload: T; constructor(payload: T); sign(passphrase: string): string; verify(signature: Buffer | string, publicKey: string): boolean; abstract serialize(): ByteBuffer; private getPayloadHashBuffer; } /** * Provide all features to compute payload hash buffer. */ export interface IPayloadHashBuffer { /** * Function to compute payload hash buffer to an hex string. */ getPayloadHashBuffer(): string; }