refactor: nsec script
This commit is contained in:
parent
90e110b1fd
commit
99b22ab726
|
@ -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);
|
||||
}
|
||||
}
|
||||
const encodedNsec = generateEncodedPrivateKey();
|
||||
console.log(encodedNsec);
|
||||
|
||||
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';
|
||||
|
|
Loading…
Reference in New Issue