refactor: PrivateKey class signs events

This commit is contained in:
jeffthibault
2023-01-19 19:51:33 -05:00
parent c68ebe5250
commit 572bcfe628
4 changed files with 8 additions and 9 deletions

View File

@@ -49,7 +49,7 @@ time.sleep(1.25) # allow the connections to open
private_key = PrivateKey()
event = Event(private_key.public_key.hex(), "Hello Nostr")
event.sign(private_key.hex())
private_key.sign_event(event)
relay_manager.publish_event(event)
time.sleep(1) # allow the messages to send
@@ -116,7 +116,7 @@ event = Event(
"Hello, NIP-26!",
tags=[delegation.get_tag()],
)
event.sign(delegatee_pk.hex())
delegatee_pk.sign_event(event)
# ...normal broadcast steps...
```