Oddbean new post about | logout
 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  @hzrd149! 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 
 Yes that'd be amazing 
 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 
 @Egge I thought I would take it one step further. now there is a vite plugin to let the app access the list of dependencies looking for funding

https://www.npmjs.com/package/vite-plugin-funding

if you add "fundingPlugin({ types: ["lightning"] })" to your vite plugins it will expose a "virtual:funding" module in the app that has a directory of all packages with the "lightning" funding type

nostr:nevent1qvzqqqqqqypzph0s8t9gtt0q88n8gt2mau7lx5klrxws6v0z9wv93eld4pwt8wa7qy88wumn8ghj7mn0wvhxcmmv9uq3qamnwvaz7tm99ehx7uewd3hkctcqyqx4a85rtq3npmmlk5zz9sdf2dlqy7w98qk9j3djck65r5m6vrzl5hg7tnm