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

Redeem voucher to wallet #3

Open
baebb opened this issue Jan 21, 2019 · 7 comments
Open

Redeem voucher to wallet #3

baebb opened this issue Jan 21, 2019 · 7 comments

Comments

@baebb
Copy link

baebb commented Jan 21, 2019

Hi there! I am looking for a solution to create redeemable gift vouchers on LN and your solution is very, very close to it. I just would like the functionality on https://donnerlab.com/voucher/{id} page to be able to send the funds to a LN wallet.

Would this be possible? I can make a PR with the front-end html & JS if you can prove the C# wallet function.

@sputn1ck
Copy link
Member

You would need to create an Invoice from the target wallet to be able to send funds to it. Then you can use the "/api/pay/{voucher}/{pay_req}" endpoint.

@baebb
Copy link
Author

baebb commented Jan 21, 2019

Thanks for the fast response @sputn1ck !

With the target wallet's public address, I think you can open a channel to it and specify a "push amount" that will be immediately sent to their wallet. See below capture from https://dev.lightning.community/overview/

image

@sputn1ck
Copy link
Member

Ah I see, the problem with 'OpenChannel' is that it creates an on-chain Bitcoin transaction and would thus require a large amount of satoshi per voucher. I think I want to leave the functionality of the service to be off-chain only.

@sputn1ck
Copy link
Member

But I may look into it. The problem is that at the moment of creating the OpenChannel Request I do not know the exact fee of the on-chain transaction and thus wouldn't know if the satoshi amount of a voucher would be sufficient

@baebb
Copy link
Author

baebb commented Jan 21, 2019

@sputn1ck ahhh i didn't consider that. How much would the onchain transaction cost? I am not super familiar with transaction fees.

An even better alternative to OpenChannel and push amount, if it gets approved, might be sphinx send: send: lightningnetwork/lnd#2455

This is separate to this issue but when would do you plan to increase voucher size? I would like to implement lightning voucher in a game where players could find voucher codes

@sputn1ck
Copy link
Member

As soon as sphinx is included in a stable release I will support it.
What voucher size would you want?

@baebb
Copy link
Author

baebb commented Jan 21, 2019

@sputn1ck that's awesome news! Would 300000 be possible?

Big thanks for making this :)

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

No branches or pull requests

2 participants