Trying to working on the L402 lightning specification
My understanding is that: sha256(preimage) = payment_hash
What am I doing wrong? I can never get these to match.
#programming #python #asknostr
nostr:npub1vp8fdcyejd4pqjyrjk9sgz68vuhq7pyvnzk8j0ehlljvwgp8n6eqsrnpsw do you know what I’m doing wrong here?
Please Login to reply.
Try making the hash like this hashlib.sha256(bytes.fromhex(preimage)).hexdigest()
It’s cause the preimage is in hex format
I knew you were the right guy
Thanks, homie! That worked!