What is Nostr?
Jonathan Underwood [ARCHIVE] /
npub1axvโ€ฆftr0
2023-06-09 12:47:56

Jonathan Underwood [ARCHIVE] on Nostr: ๐Ÿ“… Original date posted:2017-12-10 ๐Ÿ“ Original message: Hello all, Recently I ...

๐Ÿ“… Original date posted:2017-12-10
๐Ÿ“ Original message:
Hello all,

Recently I have implemented BOLT11 in node JS. You can find it on github at
bitcoinjs/bolt11 (check the wip branch, I am still working on tests and
looking at maybe splitting encode up into two functions, encode and sign,
if anyone wants to help)

Here are some comments:

1. There should be a tags_length integer before the first tag. This will
get rid of the awkward dance of parsing from the front and end at the same
time and make it easier to detect poorly encoded data quickly.
2. Why is a description or description commit hash a MUST include tag... it
should be SHOULD.
3. Descriptions say they can encode ASCII only. Sorry, but this is
nonsense. Full unicode support via UTF8 should be supported.
4. There should be a maximum length (in bytes) for description. (Otherwise
why have a commit hash tag at all?)
5. There should be a recommendation for ways for the parsing client to
fetch the commited purpose description data. (Maybe encode a URL after the
32 byte commit hash?)
6. Lightning payment requests can get pretty long, but perhaps there should
be a limit. Apparently bech32 with the given parameters can only handle one
error correction once it is longer than 1023 words.


Now for some things on the BOLT document itself:

1. I made a pull request for adding signature preimage hex data etc. to the
examples to help people writing decoders. Some of the language was unclear
to me and lead to some goof ups.
2. Would be nice to have a fuller set of test cases on the RFC. I will work
on some cases to increase coverage on the bitcoinjs repo. Would be happy
for any help.
--
-----------------
Jonathan Underwood
ใƒ“ใƒƒใƒˆใƒใƒณใ‚ฏ็คพ ๆŠ€่ก“้กงๅ•
-----------------

ๆš—ๅทๅŒ–ใ—ใŸใƒกใƒƒใ‚ปใƒผใ‚ธใ‚’ใŠ้€ใ‚Šใฎๆ–นใฏไธ‹่จ˜ใฎๅ…ฌ้–‹้ตใ‚’ใ”ๅˆฉ็”จไธ‹ใ•ใ„ใ€‚

-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFTSV/kBB/9FyhUaxI/2bfJ0pBp+y6YAim4LyOXeFDdtZL2C04T2eWB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dtbSu17+ORn+7EN1CRCpJzta0+R7Rf4jB/sHT/FX5h7XR4rET39HRTdXd9ANoc8G
rKZil1kIqqafih8d0Jn8JGi7L2G10TwF2za1QL/bZfSq5fC9A/C+tyXvOkR2ZgOf
qDLacu7SAw4KiHImYD7MjPvQd4FFX7RaqNoTDmkoE+ss0YqkhViudGfXoI/YCWJv
VUVo0R57cbLRWlt7PZYUcKUYgS4EalxGvv9lzPXOFE5jpeIgCB6LOjN7Ak05gCIo
+EFOxvfUgb1o3wOtF7nfzTv6kygPX3EdDhLQRUel2pvYPooMnbHRyZ74NLs1B4Lv
fNUwHfPpdwu41B168qPlqj67NagQawJFZHfq1O8lwXEGNnmNx4K7ZaAG
=c+/G
-----END PGP PUBLIC KEY BLOCK-----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20171210/b337d63b/attachment.html>;
Author Public Key
npub1axv7m5dyyrnatcvmu7rse0860x9mnr95prje9x32rqvperr0rhhqp0ftr0