Nostr WoT

Documentation

Everything you need to integrate Web of Trust into your application.

Overview

Nostr Web of Trust combines browser identity, Nostr SDK packages and an Oracle for follow-graph and public-mute queries.

The Oracle answers a graph question: "What is the indexed follow distance between two pubkeys?"

Choose Your Integration

Browser Extension

Browser identity, event signing and encryption through window.nostr.

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 packages for Nostr data, relays, login and local graph queries. Check the API compatibility notes before using remote WoT queries.

SDK Docs →

Quick Example

Query the Oracle v0.3.0 API directly. Replace these example keys with your own 64-character hexadecimal pubkeys:

typescript
const from = "a".repeat(64); // Replace with your public key
const to = "b".repeat(64); // Replace with the target public key
const query = new URLSearchParams({ from, to, max_hops: "2" });
const response = await fetch(
  "https://wot-oracle.mappingbitcoin.com/distance?" + query
);
if (!response.ok) throw new Error("Oracle HTTP " + response.status);
const { hops } = await response.json();
console.log(hops === null ? "No indexed path within 2 hops" : hops);
// Follow distance is evidence of a connection, not a trust score.
// Use /trust for separate public mute evidence.

SDK compatibility and local graph queries