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

Invoice request #78

Merged
merged 3 commits into from
Nov 15, 2023
Merged

Invoice request #78

merged 3 commits into from
Nov 15, 2023

Conversation

orbitalturtle
Copy link
Collaborator

@orbitalturtle orbitalturtle commented Oct 13, 2023

This PR puts a few things into place as we start to build out functionality to pay an offer: #64

  • Adds the beginnings of a cli binary that users will eventually be able to use to pay an offer. With this, the new cli binary can be run with cargo run --bin=lndk-cli. The cli uses clap for parsing arguments.
  • Adds functionality to decode an offer and build and sign an invoice request.

Note that the invoice_request signing portion needs the following PRs:
lightningnetwork/lnd#8106
lightningdevkit/rust-lightning#2687
orbitalturtle/tonic_lnd#1

More to come!

@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a46a901) 0.00% compared to head (41a226c) 0.00%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master     #78   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files           1       1           
  Lines          12      12           
======================================
  Misses         12      12           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@carlaKC carlaKC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

Major comments are:

  1. Can we finagle the signing closure to not need a separate signer client.
  2. Needs some error handling (remove panics + expects) - I think we can just do a generic OffersError enum for now.

src/cli.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/blocking_client.rs Outdated Show resolved Hide resolved
src/lndk_offers.rs Outdated Show resolved Hide resolved
src/lndk_offers.rs Outdated Show resolved Hide resolved
@orbitalturtle
Copy link
Collaborator Author

Sorry for taking a while to respond to this :) I've been talking to LND & LDK teams about how to address our signing needs, which ended up in the two PRs I've referenced above. Luckily we've been getting responses to the PRs quite fast...

Will take a look at your other comments above today

@orbitalturtle orbitalturtle force-pushed the invoice_request branch 2 times, most recently from 5e5f440 to d4e02d1 Compare November 5, 2023 01:51
@orbitalturtle orbitalturtle requested a review from carlaKC November 5, 2023 02:10
Copy link
Collaborator

@carlaKC carlaKC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would still like to shape up the error handling here to get rid of expect/panic and replace with Result wherever reasonable. Looking good!

src/onion_messenger.rs Outdated Show resolved Hide resolved
src/cli.rs Outdated Show resolved Hide resolved
src/lndk_offers.rs Show resolved Hide resolved
src/lndk_offers.rs Outdated Show resolved Hide resolved
src/lndk_offers.rs Outdated Show resolved Hide resolved
src/lnd.rs Outdated Show resolved Hide resolved
src/lndk_offers.rs Outdated Show resolved Hide resolved
@orbitalturtle orbitalturtle changed the base branch from master to lndk-itest-part-three November 13, 2023 19:33
@orbitalturtle orbitalturtle changed the base branch from lndk-itest-part-three to master November 13, 2023 19:33
@orbitalturtle orbitalturtle changed the base branch from master to lndk-itest-part-three November 13, 2023 19:42
Copy link
Collaborator

@carlaKC carlaKC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change! Few comment, and can be rebased on master then gg!

Cargo.toml Outdated Show resolved Hide resolved
src/cli.rs Outdated Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
src/lndk_offers.rs Outdated Show resolved Hide resolved
@orbitalturtle orbitalturtle changed the base branch from lndk-itest-part-three to master November 14, 2023 17:34
@orbitalturtle
Copy link
Collaborator Author

@carlaKC Thanks for the review as always! I made those changes.

Also got the sending part working last night, just need to clean that up and then I'll get the PR up. :)

@carlaKC
Copy link
Collaborator

carlaKC commented Nov 15, 2023

Also got the sending part working last night, just need to clean that up and then I'll get the PR up. :)

LFG

@carlaKC carlaKC merged commit 6aa94ad into lndk-org:master Nov 15, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants