refactor: extract nostr to __init__
This commit is contained in:
parent
e35dafe056
commit
99022f2b4a
4 changed files with 12 additions and 10 deletions
10
services.py
10
services.py
|
|
@ -7,21 +7,13 @@ from loguru import logger
|
|||
|
||||
from lnbits.helpers import urlsafe_short_hash
|
||||
|
||||
from . import nostr
|
||||
from .models import Event, Filter
|
||||
from .nostr.client.client import NostrClient as NostrClientLib
|
||||
from .nostr.filter import Filter as NostrFilter
|
||||
from .nostr.filter import Filters as NostrFilters
|
||||
from .nostr.message_pool import EndOfStoredEventsMessage, NoticeMessage
|
||||
|
||||
|
||||
class NostrClient:
|
||||
def __init__(self):
|
||||
self.client: NostrClientLib = NostrClientLib(connect=False)
|
||||
|
||||
|
||||
nostr = NostrClient()
|
||||
|
||||
|
||||
class NostrRouter:
|
||||
|
||||
received_subscription_events: dict[str, list[Event]] = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue