mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 16:48:50 +00:00
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:
1
keys.js
1
keys.js
@@ -1,4 +1,5 @@
|
|||||||
import * as secp256k1 from '@noble/secp256k1'
|
import * as secp256k1 from '@noble/secp256k1'
|
||||||
|
import {Buffer} from 'buffer'
|
||||||
|
|
||||||
export function generatePrivateKey() {
|
export function generatePrivateKey() {
|
||||||
return Buffer.from(secp256k1.utils.randomPrivateKey()).toString('hex')
|
return Buffer.from(secp256k1.utils.randomPrivateKey()).toString('hex')
|
||||||
|
|||||||
Reference in New Issue
Block a user