From 20bc2f71aab31ca4a5e9e0300fcde994dec58325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 3 Sep 2024 11:32:28 +0200 Subject: [PATCH] fix: make new version backwards compatible with lnbits extensions. --- lnurl/__init__.py | 6 +++++- lnurl/types.py | 7 +++++++ pyproject.toml | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lnurl/__init__.py b/lnurl/__init__.py index 03a08ea..b1b8cf2 100644 --- a/lnurl/__init__.py +++ b/lnurl/__init__.py @@ -14,7 +14,7 @@ LnurlSuccessResponse, LnurlWithdrawResponse, ) -from .types import Lnurl +from .types import ClearnetUrl, DebugUrl, LightningNodeUri, Lnurl, OnionUrl __all__ = [ "decode", @@ -37,4 +37,8 @@ "LnurlSuccessResponse", "LnurlWithdrawResponse", "MilliSatoshi", + "OnionUrl", + "ClearnetUrl", + "DebugUrl", + "LightningNodeUri", ] diff --git a/lnurl/types.py b/lnurl/types.py index cc98f06..f932e50 100644 --- a/lnurl/types.py +++ b/lnurl/types.py @@ -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).""" @@ -283,3 +287,6 @@ class InitializationVector(ConstrainedStr): class Max144Str(ConstrainedStr): max_length = 144 + + +__all__ = ["MilliSatoshi"] diff --git a/pyproject.toml b/pyproject.toml index 065ca23..a21b6f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "lnurl" -version = "0.5.2" +version = "0.5.3" description = "LNURL implementation for Python." authors = ["Alan Bits "] license = "MIT"