From ae69c596eada46dc5ad388e71b416891938a1ac1 Mon Sep 17 00:00:00 2001 From: mitch-strike Date: Mon, 19 Dec 2022 12:36:33 -0700 Subject: [PATCH] Update README.md update readme file with helpful instructions for users who want to sign a message from a specified account --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 12d8bdd..fc00bf9 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,13 @@ relay_manager.add_relay("wss://relay.damus.io") relay_manager.open_connections({"cert_reqs": ssl.CERT_NONE}) # NOTE: This disables ssl certificate verification time.sleep(1.25) # allow the connections to open -private_key = PrivateKey() +private_key = PrivateKey() # NOTE: This will sign and publish a message from a randomly generated key pair + +# The below commented 2 lines allow you to sign a message from a specific key pair, it +# can be used alternatively to the random generated pair above + +# k = bytes.fromhex(nostr_private_key) +# private_key = PrivateKey(k) event = Event(private_key.public_key.hex(), "Hello Nostr") event.sign(private_key.hex())