getAlby / js-lightning-tools

Collection of helpful building blocks and tools to develop Bitcoin Lightning web apps
https://www.npmjs.com/package/@getalby/lightning-tools
MIT License
29 stars 13 forks source link

L402 parser does not parse base64 encoded macaroons correctly. #116

Closed SamuelAl closed 9 months ago

SamuelAl commented 9 months ago

The L402 protocol specification mentions macaroons being encoded in base64:

However, the current parser splits the string according to equal signs (assuming the mac will be in hexadecimal). This does not work when the macaroon is in base64 which includes equal signs.

parse.js should be corrected.