Skip to content

Commit e36077f

Browse files
committed
chore: address comments
1 parent 5692461 commit e36077f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,5 @@
127127
"@chainsafe/blst": {
128128
"optional": true
129129
}
130-
},
131-
"packageManager": "[email protected]+sha256.dbed5b7e10c552ba0e1a545c948d5473bc6c5a28ce22a8fd27e493e3e5eb6370"
130+
}
132131
}

src/blst-native/secretKey.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import blst from "@chainsafe/blst";
2-
import {randomBytes} from "@noble/hashes/utils";
2+
import crypto from "crypto";
33
import {bytesToHex, hexToBytes, isZeroUint8Array} from "../helpers/index.js";
44
import {SECRET_KEY_LENGTH} from "../constants.js";
55
import {SecretKey as ISecretKey} from "../types.js";
@@ -25,7 +25,7 @@ export class SecretKey implements ISecretKey {
2525
}
2626

2727
static fromKeygen(entropy?: Uint8Array): SecretKey {
28-
const sk = blst.SecretKey.fromKeygen(entropy || randomBytes(SECRET_KEY_LENGTH));
28+
const sk = blst.SecretKey.fromKeygen(entropy || crypto.randomBytes(SECRET_KEY_LENGTH));
2929
return new SecretKey(sk);
3030
}
3131

webpack.config.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module.exports = {
2525
fs: false,
2626
path: false,
2727
stream: false,
28+
crypto: false,
2829
child_process: false,
2930
},
3031
},

0 commit comments

Comments
 (0)