@waku/rln
Version:
RLN (Rate Limiting Nullifier) implementation for Waku
21 lines (20 loc) • 909 B
TypeScript
export declare class BytesUtils {
/**
* Concatenate Uint8Arrays
* @param input
* @returns concatenation of all Uint8Array received as input
*/
static concatenate(...input: Uint8Array[]): Uint8Array;
/**
* Convert a Uint8Array to a BigInt with configurable input endianness
* @param bytes - The byte array to convert
* @param inputEndianness - Endianness of the input bytes ('big' or 'little')
* @returns BigInt representation of the bytes
*/
static toBigInt(bytes: Uint8Array, inputEndianness?: "big" | "little"): bigint;
/**
* Writes an unsigned integer to a buffer in little-endian format
*/
static writeUIntLE(buf: Uint8Array, value: number, offset: number, byteLength: number, noAssert?: boolean): Uint8Array;
static checkInt(buf: Uint8Array, value: number, offset: number, ext: number, max: number, min: number): void;
}