This website requires JavaScript.
b45c289f1c
Merge pull request #41 from 13x-tech/fix/ignore-trailing-slash
fiatjaf
2023-01-18 22:16:01 -03:00
455c7a23b6
nit - not necessary to be verbose
Liran Cohen
2023-01-18 21:38:46 +00:00
839154da5a
case insenstive for nip42 service url validation, some cleanup
Liran Cohen
2023-01-18 21:35:32 +00:00
afcfa20763
Changing (evt Event) MarshalJSON to avoid string escaping bug
Dylan Cant
2023-01-18 14:50:44 -05:00
443c7cf633
trim trailing slash from expected and found relay URL, clean up
Liran Cohen
2023-01-18 17:44:32 +00:00
b9d04f1496
cleaning up marshaling/serialization (#1 )
barkyq
2023-01-18 11:06:59 -05:00
c816103774
fix typo for GoDoc comment on GetAll tags
Liran Cohen
2023-01-18 04:22:38 +00:00
dcc133e628
Merge pull request #39 from barkyq/master
fiatjaf
2023-01-17 08:12:32 -03:00
c6b4867dd4
simplifications in number of lines of code for serialization
Dylan Cant
2023-01-16 23:31:22 -05:00
771a2b6218
remove int64 -> int conversion as it is not necessary for Sprinting
Dylan Cant
2023-01-16 23:22:45 -05:00
be46f7abac
fixing JSON escaping (to RFC4627)
Dylan Cant
2023-01-16 23:13:19 -05:00
ebe3d61484
added nip04.go docstrings
Dylan Cant
2023-01-16 21:55:34 -05:00
67813257df
stopping data races with sync.mutex to Publish() in relay.go
Dylan Cant
2023-01-16 11:32:00 -05:00
87b6280299
Added some NIP-42 functionality to the client (relay.go) (#38 )
barkyq
2023-01-16 06:27:11 -05:00
9775016bf1
implement nip-42 AUTH event validation.
fiatjaf
2023-01-15 22:00:38 -03:00
a37ffacc74
added sub.mutex handling in the relay Connect() function (#37 )
barkyq
2023-01-15 07:19:00 -05:00
635c1b0132
fixed small typo
Dylan Cant
2023-01-13 22:14:21 -05:00
ea968c79d1
typo...
Dylan Cant
2023-01-13 22:08:27 -05:00
f149ee8b4e
nip19, subscription, publication code examples added to README.md
Dylan Cant
2023-01-13 22:07:08 -05:00
92ce379649
added example/example.go with subscription and publication code example
Dylan Cant
2023-01-13 18:50:35 -05:00
c64078e5cc
remove outdated docs. must add new ones later.
fiatjaf
2023-01-13 14:28:56 -03:00
0397395261
force a deadline of 7 seconds when connecting to relays (if not set).
fiatjaf
2023-01-03 14:47:21 -03:00
3349b2a52b
fix encoding and decoding of event "extra" fields.
fiatjaf
2023-01-03 14:46:50 -03:00
4a62a753e6
contexts everywhere.
fiatjaf
2023-01-01 20:22:40 -03:00
c18de89dd3
remove relaypool because it is considered harmful.
fiatjaf
2023-01-01 20:10:05 -03:00
4dbbcec80a
one more nip19 test.
fiatjaf
2022-12-29 09:35:05 -03:00
e4c5dfbebb
nip19.
fiatjaf
2022-12-27 07:49:26 -03:00
28663f21f0
relaypool: add a unique events subscription smoke test
alex
2022-12-26 19:54:37 +01:00
435579dc75
publish: correctly report failed command statuses from nip-20 relays
alex
2022-12-26 17:20:56 +01:00
5bfb398f4d
nip13: check and generate proof of work
alex
2022-12-26 02:22:04 +01:00
bb1138a2fa
problem: panic if calling unsub more than once
Stan Stacker
2022-12-25 04:58:44 +00:00
3f2c3f1bd8
fix: nip04 remove extra padding
Wes van der Vleuten
2022-12-23 02:16:57 +01:00
6aab32ef4f
Merge pull request #20 from stanstacks/cantunsub
fiatjaf
2022-12-23 11:33:11 -03:00
6452f7de09
problem: example is broken
stanstacks
2022-12-23 10:12:22 +08:00
c94ae093c1
problem: close channel to unsub is confusing
stanstacks
2022-12-23 10:03:40 +08:00
6f1c60f66c
problem: can't unsub
stanstacks
2022-12-22 18:48:41 +08:00
72ef03f238
use crypto/rand instead of math/rand
mlctrez
2022-12-19 22:40:24 -06:00
6c13dc7969
remove tlv from npub in nip19.
fiatjaf
2022-12-19 15:10:23 -03:00
b3aa4eba29
remove unused dependency.
fiatjaf
2022-12-18 06:37:54 -03:00
c327f622f3
relay: introduce ConnectContext for better control over network latency
alex
2022-12-17 19:39:10 +01:00
ad71e083d8
add some extra padding to decoy super small messages.
fiatjaf
2022-12-14 16:17:37 -03:00
8a8fd7c2b0
fix nip04 decryption padding and add tests.
fiatjaf
2022-12-14 16:10:10 -03:00
ac25c2071e
another event serialization test, now reversed.
fiatjaf
2022-12-14 13:35:13 -03:00
4a3aea6d4b
update nip04 to btcec/v2
fiatjaf
2022-12-11 16:35:42 -03:00
fb29445ef9
omitempty metadata fields.
fiatjaf
2022-12-11 16:35:04 -03:00
ea15550039
kind-0 metadata helper type.
fiatjaf
2022-11-26 19:32:16 -03:00
0c39530d57
QuerySync() relay method.
fiatjaf
2022-11-26 19:32:03 -03:00
e8bc11e4f9
support nip-35.
fiatjaf
2022-11-26 19:31:49 -03:00
2d01aa8630
prevent sending on closed channel for subscription.
fiatjaf
2022-11-26 09:25:51 -03:00
67d8f26d8a
some stringifiers.
fiatjaf
2022-11-26 09:25:31 -03:00
b0ae497656
allow more fine-grained control over subscription filters.
fiatjaf
2022-11-19 14:00:29 -03:00
8bc91a894c
sub.GetFilters()
fiatjaf
2022-11-19 07:19:36 -03:00
b2885d57cd
fix blank case on NormalizeURL().
fiatjaf
2022-11-19 07:19:10 -03:00
89cb5ad461
fix Tag.Relay().
fiatjaf
2022-11-18 14:16:29 -03:00
e09f6b4bff
fix event extra: create a map when it doesn't exist.
fiatjaf
2022-11-18 14:16:17 -03:00
0d7a4b258a
fix normalize and add a test.
fiatjaf
2022-11-18 14:15:41 -03:00
37b3bf7a8a
helpers for dealing with extra values in events.
fiatjaf
2022-11-17 10:58:40 -03:00
480ee0ef87
PublishEvent() fixes.
fiatjaf
2022-11-17 09:28:45 -03:00
381ee2cc01
tag helpers in a separate file and nip10 helpers.
fiatjaf
2022-11-17 06:15:30 -03:00
69ccfbaa08
protect against faulty relays that send more than one EOSE halting us
fiatjaf
2022-11-16 10:07:15 -03:00
7538f1108d
stop halting at EOSE.
fiatjaf
2022-11-16 10:05:28 -03:00
14e81a756a
fix unique logic (move it to a helper function, we can't return two channels because that will break if the caller doesn't read from both.)
fiatjaf
2022-11-15 16:40:17 -03:00
2ec7957409
fix nip19 bech32 encoding and decoding.
fiatjaf
2022-11-15 16:29:37 -03:00
dd0571229b
RelayConnect() ensures there will be a connection, and handle connection errors better.
fiatjaf
2022-11-15 07:53:50 -03:00
2b8807d699
fix relay .Connect() and .Sub()
fiatjaf
2022-11-14 19:48:02 -03:00
37235a1394
bring back unique events.
fiatjaf
2022-11-13 19:33:48 -03:00
2641327c28
support for EOSE and OK messages on relay/subscription.
fiatjaf
2022-11-12 21:49:57 -03:00
50e47392a9
improve tags godoc.
fiatjaf
2022-11-11 10:56:17 -03:00
8a12bb2c18
some helper functions for tags.
fiatjaf
2022-11-11 10:08:36 -03:00
cdc9b61db1
Update example.go
Blake Jakopovic
2022-11-09 15:59:12 +01:00
fe01c9474b
fix string formatting on test errors.
fiatjaf
2022-11-08 08:44:22 -03:00
f98f54d3be
use generic functions for dealing with lists.
fiatjaf
2022-11-08 07:15:08 -03:00
c4d52e516f
change relaypool and subscription such that a Relay can have an independent existence.
fiatjaf
2022-11-06 21:15:42 -03:00
2427dbd65a
rename to github.com/nbd-wtf/go-nostr
fiatjaf
2022-11-04 08:24:32 -03:00
329b8d44d2
move stuff back from nostr package to top level.
fiatjaf
2022-11-04 08:22:12 -03:00
3a6d6795e4
add an "extra" map to events that can be used to merge other properties when necessary.
fiatjaf
2022-11-04 08:21:35 -03:00
fb3972b725
add new event kinds.
fiatjaf
2022-11-04 08:03:17 -03:00
7de8bcd2d0
basic support for nip19.
fiatjaf
2022-10-31 14:57:33 -03:00
9549c3624a
nostr package, readme updates accordingly, matching example program (#14 )
BitcoinCoderBob
2022-10-12 16:24:30 -04:00
e47c80a63d
Handle Filter.Limit
dolcea@lenovo
2022-10-11 12:25:34 -03:00
e546214291
added nbd badge
Santos Hernandez
2022-10-07 18:51:36 -07:00
5276359774
Rename LICENSE to LICENSE.md
Santos Hernandez
2022-10-07 16:52:01 -07:00
01a4034add
Create LICENSE
Santos Hernandez
2022-10-07 16:51:17 -07:00
cea3004867
update to go1.18 and use generic sync maps instead of normal maps.
fiatjaf
2022-08-22 08:45:27 -03:00
2f84ddf5f5
add limit field to filter.
fiatjaf
2022-07-24 19:53:10 -03:00
66aa4e9de2
add nip-11 type.
fiatjaf
2022-07-11 15:51:24 -03:00
1f1d3cfe7f
some changes and fixes related to sub.Sub().
fiatjaf
2022-05-04 12:34:12 -03:00
5f3221e966
nip05 queryName() function.
fiatjaf
2022-05-04 11:15:26 -03:00
5d1a29d135
stop closing publishstatus connection and subscriptions.
fiatjaf
2022-05-01 21:11:42 -03:00
16c874cb8d
add String() method to Status int on PublishStatus.
fiatjaf
2022-05-01 17:51:38 -03:00
a11aa8756b
fix CheckSignature(): we were parsing the pubkey with the ECDSA function instead of Schnorr.
fiatjaf
2022-05-01 17:51:16 -03:00
00ad1acde9
use schnorr from btcec instead of the bip340 library.
fiatjaf
2022-05-01 15:10:18 -03:00
c0a2be91a1
relaypool: continue on ping msg
Gustavo Chain
2022-02-19 09:56:15 +01:00
dd43f4c495
add another event to serialization and verification test.
fiatjaf
2022-02-14 10:18:50 -03:00
a563c5faa1
fix subarray length typo.
fiatjaf
2022-02-13 16:31:44 -03:00
acf86e9ad8
filenames starting with "aux" break things because something on windows?
fiatjaf
2022-02-12 20:32:48 -03:00
795863d2dd
alias TagMap to map[string]StringList.
fiatjaf
2022-02-09 20:25:20 -03:00
9721ffa851
use fastjson to serialize and unmarshal/marshal events, remove need for special Time type.
fiatjaf
2022-02-09 20:23:10 -03:00
41955a0601
serialization tests for events and filters.
fiatjaf
2022-02-09 13:40:26 -03:00
5266482b2a
support prefix search for ids and authors (nip01 update).
fiatjaf
2022-02-08 16:44:33 -03:00