Commit Graph

269 Commits

Author SHA1 Message Date
fiatjaf 89f11e214d fix filter matching for tags. 2022-01-02 19:46:19 -03:00
fiatjaf bb09e25512 fix tag in matchFilter for kinds and ids. 2022-01-01 21:18:37 -03:00
fiatjaf 1b5c314436 nip-01 update: everything as arrays on filters. 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. 2022-01-01 10:26:55 -03:00
fiatjaf 76624a0f23 validateEvent() function. 2022-01-01 10:04:36 -03:00
fiatjaf 1f1a6380f0 fix getPublicKey to return the bip340 key. 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. 2021-12-31 22:53:27 -03:00
fiatjaf 01dd5b7a3c bring back @noble/secp256k1 along with micro-bip32. 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. 2021-12-30 21:46:54 -03:00
fiatjaf ce214ebbab small tweaks on relayConnect. 2021-12-30 15:02:05 -03:00
fiatjaf 800beb37f1 cut out the first byte of pubkeys. 2021-12-29 15:15:53 -03:00
fiatjaf 6d4916e6f7 eslint and minor fixes. 2021-12-29 14:35:28 -03:00
fiatjaf 60fc0d7940 use tiny-secp256k1, updated nip06 and other utils. 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.
2021-12-18 20:30:58 -03:00
fiatjaf d8eee25e3a another typo: null != undefined. 2021-12-14 22:06:31 -03:00
fiatjaf d5e93e0c30 fix a typo in matchFilter function. 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). 2021-12-14 22:00:42 -03:00
fiatjaf cd7ffb8911 add local event filter functions. 2021-12-14 21:56:07 -03:00
fiatjaf 4f0cae0eb8 add missing `id` arguments. 2021-12-13 21:22:23 -03:00
fiatjaf 06e867b675 stop sending repeated REQs. 2021-12-13 20:58:49 -03:00
fiatjaf 22e895c7c2 use exponential backoff for reconnections. 2021-12-12 11:39:56 -03:00
fiatjaf 02cacd4446 return sub object from .sub() and other methods. 2021-12-12 06:47:52 -03:00
fiatjaf a99188e4cf remove log line for events with invalid signature. 2021-12-12 05:54:48 -03:00
fiatjaf 93b22e48a6 add nip06. 2021-12-11 19:46:51 -03:00
fiatjaf 57b9bac9b1 end the rollup madness, just ship the source. 2021-12-11 09:01:52 -03:00
fiatjaf 625b3bb3ba fix buffer import and use rollup for transpiling the package. 2021-12-11 08:53:43 -03:00
fiatjaf cc2ced1558 update secp256k1 library, add nip04.js 2021-12-10 21:41:05 -03:00
fiatjaf 1ce00bd3b6 nip05. 2021-07-19 08:28:14 -03:00
fiatjaf dc698a5c90 fix getBlankEvent. 2021-05-23 14:21:46 -03:00
fiatjaf d3d120cd7c fix some important bugs so it is actually usable. 2021-05-22 22:14:27 -03:00
fiatjaf fc4ddad068 add channel reusing and cancellation to README. 2021-05-22 21:24:19 -03:00
fiatjaf e2956ab937 support getBlankEvent() function. 2021-05-22 21:20:52 -03:00
fiatjaf 28443710e3 improve reconnection attempts to relays and print less errors. 2021-05-15 18:12:03 -03:00
fiatjaf 2d2d9863d1 add example with multiple filters to readme. 2021-02-23 00:20:15 -03:00
fiatjaf b7e33c512c fix many bugs. 2021-02-23 00:18:00 -03:00
Richard Bondi 710a3c3ce1
update readme for protocol update 2021-02-21 14:13:49 -06:00
fiatjaf c13772c258
Merge pull request #6 from rsbondi/protocol-change 2021-02-20 11:10:33 -03:00
Richard Bondi a25e6c4265
reuse channel for sub sub 2021-02-19 12:08:01 -06:00
Richard Bondi bdc778314d
should subscribe correctly 2021-02-19 09:22:01 -06:00
fiatjaf 0c0f9d0e76 sha256 returns a promise! 2021-02-18 23:53:55 -03:00
fiatjaf 789cba142e finish removing ramda. 2021-02-18 20:22:06 -03:00
fiatjaf 3844f68d1a remove ramda and rework logic. 2021-02-18 16:04:41 -03:00
fiatjaf 87de1310b5 some small fixes. 2021-02-17 18:09:30 -03:00
fiatjaf 0e1c23a3f9 commonjs import for ramda. 2021-02-17 17:01:40 -03:00