Skip to main content

Module nostrdb_integration

Module nostrdb_integration 

Source
Expand description

Nostrdb integration for social graph-based access control and peer classification.

Re-exports§

pub use access::SocialGraphAccessControl;
pub use crawler::SocialGraphCrawler;

Modules§

access
Social graph-based write access control using nostrdb.
crawler
Social graph crawler - BFS crawl of follow lists via Nostr relays.
snapshot

Structs§

Ndb
A nostrdb context. Construct one of these with Ndb::new.
SocialGraphStats
Social graph statistics

Functions§

get_follow_distance
Get the follow distance for a pubkey from the social graph root. Returns None if the pubkey is not in the social graph.
get_follows
Get the list of pubkeys that a given pubkey follows.
ingest_event
Ingest a Nostr event JSON string into nostrdb_social. Wraps the event in relay format: [“EVENT”,“sub_id”,{…}]
init_ndb
Initialize nostrdb_social with the given data directory.
init_ndb_at_path
Initialize nostrdb_social at a specific directory (used for spambox).
init_ndb_with_mapsize
Initialize nostrdb_social with optional mapsize (bytes).
is_overmuted
Check if a user is overmuted based on muters vs followers at the closest distance where there is any opinion. Mirrors nostr-social-graph logic.
set_social_graph_root
Set the social graph root pubkey.