feat: upgrades

- Add login page for bunker/nsec/create account
- Upgrade snort pacakges
- Placeholder avatars
- Logout button on profile page
This commit is contained in:
kieran 2024-12-26 14:15:01 +00:00
parent dd31d27914
commit 87cffbfc3d
No known key found for this signature in database
GPG Key ID: DE71CEB3925BE941
15 changed files with 251 additions and 499 deletions

View File

@ -12,11 +12,11 @@
},
"dependencies": {
"@noble/hashes": "^1.4.0",
"@snort/shared": "^1.0.15",
"@snort/system": "^1.3.2",
"@snort/system-react": "^1.3.2",
"@snort/system-wasm": "^1.0.2",
"@snort/worker-relay": "^1.0.10",
"@snort/shared": "^1.0.17",
"@snort/system": "^1.6.0",
"@snort/system-react": "^1.6.0",
"@snort/system-wasm": "^1.0.5",
"@snort/worker-relay": "^1.3.0",
"classnames": "^2.3.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",

View File

@ -11,8 +11,13 @@ type ProfileImageProps = HTMLProps<HTMLDivElement> & {
export function ProfileImage({ pubkey, size, withName, children, ...props }: ProfileImageProps) {
const profile = useUserProfile(pubkey);
const url =
(profile?.picture?.length ?? 0) > 0
? profile?.picture
: `https://nostr.api.v0l.io/api/v1/avatar/cyberpunks/${pubkey}`;
const v = {
backgroundImage: `url(${profile?.picture})`,
backgroundImage: `url(${url})`,
} as CSSProperties;
if (size) {
v.width = `${size}px`;

View File

@ -15,7 +15,6 @@ export function Search(params: { term?: string; tags?: Array<string> }) {
<input
type="text"
placeholder="Search..."
className="px-4 py-3 bg-neutral-800 rounded-full w-full focus-visible:outline-none"
value={term}
onChange={(e) => setTerm(e.target.value)}
onKeyDown={(e) => {

View File

@ -19,9 +19,11 @@ body {
h1 {
font-size: 32px;
}
h2 {
font-size: 28px;
}
h3 {
font-size: 21px;
}
@ -46,3 +48,9 @@ input[type="radio"] {
position: absolute;
cursor: pointer;
}
input[type="text"],
input[type="number"],
input[type="password"] {
@apply px-4 py-2 rounded-xl bg-neutral-800 focus-visible:outline-none;
}

View File

@ -1,13 +1,17 @@
import { ExternalStore } from "@snort/shared";
import { EventPublisher, Nip7Signer } from "@snort/system";
import { EventPublisher, Nip46Signer, Nip7Signer, PrivateKeySigner } from "@snort/system";
import { SnortContext } from "@snort/system-react";
import { useContext, useSyncExternalStore } from "react";
export interface LoginSession {
type: "nip7" | "nsec" | "nip46";
publicKey: string;
privateKey?: string;
bunker?: string;
}
class LoginStore extends ExternalStore<LoginSession | undefined> {
#session?: LoginSession;
#signer?: EventPublisher;
constructor() {
super();
@ -21,15 +25,70 @@ class LoginStore extends ExternalStore<LoginSession | undefined> {
return this.#session ? { ...this.#session } : undefined;
}
login(pubkey: string) {
logout() {
this.#session = undefined;
this.#signer = undefined;
this.#save();
}
login(pubkey: string, type: LoginSession["type"] = "nip7") {
this.#session = {
type: type ?? "nip7",
publicKey: pubkey,
};
this.#save();
}
loginPrivateKey(key: string) {
const s = new PrivateKeySigner(key);
this.#session = {
type: "nsec",
publicKey: s.getPubKey(),
privateKey: key,
};
this.#save();
}
loginBunker(url: string, localKey: string, remotePubkey: string) {
this.#session = {
type: "nip46",
publicKey: remotePubkey,
privateKey: localKey,
bunker: url,
};
this.#save();
}
getSigner() {
if (!this.#signer && this.#session) {
switch (this.#session.type) {
case "nsec":
this.#signer = new EventPublisher(new PrivateKeySigner(this.#session.privateKey!), this.#session.publicKey);
break;
case "nip46":
this.#signer = new EventPublisher(
new Nip46Signer(this.#session.bunker!, new PrivateKeySigner(this.#session.privateKey!)),
this.#session.publicKey,
);
break;
case "nip7":
this.#signer = new EventPublisher(new Nip7Signer(), this.#session.publicKey);
break;
}
}
if (this.#signer) {
return this.#signer;
}
throw "Signer not setup!";
}
#save() {
window.localStorage.setItem("session", JSON.stringify(this.#session));
if (this.#session) {
window.localStorage.setItem("session", JSON.stringify(this.#session));
} else {
window.localStorage.removeItem("session");
}
this.notifyChange();
}
}
@ -44,8 +103,9 @@ export function useLogin() {
const system = useContext(SnortContext);
return session
? {
...session,
builder: new EventPublisher(new Nip7Signer(), session.publicKey),
type: session.type,
publicKey: session.publicKey,
builder: LoginState.getSigner(),
system,
}
: undefined;

View File

@ -13,6 +13,7 @@ import { TorrentPage } from "./page/torrent";
import { SearchPage } from "./page/search";
import { System, initSystem } from "./system";
import { RelaysPage } from "./page/relays";
import LoginPage from "./page/login";
const routes = [
{
@ -46,6 +47,10 @@ const routes = [
path: "/relays",
element: <RelaysPage />,
},
{
path: "/login",
element: <LoginPage />,
},
],
},
] as Array<RouteObject>;

View File

@ -1,6 +1,6 @@
import { Link, Outlet } from "react-router-dom";
import { Link, Outlet, useNavigate } from "react-router-dom";
import { Button } from "../element/button";
import { LoginSession, LoginState, useLogin } from "../login";
import { LoginSession, useLogin } from "../login";
import { ProfileImage } from "../element/profile-image";
import { Search } from "../element/search";
import { useRelays } from "../relays";
@ -12,6 +12,7 @@ export function Layout() {
const login = useLogin();
const system = useContext(SnortContext);
const { relays } = useRelays();
const navigate = useNavigate();
async function updateRelayConnections(system: SystemInterface, relays: Record<string, RelaySettings>) {
if (import.meta.env.VITE_SINGLE_RELAY) {
@ -33,15 +34,6 @@ export function Layout() {
updateRelayConnections(system, Object.fromEntries(relays.map((a) => [a, { read: true, write: true }])));
}, [system, relays]);
async function DoLogin() {
if ("nostr" in window) {
const pubkey = await window.nostr?.getPublicKey();
if (pubkey) {
LoginState.login(pubkey);
}
}
}
return (
<div className="container mx-auto">
<header className="flex gap-4 items-center pt-4 pb-6">
@ -59,7 +51,7 @@ export function Layout() {
{login ? (
<LoggedInHeader login={login} />
) : (
<Button type="primary" onClick={DoLogin}>
<Button type="primary" onClick={() => navigate("/login")}>
Login
</Button>
)}

68
src/page/login.tsx Normal file
View File

@ -0,0 +1,68 @@
import { Nip46Signer, Nip7Signer, PrivateKeySigner } from "@snort/system";
import { Button } from "../element/button";
import { LoginState } from "../login";
import { useNavigate } from "react-router-dom";
import { useState } from "react";
import { bech32ToHex } from "@snort/shared";
export default function LoginPage() {
const [key, setKey] = useState("");
const navigate = useNavigate();
return (
<>
<div className="flex flex-col gap-8">
<h2>Login</h2>
<hr />
<div className="flex flex-col gap-4">
<input type="password" placeholder="nsec/bunker" value={key} onChange={(e) => setKey(e.target.value)} />
<Button
type="primary"
onClick={async () => {
if (key.startsWith("nsec1")) {
LoginState.loginPrivateKey(bech32ToHex(key));
navigate("/");
} else if (key.startsWith("bunker://")) {
const signer = new Nip46Signer(key);
await signer.init();
const pubkey = await signer.getPubKey();
LoginState.loginBunker(key, signer.privateKey!, pubkey);
navigate("/");
}
}}
>
Login
</Button>
</div>
{window.nostr && (
<div className="flex flex-col gap-4">
Browser Extension:
<Button
type="primary"
onClick={async () => {
const pk = await new Nip7Signer().getPubKey();
LoginState.login(pk);
navigate("/");
}}
>
Nostr Extension
</Button>
</div>
)}
<h2>Create Account</h2>
<hr />
<Button
type="primary"
onClick={async () => {
const s = PrivateKeySigner.random();
LoginState.loginPrivateKey(s.privateKey);
navigate("/");
}}
>
Generate Account
</Button>
</div>
</>
);
}

View File

@ -223,7 +223,6 @@ export function NewPage() {
</label>
<input
type="text"
className="px-4 py-2 rounded-xl bg-neutral-800 focus-visible:outline-none"
placeholder="Title of the torrent..."
value={obj.name}
onChange={(e) => setObj((o) => ({ ...o, name: e.target.value }))}
@ -233,7 +232,6 @@ export function NewPage() {
</label>
<input
type="text"
className="px-4 py-2 rounded-xl bg-neutral-800 focus-visible:outline-none"
placeholder="Hash in hex format..."
value={obj.btih}
onChange={(e) => setObj((o) => ({ ...o, btih: e.target.value }))}
@ -331,12 +329,7 @@ export function NewPage() {
}
}
})()}
<input
type="text"
className="p-4 rounded-xl bg-neutral-800 focus-visible:outline-none font-mono text-sm"
value={newLabelValue}
onChange={(e) => setNewLabelValue(e.target.value)}
/>
<input type="text" value={newLabelValue} onChange={(e) => setNewLabelValue(e.target.value)} />
<Button
type="secondary"
onClick={() => {
@ -400,7 +393,6 @@ export function NewPage() {
<input
type="text"
value={a.name}
className="flex-1 px-3 py-1 bg-neutral-800 rounded-xl focus-visible:outline-none"
placeholder="collection1/IMG_00001.jpg"
onChange={(e) =>
setObj((o) => ({
@ -416,7 +408,6 @@ export function NewPage() {
/>
<input
type="number"
className="px-3 py-1 bg-neutral-800 rounded-xl focus-visible:outline-none"
value={a.size}
min={0}
placeholder="69000"
@ -465,7 +456,6 @@ export function NewPage() {
<input
type="text"
value={a}
className="flex-1 px-3 py-1 bg-neutral-800 rounded-xl focus-visible:outline-none"
placeholder="udp://mytracker.net:3333"
onChange={(e) =>
setObj((o) => ({

View File

@ -4,6 +4,9 @@ import { ProfileImage } from "../element/profile-image";
import { CachedMetadata, parseNostrLink } from "@snort/system";
import { LatestTorrents } from "../element/trending";
import { Text } from "../element/text";
import { LoginState, useLogin } from "../login";
import { Button } from "../element/button";
import { hexToBech32 } from "@snort/shared";
export function ProfilePage() {
const params = useParams();
@ -21,14 +24,25 @@ export function ProfilePage() {
export function ProfileSection({ pubkey }: { pubkey: string }) {
const profile = useUserProfile(pubkey);
const login = useLogin();
return (
<div className="flex items-center gap-4 mb-4">
<ProfileImage pubkey={pubkey} size={200} />
<div className="flex flex-col gap-4">
<h2>{profile?.name}</h2>
<Text content={profile?.about ?? ""} tags={[]} />
<div className="flex flex-col gap-4 grow">
<h2>{(profile?.name?.length ?? 0) > 0 ? profile?.name : hexToBech32("npub", pubkey).slice(0, 12)}</h2>
{(profile?.about?.length ?? 0) > 0 && <Text content={profile?.about ?? ""} tags={[]} />}
<WebSiteLink profile={profile} />
{login?.publicKey === pubkey && (
<Button
type="primary"
onClick={() => {
LoginState.logout();
}}
>
Logout
</Button>
)}
</div>
</div>
);

View File

@ -26,7 +26,6 @@ export function RelaysPage() {
type="text"
value={newRelay}
onChange={(e) => setNewRelay(e.target.value)}
className="px-4 py-2 rounded-xl bg-neutral-800 focus-visible:outline-none"
placeholder="wss://myrelay.com"
/>
<Button

View File

@ -3,6 +3,7 @@ import { useRequestBuilder } from "@snort/system-react";
import { useLocation, useParams } from "react-router-dom";
import { TorrentKind } from "../const";
import { TorrentList } from "../element/torrent-list";
import { useRelays } from "../relays";
export function SearchPage() {
const params = useParams();
@ -11,14 +12,16 @@ export function SearchPage() {
const q = new URLSearchParams(location.search ?? "");
const tags = q.get("tags")?.split(",") ?? [];
const iz = q.getAll("i");
const { relays } = useRelays();
const rb = new RequestBuilder(`search:${term}+${tags.join(",")}`);
const f = rb
.withFilter()
.kinds([TorrentKind])
.search(term)
.limit(100)
.relay(["wss://relay.nostr.band", "wss://relay.noswhere.com"]);
const rb = new RequestBuilder("search");
const f = rb.withFilter().relay(["wss://relay.nostr.band", "wss://relay.noswhere.com", ...relays]);
if (term || tags.length > 0 || iz.length > 0) {
f.kinds([TorrentKind]).limit(100);
}
if (term) {
f.search(term);
}
if (tags.length > 0) {
f.tag("t", tags);
}

View File

@ -19,11 +19,13 @@ export function TorrentPage() {
const evState = location.state && "kind" in location.state ? (location.state as TaggedNostrEvent) : undefined;
const rb = new RequestBuilder("torrent:event");
rb.withFilter()
.kinds([TorrentKind])
.link(parseNostrLink(unwrap(id)));
if (!evState) {
rb.withFilter()
.kinds([TorrentKind])
.link(parseNostrLink(unwrap(id)));
}
const evNew = useRequestBuilder(evState ? null : rb);
const evNew = useRequestBuilder(rb);
const ev = evState ?? evNew?.at(0);
if (!ev) return;

View File

@ -1,13 +1,5 @@
import { FlatReqFilter, NostrEvent, NostrSystem, Optimizer, PowMiner, ReqFilter } from "@snort/system";
import {
default as wasmInit,
expand_filter,
get_diff,
flat_merge,
compress,
schnorr_verify_event,
pow,
} from "@snort/system-wasm";
import { DefaultOptimizer, NostrEvent, NostrSystem, Optimizer, PowMiner } from "@snort/system";
import { default as wasmInit, schnorr_verify_event, pow } from "@snort/system-wasm";
import { WorkerRelayInterface } from "@snort/worker-relay";
import WorkerVite from "@snort/worker-relay/src/worker?worker";
@ -19,18 +11,7 @@ const workerScript = import.meta.env.DEV
const workerRelay = new WorkerRelayInterface(workerScript);
export const WasmOptimizer = {
expandFilter: (f: ReqFilter) => {
return expand_filter(f) as Array<FlatReqFilter>;
},
getDiff: (prev: Array<ReqFilter>, next: Array<ReqFilter>) => {
return get_diff(prev, next) as Array<FlatReqFilter>;
},
flatMerge: (all: Array<FlatReqFilter>) => {
return flat_merge(all) as Array<ReqFilter>;
},
compress: (all: Array<ReqFilter>) => {
return compress(all) as Array<ReqFilter>;
},
...DefaultOptimizer,
schnorrVerify: (ev) => {
return schnorr_verify_event(ev);
},

480
yarn.lock
View File

@ -1942,28 +1942,10 @@ __metadata:
languageName: node
linkType: hard
"@noble/ciphers@npm:0.2.0":
version: 0.2.0
resolution: "@noble/ciphers@npm:0.2.0"
checksum: 10c0/57dea65c32741df20a1ac24f365d616a558527109d778c1bec877f20b28875a26b80097bce51ae19529f3792ccf8285fe73839ff404733e32a27a6ebf60edd2c
languageName: node
linkType: hard
"@noble/curves@npm:1.1.0, @noble/curves@npm:~1.1.0":
version: 1.1.0
resolution: "@noble/curves@npm:1.1.0"
dependencies:
"@noble/hashes": "npm:1.3.1"
checksum: 10c0/81115c3ebfa7e7da2d7e18d44d686f98dc6d35dbde3964412c05707c92d0994a01545bc265d5c0bc05c8c49333f75b99c9acef6750f5a79b3abcc8e0546acf88
languageName: node
linkType: hard
"@noble/curves@npm:^1.2.0":
version: 1.2.0
resolution: "@noble/curves@npm:1.2.0"
dependencies:
"@noble/hashes": "npm:1.3.2"
checksum: 10c0/0bac7d1bbfb3c2286910b02598addd33243cb97c3f36f987ecc927a4be8d7d88e0fcb12b0f0ef8a044e7307d1844dd5c49bb724bfa0a79c8ec50ba60768c97f6
"@noble/ciphers@npm:^0.6.0":
version: 0.6.0
resolution: "@noble/ciphers@npm:0.6.0"
checksum: 10c0/840900243306dbf4caad942d518dc215bbe83e4daf6385d9294e76ea39b0834ba21591271cf2dd5cc5e64f96f98cdb967065b75e804b0b338b10ed50415ea64e
languageName: node
linkType: hard
@ -1976,41 +1958,13 @@ __metadata:
languageName: node
linkType: hard
"@noble/hashes@npm:1.3.1":
version: 1.3.1
resolution: "@noble/hashes@npm:1.3.1"
checksum: 10c0/86512713aaf338bced594bc2046ab249fea4e1ba1e7f2ecd02151ef1b8536315e788c11608fafe1b56f04fad1aa3c602da7e5f8e5fcd5f8b0aa94435fe65278e
languageName: node
linkType: hard
"@noble/hashes@npm:1.3.2, @noble/hashes@npm:^1.3.2":
version: 1.3.2
resolution: "@noble/hashes@npm:1.3.2"
checksum: 10c0/2482cce3bce6a596626f94ca296e21378e7a5d4c09597cbc46e65ffacc3d64c8df73111f2265444e36a3168208628258bbbaccba2ef24f65f58b2417638a20e7
languageName: node
linkType: hard
"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:^1.4.0":
"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0":
version: 1.4.0
resolution: "@noble/hashes@npm:1.4.0"
checksum: 10c0/8c3f005ee72e7b8f9cff756dfae1241485187254e3f743873e22073d63906863df5d4f13d441b7530ea614b7a093f0d889309f28b59850f33b66cb26a779a4a5
languageName: node
linkType: hard
"@noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1":
version: 1.3.3
resolution: "@noble/hashes@npm:1.3.3"
checksum: 10c0/23c020b33da4172c988e44100e33cd9f8f6250b68b43c467d3551f82070ebd9716e0d9d2347427aa3774c85934a35fa9ee6f026fca2117e3fa12db7bedae7668
languageName: node
linkType: hard
"@noble/secp256k1@npm:^2.0.0":
version: 2.1.0
resolution: "@noble/secp256k1@npm:2.1.0"
checksum: 10c0/b4c7edd2a5ec5acf294546cd06d08dc2a2a2b2ebe34a6da1f2f5104f56983f81dd31c261ad365c6b9757d1c54017fc3363331ee33bba8715ff94c2bc954313cc
languageName: node
linkType: hard
"@nodelib/fs.scandir@npm:2.1.5":
version: 2.1.5
resolution: "@nodelib/fs.scandir@npm:2.1.5"
@ -2038,26 +1992,6 @@ __metadata:
languageName: node
linkType: hard
"@nostr-dev-kit/ndk@npm:^2.7.1":
version: 2.8.2
resolution: "@nostr-dev-kit/ndk@npm:2.8.2"
dependencies:
"@noble/curves": "npm:^1.4.0"
"@noble/hashes": "npm:^1.3.1"
"@noble/secp256k1": "npm:^2.0.0"
"@scure/base": "npm:^1.1.1"
debug: "npm:^4.3.4"
light-bolt11-decoder: "npm:^3.0.0"
node-fetch: "npm:^3.3.1"
nostr-tools: "npm:^1.15.0"
tseep: "npm:^1.1.1"
typescript-lru-cache: "npm:^2.0.0"
utf8-buffer: "npm:^1.0.0"
websocket-polyfill: "npm:^0.0.3"
checksum: 10c0/7fe18fa503852ea03b3b5e212167bfc1fa4010d194ae35dcfd6693b5dafadd3299b730d46c49102da07ad0810924d7ccfb44370d3a73e47b380b5c20e1e1a4b2
languageName: node
linkType: hard
"@npmcli/agent@npm:^2.0.0":
version: 2.2.0
resolution: "@npmcli/agent@npm:2.2.0"
@ -2306,111 +2240,83 @@ __metadata:
languageName: node
linkType: hard
"@scure/base@npm:^1.1.1, @scure/base@npm:~1.1.0":
version: 1.1.6
resolution: "@scure/base@npm:1.1.6"
checksum: 10c0/237a46a1f45391fc57719154f14295db936a0b1562ea3e182dd42d7aca082dbb7062a28d6c49af16a7e478b12dae8a0fe678d921ea5056bcc30238d29eb05c55
languageName: node
linkType: hard
"@scure/base@npm:^1.1.2":
version: 1.1.3
resolution: "@scure/base@npm:1.1.3"
checksum: 10c0/4eb1d8b58da503ecdff743be36ae3562bbff724da82fb3401468d348659841ae4bb271aeae3a8cf6c4d06cd887dee3825ce6fdac2f699afc63838ae68c499baa
languageName: node
linkType: hard
"@scure/bip32@npm:1.3.1":
version: 1.3.1
resolution: "@scure/bip32@npm:1.3.1"
dependencies:
"@noble/curves": "npm:~1.1.0"
"@noble/hashes": "npm:~1.3.1"
"@scure/base": "npm:~1.1.0"
checksum: 10c0/9ff0ad56f512794aed1ed62e582bf855db829e688235420a116b210169dc31e3e2a8cc4a908126aaa07b6dcbcc4cd085eb12f9d0a8b507a88946d6171a437195
languageName: node
linkType: hard
"@scure/bip39@npm:1.2.1":
"@scure/base@npm:^1.1.6":
version: 1.2.1
resolution: "@scure/bip39@npm:1.2.1"
dependencies:
"@noble/hashes": "npm:~1.3.0"
"@scure/base": "npm:~1.1.0"
checksum: 10c0/fe951f69dd5a7cdcefbe865bce1b160d6b59ba19bd01d09f0718e54fce37a7d8be158b32f5455f0e9c426a7fbbede3e019bf0baa99bacc88ef26a76a07e115d4
resolution: "@scure/base@npm:1.2.1"
checksum: 10c0/e61068854370855b89c50c28fa4092ea6780f1e0db64ea94075ab574ebcc964f719a3120dc708db324991f4b3e652d92ebda03fce2bf6a4900ceeacf9c0ff933
languageName: node
linkType: hard
"@snort/shared@npm:^1.0.15":
version: 1.0.15
resolution: "@snort/shared@npm:1.0.15"
"@snort/shared@npm:^1.0.17":
version: 1.0.17
resolution: "@snort/shared@npm:1.0.17"
dependencies:
"@noble/curves": "npm:^1.2.0"
"@noble/hashes": "npm:^1.3.2"
"@scure/base": "npm:^1.1.2"
"@noble/curves": "npm:^1.4.0"
"@noble/hashes": "npm:^1.4.0"
"@scure/base": "npm:^1.1.6"
debug: "npm:^4.3.4"
eventemitter3: "npm:^5.0.1"
light-bolt11-decoder: "npm:^3.0.0"
checksum: 10c0/d0c109d601d02ab068f7b8a7f9e4afc23ada48da4f70cd285b2fc4bd332bcf8cdc6e898e0a6cffb40e867bcfa2e11a2a08b4e09e77cd3b65029237298d44e723
checksum: 10c0/446fc9e2e599898377d8811f544d5343210a44fdf9a4bfd5d9c280218781ac256278238a7ae9b0ac23739a2c1461be362996ecc429aa59ff0fcc72e00d11131d
languageName: node
linkType: hard
"@snort/system-react@npm:^1.3.2":
version: 1.3.2
resolution: "@snort/system-react@npm:1.3.2"
"@snort/system-react@npm:^1.6.0":
version: 1.6.0
resolution: "@snort/system-react@npm:1.6.0"
dependencies:
"@snort/shared": "npm:^1.0.15"
"@snort/system": "npm:^1.3.2"
"@snort/shared": "npm:^1.0.17"
"@snort/system": "npm:^1.6.0"
react: "npm:^18.2.0"
checksum: 10c0/faba93eb6c718cca75e0906371389d4c7c891699282c2c5725d48295bc21cc5888b1e9e76ddfec393fc32726f452d25cffae210126fef29cc3db0bd42d31b7eb
checksum: 10c0/341a12b732336c0442e7039f870b6f6553eec848bb21e4e42a2ac8d5ae9f7543fe5e201003f7c9a1e8a91c01f70a44e125fde6b7c117ca8193ac47403b316138
languageName: node
linkType: hard
"@snort/system-wasm@npm:^1.0.2":
version: 1.0.2
resolution: "@snort/system-wasm@npm:1.0.2"
checksum: 10c0/0cd754f8fceefc37d064423f46d57cb925faee9060b602eeef7d93cc92bc534d78e02b5b15531d96ee91dfa40d64c4cac82054597e9f59668fcf5c08fc871d5c
"@snort/system-wasm@npm:^1.0.5":
version: 1.0.5
resolution: "@snort/system-wasm@npm:1.0.5"
checksum: 10c0/c043264ed4d198a77cb01a6036b73e949b092be536f028071cda5f08fca0eb6cb511148c864f436c4953ee15609f71e544c9b97cd1e7da63cbec1e9c4550cd29
languageName: node
linkType: hard
"@snort/system@npm:^1.3.2":
version: 1.3.2
resolution: "@snort/system@npm:1.3.2"
"@snort/system@npm:^1.6.0":
version: 1.6.0
resolution: "@snort/system@npm:1.6.0"
dependencies:
"@noble/curves": "npm:^1.2.0"
"@noble/hashes": "npm:^1.3.2"
"@nostr-dev-kit/ndk": "npm:^2.7.1"
"@scure/base": "npm:^1.1.2"
"@snort/shared": "npm:^1.0.15"
"@noble/ciphers": "npm:^0.6.0"
"@noble/curves": "npm:^1.4.0"
"@noble/hashes": "npm:^1.4.0"
"@scure/base": "npm:^1.1.6"
"@snort/shared": "npm:^1.0.17"
"@stablelib/xchacha20": "npm:^1.0.1"
debug: "npm:^4.3.4"
eventemitter3: "npm:^5.0.1"
isomorphic-ws: "npm:^5.0.0"
lokijs: "npm:^1.5.12"
lru-cache: "npm:^10.2.0"
nostr-social-graph: "npm:^1.0.3"
uuid: "npm:^9.0.0"
ws: "npm:^8.14.0"
checksum: 10c0/882d82755e316b4fc00012986a644ca74ddb598aed94665212ba816588c6d56fadb637f844612d2bffdebb2e98c703320e83c9e7c7160d0c03ad8f17890e8ec1
checksum: 10c0/ac651493586c1f8b89a61f15891b0f8d379a76296828b6e77cf22b328fb87bf7a9abb051663b68a83734d06201431a4abf4c34a81b71b6e348533c5aa9599499
languageName: node
linkType: hard
"@snort/worker-relay@npm:^1.0.10":
version: 1.0.10
resolution: "@snort/worker-relay@npm:1.0.10"
"@snort/worker-relay@npm:^1.3.0":
version: 1.3.0
resolution: "@snort/worker-relay@npm:1.3.0"
dependencies:
"@sqlite.org/sqlite-wasm": "npm:^3.45.1-build1"
"@sqlite.org/sqlite-wasm": "npm:^3.46.1-build3"
eventemitter3: "npm:^5.0.1"
uuid: "npm:^9.0.1"
checksum: 10c0/7595163359bc09096f8e8e12f7ed903ac50d96d8fcc0064d6bd72180faf17abd368464fb3622306e0c4c1b05ec0c0e93fd1f1162e2594c313c7e4a9c547f6d9f
checksum: 10c0/1a0eb175f50787bbcaa585641bf710347b59f3d3426cbf0f83182a5574bf7a63beb3e5d66bb41506e2d50c3ee904d55670c85c7f1542018936dd5a4ce06726e8
languageName: node
linkType: hard
"@sqlite.org/sqlite-wasm@npm:^3.45.1-build1":
version: 3.45.1-build1
resolution: "@sqlite.org/sqlite-wasm@npm:3.45.1-build1"
"@sqlite.org/sqlite-wasm@npm:^3.46.1-build3":
version: 3.46.1-build5
resolution: "@sqlite.org/sqlite-wasm@npm:3.46.1-build5"
bin:
sqlite-wasm: bin/index.js
checksum: 10c0/bb774ea390a18087837408b43ab5355dda0867c92092e15591d2bdcdfbfeab90bd6d11413ff98b2d82db48bd565a8a212fe375b53fa1116e45c8dbe912cc374a
checksum: 10c0/3ff6f1587545ac4dcd95cc34e70d3ff7984d24ed102749138360eec94fd7b63b76278d937b265444df1e13dc5adf9b7cc6e5fc7880f110ac209029adcf3255a9
languageName: node
linkType: hard
@ -3065,16 +2971,6 @@ __metadata:
languageName: node
linkType: hard
"bufferutil@npm:^4.0.1":
version: 4.0.8
resolution: "bufferutil@npm:4.0.8"
dependencies:
node-gyp: "npm:latest"
node-gyp-build: "npm:^4.3.0"
checksum: 10c0/36cdc5b53a38d9f61f89fdbe62029a2ebcd020599862253fefebe31566155726df9ff961f41b8c97b02b4c12b391ef97faf94e2383392654cf8f0ed68f76e47c
languageName: node
linkType: hard
"builtin-modules@npm:^3.3.0":
version: 3.3.0
resolution: "builtin-modules@npm:3.3.0"
@ -3314,23 +3210,6 @@ __metadata:
languageName: node
linkType: hard
"d@npm:1, d@npm:^1.0.1, d@npm:^1.0.2":
version: 1.0.2
resolution: "d@npm:1.0.2"
dependencies:
es5-ext: "npm:^0.10.64"
type: "npm:^2.7.2"
checksum: 10c0/3e6ede10cd3b77586c47da48423b62bed161bf1a48bdbcc94d87263522e22f5dfb0e678a6dba5323fdc14c5d8612b7f7eb9e7d9e37b2e2d67a7bf9f116dabe5a
languageName: node
linkType: hard
"data-uri-to-buffer@npm:^4.0.0":
version: 4.0.1
resolution: "data-uri-to-buffer@npm:4.0.1"
checksum: 10c0/20a6b93107597530d71d4cb285acee17f66bcdfc03fd81040921a81252f19db27588d87fc8fc69e1950c55cfb0bf8ae40d0e5e21d907230813eb5d5a7f9eb45b
languageName: node
linkType: hard
"data-view-buffer@npm:^1.0.1":
version: 1.0.1
resolution: "data-view-buffer@npm:1.0.1"
@ -3376,15 +3255,6 @@ __metadata:
languageName: node
linkType: hard
"debug@npm:^2.2.0":
version: 2.6.9
resolution: "debug@npm:2.6.9"
dependencies:
ms: "npm:2.0.0"
checksum: 10c0/121908fb839f7801180b69a7e218a40b5a0b718813b886b7d6bdb82001b931c938e2941d1e4450f33a1b1df1da653f5f7a0440c197f29fbf8a6e9d45ff6ef589
languageName: node
linkType: hard
"deep-is@npm:^0.1.3":
version: 0.1.4
resolution: "deep-is@npm:0.1.4"
@ -3458,11 +3328,11 @@ __metadata:
resolution: "dtan@workspace:."
dependencies:
"@noble/hashes": "npm:^1.4.0"
"@snort/shared": "npm:^1.0.15"
"@snort/system": "npm:^1.3.2"
"@snort/system-react": "npm:^1.3.2"
"@snort/system-wasm": "npm:^1.0.2"
"@snort/worker-relay": "npm:^1.0.10"
"@snort/shared": "npm:^1.0.17"
"@snort/system": "npm:^1.6.0"
"@snort/system-react": "npm:^1.6.0"
"@snort/system-wasm": "npm:^1.0.5"
"@snort/worker-relay": "npm:^1.3.0"
"@types/react": "npm:^18.2.37"
"@types/react-dom": "npm:^18.2.15"
"@typescript-eslint/eslint-plugin": "npm:^6.10.0"
@ -3655,39 +3525,6 @@ __metadata:
languageName: node
linkType: hard
"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.62, es5-ext@npm:^0.10.63, es5-ext@npm:^0.10.64, es5-ext@npm:~0.10.14":
version: 0.10.64
resolution: "es5-ext@npm:0.10.64"
dependencies:
es6-iterator: "npm:^2.0.3"
es6-symbol: "npm:^3.1.3"
esniff: "npm:^2.0.1"
next-tick: "npm:^1.1.0"
checksum: 10c0/4459b6ae216f3c615db086e02437bdfde851515a101577fd61b19f9b3c1ad924bab4d197981eb7f0ccb915f643f2fc10ff76b97a680e96cbb572d15a27acd9a3
languageName: node
linkType: hard
"es6-iterator@npm:^2.0.3":
version: 2.0.3
resolution: "es6-iterator@npm:2.0.3"
dependencies:
d: "npm:1"
es5-ext: "npm:^0.10.35"
es6-symbol: "npm:^3.1.1"
checksum: 10c0/91f20b799dba28fb05bf623c31857fc1524a0f1c444903beccaf8929ad196c8c9ded233e5ac7214fc63a92b3f25b64b7f2737fcca8b1f92d2d96cf3ac902f5d8
languageName: node
linkType: hard
"es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3":
version: 3.1.4
resolution: "es6-symbol@npm:3.1.4"
dependencies:
d: "npm:^1.0.2"
ext: "npm:^1.7.0"
checksum: 10c0/777bf3388db5d7919e09a0fd175aa5b8a62385b17cb2227b7a137680cba62b4d9f6193319a102642aa23d5840d38a62e4784f19cfa5be4a2210a3f0e9b23d15d
languageName: node
linkType: hard
"esbuild@npm:^0.20.1":
version: 0.20.2
resolution: "esbuild@npm:0.20.2"
@ -3872,18 +3709,6 @@ __metadata:
languageName: node
linkType: hard
"esniff@npm:^2.0.1":
version: 2.0.1
resolution: "esniff@npm:2.0.1"
dependencies:
d: "npm:^1.0.1"
es5-ext: "npm:^0.10.62"
event-emitter: "npm:^0.3.5"
type: "npm:^2.7.2"
checksum: 10c0/7efd8d44ac20e5db8cb0ca77eb65eca60628b2d0f3a1030bcb05e71cc40e6e2935c47b87dba3c733db12925aa5b897f8e0e7a567a2c274206f184da676ea2e65
languageName: node
linkType: hard
"espree@npm:^9.6.0, espree@npm:^9.6.1":
version: 9.6.1
resolution: "espree@npm:9.6.1"
@ -3941,16 +3766,6 @@ __metadata:
languageName: node
linkType: hard
"event-emitter@npm:^0.3.5":
version: 0.3.5
resolution: "event-emitter@npm:0.3.5"
dependencies:
d: "npm:1"
es5-ext: "npm:~0.10.14"
checksum: 10c0/75082fa8ffb3929766d0f0a063bfd6046bd2a80bea2666ebaa0cfd6f4a9116be6647c15667bea77222afc12f5b4071b68d393cf39fdaa0e8e81eda006160aff0
languageName: node
linkType: hard
"eventemitter3@npm:^5.0.1":
version: 5.0.1
resolution: "eventemitter3@npm:5.0.1"
@ -3965,15 +3780,6 @@ __metadata:
languageName: node
linkType: hard
"ext@npm:^1.7.0":
version: 1.7.0
resolution: "ext@npm:1.7.0"
dependencies:
type: "npm:^2.7.2"
checksum: 10c0/a8e5f34e12214e9eee3a4af3b5c9d05ba048f28996450975b369fc86e5d0ef13b6df0615f892f5396a9c65d616213c25ec5b0ad17ef42eac4a500512a19da6c7
languageName: node
linkType: hard
"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3":
version: 3.1.3
resolution: "fast-deep-equal@npm:3.1.3"
@ -4017,16 +3823,6 @@ __metadata:
languageName: node
linkType: hard
"fetch-blob@npm:^3.1.2, fetch-blob@npm:^3.1.4":
version: 3.2.0
resolution: "fetch-blob@npm:3.2.0"
dependencies:
node-domexception: "npm:^1.0.0"
web-streams-polyfill: "npm:^3.0.3"
checksum: 10c0/60054bf47bfa10fb0ba6cb7742acec2f37c1f56344f79a70bb8b1c48d77675927c720ff3191fa546410a0442c998d27ab05e9144c32d530d8a52fbe68f843b69
languageName: node
linkType: hard
"file-entry-cache@npm:^6.0.1":
version: 6.0.1
resolution: "file-entry-cache@npm:6.0.1"
@ -4101,15 +3897,6 @@ __metadata:
languageName: node
linkType: hard
"formdata-polyfill@npm:^4.0.10":
version: 4.0.10
resolution: "formdata-polyfill@npm:4.0.10"
dependencies:
fetch-blob: "npm:^3.1.2"
checksum: 10c0/5392ec484f9ce0d5e0d52fb5a78e7486637d516179b0eb84d81389d7eccf9ca2f663079da56f761355c0a65792810e3b345dc24db9a8bbbcf24ef3c8c88570c6
languageName: node
linkType: hard
"fraction.js@npm:^4.3.6":
version: 4.3.7
resolution: "fraction.js@npm:4.3.7"
@ -4755,13 +4542,6 @@ __metadata:
languageName: node
linkType: hard
"is-typedarray@npm:^1.0.0":
version: 1.0.0
resolution: "is-typedarray@npm:1.0.0"
checksum: 10c0/4c096275ba041a17a13cca33ac21c16bc4fd2d7d7eb94525e7cd2c2f2c1a3ab956e37622290642501ff4310601e413b675cf399ad6db49855527d2163b3eeeec
languageName: node
linkType: hard
"is-weakref@npm:^1.0.2":
version: 1.0.2
resolution: "is-weakref@npm:1.0.2"
@ -5030,13 +4810,6 @@ __metadata:
languageName: node
linkType: hard
"lokijs@npm:^1.5.12":
version: 1.5.12
resolution: "lokijs@npm:1.5.12"
checksum: 10c0/275ca25174d5174f2126559aad7eedccd8a9759906f650c1bda2f11edd7ed5139fdda8f09f312443261335fdf266883972edb910a948190961689cac7dbbff2a
languageName: node
linkType: hard
"loose-envify@npm:^1.1.0":
version: 1.4.0
resolution: "loose-envify@npm:1.4.0"
@ -5245,13 +5018,6 @@ __metadata:
languageName: node
linkType: hard
"ms@npm:2.0.0":
version: 2.0.0
resolution: "ms@npm:2.0.0"
checksum: 10c0/f8fda810b39fd7255bbdc451c46286e549794fcc700dc9cd1d25658bbc4dc2563a5de6fe7c60f798a16a60c6ceb53f033cb353f493f0cf63e5199b702943159d
languageName: node
linkType: hard
"ms@npm:2.1.2":
version: 2.1.2
resolution: "ms@npm:2.1.2"
@ -5293,42 +5059,6 @@ __metadata:
languageName: node
linkType: hard
"next-tick@npm:^1.1.0":
version: 1.1.0
resolution: "next-tick@npm:1.1.0"
checksum: 10c0/3ba80dd805fcb336b4f52e010992f3e6175869c8d88bf4ff0a81d5d66e6049f89993463b28211613e58a6b7fe93ff5ccbba0da18d4fa574b96289e8f0b577f28
languageName: node
linkType: hard
"node-domexception@npm:^1.0.0":
version: 1.0.0
resolution: "node-domexception@npm:1.0.0"
checksum: 10c0/5e5d63cda29856402df9472335af4bb13875e1927ad3be861dc5ebde38917aecbf9ae337923777af52a48c426b70148815e890a5d72760f1b4d758cc671b1a2b
languageName: node
linkType: hard
"node-fetch@npm:^3.3.1":
version: 3.3.2
resolution: "node-fetch@npm:3.3.2"
dependencies:
data-uri-to-buffer: "npm:^4.0.0"
fetch-blob: "npm:^3.1.4"
formdata-polyfill: "npm:^4.0.10"
checksum: 10c0/f3d5e56190562221398c9f5750198b34cf6113aa304e34ee97c94fd300ec578b25b2c2906edba922050fce983338fde0d5d34fcb0fc3336ade5bd0e429ad7538
languageName: node
linkType: hard
"node-gyp-build@npm:^4.3.0":
version: 4.8.1
resolution: "node-gyp-build@npm:4.8.1"
bin:
node-gyp-build: bin.js
node-gyp-build-optional: optional.js
node-gyp-build-test: build-test.js
checksum: 10c0/e36ca3d2adf2b9cca316695d7687207c19ac6ed326d6d7c68d7112cebe0de4f82d6733dff139132539fcc01cf5761f6c9082a21864ab9172edf84282bc849ce7
languageName: node
linkType: hard
"node-gyp@npm:latest":
version: 10.0.1
resolution: "node-gyp@npm:10.0.1"
@ -5388,22 +5118,10 @@ __metadata:
languageName: node
linkType: hard
"nostr-tools@npm:^1.15.0":
version: 1.17.0
resolution: "nostr-tools@npm:1.17.0"
dependencies:
"@noble/ciphers": "npm:0.2.0"
"@noble/curves": "npm:1.1.0"
"@noble/hashes": "npm:1.3.1"
"@scure/base": "npm:1.1.1"
"@scure/bip32": "npm:1.3.1"
"@scure/bip39": "npm:1.2.1"
peerDependencies:
typescript: ">=5.0.0"
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/b52732df3e403ef3c73a41fe1dea89accbff91597b231d811d577c35a9bd9307651de65ec7fbcc9989aef4c35e9c6b1005200fbbfec45544dcd64f928bbfc476
"nostr-social-graph@npm:^1.0.3":
version: 1.0.5
resolution: "nostr-social-graph@npm:1.0.5"
checksum: 10c0/529865166127f1eba686453563458f948f5365200a1976f3b8eaa9203f6aa091c54d5fbe678267bf9e2a4a57cf364d7fc37861c373f6093cc1e38e3733e690f5
languageName: node
linkType: hard
@ -6586,20 +6304,6 @@ __metadata:
languageName: node
linkType: hard
"tseep@npm:^1.1.1":
version: 1.2.1
resolution: "tseep@npm:1.2.1"
checksum: 10c0/abb4b0f8558c0326cd2b057794f5a61e6e0d922d17b7915efa97fb0aa394f6ba5c261e21e14fc46601ba191b5dae0f07fe1aae9a0c391e430922b26d5f718c57
languageName: node
linkType: hard
"tstl@npm:^2.0.7":
version: 2.5.16
resolution: "tstl@npm:2.5.16"
checksum: 10c0/3815f34a2bc062e35defb4d23768ea99a099847dd36d392c3ccef9d90f865331d9ea03677fc50a3e110da3a93af8abd5bcc43e4b409be012bad5a4773b6e11c1
languageName: node
linkType: hard
"type-check@npm:^0.4.0, type-check@npm:~0.4.0":
version: 0.4.0
resolution: "type-check@npm:0.4.0"
@ -6623,13 +6327,6 @@ __metadata:
languageName: node
linkType: hard
"type@npm:^2.7.2":
version: 2.7.2
resolution: "type@npm:2.7.2"
checksum: 10c0/84c2382788fe24e0bc3d64c0c181820048f672b0f06316aa9c7bdb373f8a09f8b5404f4e856bc4539fb931f2f08f2adc4c53f6c08c9c0314505d70c29a1289e1
languageName: node
linkType: hard
"typed-array-buffer@npm:^1.0.2":
version: 1.0.2
resolution: "typed-array-buffer@npm:1.0.2"
@ -6682,22 +6379,6 @@ __metadata:
languageName: node
linkType: hard
"typedarray-to-buffer@npm:^3.1.5":
version: 3.1.5
resolution: "typedarray-to-buffer@npm:3.1.5"
dependencies:
is-typedarray: "npm:^1.0.0"
checksum: 10c0/4ac5b7a93d604edabf3ac58d3a2f7e07487e9f6e98195a080e81dbffdc4127817f470f219d794a843b87052cedef102b53ac9b539855380b8c2172054b7d5027
languageName: node
linkType: hard
"typescript-lru-cache@npm:^2.0.0":
version: 2.0.0
resolution: "typescript-lru-cache@npm:2.0.0"
checksum: 10c0/69864dd8a3538f18002c50a644ef7a7f2d5e320a12fa6266b8c715d6530fec38e475349cd35f75b5196a39d1a28f8b12ebf16afce699b743bdf385dce7df1e0e
languageName: node
linkType: hard
"typescript@npm:^5.4.5":
version: 5.4.5
resolution: "typescript@npm:5.4.5"
@ -6825,23 +6506,6 @@ __metadata:
languageName: node
linkType: hard
"utf-8-validate@npm:^5.0.2":
version: 5.0.10
resolution: "utf-8-validate@npm:5.0.10"
dependencies:
node-gyp: "npm:latest"
node-gyp-build: "npm:^4.3.0"
checksum: 10c0/23cd6adc29e6901aa37ff97ce4b81be9238d0023c5e217515b34792f3c3edb01470c3bd6b264096dd73d0b01a1690b57468de3a24167dd83004ff71c51cc025f
languageName: node
linkType: hard
"utf8-buffer@npm:^1.0.0":
version: 1.0.0
resolution: "utf8-buffer@npm:1.0.0"
checksum: 10c0/3cf47ba9ba9ca756734bbe3b139adf04c0e1419e36ecdeebfc930ae702c0b15042225cd483b9d933600353822201e0db3640e1206829823062a5accee0821027
languageName: node
linkType: hard
"util-deprecate@npm:^1.0.2":
version: 1.0.2
resolution: "util-deprecate@npm:1.0.2"
@ -6919,13 +6583,6 @@ __metadata:
languageName: node
linkType: hard
"web-streams-polyfill@npm:^3.0.3":
version: 3.3.3
resolution: "web-streams-polyfill@npm:3.3.3"
checksum: 10c0/64e855c47f6c8330b5436147db1c75cb7e7474d924166800e8e2aab5eb6c76aac4981a84261dd2982b3e754490900b99791c80ae1407a9fa0dcff74f82ea3a7f
languageName: node
linkType: hard
"webidl-conversions@npm:^4.0.2":
version: 4.0.2
resolution: "webidl-conversions@npm:4.0.2"
@ -6933,30 +6590,6 @@ __metadata:
languageName: node
linkType: hard
"websocket-polyfill@npm:^0.0.3":
version: 0.0.3
resolution: "websocket-polyfill@npm:0.0.3"
dependencies:
tstl: "npm:^2.0.7"
websocket: "npm:^1.0.28"
checksum: 10c0/b8a16af58489f0dd8e896ad986547979544d90c1b21a1777abf2432b899df9fca713b43a0ac50afc995ef7ba28bde01ec1a5391d746a9d14209e54c31054f428
languageName: node
linkType: hard
"websocket@npm:^1.0.28":
version: 1.0.35
resolution: "websocket@npm:1.0.35"
dependencies:
bufferutil: "npm:^4.0.1"
debug: "npm:^2.2.0"
es5-ext: "npm:^0.10.63"
typedarray-to-buffer: "npm:^3.1.5"
utf-8-validate: "npm:^5.0.2"
yaeti: "npm:^0.0.6"
checksum: 10c0/8be9a68dc0228f18058c9010d1308479f05050af8f6d68b9dbc6baebd9ab484c15a24b2521a5d742a9d78e62ee19194c532992f1047a9b9adf8c3eedb0b1fcdc
languageName: node
linkType: hard
"whatwg-url@npm:^7.0.0":
version: 7.1.0
resolution: "whatwg-url@npm:7.1.0"
@ -7250,13 +6883,6 @@ __metadata:
languageName: node
linkType: hard
"yaeti@npm:^0.0.6":
version: 0.0.6
resolution: "yaeti@npm:0.0.6"
checksum: 10c0/4e88702d8b34d7b61c1c4ec674422b835d453b8f8a6232be41e59fc98bc4d9ab6d5abd2da55bab75dfc07ae897fdc0c541f856ce3ab3b17de1630db6161aa3f6
languageName: node
linkType: hard
"yallist@npm:^3.0.2":
version: 3.1.1
resolution: "yallist@npm:3.1.1"