ec-sri-invoice-signer
Version:
Ecuador SRI invoice signer.
21 lines (20 loc) • 875 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildSignatureTag = void 0;
const constants_1 = require("../../utils/constants");
const buildSignatureTag = ({ signatureTagId, signatureObjectTagId, signedInfoTag, keyInfoTag, signedSignedInfoTag, signatureValueTagId, signedPropertiesTag }) => {
return `\
<ds:Signature xmlns:ds="${constants_1.XmlProperties.namespaces.ds}" Id="${signatureTagId}">\
${signedInfoTag}\
<ds:SignatureValue Id="${signatureValueTagId}">\
${signedSignedInfoTag}\
</ds:SignatureValue>\
${keyInfoTag}\
<ds:Object Id="${signatureObjectTagId}">\
<xades:QualifyingProperties xmlns:xades="${constants_1.XmlProperties.namespaces.xades}" Target="#${signatureTagId}">\
${signedPropertiesTag}\
</xades:QualifyingProperties>\
</ds:Object>\
</ds:Signature>`;
};
exports.buildSignatureTag = buildSignatureTag;