import 'Buffer'

'Buffer' wasn't imported initially and was causing issues when I tried to use generatePrivateKey in a client I am building. not sure why Branle has no error, maybe I am doing something wrong?
This commit is contained in:
monlovesmango
2022-04-06 16:05:42 -05:00
committed by fiatjaf
parent f04bc0cee1
commit c236e41f80

View File

@@ -1,4 +1,5 @@
import * as secp256k1 from '@noble/secp256k1'
import {Buffer} from 'buffer'
export function generatePrivateKey() {
return Buffer.from(secp256k1.utils.randomPrivateKey()).toString('hex')