Nostr WoT

Documentazione

Tutto ciò di cui hai bisogno per integrare Web of Trust nella tua applicazione.

Panoramica

Nostr Web of Trust fornisce due strumenti complementari per il filtraggio dello spam e il punteggio di fiducia:

Entrambi rispondono alla stessa domanda fondamentale: ""Qual è la distanza sociale tra due pubkey?""

Choose Your Integration

Browser Extension

For client-side web apps. Users need the WoT extension installed.

Extension API Docs →

Oracle REST API

For server-side apps. No user extension required. Use our public server or self-host.

Oracle API Docs →

JavaScript SDK

TypeScript SDK for the Oracle API with React hooks and error handling.

SDK Docs →

Quick Example

Here's a simple example using the SDK's Web of Trust module:

typescript
import { WoT } from "@nostr-wot/wot";

const wot = new WoT({ rootPubkey: "hex-your-pubkey", maxHops: 2 });

// Get hop distance to a target pubkey
const result = await wot.getDistance("hex-target-pubkey");

if (result && result.hops <= 2) {
  console.log(`Trusted: ${result.hops} hops away`);
} else {
  console.log("Not in your web of trust");
}