Commit Graph

91 Commits

Author SHA1 Message Date
fiatjaf
2f7e3f8473 bump version. v0.23.4 2022-06-22 20:08:48 -03:00
monlovesmango
536dbcbffe Update pool.js 2022-06-22 20:07:25 -03:00
monlovesmango
ed52d2a8d4 updating cb property for subControllers entries
when updating subscription or adding new relays, subsequent events that are received have the relay as undefined. by updating cb property for the subControllers entries to be an arrow function (when calling sub.sub or sub.addRelay), subsequent events now return the relay url appropriately
2022-06-22 20:07:25 -03:00
fiatjaf
faf8e62120 maybe fix a bug with calling sub.sub() v0.23.3 2022-06-04 18:34:54 -03:00
fiatjaf
dc489bf387 build esm module that can be imported from browsers.
closes https://github.com/fiatjaf/nostr-tools/issues/14
v0.23.1
2022-05-08 20:49:36 -03:00
Ricardo Arturo Cabral Mejia
60ce13e17d chore: bump version to 0.23.0 v0.23.0 2022-04-10 19:51:35 -03:00
Ricardo Arturo Cabral Mejia
727bcb05a8 feat: add beforeSend hook to sub() 2022-04-10 19:51:35 -03:00
monlovesmango
c236e41f80 import 'Buffer'
'Buffer' wasn't imported initially and was causing issues when I tried to use generatePrivateKey in a client I am building. not sure why Branle has no error, maybe I am doing something wrong?
2022-04-06 18:34:50 -03:00
fiatjaf
f04bc0cee1 fix filter on statusCallback: id -> ids v0.22.2 2022-02-15 21:03:44 -03:00
fiatjaf
e63479ee7f nip05 more strict. enforce the presence of "_" for domain names. 2022-02-12 20:37:23 -03:00
fiatjaf
c47f091d9b update noble secp256k1 and ensure we always return hex. v0.22.1 2022-02-11 16:27:23 -03:00
Melvin Carvalho
4c785279bc remove => from onEvent function in README.md. 2022-02-03 09:31:03 -03:00
fiatjaf
6786641b1d are you kidding me? v0.21.4 2022-01-25 17:06:26 -03:00
fiatjaf
0396db5ed6 nip04 string key is actually x and y, so we must get only 32 bytes of x. v0.21.3 2022-01-25 16:25:10 -03:00
fiatjaf
0c8e7a74f5 fix previous commit because noble is returning different values depending on [unknown], sometimes uint8array, sometimes hex. v0.21.2 2022-01-25 15:41:49 -03:00
fiatjaf
c66a2acda1 encrypt uint8array to hex. v0.21.1 2022-01-24 21:00:51 -03:00
fiatjaf
6f07c756e5 change nip04 functions interfaces. v0.21.0 2022-01-24 20:21:26 -03:00
fiatjaf
f6bcda8d8d support _ names in nip05. v0.20.1 2022-01-17 17:12:48 -03:00
fiatjaf
4b666e421b update nip05 to well-known version. v0.20.0 2022-01-17 16:37:19 -03:00
fiatjaf
454366f6a2 allow signing events with a custom signing function on pool.publish() v0.19.0 2022-01-12 22:32:45 -03:00
fiatjaf
3d6f9a41e0 prevent blocking waiting times on publish (unless "wait" is set in the pool policy). v0.18.0 2022-01-12 17:39:24 -03:00
fiatjaf
e3631ba806 fix and update nip06. 2022-01-06 21:46:34 -03:00
fiatjaf
89f11e214d fix filter matching for tags. v0.16.2 2022-01-02 19:46:19 -03:00
fiatjaf
bb09e25512 fix tag in matchFilter for kinds and ids. v0.16.1 2022-01-01 21:18:37 -03:00
fiatjaf
1b5c314436 nip-01 update: everything as arrays on filters. v0.16.0 2022-01-01 20:49:05 -03:00
fiatjaf
2230f32d11 use randomBytes from @noble/hashes. 2022-01-01 14:59:12 -03:00
fiatjaf
b271d6c06b fix .kind filter validator. v0.15.1 2022-01-01 10:26:55 -03:00
fiatjaf
76624a0f23 validateEvent() function. v0.15.0 2022-01-01 10:04:36 -03:00
fiatjaf
1f1a6380f0 fix getPublicKey to return the bip340 key. v0.14.3 2022-01-01 10:03:36 -03:00
fiatjaf
a46568d55c fix argument to micro-bip32 2021-12-31 23:09:43 -03:00
fiatjaf
ff4e63ecdf fix param order for verifySignature. v0.14.1 2021-12-31 22:53:27 -03:00
fiatjaf
01dd5b7a3c bring back @noble/secp256k1 along with micro-bip32. v0.14.0 2021-12-31 22:47:45 -03:00
fiatjaf
16536340e5 small fix on pool.removeRelay() 2021-12-31 22:25:33 -03:00
fiatjaf
1037eee335 trim relay url on normalize. 2021-12-31 22:03:02 -03:00
fiatjaf
5ce1b4c9f7 only initiate subscriptions for new relays added with read:true 2021-12-31 20:50:02 -03:00
fiatjaf
7bc9083bc5 randomChoice pool policy. v0.13.0 2021-12-30 21:46:54 -03:00
fiatjaf
ce214ebbab small tweaks on relayConnect. v0.12.4 2021-12-30 15:02:05 -03:00
fiatjaf
800beb37f1 cut out the first byte of pubkeys. v0.12.3 2021-12-29 15:15:53 -03:00
fiatjaf
6d4916e6f7 eslint and minor fixes. v0.12.2 2021-12-29 14:35:28 -03:00
fiatjaf
60fc0d7940 use tiny-secp256k1, updated nip06 and other utils. v0.12.1 2021-12-29 14:29:43 -03:00
fiatjaf
faa308049f always add event.id 2021-12-28 20:44:35 -03:00
fiatjaf
7b0220c1b8 use browserify-cipher for aes.
it seems everybody was including this by default before, but now webpack and others are not.
v0.11.0
2021-12-18 20:30:58 -03:00
fiatjaf
d8eee25e3a another typo: null != undefined. v0.10.3 2021-12-14 22:06:31 -03:00
fiatjaf
d5e93e0c30 fix a typo in matchFilter function. v0.10.2 2021-12-14 22:02:56 -03:00
fiatjaf
fff31b5ff4 automatically run received events through the filters they should pass (double-check the work made by the relay). v0.10.1 2021-12-14 22:00:42 -03:00
fiatjaf
cd7ffb8911 add local event filter functions. v0.10.0 2021-12-14 21:56:07 -03:00
fiatjaf
4f0cae0eb8 add missing id arguments. v0.9.1 2021-12-13 21:22:23 -03:00
fiatjaf
06e867b675 stop sending repeated REQs. v0.9.0 2021-12-13 20:58:49 -03:00
fiatjaf
22e895c7c2 use exponential backoff for reconnections. v0.8.1 2021-12-12 11:39:56 -03:00
fiatjaf
02cacd4446 return sub object from .sub() and other methods. v0.8.0 2021-12-12 06:47:52 -03:00