mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
7 lines
273 B
JavaScript
7 lines
273 B
JavaScript
import * as secp256k1 from '@noble/secp256k1'
|
|
|
|
export const makeRandom32 = () => secp256k1.utils.randomPrivateKey()
|
|
export const sha256 = m => secp256k1.utils.sha256(Uint8Array.from(m))
|
|
export const getPublicKey = privateKey =>
|
|
secp256k1.schnorr.getPublicKey(privateKey)
|