emvco-qr-sdk
Version:
A robust TypeScript SDK for decoding, validating, and processing EMVCo-compliant QR codes used in digital payment systems.
19 lines (18 loc) • 836 B
TypeScript
import { TlvEntity } from '../../../domain/entities/tlv.entity';
import { SubtagNameResolver } from '../../types/tag-resolver.type';
/**
* Checks whether a TLV entity contains valid subTags.
*
* @param tlv - The TLV entity to check.
* @returns True if the TLV contains at least one subTag, false otherwise.
*/
export declare function isTlvWithSubTags(tlv: TlvEntity): boolean;
/**
* Maps an array of subTags into a key-value object, using an optional name resolver.
*
* @param parentTag - The parent TLV tag.
* @param subTags - The list of subtag TLV entities.
* @param resolveSubtagName - Optional resolver for naming subtags.
* @returns An object mapping each subtag to its value.
*/
export declare function mapSubTags(parentTag: string, subTags: TlvEntity[], resolveSubtagName?: SubtagNameResolver): Record<string, any>;