Problem: can't pay for specific products/services

We can derive the next payment address from the current nostrocket state, but we can't actually store the result of payments anywhere.

Soluton:

Allow rocket maintainers to add predefined amounts (in sats) for incoming payments. This way we can create a new invoice for the next payment address for each payment amount and store this invoice in state.

When a user makes a payment, the client will publish an event that contains the preimage, proving that the payment has been made. When the state machine sees this it adds the payment to state, mapped to the pubkey of the user who paid.

This will introduce a vulnerability whereby someone could "frontrun" the preimage, but whatever it's good enough for now.

Reply to this note

Please Login to reply.

Discussion

I'm claiming [Problem: can't pay for specific products/services] on the nostrocket problem tracker so that I can work on it and other people don't duplicate my efforts.

Problem: can't get current state of Products on frontend

Resolved with patch to Engine: https://github.com/nostrocket/engine/commit/468396d77e7142859250c36347baee9ebb49a0fc

Problem: can't view products on frontend

Resolved with patch to Spaceman

https://github.com/nostrocket/spaceman/commit/7e98ae14e00f137a92eb597f158df726d1da2e1d

Problem: rocket products cannot recieve payments

Product's can't currently receive payments.

Solution:

Generate the next payment invoice based on the next-payment-address in state.

I'm claiming [Problem: rocket products cannot recieve payments] on the nostrocket problem tracker so that I can work on it and other people don't duplicate my efforts.

I'm closing [Problem: rocket products cannot recieve payments] on the nostrocket problem tracker, it's been resolved or become obsolete.

I'm closing [Problem: can't pay for specific products/services] on the nostrocket problem tracker, it's been resolved or become obsolete.