emvco-qr-sdk
Version:
A robust TypeScript SDK for decoding, validating, and processing EMVCo-compliant QR codes used in digital payment systems.
48 lines (47 loc) • 1.42 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TAGS_WITH_GENERIC_GUI_STRATEGY = exports.DEFAULT_PAYLOAD_VERSION_FIELD = exports.EMV_QR_FORMAT = exports.FALLBACK_TLV_VERSION = exports.TAG_GUI = exports.TAG_CRC = exports.DEFAULT_PARSE_MODE = exports.DEFAULT_RECURSIVE = void 0;
const qr_parse_mode_enum_1 = require("../../domain/enums/qr-parse-mode.enum");
/**
* Default behavior for TLV QR parsing.
*/
exports.DEFAULT_RECURSIVE = true;
/**
* Default QR parse mode (EMVCo TLV format).
*/
exports.DEFAULT_PARSE_MODE = qr_parse_mode_enum_1.QRParseMode.TLV;
/**
* TLV tag reserved for CRC checksum validation.
*/
exports.TAG_CRC = '63';
/**
* Common subtag representing a GUI (Globally Unique Identifier).
*/
exports.TAG_GUI = '00';
/**
* Fallback value used when no payload version is explicitly defined.
*/
exports.FALLBACK_TLV_VERSION = '01';
/**
* Constant string representing the EMVCo QR format.
*/
exports.EMV_QR_FORMAT = 'EMVCO';
/**
* Default field name used to extract the payload version from the TLV.
*/
exports.DEFAULT_PAYLOAD_VERSION_FIELD = 'payloadFormatIndicator';
/**
* List of tags that follow a common pattern: they include a GUI (subtag 00)
* and additional subfields following a generic interpretation strategy.
*/
exports.TAGS_WITH_GENERIC_GUI_STRATEGY = [
'50',
'51',
'81',
'82',
'83',
'84',
'85',
'90',
'91',
];