import type { InvoiceDetails, QRCodeOptions, Result, SignedInvoiceData, ZATCAConfig } from './types.js';
/**
* ZATCA Phase 2 QR Code Generator
*
* A production-ready, easy-to-use QR code generator for ZATCA e-invoicing Phase 2.
*
* @example
* ```typescript
* // Initialize with your certificate details
* const generator = new ZATCAQRGenerator({
* privateKey: 'YOUR_PRIVATE_KEY',
* certificateSignature: 'CERTIFICATE_SIGNATURE',
* publicKey: 'YOUR_PUBLIC_KEY'
* });
*
* // Generate QR code for an invoice
* const result = await generator.generateQRCode({
* sellerName: 'My Company LLC',
* vatNumber: '300000000000003',
* timestamp: new Date().toISOString(),
* invoiceTotal: '1150.00',
* vatTotal: '150.00',
* invoiceXML: '...'
* });
*
* if (result.success) {
* console.log(result.data); // Base64 QR code data URL
* }
* ```
*/
export declare class ZATCAQRGenerator {
private config;
/**
* Create a new ZATCA QR Generator instance
*
* @param config - Your certificate and signing configuration
*/
constructor(config?: ZATCAConfig);
/**
* Update configuration (useful for rotating certificates)
*/
updateConfig(config: Partial): void;
/**
* Get current configuration (excludes private key for security)
*/
getConfig(): Omit;
/**
* Generate invoice hash from XML
* This is a helper method if you want to generate hash separately
*/
generateInvoiceHash(invoiceXML: string): string;
/**
* Sign invoice data with your private key
* Returns complete signed invoice data ready for QR encoding
*/
signInvoice(details: InvoiceDetails): Result;
/**
* Generate TLV encoded data for ZATCA QR
*/
private generateTLVData;
/**
* Generate QR code as base64 data URL
* This is the main method - it validates, signs, and generates the QR code
*
* @param details - Invoice details to encode
* @param options - QR code generation options
* @returns Result with QR code data URL or error
*/
generateQRCode(details: InvoiceDetails, options?: QRCodeOptions): Promise>;
/**
* Generate QR code as PNG buffer
* Useful for saving to file or sending in API responses
*/
generateQRCodeBuffer(details: InvoiceDetails, options?: QRCodeOptions): Promise>;
/**
* Generate raw TLV base64 string without QR encoding
* Useful if you want to generate QR code using a different library
*/
generateTLVString(details: InvoiceDetails): Result;
/**
* Generate QR code for already signed invoice data
* Use this if you handle signing externally
*/
generateQRCodeFromSigned(signedData: SignedInvoiceData, options?: QRCodeOptions): Promise>;
}
export * from './types.js';
export * from './utils.js';
//# sourceMappingURL=index.d.ts.map