feat: support lud-11 disposable links (#95)

This commit is contained in:
dni ⚡ 2025-08-14 12:16:16 +02:00 committed by GitHub
commit 3dc1e86d8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 29 additions and 4 deletions

View file

@ -39,6 +39,7 @@ class CreatePayLinkData(BaseModel):
fiat_base_multiplier: int = Query(100, ge=1)
username: str = Query(None)
zaps: Optional[bool] = Query(False)
disposable: bool | None = Query(True)
class PayLink(BaseModel):
@ -63,6 +64,8 @@ class PayLink(BaseModel):
created_at: datetime
updated_at: datetime
disposable: bool
def lnurl(self, req: Request) -> str:
url = req.url_for("lnurlp.api_lnurl_response", link_id=self.id)
url = url.replace(path=normalize_path(url.path))