Remove 2 tsconfig-ignore
This commit is contained in:
parent
0b10c2cb4e
commit
c8798707d9
|
@ -6,15 +6,21 @@ type Bls = typeof bls;
|
|||
let blsGlobal: Bls | null = null;
|
||||
let blsGlobalPromise: Promise<void> | null = null;
|
||||
|
||||
// Patch to fix multiVerify() calls on a browser with polyfilled NodeJS crypto
|
||||
declare global {
|
||||
interface Window {
|
||||
msCrypto: typeof window["crypto"];
|
||||
}
|
||||
}
|
||||
|
||||
export async function setupBls(): Promise<void> {
|
||||
if (!blsGlobal) {
|
||||
await bls.init(bls.BLS12_381);
|
||||
|
||||
// Patch to fix multiVerify() calls on a browser with polyfilled NodeJS crypto
|
||||
// @ts-ignore
|
||||
if (typeof window === "object") {
|
||||
// @ts-ignore
|
||||
const crypto = window.crypto || window.msCrypto;
|
||||
// getRandomValues is not typed in `bls-eth-wasm` because it's not meant to be exposed
|
||||
// @ts-ignore
|
||||
bls.getRandomValues = (x) => crypto.getRandomValues(x);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"target": "esnext",
|
||||
"module": "commonjs",
|
||||
"pretty": true,
|
||||
"lib": ["esnext.bigint"],
|
||||
"lib": ["esnext.bigint", "DOM"],
|
||||
"typeRoots": ["./node_modules/@types"],
|
||||
"declaration": true,
|
||||
"strict": true,
|
||||
|
|
Reference in New Issue