cashubtc / nuts

Cashu protocol specifications https://cashubtc.github.io/nuts/
MIT License
143 stars 49 forks source link

NUT-XX: Payment Requests #124

Open Egge21M opened 4 months ago

Egge21M commented 4 months ago

Cashu transactions are initiated by the sender and can be pushed to the receiver without any additional help. However for many use cases requesting a payment may be more desirable (e.g. point-of-sales). This proposal introduces a standardised format for payment requests, that supply a sending wallet with all information necessary to complete the transaction.

thesimplekid commented 4 months ago

What do you think of an optional condition that could specify spending conditions. For example if the receiver wants it locked using P2PK?

Egge21M commented 4 months ago

What do you think of an optional condition that could specify spending conditions. For example if the receiver wants it locked using P2PK?

Yes, this should be included. I will add it later doday

callebtc commented 4 months ago

What do you think of an optional condition that could specify spending conditions. For example if the receiver wants it locked using P2PK?

Very cool. The receiver could specify the secret as well.

Edit: maybe even better: Y – the sender doesn't need to know the secret.

Edit 2: Problem: it would require one Y per proof you expect, which is not likely to be known upfront in most cases.

Egge21M commented 4 months ago

Very cool. The receiver could specify the secret as well.

I added l for specifying a locking script. However specifying secret / Y is overkill I believe. It's nice to have, but introduces a lot of complexity and will bloat the request size quite a bit too.

ngutech21 commented 3 weeks ago

Does this nut provide any information through the info-endpoint other than the supported-flag? It could make sense to provide the supported currencies and min/max amounts like we do in nut-4 and nut-5. Or is this nut using the same values as nut-5?