Comments (5)
Until the preimage is returned for intraledger also can offer a partial improvement to return it for ln settlements at least: #2953
from lightning-browser-extension.
The preImage could be returned for intraledger payments as well as the invoice is generated on the node (not knowing that it will be paid intraledger or over LN) and the paymentSecret
is known. Will open an issue for discussion with the Galoy team.
eg.:
curl --request POST \
--header 'content-type: application/json' \
--header 'X-API-KEY: galoy_staging_xxxxxxxxxxxx' \
--url 'https://api.staging.galoy.io/graphql' \
--data '{"query":"mutation LnInvoiceCreate($input: LnInvoiceCreateInput!) {\n lnInvoiceCreate(input: $input) {\n invoice {\n paymentHash\n paymentRequest\n createdAt\n satoshis\n paymentStatus\n paymentSecret\n }\n }\n}","variables":{"input":{"amount":21,"walletId":"xxxxxxxxxx"}}}'
{
"data": {
"lnInvoiceCreate": {
"invoice": {
"paymentHash": "b1cf0faaf9fd7b15de77cf032d9ca7559612c8356c6b21a7c45402d65e9c4869",
"paymentRequest": "lntbs210n1pjc9w42pp5k88sl2hel4a3thnheupjm8982ktp9jp4d34jrf7y2spdvh5ufp5sdqqcqzpuxqyz5vqsp5tr8c5ngy7s9ryvu9v3hx5tg26wfrx8kg42uhuqlleaavsc6qpp7s9qyyssq2tjznjeckf8j8mcpgezcyprat4yys3ac9fqf0g2uutkavt3qj5grqtha38lkxyvlncfwhfh88ssa895ur6a6a8h8390s6qm9tn34kdsqlwkhkj",
"createdAt": 1703066283,
"satoshis": 21,
"paymentStatus": "PENDING",
"paymentSecret": "58cf8a4d04f40a323385646e6a2d0ad392331ec8aab97e03ffcf7ac86340087d"
}
}
}
}
from lightning-browser-extension.
Looking into this, can extend the graphql call. The API can return the preimage when paying through LN, but doesn't do for intraledger:
mutation LnInvoicePaymentSend($input: LnInvoicePaymentInput!) {
lnInvoicePaymentSend(input: $input) {
errors {
message
}
status
transaction {
settlementVia {
... on SettlementViaLn {
preImage
}
... on SettlementViaIntraLedger {
counterPartyUsername
counterPartyWalletId
}
}
}
}
}
would it be useful to return the username or just a note about intraledger settlement?
Testing paying a new account without username set is not returning anything so it must be a note about intraledger payment:
{
"data": {
"lnInvoicePaymentSend": {
"errors": [],
"status": "SUCCESS",
"transaction": {
"settlementVia": {
"counterPartyUsername": null,
"counterPartyWalletId": null
}
}
}
}
}
Example response on signet LN:
{
"data": {
"lnInvoicePaymentSend": {
"errors": [],
"status": "SUCCESS",
"transaction": {
"settlementVia": {
"preImage": "b88173fa2326356c4f0f3399cc0c7e2eb6c1c8b75369c45b708c77fdb4799e15"
}
}
}
}
}
from lightning-browser-extension.
If the Galoy connector doesn't reliably return preimages for WebLN it will break quite some apps that follow the current WebLN spec and possibly would force them to handle those special cases (for intraledger payments) which is clearly not how WebLN is intended to work.
Why is it that you can't provide a preimage for intraledger payments? Do they never hit the node but just the DB?
from lightning-browser-extension.
that would be great! \o/
from lightning-browser-extension.
Related Issues (20)
- [BUG] CORS issue HOT 2
- [BUG] Error: 500: no_route HOT 2
- [BUG] Can't connect to LNDHub in Firefox; works fine in Chrome HOT 1
- Wallet connected through NWC shows wrong dates in transaction list HOT 1
- [BUG] Responsive navigation HOT 2
- [Feature/Bug] Validate Nostr key input into extension, if it's actually Nostr private key HOT 3
- [BUG] Long string goes outside of box/card
- [BUG] Two Alby password insert windows when restoring tabs on open browser
- [Feature] Context aware right click menus for lightning-related actions HOT 2
- [BUG] Bitcoin Jungle wallet instructions are incorrect HOT 2
- Extension prompts are not being opened on multi-monitor setups HOT 15
- Update Import flow with a link to import only Nostr key HOT 3
- [BUG] Mnemonic grows to more than 12 fields
- [Feature] Creation of LNURL-w vouchers HOT 3
- Phishing site warning HOT 1
- Add grouped permissions management
- [BUG] Payment success with NaN sats for Zeus notes HOT 2
- Unclear message: "Unlock passcode cannot be recovered, but may be changed"
- Remove bitcoin address receive functionality
- [BUG] Error: 400: Internal keysend payments require the custom record 696969 to be present. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightning-browser-extension.