npub13z…l2rce on Nostr: I can generate the correct event_id, but always get bad signature. Any wrong with my ...
I can generate the correct event_id, but always get bad signature. Any wrong with my sign?
from ecdsa import SigningKey, VerifyingKey, SECP256k1
# create event id
event_id = json_hash.hex()
print("event id:", event_id)
print("evnt id length:", len(event_id))
# signature the json_hash
signature = sk.sign(json_hash)
#convert to hex
sig_hex = signature.hex()
print("sig:", sig_hex)
print("sig length:", len(sig_hex))
from ecdsa import SigningKey, VerifyingKey, SECP256k1
# create event id
event_id = json_hash.hex()
print("event id:", event_id)
print("evnt id length:", len(event_id))
# signature the json_hash
signature = sk.sign(json_hash)
#convert to hex
sig_hex = signature.hex()
print("sig:", sig_hex)
print("sig length:", len(sig_hex))