Skip to content

Welshman Docs / @welshman/app / Wot

Class: Wot ​

Defined in: plugins/wot.ts:62

Web of trust: who follows and mutes whom, built from the public tags on follow (NIP-02) and mute (NIP-51) lists as they land in the repository. A list rewrites its author's edges as it arrives — so an update costs the one list that changed, and every read is a lookup into the graph.

Reads about a pubkey from the outside take a WotScope: Global counts every list in the repository, Follows counts only what the user's follows published — the pubkey as the user sees it. The user's follow list is part of the same graph, so a Follows read tracks it changing like it tracks anything else.

Every read is a Projection — subscribe via .$, snapshot via .get().

Constructors ​

Constructor ​

new Wot(app): Wot

Defined in: plugins/wot.ts:75

Parameters ​

app ​

IApp

Returns ​

Wot

Properties ​

app ​

readonly app: IApp

Defined in: plugins/wot.ts:75

Methods ​

followers() ​

followers(target, scope): Projection<string[]>

Defined in: plugins/wot.ts:209

Parameters ​

target ​

string

scope ​

WotScope

Returns ​

Projection<string[]>


follows() ​

follows(target): Projection<string[]>

Defined in: plugins/wot.ts:203

Parameters ​

target ​

string

Returns ​

Projection<string[]>


muters() ​

muters(target, scope): Projection<string[]>

Defined in: plugins/wot.ts:212

Parameters ​

target ​

string

scope ​

WotScope

Returns ​

Projection<string[]>


mutes() ​

mutes(target): Projection<string[]>

Defined in: plugins/wot.ts:206

Parameters ​

target ​

string

Returns ​

Projection<string[]>


network() ​

network(target): Projection<string[]>

Defined in: plugins/wot.ts:225

Parameters ​

target ​

string

Returns ​

Projection<string[]>


score() ​

score(target, scope): Projection<number>

Defined in: plugins/wot.ts:215

Parameters ​

target ​

string

scope ​

WotScope

Returns ​

Projection<number>


scores() ​

scores(scope): Projection<Map<string, number>>

Defined in: plugins/wot.ts:246

Every pubkey's score at once, for the callers that need the whole picture — ranking search results, resolving a score range — rather than a projection per pubkey.

Parameters ​

scope ​

WotScope

Returns ​

Projection<Map<string, number>>