working rss feed to nostr publish
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
// keys.ts
|
||||
import { schnorr } from "@noble/curves/secp256k1";
|
||||
import { bytesToHex } from "@noble/hashes/utils";
|
||||
function generatePrivateKey() {
|
||||
return bytesToHex(schnorr.utils.randomPrivateKey());
|
||||
}
|
||||
function getPublicKey(privateKey) {
|
||||
return bytesToHex(schnorr.getPublicKey(privateKey));
|
||||
}
|
||||
export {
|
||||
generatePrivateKey,
|
||||
getPublicKey
|
||||
};
|
||||
Reference in New Issue
Block a user