feat: create invoice to join

This commit is contained in:
Vlad Stan 2023-02-10 17:20:55 +02:00
parent db3ad2e32f
commit 8678090e7b
5 changed files with 176 additions and 8 deletions

View file

@ -97,6 +97,10 @@ class NostrRelay(BaseModel):
config: "RelaySpec" = RelaySpec()
@property
def is_free_to_join(self):
return not self.config.is_paid_relay or self.config.cost_to_join == 0
@classmethod
def from_row(cls, row: Row) -> "NostrRelay":
relay = cls(**dict(row))
@ -290,3 +294,8 @@ class NostrFilter(BaseModel):
values += [self.until]
return inner_joins, where, values
class RelayJoin(BaseModel):
relay_id: str
pubkey: str