99 Commits
Author SHA1 Message Date
fiatjaf 6855722ba5 make the relay connection timeout configurable. 2026-07-21 20:41:45 -03:00
fiatjaf aac995714b timeout relay connections at 2s. 2026-07-21 18:51:41 -03:00
Yasuhiro Matsumoto 6bd793bea5 helpers: reject kind numbers above 65535 instead of silently truncating them to uint16. 2026-07-15 15:34:29 +09:00
Yasuhiro Matsumoto d8e951e881 helpers: fix parseEventID rejecting note1 codes, nip19.Decode returns an EventPointer for those. 2026-07-15 15:17:24 +09:00
Yasuhiro Matsumoto 4e0b7ecc08 helpers: guard the shared relays slice and render lines with a mutex in connectToAllRelays, parallel connections were racing and could drop relays. 2026-07-15 11:43:44 +09:00
fiatjaf 40a934e3f9 fix conflicts with running bunker connections (client and server apparently) through auth-required relays, clarify "connect-as" and use a special flag for it, let's see.
hopefully fixes https://github.com/fiatjaf/nak/issues/116
2026-06-20 20:30:45 -03:00
fiatjaf 0c8e643609 key and auth flags on root command. 2026-06-11 17:49:20 -03:00
fiatjaf 7872c61a4d combineFlags() and authFlags compendium. 2026-06-11 16:23:20 -03:00
fiatjaf c2902bfb5d nak kind, and accept names on --kind flags. 2026-06-04 16:13:13 -03:00
Yasuhiro Matsumoto e5f4b07c3d go-tty: bump to v2. 2026-05-30 00:29:51 +09:00
fiatjaf eae828e03b update to the fact that Pool doesn't use PoolOptions anymore, just modify the global pool directly. 2026-04-19 20:17:00 -03:00
fiatjaf d3f4548dbd why were we recreating the pool? 2026-04-18 11:13:08 -03:00
fiatjaf 65ddf7b821 use appendUnique from nostrlib. 2026-04-02 03:24:05 -03:00
fiatjaf be26dfca3c print "connecting to..." message without the leading scheme. 2026-03-30 08:56:24 -03:00
fiatjaf ec1721cfe3 count: support CLOSED and AUTH.
fixes https://github.com/fiatjaf/nak/issues/117
2026-03-25 21:42:11 -03:00
fiatjaf 82275e4b9e when parsing a nip05 as a pubkey there is no point in falling back to parsing as hex or npub. 2026-03-22 17:17:28 -03:00
fiatjaf f00a4a7d2a fix potential double-yield() usage on reading lines from stdin. 2026-03-17 14:57:42 -03:00
fiatjaf 9d4df21836 gift/encrypt: fix wording and yield returns. 2026-03-17 11:49:09 -03:00
fiatjaf c1e72e0af1 convert tags to appropriate hex pubkeys, ids etc, even from nip05, but check the tag name first for better (hardcoded) context. 2026-03-13 00:30:46 -03:00
fiatjaf ff5a7b4ba7 git: issue replying in the middle of a thread. 2026-03-08 18:29:53 -03:00
fiatjaf 6bd2d1cdfc git: issues and patches improved enormously. 2026-03-07 23:10:00 -03:00
Yasuhiro Matsumotoandfiatjaf_ b5de7b78bc prevent panic on AUTH challenge tag (nil or len<2) 2026-02-01 14:24:51 -03:00
fiatjaf bf19f38996 nak bunker connect 'nostrconnect://...' working. 2026-01-21 12:44:40 -03:00
fiatjaf c6da13649d hopefully eliminate the weird case of cron and githubactions calling nak with an empty stdin and causing it to do nothing.
closes https://github.com/fiatjaf/nak/issues/90
2026-01-16 16:11:07 -03:00
fiatjaf ddc009a391 git: rework it to be more git-native and expose the internals more in a cool way. 2025-11-23 18:01:25 -03:00
Lezandfiatjaf_ bbe1661096 Don't emit hello event if no events were received from stdin
When running `nak req ... relay.one | nak event relay.two`,
if the first req doesn't return any events, the second
nak should not publish a "hello from nostr army knife" note
to the second relay as it is clearly not the intention.

`nak event relay.two` behavior is unchanged, it will publish the hello.
2025-11-18 08:13:47 -03:00
fiatjaf e0ca768695 also parse npub/nevent/naddr when used as tag values, turn them into their corresponding hex or address format. 2025-11-11 16:32:14 -03:00
fiatjaf bef3739a67 accept npub/nprofile/nevent instead of just hex in flags. 2025-11-11 15:58:53 -03:00
fiatjaf 23e27da077 use isatty for detecting stuff for the fancy output (it doesn't work). 2025-08-14 13:28:15 -03:00
fiatjaf 0073c9bdf1 compile tests again. 2025-05-23 07:52:19 -03:00
fiatjaf fc255b5a9a optimized clamped error message for status code failures. 2025-05-11 12:15:50 -03:00
fiatjaf 9055f98f66 use color.Output and color.Error instead of os.Stdout and os.Stderr in some places. 2025-05-03 21:45:28 -03:00
fiatjaf 02f22a8c2f nak event --confirm 2025-05-03 21:44:59 -03:00
fiatjaf e91a454fc0 nak encode that takes json from stdin. 2025-04-25 13:30:32 -03:00
fiatjaf 01be954ae6 use badger for outbox hints. 2025-04-21 15:33:49 -03:00
fiatjaf d733a31898 convert to using nostrlib. 2025-04-20 18:11:21 -03:00
fiatjaf 35da063c30 precheck for validity of relay URLs and prevent unwanted crash otherwise. 2025-04-07 23:13:32 -03:00
fiatjaf 55fd631787 fix term.GetSize() when piping. 2025-04-03 22:08:11 -03:00
fiatjaf 703c186958 much more colors everywhere and everything is prettier. 2025-04-03 14:50:25 -03:00
fiatjaf 7ae2e686cb more colors. 2025-04-03 11:57:18 -03:00
fiatjaf 9547711e8d nice dynamic UI when connecting to relays, and go much faster concurrently. 2025-04-03 11:42:33 -03:00
fiatjaf 7b6f387aad tags GetFirst() => Find() 2025-03-29 17:12:31 -03:00
fiatjaf 3d961d4bec fs: something that makes more sense. 2025-03-08 12:52:05 -03:00
fiatjaf d6a23bd00c experimental nak fs 2025-03-08 10:51:44 -03:00
fiatjaf 26930d40bc migrate to urfave/cli/v3 again now that they have flags after arguments. 2025-02-16 13:02:04 -03:00
fiatjaf 1f2492c9b1 fix multiline handler thing for when we're don't have any stdin. 2025-02-05 20:42:55 -03:00
fiatjaf 60d1292f80 parse multiline json from input on nak event and nak req, use iterators instead of channels for more efficient stdin parsing. 2025-02-05 09:44:16 -03:00
fiatjaf e2dd3ca544 fix -v verbose flag (it was being used by the default --version flag). 2025-01-30 19:58:17 -03:00
fiatjaf df5ebd3f56 global verbose flag. 2025-01-30 16:06:16 -03:00
fiatjaf 81571c6952 global bold/italic helpers. 2025-01-30 16:05:51 -03:00