UNPKG

ec-sri-invoice-signer

Version:
50 lines (49 loc) 2.37 kB
export type signXmlOptions = Partial<{ pkcs12Password: string; }>; export declare const signDocumentXml: (docXml: string, pkcs12Data: string | Buffer, rootTagName: string, options?: signXmlOptions) => string; /** * * @param xml The invoice XML to be signed. * @param pkcs12Data The pkcs12 file (.p12/.pfx) data expressed as a node Buffer or base64 string. * @param options Options are: * - **pkcs12Password**: The pkcs12 file password. Defaults to no password. * @returns The signed invoice XML. */ export declare const signInvoiceXml: (xml: string, pkcs12Data: string | Buffer, options?: signXmlOptions) => string; /** * * @param xml The debit note XML to be signed. * @param pkcs12Data The pkcs12 file (.p12/.pfx) data expressed as a node Buffer or base64 string. * @param options Options are: * - **pkcs12Password**: The pkcs12 file password. Defaults to no password. * @returns The signed debit note XML. */ export declare const signDebitNoteXml: (xml: string, pkcs12Data: string | Buffer, options?: signXmlOptions) => string; /** * * @param xml The credit note XML to be signed. * @param pkcs12Data The pkcs12 file (.p12/.pfx) data expressed as a node Buffer or base64 string. * @param options Options are: * - **pkcs12Password**: The pkcs12 file password. Defaults to no password. * @returns The signed credit note XML. */ export declare const signCreditNoteXml: (xml: string, pkcs12Data: string | Buffer, options?: signXmlOptions) => string; /** * * @param xml The delivery guide XML to be signed. * @param pkcs12Data The pkcs12 file (.p12/.pfx) data expressed as a node Buffer or base64 string. * @param options Options are: * - **pkcs12Password**: The pkcs12 file password. Defaults to no password. * @returns The signed delivery guide XML. */ export declare const signDeliveryGuideXml: (xml: string, pkcs12Data: string | Buffer, options?: signXmlOptions) => string; /** * * @param xml The withholding certificate XML to be signed. * @param pkcs12Data The pkcs12 file (.p12/.pfx) data expressed as a node Buffer or base64 string. * @param options Options are: * - **pkcs12Password**: The pkcs12 file password. Defaults to no password. * @returns The signed withholding certificate XML. */ export declare const signWithholdingCertificateXml: (xml: string, pkcs12Data: string | Buffer, options?: signXmlOptions) => string;