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

feat: Onboarding through a hodl invoice #2560

Merged
merged 28 commits into from
May 27, 2024

Commits on May 24, 2024

  1. Configuration menu
    Copy the full SHA
    80d2916 View commit details
    Browse the repository at this point in the history
  2. chore: Remove empty todo

    holzeis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    81a3116 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e7bc782 View commit details
    Browse the repository at this point in the history
  4. feat: Add lnd bridge

    holzeis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    19ced8d View commit details
    Browse the repository at this point in the history
  5. feat: Add generic signed value model

    This will allow us to generically wrap a api model into a signed value model which covers the signature creation and verification.
    holzeis committed May 24, 2024
    Configuration menu
    Copy the full SHA
    d34edf1 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2024

  1. feat: Add create invoice api

    Creates a hodl invoices, subscribes to updates to it and returns the invoice to the app.
    holzeis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    39f2b4c View commit details
    Browse the repository at this point in the history
  2. feat: Generate pre image and hash

    Co-authored-by: Richard Holzeis <richard@holzeis.me>
    bonomat and holzeis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    f9bfa82 View commit details
    Browse the repository at this point in the history
  3. fix: Wrap confirm slider and next button in sized box

    Before the button was jumping depending on whether the slider or the button was shown.
    
    I also changed the button text from "Confirm" to "Next" since there wouldn't be any semantical difference between funding with internal wallet or external.
    holzeis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    13e3392 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4c87af0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2909b7f View commit details
    Browse the repository at this point in the history
  6. feat: Add icon to show collapsable fees

    The asterix was just not clear enough. I also did some minor styling improvements and removed the unused label argument from the fee expansion widget.
    holzeis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    40eaf91 View commit details
    Browse the repository at this point in the history
  7. chore: Formatted code

    holzeis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    83330cc View commit details
    Browse the repository at this point in the history
  8. feat: Watch for lightning invoice payment

    This will submit the order once a hodl invoice is paid.
    
    In the next step we have to extend the post order api to revail the pre image so that the coordinator can claim the payment and open a single sided channel.
    holzeis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    67454ed View commit details
    Browse the repository at this point in the history
  9. chore: extract function back into own module

    api.rs should remain as a thin proxy to the flutter frontend.
    bonomat authored and holzeis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    ef02faf View commit details
    Browse the repository at this point in the history
  10. feat: store hodl invoice hash in db

    we need to store the pre image to be able to refer to it later again. Also, it will help us get a good overview of who asked for what.
    bonomat authored and holzeis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    ac3b549 View commit details
    Browse the repository at this point in the history
  11. feat: share preimage with coordinator

    if the trader receives the note that the ln invoice has been funded, he shares the preimage with him when creating a new order. Upon receiving said preimage, the coordinator checks if the preimage fits to a known hash in the db. Next: redeem payment before matching the order
    bonomat authored and holzeis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    bfd6c02 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    4cec0b4 View commit details
    Browse the repository at this point in the history
  13. chore: provide convenient methods to deserialize pre_images

    this is needed because we send a url_safe base64 version over the via.
    bonomat authored and holzeis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    698f718 View commit details
    Browse the repository at this point in the history
  14. feat: settle invoice upon receiving it

    bonomat authored and holzeis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    58407aa View commit details
    Browse the repository at this point in the history
  15. feat: Open one sided channel from coordinator

    If we received the lightning payment from the user we open the channel to the user with only the coordinator's funds.
    
    Co-authored-by: Richard Holzeis <richard@holzeis.me>
    bonomat and holzeis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    c1555d5 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    d40fc68 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    6af5cbc View commit details
    Browse the repository at this point in the history
  18. fix: Generate a url safe pre image hash

    Otherwise, we might end up with "/" in the hash what will result in an endpoint not found error as the "/" is interpreted as path.
    holzeis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    3418850 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    4306159 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    4f7546e View commit details
    Browse the repository at this point in the history
  21. chore: Expire the hodl invoice after 5 minutes

    That should be enough to pay the lightning invoice and reduces the risk of price movements.
    holzeis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    911094c View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    89fa6fe View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    06909be View commit details
    Browse the repository at this point in the history