import { EyeOffIcon, EyeOnIcon } from "@shared/icons"; import { createAccount } from "@utils/storage"; import { generatePrivateKey, getPublicKey, nip19 } from "nostr-tools"; import { useMemo, useState } from "react"; import { navigate } from "vite-plugin-ssr/client/router"; export function Page() { const [type, setType] = useState("password"); const privkey = useMemo(() => generatePrivateKey(), []); const pubkey = getPublicKey(privkey); const npub = nip19.npubEncode(pubkey); const nsec = nip19.nsecEncode(privkey); // toggle private key const showPrivateKey = () => { if (type === "password") { setType("text"); } else { setType("password"); } }; const submit = async () => { const account = await createAccount(npub, pubkey, privkey, null, 1); if (account) { navigate("/app/auth/create/step-2"); } }; return (

Lume is auto-generated key for you

); }