refactor/docs: include nsec script in README and generate nsec directly
This commit is contained in:
parent
99b22ab726
commit
494193020e
|
@ -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=<value>` 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=<value>` in your .env file. You can generate an nsec by running `deno task nsec`.
|
||||
7. Run `deno task dev`.
|
||||
|
||||
## License
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue