mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-09 07:48:57 +00:00
Handle missing monstr dependency
This commit is contained in:
@@ -3,7 +3,16 @@
|
|||||||
import time
|
import time
|
||||||
import logging
|
import logging
|
||||||
import traceback
|
import traceback
|
||||||
from monstr.event.event import Event
|
|
||||||
|
try:
|
||||||
|
from monstr.event.event import Event
|
||||||
|
except ImportError: # pragma: no cover - optional dependency
|
||||||
|
|
||||||
|
class Event: # minimal placeholder for type hints when monstr is absent
|
||||||
|
id: str
|
||||||
|
created_at: int
|
||||||
|
content: str
|
||||||
|
|
||||||
|
|
||||||
# Instantiate the logger
|
# Instantiate the logger
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@@ -23,7 +23,11 @@ import traceback
|
|||||||
from typing import Union
|
from typing import Union
|
||||||
from bip_utils import Bip39SeedGenerator
|
from bip_utils import Bip39SeedGenerator
|
||||||
from local_bip85.bip85 import BIP85
|
from local_bip85.bip85 import BIP85
|
||||||
from monstr.encrypt import Keys
|
|
||||||
|
try:
|
||||||
|
from monstr.encrypt import Keys
|
||||||
|
except ImportError: # Fall back to local coincurve implementation
|
||||||
|
from nostr.coincurve_keys import Keys
|
||||||
from cryptography.hazmat.primitives.kdf.hkdf import HKDF
|
from cryptography.hazmat.primitives.kdf.hkdf import HKDF
|
||||||
from cryptography.hazmat.primitives import hashes
|
from cryptography.hazmat.primitives import hashes
|
||||||
from cryptography.hazmat.backends import default_backend
|
from cryptography.hazmat.backends import default_backend
|
||||||
|
Reference in New Issue
Block a user