Commit Graph

269 Commits

Author SHA1 Message Date
fiatjaf bf55ad6b5a
bump to v1.6.0 2023-02-20 22:51:49 -03:00
Moe Jangda 04a46b815c include the `exports` property in the root package.json to allow node environments to use cjs or esm bundles 2023-02-19 20:54:55 -03:00
Moe Jangda 165ff44dff include `package.json` with `type: module` near esm bundle so that it's usable 2023-02-19 20:54:55 -03:00
BilligsterUser 7bfd23af3c update close() usage
Signed-off-by: BilligsterUser <billigsteruser@protonmail.com>
2023-02-17 21:07:59 -03:00
fiatjaf 3d93ec8446
remove resolveClose, close() is now fire-and-forget. 2023-02-17 14:51:56 -03:00
fiatjaf 0f841138cd
bump to v1.5.0 2023-02-17 14:31:08 -03:00
fiatjaf 336948b1d1
zap request validator. 2023-02-17 14:30:49 -03:00
Callum Macdonald d46794c681 Also fix `signEvent()` type. 2023-02-17 14:30:27 -03:00
Callum Macdonald 93cef5d886 Type unsigned events. fix #117 2023-02-17 14:30:27 -03:00
fiatjaf 2324f9548e
fail on null amount on zaprequest creation. 2023-02-16 13:56:47 -03:00
Roland Bewick f9748d9cc3 doc: fix order of commands to connect to relay 2023-02-16 12:35:13 -03:00
Roland Bewick 3a22dd3da6 doc: add installation instructions 2023-02-16 12:29:09 -03:00
fiatjaf d13039dc11
finishEvent() takes an EventTemplate and returns an Event. 2023-02-16 11:58:17 -03:00
fiatjaf 95b03902cc
add support for naddr. 2023-02-16 11:27:50 -03:00
fiatjaf ab5ea8de36
another nip57 helper and bump version. 2023-02-16 09:29:21 -03:00
fiatjaf a330b97590
partial nip57 support. 2023-02-15 21:06:38 -03:00
fiatjaf 24406b5679
more automatic cleanup of event listeners. 2023-02-15 20:36:22 -03:00
fiatjaf 6dbcc87d93
delete listeners when closing a relay connection. 2023-02-15 20:31:25 -03:00
fiatjaf 0ddcfdce68
remove "seen" event from Pub.
too complicated. if anyone wants this they can do it themselves.
2023-02-15 20:21:29 -03:00
fiatjaf 87bf349ce8
fill in missing kinds on enum. 2023-02-14 16:04:18 -03:00
fiatjaf 54dfc7b972
validate that the event is an object. 2023-02-14 15:18:39 -03:00
fiatjaf 32793146a4
remove `untilOpen` promise that was causing memory leaks when a connection was never opened. 2023-02-14 11:24:30 -03:00
fiatjaf c42cd925ce
bump noble-hashes. 2023-02-13 21:26:42 -03:00
RbnRncn 43ccb72476 docs: import SimplePool fix
Small fix of import SimplePool in new multiple relay docs.
2023-02-12 08:41:22 -03:00
fiatjaf b2b7999517
notice about just.
closes https://github.com/nbd-wtf/nostr-tools/pull/106
2023-02-09 22:02:07 -03:00
fiatjaf a568afc295
remove this extraneous file. 2023-02-09 22:01:01 -03:00
fiatjaf 9bcaed6e60
fix tests, .seenOn() method for pools. 2023-02-09 22:01:01 -03:00
Fernando López Guevara 5a9cbbb557 feat(deps): upgrade dependencies 2023-02-09 21:59:37 -03:00
fiatjaf e9acc59809
just publish. 2023-02-09 12:09:16 -03:00
fiatjaf 18fe9637b9
do not run tests on tag pushes. 2023-02-09 12:08:50 -03:00
fiatjaf ff3bf4a51c
improvements and fixes on pool. 2023-02-09 12:05:31 -03:00
fiatjaf 7ff97b5488
list() and get() methods. 2023-02-08 16:37:53 -03:00
fiatjaf df169ea42b
fix just. 2023-02-08 15:29:05 -03:00
fiatjaf 341f2bcb8d
bump version to 1.2.4 2023-02-08 14:16:20 -03:00
fiatjaf b2d1dd2110
a better way to do pubs and subs with SimplePool. 2023-02-08 14:15:54 -03:00
fiatjaf 75d7be5a54
use per-subscription alreadyHaveEvent handler instead of per-relay.
now pools are much smarter.
2023-02-08 14:15:54 -03:00
fiatjaf b5c8255b2f
fakejson match subscription id. 2023-02-08 14:15:54 -03:00
fiatjaf 4485c8ed5e
remove broken globalThis error type. 2023-02-08 14:15:54 -03:00
fiatjaf 3710866430
replace package.json scripts with just. 2023-02-08 14:15:54 -03:00
fiatjaf da59e3ce90
when in pool, automatically and efficiently deduplicate. 2023-02-08 09:46:05 -03:00
fiatjaf cc8e34163d
most simple relay pool. 2023-02-08 08:39:59 -03:00
gaodeng 9082953ede fix error event 2023-02-07 06:03:41 -03:00
Luis Miguel 61f397463d nip05 supports uppercase
nip05 says `NIP-05 assumes the <local-part> part will be restricted to the characters a-z0-9-_., case insensitive`

So a lot of people is starting the names with uppercase. See here:

`https://nostr-check.com/.well-known/nostr.json`

So I think we should change the regex to accept lowercase or uppercase.

Another way to do it would be to do a `.toLowerCase` at the beginning, but then we would need to do this search ignoring the case:

```
if (!res?.names?.[name])
```

So maybe for now this is enough?
2023-01-31 10:22:11 -03:00
fiatjaf 312b6fd035
add fast insert-into-sorted-list utils. 2023-01-28 18:07:14 -03:00
fiatjaf 7f1bd4f4a8
tag v1.2.0 2023-01-22 10:34:04 -03:00
fiatjaf 26089ef958
refactor previous commit a little, add fakejson module for simple parsing that doesn't use regex. 2023-01-22 10:32:33 -03:00
Martti Malmi 2e305b7cd4 incoming message queue, alreadyHaveEvent check, msg.send catch 2023-01-21 07:03:12 -03:00
fiatjaf 51c1a54ddf
test every pull request. 2023-01-20 17:00:48 -03:00
fiatjaf cb05ee188f
increase bech32 max size to 5000. 2023-01-18 17:31:37 -03:00
jaonoctus fa9e169c46 test(nip06): add nip06 2023-01-17 08:15:55 -03:00