Commit Graph

429 Commits

Author SHA1 Message Date
Alex Gleason 2fccf0ae48
Update event.ts
Co-authored-by: WilliamConnatser <43946230+WilliamConnatser@users.noreply.github.com>
2023-11-06 08:23:35 +09:00
fiatjaf 842cba25f3
turn Kind enum into a simple object with numbers. 2023-10-30 08:03:42 -03:00
fiatjaf 318e3f8c88
we don't have to bump to 2.0.0 since this will not break backwards-compatibility. 2023-10-15 17:58:42 -03:00
fiatjaf 894ffff1f0
prefix exported modules with ./ (esbuild requires this apparently). 2023-10-14 07:57:30 -03:00
franzap ce11a5fc89
Organize build, allow one entrypoint per file (#305) 2023-10-01 18:20:53 -03:00
Paul Miller 5e85bbc2ed
Fix nip44 vectors (#308)
* Fix nip44 vectors

* Update vectors

* Update vectors
2023-09-30 18:46:45 -03:00
Paul Miller eb0a9093f2
Implement NIP-44: secure versioned replacement for NIP4 (#221) 2023-09-29 20:43:48 -03:00
Sherry c73268c4e2
Add kind to nevent decode and encode (#304) 2023-09-26 12:20:17 -03:00
fiatjaf 6874f58c0a
apply prettier. 2023-09-26 12:19:01 -03:00
Sepehr Safari e899cc32b7 edit batchedList and add mergeFilters to it 2023-09-24 20:49:45 -03:00
Sam Samskies de72172583 add helper functions for nip-47 2023-09-19 14:43:01 -03:00
Sepehr Safari 073dcaafd6 Update README.md
add docs about batchedList.
2023-09-15 20:38:39 -03:00
Alex Gleason 8e932f0c5a
Merge pull request #295 from AsaiToshiya/patch-1
Improve example for finishEvent
2023-09-10 22:59:46 -05:00
Asai Toshiya f9a048679f
Improve example for finishEvent 2023-09-11 12:53:25 +09:00
Alex Gleason 6db8b94275 nip13: add minePow function 2023-09-10 15:45:31 -03:00
fiatjaf 13bc2ad5a8
trick typescript into accepting our types. 2023-09-10 15:44:22 -03:00
fiatjaf 55f032d0a4
tag v1.15.0 2023-09-10 15:16:04 -03:00
Alex Gleason c890e29290 nip13: use a simpler implementation 2023-09-10 15:15:33 -03:00
Alex Gleason c18f050468 relay: `sub.events` async iterator 2023-09-09 19:05:21 -03:00
Alex Gleason 401b9c7864 Make TypeScript >= 5.0.0 an optional peer dependency 2023-09-03 20:56:05 -03:00
fiatjaf_ c175f6c804
Merge pull request #289 from alexgleason/verified 2023-09-03 15:47:50 -03:00
Alex Gleason 41265a19f5
event.test: tamper with things in a more evil way 2023-09-03 12:12:42 -05:00
Alex Gleason d88761907a
verifySignature: set verifiedSymbol to false on failure, DRY return values 2023-09-02 18:08:09 -05:00
Alex Gleason 8325d4351e
just format 2023-09-02 17:40:00 -05:00
Alex Gleason 62bf592d72
finishEvent: return a VerifiedEvent 2023-09-02 17:39:35 -05:00
Alex Gleason 54f3bedf38
verifySignature: return `false` if the id is invalid 2023-09-02 17:39:28 -05:00
Alex Gleason 34e0ad8c41 Add a symbol to verified events 2023-09-02 18:04:10 -03:00
Egge e9eac28bab
Added eoseSubTimeout to pool's SubscriptionOptions (#284)
* added timeout sub option

* made eoseSubTimeout optional
2023-09-01 07:50:12 -03:00
fiatjaf_ 85035d61f2
Merge pull request #287 from alexgleason/prettier
Fix tests, format everything with prettier and enforce prettier+eslint in the CI
2023-09-01 07:48:06 -03:00
Alex Gleason cf46560619
ci: ensure `just` is available to the runner 2023-08-31 13:52:56 -05:00
Alex Gleason e7aa23cb1d
README: add a note about typescript 5.0 2023-08-31 13:51:17 -05:00
Alex Gleason 5977d68ec2
nip98.test: remove outdated/failing test 2023-08-31 13:47:16 -05:00
Alex Gleason 48767d382d
relay.test: increase querying timeout to 10s 2023-08-31 13:45:39 -05:00
Alex Gleason 718032022c
just format 2023-08-31 13:42:15 -05:00
Alex Gleason 2a70bb18ff
pool: use triple-equals 2023-08-31 13:41:40 -05:00
Alex Gleason 9effe807d1
filter: remove unused import for Kind 2023-08-31 13:41:25 -05:00
Alex Gleason 899c2bd0dc
eslint: remove conflicting generator-star-spacing rule 2023-08-31 13:41:06 -05:00
Alex Gleason 918d514a25
Upgrade all eslint deps 2023-08-31 13:37:45 -05:00
Alex Gleason 48cb9046c4
Add eslint-config-prettier to solve conflicts between prettier and eslint 2023-08-31 13:27:28 -05:00
Alex Gleason 864dd28b26
justfile: improve lint/format commands 2023-08-31 13:25:30 -05:00
Alex Gleason fa085367c9
Add eslint to `just format` 2023-08-31 13:22:43 -05:00
Alex Gleason 350951b88e
Add eslint to `just lint` 2023-08-31 13:21:10 -05:00
Alex Gleason c6133f7160
ci: run prettier on every commit 2023-08-31 13:14:16 -05:00
Alex Gleason 470512bbeb
prettier: increase printWidth, enable bracketSpacing, alphabetize 2023-08-31 13:00:50 -05:00
Alex Gleason c3acb82464
Upgrade Prettier to v3.0.3 2023-08-31 12:59:54 -05:00
Alex Gleason fc23d05764
Merge pull request #283 from jiftechnify/fix-code-samples
Fix code samples in README
2023-08-27 12:14:32 -05:00
jiftechnify 8296ce897c
fix a code sample in README
- add pool.close() usage
2023-08-28 01:54:33 +09:00
jiftechnify 3ca78c0e13
fix code samples in README 2023-08-28 01:47:35 +09:00
Alex Gleason 837a05e54d Add kinds module to classify events by kind 2023-08-26 22:26:04 -03:00
ffaex 32fd25556b added new event kind 1063
see https://github.com/nostr-protocol/nips/blob/master/94.md
2023-08-21 15:03:23 -03:00