feat: init lnbits_relay_information
This commit is contained in:
parent
e4197ce66d
commit
4c9d1a4395
3 changed files with 22 additions and 6 deletions
16
models.py
16
models.py
|
|
@ -13,13 +13,21 @@ class NostrRelay(BaseModel):
|
|||
name: str
|
||||
description: Optional[str]
|
||||
pubkey: Optional[str]
|
||||
contact: Optional[str] = "https://t.me/lnbits"
|
||||
contact: Optional[str]
|
||||
active: bool = False
|
||||
supported_nips: List[str] = ["NIP01", "NIP09", "NIP11", "NIP15", "NIP20"]
|
||||
software: Optional[str] = "LNbist"
|
||||
version: Optional[str]
|
||||
|
||||
# meta: Optional[str]
|
||||
|
||||
@classmethod
|
||||
def info(cls,) -> dict:
|
||||
return {
|
||||
"contact": "https://t.me/lnbits",
|
||||
"supported_nips": [1, 9, 11, 15, 20],
|
||||
"software": "LNbits",
|
||||
"version": "",
|
||||
}
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_row(cls, row: Row) -> "NostrRelay":
|
||||
return cls(**dict(row))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue