UNPKG

@dfinity/agent

Version:

JavaScript and TypeScript library to interact with the Internet Computer

22 lines 843 B
/** * Returns a true Uint8Array from an ArrayBufferLike object. * @param bufLike a buffer-like object * @returns Uint8Array */ export declare function uint8FromBufLike(bufLike: ArrayBuffer | Uint8Array | DataView | ArrayBufferView | ArrayBufferLike | [number] | number[] | { buffer: ArrayBuffer; }): Uint8Array; /** * Returns a true ArrayBuffer from a Uint8Array, as Uint8Array.buffer is unsafe. * @param {Uint8Array} arr Uint8Array to convert * @returns ArrayBuffer */ export declare function uint8ToBuf(arr: Uint8Array): ArrayBuffer; /** * Compares two Uint8Arrays for equality. * @param a The first Uint8Array. * @param b The second Uint8Array. * @returns True if the Uint8Arrays are equal, false otherwise. */ export declare function uint8Equals(a: Uint8Array, b: Uint8Array): boolean; //# sourceMappingURL=buffer.d.ts.map