yeah, its part of a long running PR in the blossom repo to support HTTP 402 status codes with lightning and cashu https://github.com/hzrd149/blossom/pull/29

nostr:npub138s5hey76qrnm2pmv7p8nnffhfddsm8sqzm285dyc0wy4f8a6qkqtzx624 sorry the PRs been open so long but I've wanted to thoroughly test it before its officially part of the blossom spec

Reply to this note

Please Login to reply.

Discussion

BUD-07 outlines generating a 402 status code for the GET method when attempting to access a blob. To implement what you’re suggesting, it could be as simple as providing a dedicated URL (like a “tips” endpoint), where the server would return a 402 HTTP status code along with a X-Lightning or X-Cashu header. If the client is a browser, it would require a third-party extension/app like Alby to handle the payment.

As far as I see it, there shouldn’t be any major obstacles, as long as we adhere to (and maybe stretch a little 🤣) the BUD guidelines.

No need to apologize, I completely understand that this needs to mature and be thoroughly tested before becoming part of Blossom.

By the way, nostrcheck-server is already compatible with this BUD, allowing sats to be received (by both the server owner and the pubkey who uploaded the file) for file uploads/downloads. Once more clients implement this, it will be fully activated 🤓