395 Commits

Author SHA1 Message Date
fiatjaf
1f1d3cfe7f some changes and fixes related to sub.Sub(). v0.7.2 2022-05-04 12:39:10 -03:00
fiatjaf
5f3221e966 nip05 queryName() function. 2022-05-04 11:15:31 -03:00
fiatjaf
5d1a29d135 stop closing publishstatus connection and subscriptions.
I'm not sure about this but it seems to work better this way.
v0.7.1
2022-05-01 21:11:46 -03:00
fiatjaf
16c874cb8d add String() method to Status int on PublishStatus. 2022-05-01 17:51:46 -03:00
fiatjaf
a11aa8756b fix CheckSignature(): we were parsing the pubkey with the ECDSA function instead of Schnorr. 2022-05-01 17:51:16 -03:00
fiatjaf
00ad1acde9 use schnorr from btcec instead of the bip340 library. v0.7.0 2022-05-01 15:10:18 -03:00
Gustavo Chain
c0a2be91a1 relaypool: continue on ping msg v0.6.3 2022-02-19 08:33:29 -03:00
fiatjaf
dd43f4c495 add another event to serialization and verification test. 2022-02-14 10:18:50 -03:00
fiatjaf
a563c5faa1 fix subarray length typo. v0.6.2 2022-02-13 16:31:44 -03:00
fiatjaf
acf86e9ad8 filenames starting with "aux" break things because something on windows? v0.6.1 2022-02-12 20:32:48 -03:00
fiatjaf
795863d2dd alias TagMap to map[string]StringList. v0.6.0 2022-02-09 20:25:23 -03:00
fiatjaf
9721ffa851 use fastjson to serialize and unmarshal/marshal events, remove need for special Time type. 2022-02-09 20:23:10 -03:00
fiatjaf
41955a0601 serialization tests for events and filters. 2022-02-09 13:40:26 -03:00
fiatjaf
5266482b2a support prefix search for ids and authors (nip01 update). 2022-02-08 16:44:33 -03:00
fiatjaf
86853004ef change parsing so NIP12 can work, rename types. 2022-02-08 16:27:33 -03:00
fiatjaf
ef1f548212 avoid sending to closed Events/UniqueEvents channels. v0.5.1 2022-02-07 11:33:45 -03:00
raphael
7760f53ce2
Adding nip04 (encrypted direct messages) support (#8)
* implementing encrypted direct messages

* added encrypted direct message support

Co-authored-by: Raphael <raphjaph@protonmail.com>
2022-02-06 10:16:09 -03:00
fiatjaf
c54ddab07d fix README on generating keys. 2022-01-23 15:23:55 -03:00
Honza Pokorny
a3df2cb893 Add mutexes around websockets
We replace the bare websocket.Conn type with a new Connection type which
implements `WriteJSON`, `WriteMessage`, and `Close`.  The Connection
type adds mutexes around writes since gorilla doesn't support concurrent
writes to websockets.

Signed-off-by: Honza Pokorny <honza@pokorny.ca>
2022-01-12 12:19:33 -03:00
fiatjaf
ba0507cce7 nip06 package for key derivation. v0.5.0 2022-01-06 21:57:04 -03:00
fiatjaf
275020a7ef just some basic bip340 key functions instead. 2022-01-06 08:24:20 -03:00
Honza Pokorny
8558025305 Add key-related functions 2022-01-06 07:39:04 -03:00
Honza Pokorny
26c3b4aac9 Remove unnecessary argument to subscription.Sub
The `Sub()` function retrieves the list of filters from the
`Subscripton` object itself, and therefore it's unnecessary to pass it
in.  The argument is unused.

Here, we remove the function argument from the definition, and from the
single call site.  We then pass the filters to the initializer.

This makes it so that filters are in fact passed to the relay on the wire.
2022-01-04 12:24:05 -03:00
fiatjaf
5cdcdfc66f rename Equal -> FilterEqual. v0.4.2 2022-01-02 09:06:33 -03:00
fiatjaf
140edc693c relay policies as interfaces, SimplePolicy as the most basic implementation. v0.4.1 2022-01-02 08:50:53 -03:00
fiatjaf
d131e8460e move everything to the same directory. v0.4.0 2022-01-02 08:44:18 -03:00
fiatjaf
44604e406b nip-01 update: everything as arrays on filters. v0.3.0 2022-01-01 20:48:13 -03:00
fiatjaf
8c17ac4d77 add kind5 "deletion". 2022-01-01 14:14:59 -03:00
fiatjaf
18ed9cd418 .Until filter attr and filter.Equal() function. v0.2.1 2021-12-26 07:02:38 -03:00
fiatjaf
0a60285e30 upgrade interfaces, add local filtering for subscriptions and some other things I forgot. also a README with examples. v0.2.0 2021-12-16 20:47:53 -03:00
fiatjaf
7dfc354eec remove .Author field from filter. 2021-12-16 15:31:31 -03:00
fiatjaf
009251dd6e event kinds as int, not uint8. v0.1.5 2021-12-16 15:31:31 -03:00
fiatjaf
77fa373bab event kinds as int, not uint8. v0.1.3 2021-11-28 16:36:42 -03:00
fiatjaf
16b56e22ef
public domain license. v0.1.2 2021-11-01 08:16:28 -03:00
Richard Bondi
acff24ad46 non ported html fix v0.1.1 2021-02-22 01:17:53 -03:00
Richard Bondi
e6cc6347e2 scan tags fix v0.1.0 2021-02-20 18:55:43 -03:00
fiatjaf
7048f3186c fixing publish statuses and UniqueEvents channel. 2021-02-20 18:54:34 -03:00
fiatjaf
66e73768e0 publish was sending the event as based-64 bytes. 2021-02-20 18:29:30 -03:00
fiatjaf
9736da1a8c init and close quibbles. 2021-02-20 18:28:59 -03:00
fiatjaf
b5e7e446fb a UniqueEvents channel for each subscription. 2021-02-20 17:59:47 -03:00
fiatjaf
4a172a5f51 adapt relaypool to the new nip-01. 2021-02-20 17:44:05 -03:00
fiatjaf
ee53d55800 support kind filter. 2021-02-20 11:33:45 -03:00
fiatjaf
ba7f7b5398 add filter helpers following the new nip-01. v0.0.2 2021-02-14 22:38:54 -03:00
fiatjaf
b4481918fe many fixes and some logs. 2021-02-07 08:02:39 -03:00
fiatjaf
32c21eb652 basic event and relaypool. 2021-01-31 11:05:09 -03:00