-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add custom offers #678
base: master
Are you sure you want to change the base?
Add custom offers #678
Conversation
The catch here is that the invoice is not persisted and would need to be recreated after startup though IIUC. |
Correct |
* @param secret A random private key for creating the blinded path of the offer. Must be unique to this offer. | ||
* The offer returned is deterministic, if you need to persist you just need to save the parameters used to create it. | ||
*/ | ||
fun createOffer(secret: PrivateKey, amount: MilliSatoshi?, description: String?): OfferTypes.Offer { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noted that this is done inside OfferTypes
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I left some comments for improving my understanding.
I am building on top of this PR to allow phoenixd to create offers with descriptions.
Following the comments inside the PR storing inside the db the secret: PrivateKey, amount: MilliSatoshi?, description: String?
should be enough to recreate the offers right?
Allow creating more offers with customizable amount and description.
I need this for a feature I'm working on in Phoenix (PR #665) Here's the use case:
So |
9627000
to
6e29e6c
Compare
Hi @robbiehanson I wrote a PR that should be doing this exactly and also working on persistence in #743 Let me know if I need to do something on it that it is not right with the work hat you are doing |
Allow creating more offers with customizable amount and description.