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

Give quotes for inbound channels and email #11

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

nickfarrow
Copy link
Collaborator

Adds an endpoint

/getinbound?<nodeid>&<capacity>&<duration>&<refund_address>

Resposnds with an address.
Currently hardcoded to

    let price = 30_000;
    let size = 1_000_000; //sats
    let duration = 1; //month

Sends us an email notification/invoice using aws ses via

nolooking Forward <913burner@gmail.com>

(need ~/.aws/credentials)

@nickfarrow
Copy link
Collaborator Author

Running this in prod already since the nolooking PR is more important

@nickfarrow nickfarrow force-pushed the inbound branch 3 times, most recently from fc2ddf4 to 2a8616c Compare November 16, 2022 04:48
src/inbound.rs Outdated Show resolved Hide resolved
@DanGould
Copy link

please consider using POST as changed in this commit DanGould@362fdde. That commit is now running in prod

@DanGould
Copy link

Shouldn't this only send a notification when someone pays us? Otherwise we have to watch the payment address

@nickfarrow nickfarrow force-pushed the inbound branch 2 times, most recently from 3d16959 to 3fe03c5 Compare November 18, 2022 01:30
src/email.rs Outdated Show resolved Hide resolved
let price = 30_000;
let resp_capacity = 1_000_000; //sats
let resp_duration = 1; //month
let payment_address = crate::lnd::get_onchain_address().await;

Choose a reason for hiding this comment

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

It seems a bit hacky to have gotten the software this far and still call what look like static functions when they that rely on a specific config. Still good on you for making it work

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think fine, the config is loaded within each function. nicer than keeping config around

src/inbound.rs Outdated Show resolved Hide resolved
src/lnd.rs Outdated Show resolved Hide resolved
@nickfarrow
Copy link
Collaborator Author

TODO: Bubble up results within that separate thread and just ignore them. We can't afford to panic!

src/inbound.rs Outdated Show resolved Hide resolved
@DanGould
Copy link

DanGould commented Dec 5, 2022

I think this is what we're running. If so, it gets my approval and should be merged asap

Copy link

@DanGould DanGould left a comment

Choose a reason for hiding this comment

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

gg

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