@waku/rln
Version:
RLN (Rate Limiting Nullifier) implementation for Waku
18 lines (16 loc) • 480 B
JavaScript
/**
* Returns a `Uint8Array` of the requested size. Referenced memory will
* be initialized to 0.
*/
function alloc(size = 0) {
return new Uint8Array(size);
}
/**
* Where possible returns a Uint8Array of the requested size that references
* uninitialized memory. Only use if you are certain you will immediately
* overwrite every value in the returned `Uint8Array`.
*/
function allocUnsafe(size = 0) {
return new Uint8Array(size);
}
export { alloc, allocUnsafe };