Skip to content

Lnurl pay metadata hash missing, payments fail #1184

@michaelWuensch

Description

@michaelWuensch

Hi, I have a strange problem and I am not 100% sure if the "hub" repo is the correct one. So if the issue belongs somewhere else, please let me know.

In BitBanana I try to pay different getalby.com lightning addresses. On some it works, on others it doesn't.

I have traced down the issue:

Paying redsun63681@getalby.com fails.
Paying secondl1ght@getalby.com works.

The reason why redsun63681@getalby.com fails is that BitBanana verifies the descriptionHash field in the returned Lightning Invoice. (See step 7 in lud6: https://github.com/lnurl/luds/blob/luds/06.md)
But that descriptionHash field (h field) is missing!

Here are the steps happening:

  1. BitBanana reads the lnurl and gets this response, please note that it has a metadata field:
{"status":"OK","tag":"payRequest","commentAllowed":255,"callback":"https://getalby.com/lnurlp/redsun63681/callback","metadata":"[[\"text/identifier\",\"redsun63681@getalby.com\"],[\"text/plain\",\"Sats for redsun63681\"]]","minSendable":1000,"maxSendable":10000000000,"payerData":{"name":{"mandatory":false},"email":{"mandatory":false},"pubkey":{"mandatory":false}},"nostrPubkey":"79f00d3f5a19ec806189fcab03c1be4ff81d18ee4f653c88fac41fe03570f432","allowsNostr":true}
  1. BitBanana makes this request:
https://getalby.com/lnurlp/redsun63681/callback?amount=21000&nonce=e6f47d712a11beab
  1. BitBanana receives this response:
{"status":"OK","successAction":{"tag":"message","message":"Thanks, sats received!"},"verify":"https://getalby.com/lnurlp/redsun63681/verify/3qsTuvyFFrQdzxEQb1catxTn","routes":[],"pr":"lnbc210n1pna9a6xdqqnp4qf2jcp8jgfs5qtaruysmf2akf5srcj5de2wq3tvsxj94td4rrm27qpp50q4xct3vvcqt08xjw857cm0hnaf2xglwhuw6ra7nn0fhqgjkuf0ssp55ffj4ztac6myf6t4nhz9825skzlfxup69p5jy0ydcadugpw3fmps9qyysgqcqpcxqyz5vqrzjqw9fu4j39mycmg440ztkraa03u5qhtuc5zfgydsv6ml38qd4azymlapyqqqqqqqr2vqqqqlgqqqq86qqjqzu69a5gu6dcvafd5gvv9tyhm3pxt9apl5qzafqh74uh4wam2he7sdqr5xj8rpm9ex0u5e6s4d8zzl3328ccq7snpwve4y5va22fjhpsqf99t0s"}
  1. When decoding the invoice ("pr" field) the descriptionHash field is missing, but per lud6 spec the descriptionHash has to be set to the hash of the metadata.

Comparision to working example

The strange thing is that for others like secondl1ght@getalby.com it works. Everything looks identical but in the end it has the descriptionHash field correctly set.

For comparision here are the steps happening:

  1. BitBanana reads the lnurl and gets this response, please note that it has a metadata field:
{"status":"OK","tag":"payRequest","commentAllowed":255,"callback":"https://getalby.com/lnurlp/secondl1ght/callback","metadata":"[[\"text/identifier\",\"secondl1ght@getalby.com\"],[\"text/plain\",\"Sats for secondl1ght\"]]","minSendable":1000,"maxSendable":50000000,"payerData":{"name":{"mandatory":false},"email":{"mandatory":false},"pubkey":{"mandatory":false}},"nostrPubkey":"79f00d3f5a19ec806189fcab03c1be4ff81d18ee4f653c88fac41fe03570f432","allowsNostr":true}
  1. BitBanana makes this request:
https://getalby.com/lnurlp/secondl1ght/callback?amount=21000&nonce=eb8169ec1d2210d8
  1. BitBanana receives this response:
{"status":"OK","successAction":{"tag":"message","message":"Thanks, sats received!"},"verify":"https://getalby.com/lnurlp/secondl1ght/verify/mN6bum8aS6crKjE8QrzEEM4H","routes":[],"pr":"lnbc210n1pna9lcfpp56wsrslpk7rhvh3t7cl4w7mwdjfjg7ht83phstjupfwzp40e3gtrshp5ln4h8tlgeuju89frdcyxhcqey9tvdcdht74a8cw78rd0ya3wv82scqzzsxqyz5vqsp5805xpwmj3cw8n3favjkjkp6x3p5tkz5rx8u2fxqg9sst6jnl2quq9qxpqysgqkkca5uxzqyn8uv2aytfy8rec33cjg2z2eahhuf84k07s3tu9hs348u0jqkd6l5tuzxzts7eupyxpp0n0lvq7xarclkt0sgdsq094sfgpya594u"}
  1. When decoding the invoice ("pr" field) the descriptionHash field is available and everything works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions