Skip to content

Commit

Permalink
fix: make new version backwards compatible (#41)
Browse files Browse the repository at this point in the history
with lnbits extensions.
  • Loading branch information
dni authored Sep 3, 2024
1 parent 4ab71f2 commit fdad7cf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lnurl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
LnurlSuccessResponse,
LnurlWithdrawResponse,
)
from .types import Lnurl
from .types import ClearnetUrl, DebugUrl, LightningNodeUri, Lnurl, OnionUrl

__all__ = [
"decode",
Expand All @@ -37,4 +37,8 @@
"LnurlSuccessResponse",
"LnurlWithdrawResponse",
"MilliSatoshi",
"OnionUrl",
"ClearnetUrl",
"DebugUrl",
"LightningNodeUri",
]
7 changes: 7 additions & 0 deletions lnurl/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
from .exceptions import InvalidLnurlPayMetadata
from .helpers import _bech32_decode, _lnurl_clean, lnurl_decode

# needed for old lnbits extension imports
# TODO: should be changed in extension to root package
from .models import MilliSatoshi


def ctrl_characters_validator(value: str) -> str:
"""Checks for control characters (unicode blocks C0 and C1, plus DEL)."""
Expand Down Expand Up @@ -283,3 +287,6 @@ class InitializationVector(ConstrainedStr):

class Max144Str(ConstrainedStr):
max_length = 144


__all__ = ["MilliSatoshi"]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "lnurl"
version = "0.5.2"
version = "0.5.3"
description = "LNURL implementation for Python."
authors = ["Alan Bits <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit fdad7cf

Please sign in to comment.