UNPKG

@lifi/sdk

Version:

LI.FI Any-to-Any Cross-Chain-Swap SDK

10 lines 368 B
export function uint8ArrayToBase64(bytes) { // Node.js environment if (typeof Buffer !== 'undefined') { return Buffer.from(bytes).toString('base64'); } // Browser environment const binaryString = Array.from(bytes, (byte) => String.fromCharCode(byte)).join(''); return btoa(binaryString); } //# sourceMappingURL=uint8ArrayToBase64.js.map