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: store and send metadata during invoice creation #11

Merged
merged 7 commits into from
Dec 10, 2024

Conversation

im-adithya
Copy link
Member

@im-adithya im-adithya commented Nov 26, 2024

Fixes #3

  • Stores invoice data (limited to user_id, description, description_hash, amount, pr, payment_hash, settled_at and metadata)
  • nwcPool updates invoice settled_at and preimage
  • /verify endpoint now fetches data from invoice table instead of making lookupInvoice call (the identifier is still payment_hash tho)
  • Adds indexes on username column in users and payment_hash and user_id (and combined index) in invoices

src/lnurlp.ts Outdated Show resolved Hide resolved
src/lnurlp.ts Outdated Show resolved Hide resolved
src/db/db.ts Outdated Show resolved Hide resolved
src/db/db.ts Outdated Show resolved Hide resolved
src/db/schema.ts Outdated Show resolved Hide resolved
src/db/schema.ts Outdated Show resolved Hide resolved
src/db/db.ts Show resolved Hide resolved
src/db/schema.ts Outdated Show resolved Hide resolved
@im-adithya
Copy link
Member Author

Addressed feedback, only have to decide on description hash now

@im-adithya im-adithya changed the base branch from do-not-trust to master December 9, 2024 10:24
Copy link
Collaborator

@rolznz rolznz left a comment

Choose a reason for hiding this comment

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

tACK

Nice work!

@im-adithya im-adithya merged commit 83cecef into master Dec 10, 2024
1 check 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.

Include LNURL / zap metadata when calling make_invoice
3 participants