Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phoenixd send+recv #1322

Merged
merged 3 commits into from
Aug 26, 2024
Merged

Phoenixd send+recv #1322

merged 3 commits into from
Aug 26, 2024

Conversation

ekzyis
Copy link
Member

@ekzyis ekzyis commented Aug 21, 2024

Description

Close #1315

TODO:

  • run phoenixd and test against

I will probably test the API calls on mainnet since phoenixd doesn't support signet yet (ACINQ/phoenixd#49)

Additional Context

  • included a genwallet script that generates some boilerplate code. It also marks the lines of code that require updates with TODOs that are easily searchable.
  • cherry-picked the commits that rename the wallet interface from Support receiving with NWC #1310
  • phoenixd only supports mainnet and testnet:
$ phoenixd --help
Usage: phoenixd [<options>]

Liquidity Options:
  --auto-liquidity=(off|2m|5m|10m)  Amount automatically requested when inbound liquidity is needed (default: 2m)
  --max-mining-fee=<int>            Max mining fee for on-chain operations, in satoshis (default: 1% of auto-liquidity amount)
  --max-fee-credit=(off|50k|100k)   Max fee credit, if reached payments will be rejected (default: 100k)

Options:
  --chain=(mainnet|testnet)              Bitcoin chain to use (default: mainnet)
  --mempool-space-url=<value>            Custom mempool.space instance
  --http-bind-ip=<text>                  Bind ip for the http api (default: 127.0.0.1)
  --http-bind-port=<int>                 Bind port for the http api (default: 9740)
  --http-password=<text>                 Password for the http api (full access)
  --http-password-limited-access=<text>  Password for the http api (limited access)
  --webhook=<value>                      Webhook http endpoint for push notifications (alternative to websocket)
  --webhook-secret=<text>                Secret used to authenticate webhook calls
  --silent, --verbose                    Verbosity level (default: prints high-level info to the console)
  -v, --version                          Show the version and exit
  -h, --help                             Show this message and exit

Checklist

Are your changes backwards compatible? Please answer below:

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:

I'd give this a 6.

I have setup phoenixd on a server (phoenixd.ekzy.is). The code is able to pay invoices and create invoices. I tested the payment with a mainnet invoice. I also added code to handle any errors I encountered i.e. payment failures. phoenixd seems to mainly report errors as a text. An example is visiting / of phoenixd.ekzy.is which responds with Unknown endpoint (check api doc). However, on payment failures, it might also respond with success (2xx status code) but not contain a preimage but a reason.

Therefore, there might be more errors I am not properly handling so might result in a ugly toast but I think this is not blocking or wait until we can run phoenixd on regtest for proper integration testing.

For frontend changes: Tested on mobile? Please answer below:

Did you introduce any new environment variables? If so, call them out explicitly here:

@ekzyis ekzyis added feature new product features that weren't there before wallets labels Aug 21, 2024
@ekzyis ekzyis marked this pull request as draft August 21, 2024 09:38
@ekzyis ekzyis force-pushed the phoenixd-recv branch 2 times, most recently from 3112e33 to 1a567aa Compare August 23, 2024 01:23
@ekzyis ekzyis marked this pull request as ready for review August 23, 2024 04:47
@huumn huumn merged commit cc003a9 into master Aug 26, 2024
6 checks passed
@huumn huumn deleted the phoenixd-recv branch August 26, 2024 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new product features that weren't there before wallets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

phoenixd receiving wallet
2 participants