New https://github.com/fiatjaf/nak release has some unexciting new features:

- nak wallet: implements NIP-60 token receiving, sending and swapping, there is also a nutzap command for sending to others but I forgot to test that so let me know where exactly is broken (blame nostr:npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft)

- nak curl: this wraps the actual curl command you must have installed and adds a NIP-98 header to it so you can call APIs with Nostr authorization (blame nostr:npub1v0lxxxxutpvrelsksy8cdhgfux9l6a42hsj2qzquu2zk7vc9qnkszrqj49)

- nak mcp: you can use this to allow AIs to search people on Nostr, publish notes, mention people, read notes with built-in outbox model (blame nostr:npub1hr6v96g0phtxwys4x0tm3khawuuykz6s28uzwtj5j0zc7lunu99snw2e29 and nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s), I don't understand the MCP protocol and I don't really know if this works, I could only test it twice because Goose has stopped answering me completely

- nak outbox: in its default form this just lists NIP-65 relays for a given pubkey, but if you enable persistent mode by calling 'nak outbox init' then it will start storing relay hints from multiple contexts for every person every time you use Nostr and use those in a more robust outbox relay algorithm strategy (like https://how-nostr-works.pages.dev/#/pathological) in other contexts, like when doing 'nak fetch' -- inside nak this is not very important, but it serves as a learning tool

- now you can pipe multiline JSON into 'nak event' or 'nak req' (you probably didn't notice but before if you want to pass an event for it to modify, sign or publish you had to pass the entire JSON in a single line -- not anymore)

Reply to this note

Please Login to reply.

Discussion

How to replay these edits?

Will the 0xchat style cashu integration come to more normie clients soon? πŸ‘οΈπŸ§‘πŸ‘οΈ

Thank you! This will be really helpful to us.

nak update!!! AWESOME! Thanks i thought it was abandoned πŸ˜…πŸ€™

> you had to pass the entire JSON in a single line

Just yesterday I devoted some time to getting around this limitation. Thanks.

You could have used jq to shrink it to one line:

echo '{

"content": "bla"

} | jq -c | nak event

One thing jq does that nak doesn't is to detect multiple JSON entities within a same line -- or one that ends in that line and another starts, spanning other lines.

I won't even attempt to implement that.

It's what I did, when I found out about the -c flag at the end.

nice!

Nice! Thanks.

Fuck off

Trying to query with

nak req -v -k 1 -t t=asknostr -l 20 relay

and it doesn't catch nothing .. what i'm doing wrong ? 😁

also simple

~~~

nak req -v -l 10 relay.damus.io

~~~

doesn't return nothing but that connection to relay was ok

Oops, thank you for spotting this obvious, blatant and horrible bug. I've pushed a fix.

All good now!

wut

gj! from grug

Lit!! 🀘

What is this and why should anyone care?

πŸ”₯