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.
v1.2.3
2023-02-08 08:39:59 -03:00
gaodeng
9082953ede
fix error event
v1.2.2
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.
v1.2.1
2023-01-28 18:07:14 -03:00
fiatjaf
7f1bd4f4a8
tag v1.2.0
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.
v1.1.2
2023-01-18 17:31:37 -03:00
jaonoctus
fa9e169c46
test(nip06): add nip06
2023-01-17 08:15:55 -03:00
jaonoctus
bb1e3f2fa6
feat(nip06): add passphrase optional param
2023-01-17 08:15:55 -03:00
David Strayhorn
160987472f
Update README.md
...
remove extra &&
2023-01-14 08:20:10 -03:00
Callum Macdonald
8b18341ebb
Minor typo fix
2023-01-09 15:00:28 -03:00
fiatjaf
901445dea1
tag v1.1.1
v1.1.1
2023-01-04 10:16:15 -03:00
fiatjaf
91b67cd0d5
fix readme signing example.
...
fixes https://github.com/nbd-wtf/nostr-tools/issues/78
2023-01-04 10:15:16 -03:00
bayernator
1e696e0f3b
increase nprofile, encodeBytes, nprofileEncode string length parameter to 1500
2023-01-03 16:20:42 -03:00
fiatjaf
4b36848b2d
fix signing functions to be more strict and correct.
2022-12-29 18:26:28 -03:00
pseudozach
3cb351a5f4
fix typo
2022-12-28 09:18:09 -03:00
François-Xavier Thoorens
5db1934fa4
fixed security issue around event verification
...
the use of id has been removed and the hash is computed instead
2022-12-27 16:46:36 -03:00
fiatjaf
50c3f24b25
replace two packages with a @scure dependency that already existed.
v1.1.0
2022-12-27 11:35:21 -03:00
fiatjaf
39ea47660d
use a different relay for tests.
v1.0.1
2022-12-25 16:01:31 -03:00
Tristan
8071e2f4fa
Make opts arg optional for sub method
...
In the README and the code, it looks like the second argument for the relay's `sub` method is optional:
```typescript
let sub = relay.sub([
{
ids: ['d7dd5eb3ab747e16f8d0212d53032ea2a7cadef53837e5a6c66d42849fcb9027']
}
])
```
In the type definitions it's required however, which leads to an error in editors. Let's mark it as optional in the type definitions too! 👍
2022-12-25 14:32:20 -03:00
Tristan
cc2250da1f
Add missing "error" event to on and off type definitions
2022-12-25 14:31:38 -03:00
rkfg
c37d10bb9d
Fix resolveClose
2022-12-24 20:41:49 -03:00
rkfg
97e28fdf9a
Fix connect/close return types and race condition
2022-12-24 18:49:16 -03:00
fiatjaf
87c0f0d061
tag v1.0.0
v1.0.0
2022-12-23 20:51:36 -03:00
fiatjaf
83c397b839
do event signature and verification synchronously.
2022-12-23 17:32:13 -03:00
fiatjaf
cd7d1cec48
implement nip26 delegation.
2022-12-23 17:30:35 -03:00
adamritter
613a843838
Add Kind enum for easier client development ( #61 )
2022-12-23 16:38:59 -03:00
fiatjaf
74a0d5454a
guard against some nonexisting arrays of event listeners.
v1.0.0-rc2
2022-12-23 15:18:23 -03:00
fiatjaf
c0d1e41424
always recompute the hash when signing.
...
fixes https://github.com/fiatjaf/nostr-tools/issues/59
2022-12-23 15:06:21 -03:00
fiatjaf
f7e510e1c8
nip05 regex name check.
2022-12-23 15:04:24 -03:00
fiatjaf
c08bdac7a7
catch usage of global fetch for nodejs.
...
fixes https://github.com/fiatjaf/nostr-tools/issues/53
2022-12-23 11:36:37 -03:00
rkfg
c5b64404f6
Add limit to filter
2022-12-23 11:29:38 -03:00
adamritter
c7b26fdba2
Don't expose external API to hex representation of mnemoic
2022-12-23 11:01:10 -03:00
fiatjaf
ac698ef67d
make relay.connect() an awaitable thing.
v1.0.0-rc1
2022-12-22 08:53:40 -03:00
fiatjaf
8262a81cb2
make crypto available as a global on nip04 test.
v1.0.0-beta2
2022-12-21 17:12:50 -03:00
fiatjaf
26e6da6ba3
we need websocket polyfill on relay tests.
2022-12-21 17:09:00 -03:00
fiatjaf
8aa31bb437
remove websocket-polyfill, instruct nodejs users to install it manually.
2022-12-21 16:23:47 -03:00
fiatjaf
4bd4469357
remove useless readable-stream dependency.
2022-12-21 16:19:59 -03:00
fiatjaf
89ae21f796
remove buffer usage everywhere.
2022-12-21 16:04:09 -03:00
fiatjaf
41a1614d89
remove browserify-cipher, use crypto.subtle for nip04.
2022-12-21 16:04:00 -03:00
fiatjaf
0500415a4e
remove all the auto-reconnection code from relay.
2022-12-21 15:31:57 -03:00
fiatjaf
cee4357cab
Merge pull request #50 from mmalmi/patch-1
2022-12-21 08:50:29 -03:00