bitmask-core icon indicating copy to clipboard operation
bitmask-core copied to clipboard

Verify chain / network on RGB invoice

Open cryptoquick opened this issue 1 year ago • 6 comments

Different from #360; We need to verify if an invoice for the wrong network has been provided, and return an error if that is the case. We'll also need tests, and the necessary upstream functionality.

cryptoquick avatar Aug 29 '23 19:08 cryptoquick

Hi @cryptoquick and @josediegorobles , we can make solve it, if add optional parameter in invoice called network. This maintain compatibility with other wallets and prevents the problem use invoices in wrong network. Does make sense?

crisdut avatar Nov 02 '23 14:11 crisdut

This should already be on the RGB invoice struct

cryptoquick avatar Nov 02 '23 18:11 cryptoquick

This should already be on the RGB invoice struct

Yes, but it is only used in case you know the beneficiary (see here).

crisdut avatar Nov 02 '23 19:11 crisdut

So, that would be an invoice that includes a blinded UTXO? That's fine I think.

cryptoquick avatar Nov 02 '23 19:11 cryptoquick

So, that would be an invoice that includes a blinded UTXO? That's fine I think.

No, RgbInvoice parse the chain only when beneficiary is a bitcoin address, not when a blind UTXO

crisdut avatar Nov 02 '23 19:11 crisdut

I see. You're right, we may need to add an optional parameter to the invoice then. I'll also tag @dr-orlovsky and @fedsten on this issue so they're aware of the issue.

cryptoquick avatar Nov 02 '23 19:11 cryptoquick