emvco-qr-sdk
Version:
A robust TypeScript SDK for decoding, validating, and processing EMVCo-compliant QR codes used in digital payment systems.
30 lines (29 loc) • 907 B
TypeScript
/**
* Represents a Tag value object in a TlvEntity structure.
*
* This class encapsulates the tag identifier ensuring that it complies with the expected format.
* According to the EMVCo specifications, a valid Tag is typically a two-character string.
*/
export declare class Tag {
private readonly _value;
/**
* Constructs a Tag value object.
*
* @param value - The tag string. It must be exactly two characters.
* @throws {Error} If the tag is not exactly two characters.
*/
constructor(value: string);
/**
* Returns the tag value as a string.
*
* @returns The tag as a string.
*/
toString(): string;
/**
* Validates the provided tag value.
*
* @param value - The tag value to validate.
* @returns True if the tag is exactly two characters, false otherwise.
*/
static isValid(value: string): boolean;
}