Commit Graph

  • d36fbb95b9 ParseMessage() returns an Envelope, use that on the main relay handler loop. fiatjaf 2023-05-09 16:55:21 -03:00
  • f7ce78d7f8 add custom envelope types with json codecs. fiatjaf 2023-05-09 16:31:10 -03:00
  • 52a493fd96 EnsureRelay() returns an error. fiatjaf 2023-05-09 00:08:06 -03:00
  • 6c186812c9 fix readme code example shota3506 2023-05-07 14:28:54 +09:00
  • 96f3d4c9a0 fix event comparison in EventSerialization test shota3506 2023-05-07 14:59:21 +09:00
  • c0a42ff2ff SimplePool improvements. fiatjaf 2023-05-06 14:32:39 -03:00
  • 2b2c000d6a Merge pull request #81 from wozuo/master fiatjaf_ 2023-05-05 21:06:07 -03:00
  • 69b9d82bb1 check if messages are compressed on receive Marc Tarnutzer 2023-05-06 01:48:01 +02:00
  • 98a2a39521 add SimplePool. fiatjaf 2023-05-05 19:05:11 -03:00
  • c86e907142 enable compression by default Marc Tarnutzer 2023-05-05 22:00:25 +02:00
  • ee9502bc3e fix: outgoing pings Marc Tarnutzer 2023-05-05 12:14:29 +02:00
  • f152a5e0c7 simplify connection close Marc Tarnutzer 2023-05-04 23:54:39 +02:00
  • 9c01ead91f switch to gobwas/ws, add compression Marc Tarnutzer 2023-05-04 23:51:15 +02:00
  • 1c118cd83e take context.Context for nip-05 resolving. fiatjaf 2023-05-04 13:20:15 -03:00
  • 53e0935308 parse kind in nevent. fiatjaf 2023-05-04 08:24:39 -03:00
  • 6fc1627fcc json tags on pointers. fiatjaf 2023-05-04 08:22:17 -03:00
  • 32ca737acf remove unused ping handler (it is done automatically). fiatjaf 2023-04-26 08:12:05 -03:00
  • ebae5d41e6 Add most NIP-11 extension structures to the RelayInformationDocument struct. (#80) Patrick Bennett 2023-04-26 07:06:05 -04:00
  • 3838ed7e91 guard ping writes with the mutex. fiatjaf 2023-04-26 08:04:47 -03:00
  • b077a41f83 Fix race condition on status in Relay.Publish method and failure to send Patrick Bennett 2023-04-21 00:10:11 -04:00
  • 9b89a49e5e cancel relay context when calling .Close(). fiatjaf 2023-04-21 07:45:23 -03:00
  • 3785daf8aa normalize relay url from Tag.Relay(). fiatjaf 2023-04-19 14:40:44 -03:00
  • fc7b20114b update readme and example. fiatjaf 2023-04-16 16:25:25 -03:00
  • 2695854e56 fixing json filter json + marshaling filter tags. fiatjaf 2023-04-16 16:19:24 -03:00
  • c42059f4b4 tests run (but not pass) and fine-tuning (specially tag filters) on filter_easyjson.go fiatjaf 2023-04-16 16:12:42 -03:00
  • 0a3e898c2f using easyjson. fiatjaf 2023-04-16 15:56:50 -03:00
  • af52f8d490 debug log events received. fiatjaf 2023-04-14 10:07:10 -03:00
  • 326d2790de rename interface{} to any. fiatjaf 2023-04-12 12:14:24 -03:00
  • ec3f1287c4 debug log CLOSE messages. fiatjaf 2023-04-12 12:14:16 -03:00
  • 2314db57a1 tweak timeouts on Publish() fiatjaf 2023-04-11 15:33:29 -03:00
  • dd692560ff fill in event pubkey when signing. fiatjaf 2023-04-11 15:33:13 -03:00
  • 32768b1a5b improve debug logging, fix stringer interface, debuglog events sent, fix debuglogging affecting the actual values. fiatjaf 2023-04-11 11:02:35 -03:00
  • 7f64f2f65e improve logic for subscribing to just-published events. fiatjaf 2023-04-11 10:06:33 -03:00
  • df7abe72fa fix: return PublishStatusFailed if connection can't be established etc. fiatjaf 2023-04-11 09:52:01 -03:00
  • 6f74d284c4 improved logging thing with the "debug" build tag. fiatjaf 2023-04-11 09:07:37 -03:00
  • 7b0af23f1a implement Stringer for Event. fiatjaf 2023-04-11 07:36:59 -03:00
  • 4507477486 slight improvements to debug logging. fiatjaf 2023-04-11 07:10:05 -03:00
  • e103c99bb8 a pluggable logging interface and more debug logging. fiatjaf 2023-04-11 00:28:52 -03:00
  • f918809e21 add subscription test using the damus relay. fiatjaf 2023-04-07 11:32:14 -03:00
  • a666994ae7 fix test that was broken when the context passed to RelayConnect() became the relay context for its full timeline. fiatjaf 2023-04-06 16:22:18 -03:00
  • ef428ff39f Subscription.Fire() can error, so Relay.Subscribe() must also. fiatjaf 2023-04-06 16:21:25 -03:00
  • 4c9db5928a log relay url too when filter doesn't match. fiatjaf 2023-04-06 12:57:15 -03:00
  • abfb7de394 add a mutex lock around Challenges and Notices channel. fiatjaf 2023-03-31 22:09:01 -03:00
  • 411718f3c1 reformat nip04 errors. fiatjaf 2023-03-31 09:30:33 -03:00
  • 30e0e1040a use context passed to .Connect() for the live of the relay. fiatjaf 2023-03-30 18:26:43 -03:00
  • e84a7936d5 fix some concurrency things. fiatjaf 2023-03-29 14:55:52 -03:00
  • b0031bfd86 sdk.ParseReferences() fiatjaf 2023-03-27 08:47:59 -03:00
  • d3a1624880 ping every 29 seconds. fiatjaf 2023-03-25 14:59:35 -03:00
  • 35875e6071 replace vendored bech32 code with btcd library. fiatjaf 2023-03-23 16:59:41 -03:00
  • 3f3bbb7529 ensure nip05 results are valid keys or nil. fiatjaf 2023-03-23 08:09:49 -03:00
  • 4b1f69ec27 subscriptions receive their context on Prepare(). fiatjaf 2023-03-21 14:50:34 -03:00
  • 46e724b8d5 dry sub.unsub() on context cancelation. fiatjaf 2023-03-18 16:07:19 -03:00
  • e9ad77c822 asynchronous event parsing on received. fiatjaf 2023-03-18 15:09:58 -03:00
  • 85fc74fd22 fixing subscription labels and ids. fiatjaf 2023-03-18 15:09:49 -03:00
  • 3f66c60b5f subscription labels: GetID() and SetLabel(). fiatjaf 2023-03-18 08:39:31 -03:00
  • 661e299981 one live random filter test. fiatjaf 2023-03-18 08:18:08 -03:00
  • fdc99d61b6 subscription ids as sequential numbers and sub.GetID() fiatjaf 2023-03-17 16:43:48 -03:00
  • cef5892bce return status from publish when relay loses connectivity. fiatjaf 2023-03-17 16:21:04 -03:00
  • 332ae1ff7f support author on nevent. fiatjaf 2023-03-17 09:09:36 -03:00
  • c982ad0ab1 guard against closed channels in subscriptions. fiatjaf 2023-03-16 15:53:24 -03:00
  • ec34d4eb10 return error message from Publish() fiatjaf 2023-03-16 14:27:33 -03:00
  • 0765f7b91b context cancelation for relay connections and subscriptions. fiatjaf 2023-03-16 14:15:16 -03:00
  • 5e24b24442 improve relay URL normalization. fiatjaf 2023-03-14 21:54:25 -03:00
  • 7803cc74b3 a function to check if a public key hex is a public key hex. fiatjaf 2023-03-14 21:42:37 -03:00
  • 02759120ea Relay.AssumeValid fiatjaf 2023-03-14 17:07:22 -03:00
  • 483f40a596 add nip57 constants cj-ibex 2023-03-11 10:53:17 -06:00
  • 7be5330d42 improve nip10.GetImmediateReply() fiatjaf 2023-03-04 21:04:59 -03:00
  • 392013fa25 sdk package with higher-level functions. fiatjaf 2023-02-27 16:45:45 -03:00
  • de7179437e helpers.go -> utils.go and lowercase util functions. fiatjaf 2023-02-27 16:30:48 -03:00
  • 916a6a6abb support for naddr on nip19. fiatjaf 2023-02-27 16:15:04 -03:00
  • e7e20f3e00 revert accidentally changes Yasuhiro Matsumoto 2023-02-26 21:55:46 +09:00
  • 2d7dae3f69 add test for Filter.Search Yasuhiro Matsumoto 2023-02-26 21:38:43 +09:00
  • 75a07daf7b use StringBytes() instead of String() Yasuhiro Matsumoto 2023-02-26 21:34:01 +09:00
  • 74c646fe21 add RequestHeader option for websocket conn Jasper Rädisch 2023-02-21 13:12:23 +01:00
  • 17a7c3a678 feat: add check redirect for identifier request zach 2023-02-25 09:26:17 +08:00
  • b278230cdb Nip04 decrypt (#65) cj-chua 2023-02-22 17:35:39 -06:00
  • ec94c6ee98 test nip26 on ci. fiatjaf 2023-02-15 20:25:16 -03:00
  • 77c625e341 nip50: add filter.search field Steve Perkins 2023-02-13 20:32:09 -05:00
  • 433a53fef2 docs: add ci status in readme r3drun3 2023-02-14 17:50:33 +01:00
  • a0d9f3a392 send notices on a goroutine. fiatjaf 2023-02-05 20:03:00 -03:00
  • 7c1ab3e627 Merge pull request #60 from barkyq/nip26 fiatjaf 2023-02-12 08:44:50 -03:00
  • 442fe39867 small edits Dylan Cant 2023-02-12 00:39:29 -05:00
  • a42c603847 nip26 initial commit Dylan Cant 2023-02-12 00:03:29 -05:00
  • 3ccef5eec4 Tweaked the NIP 42 Validation (#58) barkyq 2023-02-09 09:28:31 -05:00
  • 72386d27e1 fix nip19_test Dylan Cant 2023-02-06 19:19:52 -05:00
  • ab2db2dfc5 Fix unblock mutex Wayback Archiver 2023-02-05 16:00:48 +00:00
  • 4aee139f6c modify AppendUnique so it matches only the first two items. fiatjaf 2023-02-05 17:04:15 -03:00
  • a3e3b25dd9 support relays in nip05. fiatjaf 2023-02-05 16:25:00 -03:00
  • 024f89ac58 unexport internal nip05 types. fiatjaf 2023-02-05 16:22:41 -03:00
  • e407725a43 adjust nip05 so it supports naked domains. fiatjaf 2023-02-05 16:21:40 -03:00
  • a16e2a28d5 Update relay.go Wayback Archiver 2023-02-05 13:44:26 +00:00
  • d7d4c62602 Fix execution sequence Wayback Archiver 2023-02-05 13:32:31 +00:00
  • 11f4090639 Test with -race flag Wayback Archiver 2023-02-05 06:30:44 +00:00
  • 15370a9acd Fix example compilation error (#50) Kevin Lee 2023-02-03 22:36:21 +08:00
  • cc6ec2b886 Fix test nip19 variable naming Theodore Keloglou 2023-02-03 14:20:41 +00:00
  • de78b2c054 added function to fetch NIP-11 documents Dylan Cant 2023-01-31 11:48:48 -05:00
  • 92c0143762 make sub.Events a channel of pointers. fiatjaf 2023-01-26 09:04:27 -03:00
  • 0e2ee85785 test every pull request. fiatjaf 2023-01-20 17:00:27 -03:00
  • 9e58aa85c8 test every commit on github actions. fiatjaf 2023-01-20 16:30:03 -03:00
  • 3d58f81ea9 Merge pull request #43 from barkyq/event_MarshalJSON fiatjaf 2023-01-20 16:27:16 -03:00