* feat: add shortcuts for insert_query and update_query into `Database`
example: await db.insert("table_name", base_model)
* remove where from argument
* chore: code clean-up
* extension manager
* lnbits-qrcode components
* parse date from dict
* refactor: make `settings` a fixture
* chore: remove verbose key names
* fix: time column
* fix: cast balance to `int`
* extension toggle vue3
* vue3 @input migration
* fix: payment extra and payment hash
* fix dynamic fields and ext db migration
* remove shadow on cards in dark theme
* screwed up and made more css pushes to this branch
* attempt to make chip component in settings dynamic fields
* dynamic chips
* qrscanner
* clean init admin settings
* make get_user better
* add dbversion model
* remove update_payment_status/extra/details
* traces for value and assertion errors
* refactor services
* add PaymentFiatAmount
* return Payment on api endpoints
* rename to get_user_from_account
* refactor: just refactor (#2740)
* rc5
* Fix db cache (#2741)
* [refactor] split services.py (#2742)
* refactor: spit `core.py` (#2743)
* refactor: make QR more customizable
* fix: print.html
* fix: qrcode options
* fix: white shadow on dark theme
* fix: datetime wasnt parsed in dict_to_model
* add timezone for conversion
* only parse timestamp for sqlite, postgres does it
* log internal payment success
* fix: export wallet to phone QR
* Adding a customisable border theme, like gradient (#2746)
* fixed mobile scan btn
* fix test websocket
* fix get_payments tests
* dict_to_model skip none values
* preimage none instead of defaulting to 0000...
* fixup test real invoice tests
* fixed pheonixd for wss
* fix nodemanager test settings
* fix lnbits funding
* only insert extension when they dont exist
---------
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Tiago Vasconcelos <talvasconcelos@gmail.com>
Co-authored-by: Arc <ben@arc.wales>
Co-authored-by: Arc <33088785+arcbtc@users.noreply.github.com>
219 lines
4.7 KiB
TOML
219 lines
4.7 KiB
TOML
[tool.poetry]
|
|
name = "lnbits"
|
|
version = "1.0.0-rc5"
|
|
description = "LNbits, free and open-source Lightning wallet and accounts system."
|
|
authors = ["Alan Bits <alan@lnbits.com>"]
|
|
readme = "README.md"
|
|
repository = "https://github.com/lnbits/lnbits"
|
|
homepage = "https://lnbits.com"
|
|
packages = [
|
|
{include = "lnbits"},
|
|
{include = "lnbits/py.typed"},
|
|
]
|
|
|
|
[tool.poetry.dependencies]
|
|
python = "^3.12 | ^3.11 | ^3.10 | ^3.9"
|
|
bech32 = "1.2.0"
|
|
click = "8.1.7"
|
|
ecdsa = "0.19.0"
|
|
fastapi = "0.115.2"
|
|
httpx = "0.27.0"
|
|
jinja2 = "3.1.4"
|
|
lnurl = "0.5.3"
|
|
pydantic = "1.10.18"
|
|
pyqrcode = "1.2.1"
|
|
shortuuid = "1.0.13"
|
|
sse-starlette = "1.8.2"
|
|
typing-extensions = "4.12.2"
|
|
uvicorn = "0.30.6"
|
|
sqlalchemy = "1.4.54"
|
|
aiosqlite = "0.20.0"
|
|
asyncpg = "0.29.0"
|
|
uvloop = "0.19.0"
|
|
websockets = "11.0.3"
|
|
loguru = "0.7.2"
|
|
grpcio = "1.66.1"
|
|
protobuf = "5.28.0"
|
|
pyln-client = "24.8.1"
|
|
pywebpush = "1.14.1"
|
|
slowapi = "0.1.9"
|
|
websocket-client = "1.8.0"
|
|
pycryptodomex = "3.20.0"
|
|
packaging = "24.0"
|
|
bolt11 = "2.1.0"
|
|
# needed for new login methods: username-password, google-auth, github-auth
|
|
bcrypt = "4.2.0"
|
|
pyjwt = "2.9.0"
|
|
passlib = "1.7.4"
|
|
itsdangerous = "2.2.0"
|
|
fastapi-sso = "0.15.0"
|
|
# needed for boltz, lnurldevice, watchonly extensions
|
|
embit = "0.8.0"
|
|
# needed for cashu, lnurlp, nostrclient, nostrmarket, nostrrelay extensions
|
|
secp256k1 = "0.14.0"
|
|
# keep for backwards compatibility with lnurlp and cashu
|
|
environs = "9.5.0"
|
|
# needed for scheduler extension
|
|
python-crontab = "3.2.0"
|
|
# needed for liquid support boltz
|
|
wallycore = {version = "1.3.0", optional = true}
|
|
# needed for breez funding source
|
|
breez-sdk = {version = "0.5.2", optional = true}
|
|
|
|
[tool.poetry.extras]
|
|
breez = ["breez-sdk"]
|
|
liquid = ["wallycore"]
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
|
black = "^24.8.0"
|
|
# we are stuck with pytest-asyncio 0.21.x because of https://github.com/pytest-dev/pytest-asyncio/issues/706
|
|
pytest-asyncio = "^0.21.2"
|
|
pytest = "^8.3.2"
|
|
pytest-cov = "^4.1.0"
|
|
mypy = "^1.11.2"
|
|
types-protobuf = "^5.27.0.20240626"
|
|
pre-commit = "^3.8.0"
|
|
openapi-spec-validator = "^0.7.1"
|
|
ruff = "^0.6.4"
|
|
types-passlib = "^1.7.7.20240327"
|
|
openai = "^1.39.0"
|
|
json5 = "^0.9.25"
|
|
asgi-lifespan = "^2.1.0"
|
|
pytest-md = "^0.2.0"
|
|
pytest-httpserver = "^1.1.0"
|
|
pytest-mock = "^3.14.0"
|
|
types-mock = "^5.1.0.20240425"
|
|
mock = "^5.1.0"
|
|
grpcio-tools = "^1.66.1"
|
|
|
|
[build-system]
|
|
requires = ["poetry-core>=1.0.0"]
|
|
build-backend = "poetry.core.masonry.api"
|
|
|
|
[tool.poetry.scripts]
|
|
lnbits = "lnbits.server:main"
|
|
lnbits-cli = "lnbits.commands:main"
|
|
|
|
[tool.pyright]
|
|
include = [
|
|
"lnbits",
|
|
"tests",
|
|
"tools",
|
|
]
|
|
exclude = [
|
|
"lnbits/wallets/boltz_grpc_files",
|
|
"lnbits/wallets/lnd_grpc_files",
|
|
"lnbits/extensions",
|
|
"lnbits/upgrades",
|
|
]
|
|
|
|
[tool.mypy]
|
|
files = [
|
|
"lnbits",
|
|
"tests",
|
|
"tools",
|
|
]
|
|
exclude = [
|
|
"^lnbits/wallets/boltz_grpc_files",
|
|
"^lnbits/wallets/lnd_grpc_files",
|
|
"^lnbits/extensions",
|
|
"^lnbits/upgrades",
|
|
]
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = [
|
|
"embit.*",
|
|
"secp256k1.*",
|
|
"uvicorn.*",
|
|
"sqlalchemy.*",
|
|
"websocket.*",
|
|
"websockets.*",
|
|
"pyqrcode.*",
|
|
"shortuuid.*",
|
|
"grpc.*",
|
|
"lnurl.*",
|
|
"bolt11.*",
|
|
"bitstring.*",
|
|
"ecdsa.*",
|
|
"pyngrok.*",
|
|
"pyln.client.*",
|
|
"py_vapid.*",
|
|
"pywebpush.*",
|
|
"fastapi_sso.sso.*",
|
|
"json5.*",
|
|
]
|
|
ignore_missing_imports = "True"
|
|
|
|
[tool.pytest.ini_options]
|
|
log_cli = false
|
|
addopts = "--durations=1 -s --cov=lnbits --cov-report=xml"
|
|
testpaths = [
|
|
"tests"
|
|
]
|
|
|
|
[tool.black]
|
|
line-length = 88
|
|
# use upcoming new features
|
|
# preview = true
|
|
extend-exclude = """(
|
|
lnbits/static
|
|
| lnbits/extensions
|
|
| lnbits/upgrades
|
|
| lnbits/wallets/lnd_grpc_files
|
|
| lnbits/wallets/boltz_grpc_files
|
|
)"""
|
|
|
|
[tool.ruff]
|
|
# Same as Black. + 10% rule of black
|
|
line-length = 88
|
|
|
|
# Exclude generated files.
|
|
extend-exclude = [
|
|
"lnbits/wallets/lnd_grpc_files",
|
|
"lnbits/wallets/boltz_grpc_files"
|
|
]
|
|
|
|
[tool.ruff.lint]
|
|
# Enable:
|
|
# F - pyflakes
|
|
# E - pycodestyle errors
|
|
# W - pycodestyle warnings
|
|
# I - isort
|
|
# A - flake8-builtins
|
|
# C - mccabe
|
|
# N - naming
|
|
# UP - pyupgrade
|
|
# RUF - ruff specific rules
|
|
# B - bugbear
|
|
select = ["F", "E", "W", "I", "A", "C", "N", "UP", "RUF", "B"]
|
|
# UP007: pyupgrade: use X | Y instead of Optional. (python3.10)
|
|
# RUF012: mutable-class-default
|
|
ignore = ["UP007", "RUF012"]
|
|
|
|
# Allow autofix for all enabled rules (when `--fix`) is provided.
|
|
fixable = ["ALL"]
|
|
unfixable = []
|
|
|
|
# Allow unused variables when underscore-prefixed.
|
|
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
|
|
# needed for pydantic
|
|
[tool.ruff.lint.pep8-naming]
|
|
classmethod-decorators = [
|
|
"root_validator",
|
|
"validator",
|
|
]
|
|
|
|
[tool.ruff.lint.mccabe]
|
|
# TODO: Decrease this to 10.
|
|
max-complexity = 16
|
|
|
|
[tool.ruff.lint.flake8-bugbear]
|
|
# Allow default arguments like, e.g., `data: List[str] = fastapi.Query(None)`.
|
|
extend-immutable-calls = [
|
|
"fastapi.Depends",
|
|
"fastapi.Query",
|
|
"fastapi.Body",
|
|
"lnbits.decorators.parse_filters"
|
|
]
|