update to nostrsdk0.11.1 (for testing)

This commit is contained in:
Believethehype
2024-02-17 20:40:56 +01:00
parent cd077db044
commit 19c554d7bf
25 changed files with 78 additions and 76 deletions

View File

@@ -5,7 +5,7 @@ from threading import Thread
import dotenv
from nostr_sdk import Keys, Client, Tag, EventBuilder, Filter, HandleNotification, Timestamp, nip04_decrypt, \
ClientSigner
NostrSigner
from nostr_dvm.utils.dvmconfig import DVMConfig
from nostr_dvm.utils.nostr_utils import send_event, check_and_set_private_key
@@ -13,7 +13,7 @@ from nostr_dvm.utils.definitions import EventDefinitions
def nostr_client_test_tts(prompt):
keys = Keys.from_sk_str(check_and_set_private_key("test_client"))
keys = Keys.parse(check_and_set_private_key("test_client"))
iTag = Tag.parse(["i", prompt, "text"])
paramTag1 = Tag.parse(["param", "language", "en"])
@@ -30,7 +30,7 @@ def nostr_client_test_tts(prompt):
"wss://nostr-pub.wellorder.net"]
signer = ClientSigner.keys(keys)
signer = NostrSigner.keys(keys)
client = Client(signer)
for relay in relay_list:
client.add_relay(relay)
@@ -40,11 +40,11 @@ def nostr_client_test_tts(prompt):
return event.as_json()
def nostr_client():
keys = Keys.from_sk_str(check_and_set_private_key("test_client"))
keys = Keys.parse(check_and_set_private_key("test_client"))
sk = keys.secret_key()
pk = keys.public_key()
print(f"Nostr Test Client public key: {pk.to_bech32()}, Hex: {pk.to_hex()} ")
signer = ClientSigner.keys(keys)
signer = NostrSigner.keys(keys)
client = Client(signer)
dvmconfig = DVMConfig()