Commit Graph

192 Commits

Author SHA1 Message Date
fiatjaf
a666994ae7 fix test that was broken when the context passed to RelayConnect() became the relay context for its full timeline.
30e0e1040a
v0.16.0
2023-04-06 16:22:24 -03:00
fiatjaf
ef428ff39f Subscription.Fire() can error, so Relay.Subscribe() must also. 2023-04-06 16:21:25 -03:00
fiatjaf
4c9db5928a log relay url too when filter doesn't match. 2023-04-06 12:57:15 -03:00
fiatjaf
abfb7de394 add a mutex lock around Challenges and Notices channel. v0.15.4 2023-03-31 22:09:01 -03:00
fiatjaf
411718f3c1 reformat nip04 errors. 2023-03-31 09:30:33 -03:00
fiatjaf
30e0e1040a use context passed to .Connect() for the live of the relay. 2023-03-30 18:26:43 -03:00
fiatjaf
e84a7936d5 fix some concurrency things. v0.15.3 2023-03-29 14:55:52 -03:00
fiatjaf
b0031bfd86 sdk.ParseReferences() v0.15.2 2023-03-27 08:47:59 -03:00
fiatjaf
d3a1624880 ping every 29 seconds.
fixes https://github.com/nbd-wtf/go-nostr/issues/72
2023-03-25 14:59:38 -03:00
fiatjaf
35875e6071 replace vendored bech32 code with btcd library. 2023-03-23 16:59:46 -03:00
fiatjaf
3f3bbb7529 ensure nip05 results are valid keys or nil. v0.15.1 2023-03-23 08:09:49 -03:00
fiatjaf
4b1f69ec27 subscriptions receive their context on Prepare(). v0.15.0 2023-03-21 14:50:34 -03:00
fiatjaf
46e724b8d5 dry sub.unsub() on context cancelation. v0.14.1 2023-03-18 16:07:19 -03:00
fiatjaf
e9ad77c822 asynchronous event parsing on received. 2023-03-18 15:09:58 -03:00
fiatjaf
85fc74fd22 fixing subscription labels and ids. 2023-03-18 15:09:49 -03:00
fiatjaf
3f66c60b5f subscription labels: GetID() and SetLabel(). v0.14.0 2023-03-18 08:40:12 -03:00
fiatjaf
661e299981 one live random filter test. 2023-03-18 08:18:08 -03:00
fiatjaf
fdc99d61b6 subscription ids as sequential numbers and sub.GetID() 2023-03-17 16:43:48 -03:00
fiatjaf
cef5892bce return status from publish when relay loses connectivity. 2023-03-17 16:21:04 -03:00
fiatjaf
332ae1ff7f support author on nevent. 2023-03-17 09:09:36 -03:00
fiatjaf
c982ad0ab1 guard against closed channels in subscriptions. 2023-03-16 15:53:24 -03:00
fiatjaf
ec34d4eb10 return error message from Publish() 2023-03-16 14:27:33 -03:00
fiatjaf
0765f7b91b context cancelation for relay connections and subscriptions. 2023-03-16 14:16:46 -03:00
fiatjaf
5e24b24442 improve relay URL normalization. 2023-03-14 21:56:40 -03:00
fiatjaf
7803cc74b3 a function to check if a public key hex is a public key hex. 2023-03-14 21:56:40 -03:00
fiatjaf
02759120ea Relay.AssumeValid 2023-03-14 17:07:32 -03:00
cj-ibex
483f40a596 add nip57 constants 2023-03-11 14:20:31 -03:00
fiatjaf
7be5330d42 improve nip10.GetImmediateReply() 2023-03-04 21:04:59 -03:00
fiatjaf
392013fa25 sdk package with higher-level functions. 2023-02-27 16:45:45 -03:00
fiatjaf
de7179437e helpers.go -> utils.go and lowercase util functions. 2023-02-27 16:30:48 -03:00
fiatjaf
916a6a6abb support for naddr on nip19. 2023-02-27 16:15:04 -03:00
Yasuhiro Matsumoto
e7e20f3e00 revert accidentally changes v0.13.2 2023-02-26 10:34:22 -03:00
Yasuhiro Matsumoto
2d7dae3f69 add test for Filter.Search 2023-02-26 09:48:41 -03:00
Yasuhiro Matsumoto
75a07daf7b use StringBytes() instead of String() 2023-02-26 09:48:41 -03:00
Jasper Rädisch
74c646fe21 add RequestHeader option for websocket conn 2023-02-25 16:06:46 -03:00
zach
17a7c3a678 feat: add check redirect for identifier request 2023-02-25 15:54:00 -03:00
cj-chua
b278230cdb Nip04 decrypt (#65)
Co-authored-by: cj-ibex <chongjin@ibexmercado.com>
2023-02-22 20:35:39 -03:00
fiatjaf
ec94c6ee98 test nip26 on ci. v0.13.1 2023-02-15 20:25:16 -03:00
Steve Perkins
77c625e341 nip50: add filter.search field 2023-02-15 18:37:36 -03:00
r3drun3
433a53fef2 docs: add ci status in readme 2023-02-14 14:26:23 -03:00
fiatjaf
a0d9f3a392 send notices on a goroutine. 2023-02-14 11:25:49 -03:00
fiatjaf
7c1ab3e627 Merge pull request #60 from barkyq/nip26
NIP-26
2023-02-12 08:44:50 -03:00
Dylan Cant
442fe39867 small edits 2023-02-12 00:39:29 -05:00
Dylan Cant
a42c603847 nip26 initial commit 2023-02-12 00:03:29 -05:00
barkyq
3ccef5eec4 Tweaked the NIP 42 Validation (#58) 2023-02-09 11:28:31 -03:00
Dylan Cant
72386d27e1 fix nip19_test 2023-02-06 21:31:06 -03:00
Wayback Archiver
ab2db2dfc5 Fix unblock mutex
- if `receivedEvent.ID` not match `event.ID`, may trigger an error `fatal error: sync: unlock of unlocked mutex`.
- if context cancled, it does not needs mutex.
2023-02-05 17:10:56 -03:00
fiatjaf
4aee139f6c modify AppendUnique so it matches only the first two items. 2023-02-05 17:04:15 -03:00
fiatjaf
a3e3b25dd9 support relays in nip05. v0.13.0 2023-02-05 16:25:00 -03:00
fiatjaf
024f89ac58 unexport internal nip05 types. 2023-02-05 16:22:41 -03:00