export const bytesToHexString = (bytes) => {
    return bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, '0'), '');
};
export const hexStringToBytes = (hexString) => {
    const bytes = hexString.match(/.{1,2}/g);
    if (!bytes) {
        return new Uint8Array(0);
    }
    return new Uint8Array(bytes.map((byte) => parseInt(byte, 16)));
};
export const hexToString = (str1) => {
    const hex = str1.toString();
    let str = '';
    for (let n = 0; n < hex.length; n += 2) {
        str += String.fromCharCode(parseInt(hex.substr(n, 2), 16));
    }
    return str;
};
//# sourceMappingURL=helpers.js.map