Claude
d1bc98d0f8
Add signevent method to NIP-86 (nip86 + khatru)
...
Implements the signevent capability from nostr-protocol/nips#2389 : relay admins
can ask the relay to sign an unsigned event template with its own (self) key.
- nip86: SignEvent MethodParams type + "signevent" decode case (round-trips the
{kind, content, tags, created_at} param into a nostr.Event).
- khatru: RelayManagementAPI.SignEvent hook + dispatch returning the signed event
as the result.
2026-06-20 15:06:17 +00:00
Jon Staab
fefc85d500
Add unbanpubkey and unallowpubkey
2026-05-05 11:36:42 -07:00
Jon Staab
fbc805a5a6
Switch supported_nips to strings
2026-05-05 11:36:42 -07:00
fiatjaf
a5aeff31d7
khatru: cancel existing subscription when a new one starts with the same id.
2026-05-04 19:26:24 -03:00
fiatjaf
bf7998e780
khatru: OnListenerRemoved wasn't being called in the most common case of a connection dropped.
2026-05-04 13:13:02 -03:00
fiatjaf
61586d5d1b
khatru: ForceSetAuthed()
2026-05-04 11:50:21 -03:00
fiatjaf
05b426e67e
khatru: add and remove listener hooks.
2026-04-29 19:32:47 -03:00
fiatjaf
e144b33fa2
khatru: use sync.Pool to minimize allocations of sets on dispatcher.
2026-04-23 20:14:18 -03:00
fiatjaf
e2ad68d050
khatru: we haven't fixed the nil ws bug on dispatcher, but at least now we have more tests and an even more efficient architecture!
2026-04-22 23:16:43 -03:00
fiatjaf
5b28d08e47
khatru: add tests and fix dispatcher.
2026-04-21 21:20:40 -03:00
fiatjaf
f50b7b0f8d
khatru: list clients and client details.
2026-04-16 16:14:42 -03:00
fiatjaf
31473172a9
khatru: byAuthor and byKind as xsync maps.
2026-04-16 07:20:48 -03:00
fiatjaf
d56bdba3ff
khatru: WithServiceURL() subhandlers.
2026-04-15 21:19:03 -03:00
fiatjaf
c11e94a04b
khatru: ReplaceEvent hook doesn't need the previous events.
2026-04-14 19:58:17 -03:00
fiatjaf
b989b66bb7
change ReplaceEvent() interface to return a list of the events deleted.
2026-04-10 11:56:08 -03:00
fiatjaf
9b881801d8
khatru: get rid of broken unused get-started.go helpers.
2026-04-04 09:20:03 -03:00
fiatjaf
371cecdb84
guard against nil connections on write to protect against concurrent listener removals.
2026-04-03 12:30:06 -03:00
fiatjaf
2735abe060
khatru: listener needed a xsync.Map instead of a map, because of concurrent access.
2026-04-03 08:27:00 -03:00
fiatjaf
117a304f68
khatru: relay stats.
2026-04-02 03:29:56 -03:00
fiatjaf
ac2d4579f1
khatru: get rid of subrelays + segregated indexed listeners.
2026-04-02 03:29:56 -03:00
fiatjaf
172e7890b9
khatru: use a channelmutex so we can fail to lock on addListener() if there's a disconnect.
2026-03-28 10:47:33 -03:00
fiatjaf
4e490879b5
khatru/policies: accept deletions even when they're not protected.
2026-03-09 22:37:26 -03:00
fiatjaf
4719c0bc9f
khatru/policies: PreventNormalDuplicates() to consider "a" reactions too.
2026-03-06 01:04:46 -03:00
fiatjaf
55cc52876a
khatru/policies: support "a" in kind:1163 on PreventNormalDuplicates()
2026-02-18 15:26:10 -03:00
fiatjaf
137c09369a
khatru/policies: fix tagName usage in PreventNormalDuplicates()
2026-02-18 10:43:33 -03:00
fiatjaf
d30c1bff46
khatru/policies: PreventNormalDuplicates()
2026-02-17 18:33:59 -03:00
fiatjaf
65ef1c50a7
khatru: OnEventDeleted hook.
2026-02-17 18:33:59 -03:00
fiatjaf
a98ac0d050
khatru: only kill connection once.
2026-02-08 10:59:51 -03:00
fiatjaf
28bef1c990
khatru: stop iterating through event results if ws fails.
2026-02-08 10:59:30 -03:00
fiatjaf
0cb0d1ccb0
unify usage and export nostr.IsOlder() helper.
2026-01-22 22:54:44 -03:00
fiatjaf
bcf973f997
khatru: update search cookbook in docs.
2026-01-16 18:56:41 -03:00
fiatjaf
bd55c22768
khatru/blossom: ensure we don't get tricked by Content-Length.
2026-01-16 08:13:14 -03:00
fiatjaf
8b9e2ea951
khatru/blossom: fix yield exiting on eventstorewrapper.
2026-01-16 07:20:57 -03:00
fiatjaf
449db37bb5
nip86: fix kind type.
2026-01-14 00:53:05 -03:00
fiatjaf
455d7fcefe
khatru: maybe fix links on readme.
2026-01-13 07:49:45 -03:00
fiatjaf
348de7bb06
khatru/blossom: fix an error message.
2026-01-13 00:23:44 -03:00
fiatjaf
b9f1f93561
khatru/blossom: get rid of custom BlobDescriptor with useless Owner field.
2026-01-13 00:03:53 -03:00
fiatjaf
14acd4b740
blossom: GetExtension()
2026-01-12 15:46:01 -03:00
fiatjaf
416e11b868
khatru: support path in getBaseURL().
2026-01-02 07:25:46 -03:00
fiatjaf
f47b77272b
khatru: serve relay only from the path specified in ServiceURL.
2025-12-30 23:58:33 -03:00
fiatjaf
9f6143143b
grasp: allowFilter.
2025-12-29 19:50:25 -03:00
fiatjaf
c6bd1ee446
khatru: fix bbolt halting problem by deleting outside of the loop that fetches events to be deleted.
...
fixes nostr:nevent1qvzqqqqx25pzq2f38nys0gq4hs5k4l4s426689psdk7d52kzjk9s0ypne2nt7927qy88wumn8ghj7mn0wvhxcmmv9uq32amnwvaz7tmjv4kxz7fwv3sk6atn9e5k7tcqyphrdv7jerr3f5mtlpcl7j7dg26ecxj9vrd5pyf0jknkqmp5qyyj28gxd3q
2025-12-19 00:23:21 -03:00
fiatjaf
bdef5ac224
khatru: fix possible race condition with authed keys.
2025-12-16 13:21:53 -03:00
fiatjaf
658a40e16c
grasp: remove superfluous status code.
2025-12-12 21:24:48 -03:00
fiatjaf
34a509c9d7
grasp: pass request context to repoExists().
2025-12-08 12:29:32 -03:00
fiatjaf
b323ca1b73
khatru: expose GetAllAuthed() safe helper.
2025-12-03 19:31:23 -03:00
fiatjaf
0e76c95cba
khatru: increase max tokens on default strict policy.
2025-12-03 16:13:54 -03:00
fiatjaf
836a0f9842
grasp: remove apparently useless usage of syscall.SysProcAttr as it breaks windows builds.
2025-12-01 21:22:26 -03:00
fiatjaf
91548fa0a1
khatru: set max negentropy limit to 20x the default max limit.
2025-12-01 20:28:30 -03:00
fiatjaf
b15ad71282
khatru: negentropy sessions take longer to close.
2025-12-01 18:28:02 -03:00