ditto/scripts/nsec.ts

7 lines
148 B
TypeScript
Raw Normal View History

2024-03-30 20:25:41 +00:00
import { generateSecretKey, nip19 } from 'npm:nostr-tools';
const sk = generateSecretKey();
const nsec = nip19.nsecEncode(sk);
console.log(nsec);