mirror of
https://github.com/aljazceru/python-nostr.git
synced 2025-12-19 07:14:23 +01:00
print hex as default
This commit is contained in:
@@ -48,8 +48,10 @@ class NostrClient:
|
||||
pk = bytes.fromhex(privatekey_hex) if privatekey_hex else None
|
||||
self.private_key = PrivateKey(pk)
|
||||
self.public_key = self.private_key.public_key
|
||||
print(f"Private key: {self.private_key.bech32()} ({self.private_key.hex()})")
|
||||
print(f"Public key: {self.public_key.bech32()} ({self.public_key.hex()})")
|
||||
print(
|
||||
f"Nostr private key: {self.private_key.hex()} ({self.private_key.bech32()})"
|
||||
)
|
||||
print(f"Nostr public key: {self.public_key.hex()} ({self.public_key.bech32()})")
|
||||
|
||||
def post(self, message: str):
|
||||
event = Event(self.public_key.hex(), message, kind=EventKind.TEXT_NOTE)
|
||||
|
||||
Reference in New Issue
Block a user