Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make new version backwards compatible #41

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading