feat: add UI for basic relay operations
This commit is contained in:
parent
0db0d9c351
commit
a849dea99f
6 changed files with 152 additions and 62 deletions
18
models.py
18
models.py
|
|
@ -10,25 +10,19 @@ from secp256k1 import PublicKey
|
|||
|
||||
class NostrRelay(BaseModel):
|
||||
id: str
|
||||
wallet: str
|
||||
name: str
|
||||
currency: str
|
||||
tip_options: Optional[str]
|
||||
tip_wallet: Optional[str]
|
||||
|
||||
@classmethod
|
||||
def from_row(cls, row: Row) -> "NostrRelay":
|
||||
return cls(**dict(row))
|
||||
|
||||
|
||||
class NostrRelayInfo(BaseModel):
|
||||
name: Optional[str]
|
||||
description: Optional[str]
|
||||
pubkey: Optional[str]
|
||||
contact: Optional[str] = "https://t.me/lnbits"
|
||||
supported_nips: List[str] = ["NIP01", "NIP09", "NIP11", "NIP15", "NIP20"]
|
||||
software: Optional[str] = "LNbist"
|
||||
version: Optional[str]
|
||||
# meta: Optional[str]
|
||||
|
||||
@classmethod
|
||||
def from_row(cls, row: Row) -> "NostrRelay":
|
||||
return cls(**dict(row))
|
||||
|
||||
|
||||
|
||||
class NostrEventType(str, Enum):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue