Commit Graph

11 Commits

Author SHA1 Message Date
fiatjaf
1f7378ca49 import from core.ts instead of pure.ts whenever possible. 2023-12-21 17:27:32 -03:00
fiatjaf
fe87529646 change tests and nips to use the new api. 2023-12-19 13:58:37 -03:00
fiatjaf
2ac69278ce simplify nip-42. 2023-12-16 11:21:49 -03:00
fiatjaf
6a07e7c1cc remove the kind type parameter from events and filters. 2023-12-16 10:10:37 -03:00
Alex Gleason
718032022c just format 2023-08-31 13:42:15 -05:00
fiatjaf
9d690814ca turn .publish() into a normal async function returning a promise.
this simplifies the code and makes the API more intuitive.

we used to need the event emitter thing because we were subscribing to the same relay
to check if the event had been published, but that is not necessary now that we assume
an OK response will always come.

closes https://github.com/nbd-wtf/nostr-tools/issues/262
2023-07-30 18:23:05 -03:00
Alex Gleason
08885ab8da Refactor imports: use file extension, improve tree shaking, update tests 2023-05-12 17:03:41 -03:00
Alex Gleason
18e8227123 Convert all tests to TypeScript 2023-05-10 21:20:27 -03:00
Alex Gleason
8a53b3b8b3 Improve event types 2023-05-06 21:00:25 -03:00
Lynn Zenn
32c47e9bd8 relay: separate auth() and publish() methods 2023-04-18 15:16:40 -03:00
Lynn Zenn
6e58fe371c relay: add support for NIP42 authentication 2023-04-18 15:16:40 -03:00