ditto/scripts/nsec.ts

7 lines
144 B
TypeScript
Raw Permalink Normal View History

2024-05-31 19:28:43 +00:00
import { generateSecretKey, nip19 } from 'nostr-tools';
const sk = generateSecretKey();
const nsec = nip19.nsecEncode(sk);
console.log(nsec);