Global Feed Post Login
Replying to Avatar Egge

Would it not be amazing if there was an easy way to support the people that build the libraries that we use everyday? And what about the dependencies of those libraries?

Introducing: npmnut - a simple "protocol" and cli-tool to advertise donation addresses and send donations to package developers!

The CLI tool parses your npm modules and looks for "npmnut" keys in their package.json files. These are supposed to be nprofiles of the developers. It then mints some Nuts from a preferred mint and sends them via DM to the developers of the package. Because sending tokens is quite lean, this works for direct dependencies and transitive dependencies and is quite fast.

I got inspired to build this by nostr:npub1ye5ptcxfyyxl5vjvdjar2ua3f0hynkjzpx552mu5snj3qmx5pzjscpknpr! I hacked this together over the last few hours, so there is still a lot of work to be done. I'll publish the code in a repo later today.

https://m.primal.net/MDBG.mov

Avatar
hzrd149 1y ago

awesome, I forgot we talked about this

you might be able to use the "funding" field in the package.json with a lightning invoice or cashu payment request https://docs.npmjs.com/cli/v10/configuring-npm/package-json?v=true#funding

Reply to this note

Please Login to reply.

Discussion

Avatar
hzrd149 1y ago

as an example pkgzap-cli is using the funding field https://www.npmjs.com/package/@getalby/pkgzap-cli#how-to-receive-sats-to-your-dependencies

Thread collapsed