Alex Gleason
341ccc5ac5
nip05: move NIP05Result to the bottom, add another test
2023-05-07 21:18:22 -03:00
Alex Gleason
d2a9af2586
nip05 refactoring
2023-05-07 21:18:22 -03:00
fiatjaf
5d92be05bb
run prettier on tests.
2023-05-07 21:18:12 -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
ac7598b5e3
Fix reposts without `p` tag not parsed
2023-05-07 08:52:18 -03:00
futpib
424449c773
Add NIP-18 utils
2023-05-07 08:52:18 -03:00
Alex Gleason
ab6abe6815
Improve types of filter.ts
2023-05-06 21:00:25 -03:00
Alex Gleason
30fd6b6215
nip57: use Kind enum instead of using the number directly
2023-05-06 21:00:25 -03:00
Alex Gleason
8a53b3b8b3
Improve event types
2023-05-06 21:00:25 -03:00
Alex Gleason
d0bd599ce8
Infer relay event types from filter
2023-05-06 20:59:39 -03:00
Alex Gleason
1cbb62e6b9
Move BECH32_REGEX to nip19.ts
2023-05-03 17:12:39 -03:00
Luka Dover
977316915b
Fix subtle inconsistency with NIP-04 in the decryption example
...
Sender's pubkey was incorrectly searched for in the `p` tag, where receiver's pubkey is found; use `event.pubkey` instead.
2023-05-03 09:44:03 -03:00
Alex Gleason
dd8f555094
Make Filter a generic type accepting Kind
2023-05-02 22:35:04 -03:00
eosxx
87f5ea4291
test(event): add test for getBlankEvent
2023-05-01 17:02:14 -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
eosxx
1647601727
fix: check crypto and webcrypto
2023-04-28 05:56:25 -03:00
eosxx
b66ca1787a
fix(nip04): crypto.subtle is undefined
2023-04-28 05:56:25 -03:00
fiatjaf_
278cdda9c2
Merge pull request #195 from alexgleason/get-signature
2023-04-24 07:28:06 -03:00
Alex Gleason
552530fa3f
Add back deprecated signEvent function with a warning
2023-04-24 01:22:12 -05:00
futpib
13e9b4aa3e
Add NIP-25 utils
2023-04-23 20:19:52 -03:00
Alex Gleason
9a3e05ce5f
Rename signEvent to getSignature
2023-04-23 11:13:15 -05:00
fiatjaf
55ff796b9f
v1.10.1
2023-04-22 21:59:41 -03:00
fiatjaf_
3ef2ad5bc4
Merge pull request #194 from alexgleason/nip27
2023-04-22 21:58:36 -03:00
Alex Gleason
45c07a5f45
nip27: make `matchAll` a generator function
2023-04-22 19:22:06 -05:00
Alex Gleason
6a037d1658
nip27.find --> nip27.matchAll
2023-04-22 19:06:53 -05:00
Alex Gleason
dcf101c6c2
yarn format
2023-04-22 18:33:09 -05:00
Alex Gleason
eb97dbd9ef
Add NIP-21 and NIP-27 modules for parsing nostr URIs
2023-04-22 18:30:57 -05:00
Alex Gleason
92988051c6
Add Unlicense
2023-04-20 12:22:39 -03:00
fiatjaf
bf7e00d32a
hotfix types.
2023-04-18 15:29:28 -03:00
fiatjaf
9241089997
v1.10.0 with @noble/secp256k1 back, nip42 support and nip19 typing improvements.
2023-04-18 15:17:57 -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
Lynn Zenn
26e35d50e0
relay: fix type errors
2023-04-18 15:16:40 -03:00
fiatjaf
ef3184a6e0
remove @noble/curves. people are not ready for it, causes BigInt issues.
2023-04-18 15:14:21 -03:00
Alex Gleason
56fe3dd5dd
nip19: improve return type
2023-04-18 07:30:43 -03:00
Jonathan Staab
f1bb5030c8
Add support for count
2023-04-16 06:43:38 -03:00
fiatjaf
ac212cb5c8
tag v1.9.0 using @noble/curves.
2023-04-14 17:09:28 -03:00
Paul Miller
204ae0eff1
Switch from noble-secp256k1 to noble-curves
2023-04-14 16:45:01 -03:00
Alejandro Gomez
f17ab41d72
NIP-19: Add nrelay encoding and decoding
2023-04-14 13:26:31 -03:00
fiatjaf
f6f5ee8223
tag v1.8.4
2023-04-11 18:23:04 -03:00
Alex Gleason
a05506468d
Add NIP-13 (proof-of-work) module
2023-04-11 18:21:40 -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
channelninja
731705047a
fix(nip05): allow dot in name
2023-04-09 19:32:58 -03:00
Alex Gleason
94b382a49f
Fix validateEvent type checking
2023-04-08 17:53:31 -03:00
fiatjaf
199411a971
yarn.lock with deduped packages.
2023-04-08 15:44:37 -03:00
fiatjaf
a1dc6f41b9
fix conflict in noble dependencies.
2023-04-08 15:43:47 -03:00
Alex Gleason
5b59b93d86
validateEvent: use assertion function
2023-04-08 15:07:25 -03:00
OFF0
12acd7bdca
scripts: add npm build, format and test scripts
...
in addition to the just tasks, this commit adds npm scripts back,
for convenience.
example taks:
- npm test
- npm test filter.test.js
- npm run build
- npm run format
in yarn it should just work without 'run' i.e. 'yarn build'.
2023-04-08 09:05:23 -03:00
OFF0
3bdb68020d
nip01: add support for filter prefix in authors and ids
...
so clients can filter events by prefix in authors and ids as
described in nip-01, i.e. to subscribe to mined events starting
with zeroes or to add some privacy for clients that may not want
to disclose the exact filter.
see also https://github.com/scsibug/nostr-rs-relay/issues/104
2023-04-07 08:29:00 -03:00