From snigirev.stepan at gmail.com Mon Jun 10 08:34:07 2019 From: snigirev.stepan at gmail.com (Stepan Snigirev) Date: Mon, 10 Jun 2019 10:34:07 +0200 Subject: [Lightning-dev] ECDH for spontaneous payments and offline vending machines In-Reply-To: References: Message-ID: Hi ZmnSCPxj, > Just to be clear: each time the vending node needs a new invoice, it generates a new ephemeral key `k`? Yes, the vending machine generates a new `k` for every invoice. The same technique can be used for spontaneous payments as well and in this case we can also provide additional information to the node about the payment. For example, let's say I have my digitalocean account with some user id. If I want to top-up my account with certain amount I could just generate an invoice myself and pay it, and I could also include my ID (or login) into the short channel id. The node would see this information and top-up my account with the money I just sent. Effectively this routing trick allows including a "payment purpose" by misusing the short channel id. It is a workaround as it uses the data field not according to the purpose and has a limit of 8 bytes, so I would prefer to have some metadata field in the invoice that should be passed to the payee in the onion packet instead, but this requires changes in the bolt 11 and as far as I understand something like that is already on the roadmap. Stepan. -------------- next part -------------- An HTML attachment was scrubbed... URL: