diff --git a/README.md b/README.md index ae5828e..73fc4e4 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ TODO 3. Download [Soapbox](https://dl.soapbox.pub/) or another web-based Mastodon client of your choice. 4. Put the frontend files inside the `public` directory. 5. Create an `.env` file. -6. Define `DITTO_NSEC=` in your .env file. You can generate an nsec by installing [nak](https://github.com/fiatjaf/nak) and running `nak key generate | nak encode nsec`. +6. Define `DITTO_NSEC=` in your .env file. You can generate an nsec by running `deno task nsec`. 7. Run `deno task dev`. ## License diff --git a/scripts/nsec.ts b/scripts/nsec.ts index dcfa926..b0da325 100644 --- a/scripts/nsec.ts +++ b/scripts/nsec.ts @@ -1,11 +1,6 @@ import { generateSecretKey, nip19 } from 'npm:nostr-tools'; -const encodedNsec = generateEncodedPrivateKey(); -console.log(encodedNsec); +const sk = generateSecretKey(); +const nsec = nip19.nsecEncode(sk); -function generateEncodedPrivateKey(): string { - const sk = generateSecretKey(); - const nsec = nip19.nsecEncode(sk); - - return nsec; -} +console.log(nsec);