Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down