UNPKG

emvco-qr-sdk

Version:

A robust TypeScript SDK for decoding, validating, and processing EMVCo-compliant QR codes used in digital payment systems.

15 lines (14 loc) 530 B
/** * Validates that a QR string is non-empty and follows the TLV format. * * This function checks two things: * 1. The string must not be empty or whitespace. * 2. It must follow a pattern consistent with EMVCo TLV encoding * (e.g., `ID + LENGTH + VALUE`). * * Throws meaningful errors if the input fails these validations. * * @param rawQRString - The QR string to validate. * @throws {Error} If the QR string is empty or not TLV-compliant. */ export declare function validateQRString(rawQRString: string): void;