update to sdk 0.36 (for testing..)

This commit is contained in:
Believethehype
2024-11-06 08:14:15 +01:00
parent 972785d28d
commit ab66d5ed46
82 changed files with 1420 additions and 654 deletions

View File

@@ -24,14 +24,12 @@ async def nostr_client_test(prompt):
"wss://nostr-pub.wellorder.net"])
alttag = Tag.parse(["alt", "This is a NIP90 DVM AI task to generate TTS"])
event = EventBuilder(EventDefinitions.KIND_NIP90_GENERATE_TEXT, str("Answer to prompt"),
[iTag, relaysTag, alttag]).to_event(keys)
[iTag, relaysTag, alttag]).sign_with_keys(keys)
relay_list = ["wss://relay.damus.io", "wss://blastr.f7z.xyz", "wss://relayable.org",
"wss://nostr-pub.wellorder.net"]
opts = (Options().wait_for_send(False).send_timeout(timedelta(seconds=5)))
signer = NostrSigner.keys(keys)
client = Client.with_opts(signer,opts)
client = Client(keys)
for relay in relay_list:
await client.add_relay(relay)
await client.connect()
@@ -44,8 +42,7 @@ async def nostr_client():
sk = keys.secret_key()
pk = keys.public_key()
print(f"Nostr Test Client public key: {pk.to_bech32()}, Hex: {pk.to_hex()} ")
signer = NostrSigner.keys(keys)
client = Client(signer)
client = Client(keys)
dvmconfig = DVMConfig()
for relay in dvmconfig.RELAY_LIST: