freeport-nostr

v0.5.0
io.github.ptrinh/freeport-nostr Checked 1 day ago Published 5 months ago

Search Freeport Nostr events by kind, tag & geohash radius (rides, services, reputation).

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

nostr_search_intents

Search Freeport ride/service/product intents (offers & requests). Filter by side, category/area topic tags, and an optional geographic radius. Results are decoded, expiry-filtered, and sorted nearest-first when a point is given.

ParameterTypeDescription
includeExpiredboolean
limitinteger
nearobjectFilter & sort by distance from this point.
relaySideGeohashbooleanAlso narrow at the relay via a #g cover of the radius. Only effective if posts carry geohash-prefix tags; off by default.
relaysarrayOverride the relay set for this call (ws/wss URLs, max 10). Defaults to the server relays.
sidestringoffer = drivers/providers/sellers; request = riders/buyers; any = both
sinceintegerOnly events created at/after this unix-seconds time.
topicsarrayTopic `t` tags to require (category/subcategory/area keys, e.g. "vn_hanoi", "ridesharing").
untilintegerOnly events created at/before this unix-seconds time.

nostr_search_reputation

Fetch reputation signals for a pubkey: karma ratings (kind 32103) it received and deal receipts (kind 32104). Returns proven-deal count (both receipt halves present) and a karma summary. Note: scores are subjective and un-weighted here; do not treat as Sybil-proof.

ParameterTypeDescription
pubkey *stringSubject pubkey (hex) to look up reputation for.
limitinteger
relaysarrayOverride the relay set for this call (ws/wss URLs, max 10). Defaults to the server relays.

nostr_get_event

Fetch one or more events by id. Returns the raw signed events.

ParameterTypeDescription
ids *array
relaysarrayOverride the relay set for this call (ws/wss URLs, max 10). Defaults to the server relays.

nostr_profile

Fetch NIP-01 profile metadata (kind 0) for one or more pubkeys — name, about, picture, nip05, lud16, etc. Optionally include each author's most recent notes (kind 1). General-purpose: works for any Nostr user, not just Freeport.

ParameterTypeDescription
pubkeys *arrayHex pubkeys to fetch profiles for.
recentNotesintegerIf >0, also fetch up to this many recent text notes (kind 1) per pubkey.
relaysarrayOverride the relay set for this call (ws/wss URLs, max 10). Defaults to the server relays.

nostr_query_raw

Escape hatch: run an arbitrary NIP-01 filter (kinds/authors/ids/tags/since/until/limit). Use the typed tools above when they fit. Returns raw signed events.

ParameterTypeDescription
authorsarray
idsarray
kindsarray
limitinteger
relaysarrayOverride the relay set for this call (ws/wss URLs, max 10). Defaults to the server relays.
sinceinteger
tagsobjectTag filters, e.g. {"t":["vn_hanoi"],"g":["w3gv"]}. Keys are single tag letters.
untilinteger