Nostr WoT

Documentação

Tudo que você precisa para integrar Web of Trust em seu aplicativo.

Visão Geral

Nostr Web of Trust fornece duas ferramentas complementares para filtragem de spam e pontuação de confiança:

Ambos respondem a mesma pergunta fundamental: ""Qual é a distância social entre duas pubkeys?""

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");
}