Commit Graph

60 Commits

Author SHA1 Message Date
fiatjaf
7cbca5f040 nip46: dynamic signer to store sessions associated with the handler pubkey to prevent stupid bugs when the same client try to use two different bunkers. 2025-07-18 14:36:42 -03:00
fiatjaf
028a1637fb nip46: handle ok=false from RPC calls better for instant failure. 2025-06-27 13:51:01 -03:00
fiatjaf
4befaa0129 nip11, nip13, nip46 changes from promenade port.
and verify pubkey validity when decoding it from an arbitrary json object.
2025-05-11 17:42:19 -03:00
fiatjaf
c0934e0639 since and until are not pointers anymore because that is too annoying. 2025-05-08 09:32:54 -03:00
fiatjaf
631ff67d52 nip46: fixes from nak bunker tests. 2025-04-22 08:37:34 -03:00
fiatjaf
3d595039cc fixes and tweaks from nak port work. 2025-04-21 08:35:19 -03:00
fiatjaf
15c6093c9b define a nostr.Kind type for event kinds, make adjustments everywhere and fix some horrible bugs with mmm, lmdb and badger querying and deleting. 2025-04-20 11:15:41 -03:00
fiatjaf
1c56906506 fix some pubkeys that were strings still. 2025-04-17 00:54:50 -03:00
fiatjaf
5b8954461f it never ends. 2025-04-16 02:59:47 -03:00
fiatjaf
cb0dd45a32 go mod tidy works now at least. 2025-04-15 18:40:56 -03:00
fiatjaf
2b5b646a62 a big bundle of conversions and other changes. 2025-04-15 17:13:57 -03:00
fiatjaf
376834cbf9 more conversions. 2025-04-15 00:00:03 -03:00
fiatjaf
b4268d649c a bunch of [32]byte conversions. still more needed. 2025-04-14 17:47:53 -03:00
fiatjaf
459273216c replace deprecated functions in multiple places. 2025-03-10 02:56:12 -03:00
fiatjaf
9cb853d6b1 nip46: fix IsValidBunkerURL because that regex was borked. 2024-12-17 11:05:43 -03:00
fiatjaf
11bdc95a37 nip46: label subscription. 2024-12-17 11:05:27 -03:00
fiatjaf
72d9aac9b1 replace all ocurrences of encoding/json with json-iterator so we get rid of HTML escaping and hopefully get faster too. 2024-12-03 00:49:27 -03:00
fiatjaf
898455cbe6 nip46: better error messages on decrypt failure. 2024-11-12 17:29:19 -03:00
fiatjaf
903770f78d nip46: check signatures incoming from bunkers by default. 2024-11-12 17:29:19 -03:00
fiatjaf
9e6342a23b nip46: delete create_account.go, it was broken. 2024-10-27 15:03:49 -03:00
fiatjaf
4346158f83 nip46: only use nip44 for encrypting requests and responses (breaking). 2024-10-27 15:03:07 -03:00
fiatjaf
579172e5b7 nip46: move some code around for clarity. 2024-10-26 19:55:55 -03:00
fiatjaf
6445b3bfe6 nip46: client to support decrypting with nip44 together with nip04. 2024-10-26 19:37:36 -03:00
fiatjaf
d4399892ee nip46: dynamic signer sessions were missing nip44 conversation key. 2024-10-26 19:26:20 -03:00
fiatjaf
022d4ce598 nip46: implement fmt.Stringer for request and response. 2024-10-14 16:42:54 -03:00
fiatjaf
e05dbb5d51 nip46: revamp dynamic signer, require a ctx on HandleRequest(). 2024-10-14 16:26:16 -03:00
sebas
27bd9bfc8c nip46: fix HandleRequest request parsing logic
Move out the `session.ParseRequest` call from the `else` branch. This
caused an empty `Request` object to be used down in the function when
the `Session` already existed.
2024-10-01 16:58:54 -03:00
jiftechnify
db39f79f23 ping method considered harmless 2024-10-01 09:39:03 -03:00
jiftechnify
1b6ac1fe0a implement ping method in nip46 signers 2024-10-01 09:39:03 -03:00
fiatjaf
03ae3812c8 nip46: remove duplicated code.
fixes https://github.com/nbd-wtf/go-nostr/issues/152
2024-10-01 00:00:21 -03:00
1l0
39f7a99894 make context work 2024-09-24 10:59:35 -03:00
fiatjaf
243343f0c5 nip46: add nip04_encrypt and nip04_decrypt to client. 2024-09-17 11:25:13 -03:00
fiatjaf
1b7f191bc4 nip46: fix using nil relay pointer when connection fails. 2024-09-11 16:42:57 -03:00
fiatjaf
c6ea51653b make nip44 conversation key be static array. 2024-09-11 10:13:29 -03:00
fiatjaf
cc038de0dd nip46: encrypt/decrypt nip44 methods on client. 2024-09-11 10:13:29 -03:00
K
c91e7b9765 using testify instead of testing.T methods. (#143) 2024-09-09 07:20:56 -03:00
fiatjaf
5edb54efee nip46: do not allow one faulty relay to break RPC calls to other relays. 2024-08-29 17:49:51 -03:00
fiatjaf
7578bf6c71 nip46: support decrypting with nip44. 2024-05-20 09:20:39 -03:00
fiatjaf
7ccd0e7192 nip46: client sends limit: 0 2024-05-15 16:59:46 -03:00
fiatjaf
a183ab0768 nip46: pass secret to authorize functions. 2024-05-15 16:13:12 -03:00
fiatjaf
4a2242e965 nip46: support nip44 in servers. 2024-05-15 16:00:30 -03:00
fiatjaf
76997c619b nip46: client small tweaks. 2024-04-25 18:25:35 -03:00
fiatjaf
aea2895441 nip46: fix pubkey passed to "connect". 2024-03-04 09:30:45 -03:00
fiatjaf
d690fd7f07 nip46: bunker implementation changes for more streamlined authorization prompts. 2024-03-02 08:16:11 -03:00
fiatjaf
5aa4fbcc72 nip46: fix assigning client secret key to struct. 2024-03-02 07:48:41 -03:00
fiatjaf
f4cf242084 validating/parsing nip05 and nip46. 2024-03-01 15:55:02 -03:00
fiatjaf
f75501e7ef nip46: auth_url support. 2024-02-29 20:37:16 -03:00
fiatjaf
6d5aef70c5 nip46: create_account 2024-02-29 20:29:08 -03:00
fiatjaf
e0ba846a03 nip46: support nip05 identifier in client. 2024-02-29 16:28:46 -03:00
fiatjaf
f3d9f02598 nip46: add a random element to id generation. 2024-02-11 11:07:01 -03:00