@lifi/sdk
Version:
LI.FI Any-to-Any Cross-Chain-Swap SDK
11 lines • 433 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.uint8ArrayToBase64 = uint8ArrayToBase64;
function uint8ArrayToBase64(bytes) {
if (typeof Buffer !== 'undefined') {
return Buffer.from(bytes).toString('base64');
}
const binaryString = Array.from(bytes, (byte) => String.fromCharCode(byte)).join('');
return btoa(binaryString);
}
//# sourceMappingURL=uint8ArrayToBase64.js.map