Provider einrichten
Terminal
$npm install nostr-wot-sdk@3.0.0 nostr-tools react
Provider einrichten
NostrSdkProvider kombiniert Datenkonfiguration, Sitzungsstatus und optionalen WoT-Kontext. Gib myPubkey für Oracle-Abfragen ausdrücklich an; die Anmeldung setzt den Ausgangspunkt für WoT-Abfragen nicht automatisch.
tsx
"use client";
import type { ReactNode } from "react";
import { NostrSdkProvider } from "nostr-wot-sdk/react";
export function Providers({ children }: { children: ReactNode }) {
return (
<NostrSdkProvider
relays={["wss://relay.damus.io", "wss://nos.lol"]}
profileAggregators={["wss://purplepag.es"]}
>
{children}
</NostrSdkProvider>
);
}