This repository has been archived on 2023-04-09. You can view files and clone it, but cannot push or open issues or pull requests.
chainsafe-bls/test/util.ts

10 lines
231 B
TypeScript
Raw Permalink Normal View History

import {randomBytes} from "../src/helpers";
2020-11-20 12:27:30 +00:00
export function randomMessage(): Uint8Array {
return randomBytes(32);
2020-11-20 12:27:30 +00:00
}
export function getN<T>(n: number, getter: () => T): T[] {
return Array.from({length: n}, () => getter());
}