22 lines
613 B
TypeScript
22 lines
613 B
TypeScript
import { SigningEnvelope } from './classes.envelope.js';
|
|
import * as plugins from './smartsign.plugins.js';
|
|
|
|
export class SmartSign {
|
|
public p12Cert: Buffer;
|
|
public smartpdfInstance: plugins.smartpdf.SmartPdf;
|
|
constructor(p12CertBuffer: Buffer) {
|
|
this.p12Cert = p12CertBuffer;
|
|
}
|
|
|
|
public async start() {
|
|
this.smartpdfInstance = new plugins.smartpdf.SmartPdf();
|
|
await this.smartpdfInstance.start();
|
|
}
|
|
public async stop() {
|
|
await this.smartpdfInstance.stop();
|
|
}
|
|
|
|
public async createEnvelopeFromPdf(pdfArg: plugins.smartpdf.IPdf) {
|
|
return new SigningEnvelope(this, pdfArg);
|
|
}
|
|
} |