Sam Samskies
|
de72172583
|
add helper functions for nip-47
|
2023-09-19 14:43:01 -03:00 |
|
Alex Gleason
|
d88761907a
|
verifySignature: set verifiedSymbol to false on failure, DRY return values
|
2023-09-02 18:08:09 -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 |
|
Alex Gleason
|
718032022c
|
just format
|
2023-08-31 13:42:15 -05: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 |
|
Alex Gleason
|
df6f887d7e
|
Event, Filter: allow any kind number
Fixes https://github.com/nbd-wtf/nostr-tools/issues/275
|
2023-08-12 20:13:53 -03:00 |
|
Dolu
|
915d6d729b
|
feat(nip98): add getToken and validateToken
|
2023-07-17 11:51:12 -03:00 |
|
PMK
|
b9a7f814aa
|
Update Kind for ProfileBadge and BadgeDefinition
|
2023-06-20 15:40:55 -03:00 |
|
Alex Gleason
|
08885ab8da
|
Refactor imports: use file extension, improve tree shaking, update tests
|
2023-05-12 17:03:41 -03:00 |
|
Paul Miller
|
03cc18d53b
|
bring back @noble/curves instead of @noble/secp256k1.
fixes https://github.com/nbd-wtf/nostr-tools/issues/196#issuecomment-1537549606
|
2023-05-07 21:16:48 -03:00 |
|
futpib
|
424449c773
|
Add NIP-18 utils
|
2023-05-07 08:52:18 -03:00 |
|
Alex Gleason
|
8a53b3b8b3
|
Improve event types
|
2023-05-06 21:00:25 -03:00 |
|
eosxx
|
595ae21baf
|
feat(event): getBlankEvent can accept a kind
|
2023-05-01 17:02:14 -03:00 |
|
Alex Gleason
|
9fa554ca8e
|
Make Event a generic type accepting Kind
|
2023-04-30 09:26:40 -03:00 |
|
Alex Gleason
|
552530fa3f
|
Add back deprecated signEvent function with a warning
|
2023-04-24 01:22:12 -05:00 |
|
Alex Gleason
|
9a3e05ce5f
|
Rename signEvent to getSignature
|
2023-04-23 11:13:15 -05:00 |
|
fiatjaf
|
ef3184a6e0
|
remove @noble/curves. people are not ready for it, causes BigInt issues.
|
2023-04-18 15:14:21 -03:00 |
|
Paul Miller
|
204ae0eff1
|
Switch from noble-secp256k1 to noble-curves
|
2023-04-14 16:45:01 -03:00 |
|
Agustin Kassis
|
674ff66b6f
|
added badge events
Added the following badge kinds according to NIP 58
BadgeDefinition: 30008,
BadgeAward: 8,
ProfileBadge: 30009,
|
2023-04-11 17:39:13 -03:00 |
|
Alex Gleason
|
94b382a49f
|
Fix validateEvent type checking
|
2023-04-08 17:53:31 -03:00 |
|
Alex Gleason
|
5b59b93d86
|
validateEvent: use assertion function
|
2023-04-08 15:07:25 -03:00 |
|
Susumu OTA
|
b0a58e2ca4
|
fix: Event type has id and sig field.
|
2023-04-06 06:15:07 -03:00 |
|
Simon
|
96a6f7af87
|
ensure kind has type 'number' in validateEvent
|
2023-02-27 14:22:36 -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
|
d13039dc11
|
finishEvent() takes an EventTemplate and returns an Event.
|
2023-02-16 11:58:17 -03:00 |
|
fiatjaf
|
a330b97590
|
partial nip57 support.
|
2023-02-15 21:06:38 -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
|
4b36848b2d
|
fix signing functions to be more strict and correct.
|
2022-12-29 18:26:28 -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
|
83c397b839
|
do event signature and verification synchronously.
|
2022-12-23 17:32:13 -03:00 |
|
adamritter
|
613a843838
|
Add Kind enum for easier client development (#61)
|
2022-12-23 16:38:59 -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
|
89ae21f796
|
remove buffer usage everywhere.
|
2022-12-21 16:04:09 -03:00 |
|
fiatjaf
|
1162935f58
|
add a bunch of tests.
|
2022-12-19 20:02:01 -03:00 |
|
fiatjaf
|
897919be3b
|
get rid of create-hash, use noble hashes.
|
2022-12-19 19:50:41 -03:00 |
|
fiatjaf
|
de8bdd8370
|
fix typescript types everywhere, delete pool.js and refactor relay.js to use event listeners everywhere.
|
2022-12-18 17:02:19 -03:00 |
|