/// /// import { Secret } from 'jsonwebtoken'; import { InvoiceSignedPayload } from './InvoiceSignedPayload'; import { InvoiceInterface } from './InvoiceInterface'; export declare class Invoice { invoice: InvoiceInterface; private privateKey; readonly subtotalWithoutTax: number; readonly amountDue: number; /** * @param {InvoiceInterface} invoice Invoice information * @param {Secret} privateKey prime256v1 private key */ constructor(invoice: InvoiceInterface, privateKey: string); /** * Sign payload containing invoice information with private key * @param {InvoiceSignedPayload} signedPayload The payload to be signed * @param {Secret} privateKey The secret key to use * @return {string} The signed JWT token */ static signJwt(signedPayload: InvoiceSignedPayload, privateKey: Secret): string; /** * Prove the authenticity of a token by verifying its signature * @param {string} token The token to be verified * @param {Secret} key The issuer's public key * @return {InvoiceSignedPayload} The verified payload */ static verifyJwt(token: string, key: Secret): InvoiceSignedPayload; /** * Generate a signed token containing the instance information * @return {string} The signed JWT token */ createJwt(): string; /** * Generate a signed token and convert it to a QR Code PNG image * @return {Promise} */ createQRCodeBuffer(): Promise; /** * Generate the final PDF file containing the cryptographic stamp of authenticity * @return {Promise} */ generatePDF(): Promise; }