ethers.js/packages/random/src.ts/index.ts

13 lines
263 B
TypeScript
Raw Normal View History

2019-05-15 01:25:46 +03:00
"use strict";
import { randomBytes as _randomBytes } from "crypto";
import { arrayify } from "@ethersproject/bytes";
export { shuffled } from "./shuffle";
export function randomBytes(length: number): Uint8Array {
return arrayify(_randomBytes(length));
}