feat: add extension-settings instead of environs (#28)
* feat: add extension-settings instead of environs
This commit is contained in:
parent
257f5d34d2
commit
f2e419e18d
10 changed files with 230 additions and 130 deletions
8
helpers.py
Normal file
8
helpers.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
from .nostr.key import PrivateKey
|
||||
|
||||
|
||||
def parse_nostr_private_key(key: str) -> PrivateKey:
|
||||
if key.startswith("nsec"):
|
||||
return PrivateKey.from_nsec(key)
|
||||
else:
|
||||
return PrivateKey(bytes.fromhex(key))
|
||||
Loading…
Add table
Add a link
Reference in a new issue