ACINQ / phoenix

Phoenix is a self-custodial Bitcoin wallet using Lightning to send/receive payments.
https://phoenix.acinq.co
Apache License 2.0
644 stars 97 forks source link

Local RESTfull API for creating LN invoice programmatically #136

Closed jk14 closed 3 years ago

jk14 commented 3 years ago

I just released the first release of One-Click Miner with Submarine Swap support and direct LN payments into Phoenix Wallet ( https://github.com/jk14/one-click-miner-vnext/blob/master/README.md )

But Windows with default firewall is not user friendly for average user. Due to this I would like to ask for such tiny addition to Phoenix Wallet (necessary to make the process of top-up your wallet - almost invisible for Average Joe, i.e. fully under the hood, what is good for Lightning Network global adoption)

Probably under the "App acccess settings" - something like this option: "Local REST API" (switch on/off)

It may/should only work in the local network, on WiFi interface (if not possible: only with single, whitelisted IP) And it would be fine enough to introduce it in the new Kotlin codebase.

This is very simple, but quite important feature in case of some other, future integrations with other tools, too (as an incentive I may try to help with many new, missing yet translations for Phoenix Wallet, vide: https://github.com/vertcoin-project/one-click-miner-vnext/tree/master/frontend/src/i18n )

dpad85 commented 3 years ago

Hello,

If I understand correctly, what you want is Phoenix to be able to receive payments without user interaction. The correct solution is to have Phoenix generate static invoices. That is, some sort of keysend + relevant information allowing the sender to reach the Phoenix node (i.e the routing hints that are embedded in a BOLT11 invoice). We do have plans, but not yet decided on the best way to achieve this.

jk14 commented 3 years ago

In short: I would like from PC to receive the LN invoice created by Phoenix wallet automatically (not manually like right now). Your proposition with static invoices can't be applied to the Submarine Swap case. It must be standard, non-zero LN invoice for it. Additionally, it looks like my proposition above would be the simplest one, but probably possible only on Android, but not on iOS. Due to this, it looks reasonable to ask for implementing webLN support in Phoenix wallet (in my next request: https://github.com/ACINQ/phoenix/issues/137 )

jk14 commented 3 years ago

I will try to achieve this functionality with LNURL