mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-17 13:34:24 +01:00
refactor: nsec script
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
"test": "DB_PATH=\":memory:\" deno test -A --unstable-ffi",
|
||||
"check": "deno check src/server.ts",
|
||||
"relays:sync": "deno run -A --unstable-ffi scripts/relays.ts sync",
|
||||
"nsec": "deno run -A --unstable-ffi scripts/nsec.ts"
|
||||
"nsec": "deno run scripts/nsec.ts"
|
||||
},
|
||||
"exclude": ["./public"],
|
||||
"imports": { "@/": "./src/", "@soapbox/nspec": "jsr:@soapbox/nspec@^0.8.1", "~/fixtures/": "./fixtures/" },
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
import { generateSecretKey, nip19 } from '@/deps.ts';
|
||||
import { generateSecretKey, nip19 } from 'npm:nostr-tools';
|
||||
|
||||
switch (Deno.args[0]) {
|
||||
default: {
|
||||
const encodedNsec = generateEncodedPrivateKey();
|
||||
console.log(encodedNsec);
|
||||
Deno.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
function generateEncodedPrivateKey(): string {
|
||||
const sk = generateSecretKey();
|
||||
|
||||
@@ -19,7 +19,6 @@ export {
|
||||
nip13,
|
||||
nip19,
|
||||
nip21,
|
||||
generateSecretKey,
|
||||
type UnsignedEvent,
|
||||
type VerifiedEvent,
|
||||
} from 'npm:nostr-tools@^2.3.1';
|
||||
|
||||
Reference in New Issue
Block a user