UNPKG

fints

Version:

FinTS client library with psd2 support

31 lines 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const parse_1 = require("../parse"); const segment_1 = require("./segment"); class HITANProps { } exports.HITANProps = HITANProps; class HITAN extends segment_1.SegmentClass(HITANProps) { constructor() { super(...arguments); this.type = "HITAN"; } serialize() { throw new Error("Not implemented."); } deserialize(input) { if (![6].includes(this.version)) { throw new Error(`Unimplemented TAN method version ${this.version} encountered.`); } const [[process], [transactionHash], [transactionReference], [challengeText], ...challengeHhdUc] = input; this.process = parse_1.Parse.num(process); this.transactionHash = transactionHash; this.transactionReference = transactionReference; this.challengeText = challengeText; if (challengeHhdUc.length > 0) { [this.challengeMediaType, this.challengeMedia] = parse_1.Parse.challengeHhdUc(challengeHhdUc); } } } exports.HITAN = HITAN; //# sourceMappingURL=hitan.js.map