xtrimmer / lndecode Goto Github PK
View Code? Open in Web Editor NEWFor decoding lightning network payment requests as defined in BOLT #11.
License: MIT License
For decoding lightning network payment requests as defined in BOLT #11.
License: MIT License
I believe the invoice string is correct, but the error ”TypeError: Cannot read property 'type' of undefined“ seems to cause lndecode to mark it incorrect.
https://lndecode.com/?invoice=lnbc190n1p0q3tvapp58eg4t4wvauv7dw7hw8auhs3kvctej2amxyr789qtmuywgvh7a87qdp2d9hxc6twv5knzdeexcmnvdekx56njvesx5mnxwfc8yxqyz5vqcqzyssp5r09au7e74epce307xydezwdqxv6g5xh4m7xhr0slj42gr25d0ehqrzjqwgtt4zf9hp02vvw2ge6kt8t7m2gj9ygrge7765ud0xmkse6mxrdqzrytgqq9mqqqqqqqquyqqqqqksqrc9qy9qsqehre8cdlcg8ayydqd7vp63lt5rnj52d0rffpykr34fh7krwwczuxl8uteel048ps9ntzpryk6nzl23tfxlrtx2zsunuccdlkuklfc9sqspgzle
lnsb10n1pwemvgrpp5682zm9zc4jp3yzr69lvqnwxzj3e9qh9q0xyf8fq6xed6pgex37rqdqqcqzpgxq97zvuqh6r9xwxyg5kwlaz3tkm00fx6zyr7m43lp95tk0drkng2ysex7xsxva9ky3ggw3uuae2rdfvls0j2m3vdxzs7vdxxvskxguds3q0ewxqqh7nys7
Uh-Oh! Something is not quite right with this request.
Malformed request: unknown prefix
Would be nice to have decode feature for bolt12.
www.bolt12.org/bolt12.html
Code works fine but lndecode.com/js/decoder.js and lndecode.com/js/pageupdate.js return 403 Forbidden.
Love your tool! The formatting looks good and is very readable. I wanted to send you a little donation, but wanted to avoid on-chain fees. It would be awesome if you had a way to accept lightning donations.
Thanks very much for the service. I would like to make a couple of suggestions.
Could the decoded be passed in the url? And once entered manually, that decode will return the URL including the invoice string? eg. https://lndecode.com/?lnbc1230n1pw4uy6app56445r7papdht2v5ypkhsztm8g4d8ma9zzavca0gleed3xucfuywsdqu2askcmr9wssx7e3q2dshgmmndp5scqzpgxqrrss3024un2qyz28m4psh9wkccz4vhdy0lfj6mtpq0v7ka0esc7w3575kxz4qv5ca0uvrhx59resnqfhqcw948cltwr58qpq8azellxjgtcpag0xva
Could the input field do a little pre-processing to trim fore and aft? It's unfortunate that strings are condemned as invalid due to a carriage return at the end of the string.
Again, thank for something so neat and simple my nitpicks stand out the more.
Hi,
Here's an invoice, and decode, made on Zeus connected to myNodeBTC. http://bit.ly/30da2Th
No destination (AKA public key?)
But.
myNode:~ $ lncli decodepayreq lnbc1020n1p0pc9yxpp5n5e9hw0gp4j5m2vqmnhr0qeke0yfm6rgdm98yaqs94303wlkxhesdp8f9h8vmmfvdjjqenjdakjqkn9w4ej7mtefehkgegcqzpgxqypr9qfz0cg9hqkjj9ptdcxek59v833suuzsgezx5rmlg69qpj6ezrmlj3zmghpfqvhscxj6k3qf9qzj5szpp8yjnjqsfxaswhf2jeppft35spfjscsx
{
"destination": "024782abc1c13802508f4c7b2c2c8b1f5ebc2b596bee0b2ff338c382e7ca28df77",
"payment_hash": "9d325bb9e80d654da980dcee378336cbc89de8686eca7274102d62f8bbf635f3",
"num_satoshis": "102",
"timestamp": "1578898566",
"expiry": "36000",
"description": "Invoice from Zeus/myNode",
"description_hash": "",
"fallback_addr": "",
"cltv_expiry": "40",
"route_hints": [
]
}
What am I missing?
Any invoice with an amount greater than 1 BTC will produce an undefined amount multiplier
error.
Uh-Oh! Something is not quite right with this request.
Malformed request: undefined amount multiplier
The spec says amount: optional number in that currency, followed by an optional multiplier letter.
But in the logic here: https://github.com/Xtrimmer/lndecode/blob/master/js/decoder.js#L90
it says: A reader SHOULD fail if amount is followed by anything except a defined multiplier.
Here's a valid invoice that'll fail because it's a 1btc invoice lnbcrt11p044hvepp5mfyxfq7m7jj60wskkh8eaz74ppfy2x6rnnj6gmy3g7r297kavfdqdqqcqzpgsp5tcm44lr40gn78g9qvz0r2hysqluwz6jlatyqee4t7lwjl8ndcnjs9qy9qsqhfxk8a9f86kwuh5g64jewkrnrgqqy2kdm3nkn6rmgshu6hs7c0yzq8t4pvm324vll0hmld0mnf58c6y0598sp880kuyte7m3a52aa9qp9jdf0m
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.