1.0 KiB
1.0 KiB
web of npubs
Quick and dirty code for minimum viable web of trust.
Running
Create a SQLite database pubkeys.db
from the old csv file of users. This is idempotent.
deno run --allow-read=. --allow-write=. initialize-subscriber-table.ts
deno run -A fetch.ts
deno run -A fetch.ts --legacy-mode
The legacy mode flag disables outbox mode to workaround issues where outbox mode stalls indefinitely on some profiles.
Moreover, the websocket implementation in Deno will frequently crash for whatever reason. This means we need to run the script many times before it finishes collecting npubs.
There's no update method, so if you want to update the foaf pubkey lists, delete pubkey.db
and run the script again.
Development
Using repl:
export DEBUG='ndk:*'
deno repl -A
Paste code from fetch.ts
. Profit.
TODO:
- rename pubkey to subscriber_pubkey for consitency.