Giter VIP home page Giter VIP logo

bolt11's Issues

Issue decoding invoice

this snippet:

import bolt11

invoice = 'lnbc1950n1pjtrgxnpp5ye3lhh8ye8ywm85evshn9wyhdsdg9a350tdhm3dyw89mwfht8s9qdqqxqyjw5q9q7sqqqqqqqqqqqqqqqqqqqqqqqqq9qsqsp5z22wjrrm0lgl32e0yes38dzmvjxnajrvanhw3hp4duq4k55wl0gsrzjqwryaup9lh50kkranzgcdnn2fgvx390wgj5jd07rwr3vxeje0glclludsryzx7vvvqqqqqlgqqqqqeqqjqqq3zq0d9kw8q4fhsgxh595f2l0ass4zaj2pdknzhxzzrlf7g5wgsk3nlgzzeduhnp6mva9jehwcq9y4hrllwt6ffl822q5drdgvxtjspmgfnls'
decoded = bolt11.decode(invoice)

give me this output:

Traceback (most recent call last):
  File "/home/pythcoiner/python/bolt11/main.py", line 4, in <module>
    decoded = bolt11.decode(invoice)
  File "/home/pythcoiner/python/bolt11/venv/lib/python3.10/site-packages/bolt11/decode.py", line 82, in decode
    tags["9"] = Features.from_bitstring(tagdata)  # type: ignore
  File "/home/pythcoiner/python/bolt11/venv/lib/python3.10/site-packages/bolt11/models/features.py", line 76, in from_bitstring
    raise ValueError(f"Feature index ({i}) out of range, word_length: {length}")
ValueError: Feature index (100) out of range, word_length: 150

invoice generated by Phoenix wallet
edit: pip install from pypi (pip install bolt11)

[TODO] multiple `f` tags / route hints

multiple f fields not supported yet
MAY include one or more f fields.
for Bitcoin payments:
MUST set an f field to a valid witness version and program,
OR to 17 followed by a public key hash, OR to 18 followed by a script hash.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.