Thoughts To Nostr
I am trying to use temporal at home for running automated pipelines. It's definitely overkill for my use case but this is America...
No themes match.
All posts with the tag "nostr"
I am trying to use temporal at home for running automated pipelines. It's definitely overkill for my use case but this is America...
you can hexify your Nostr key when you need to sometimes which I needed to for Posts tagged: postiz (link with a thought I’m sure I have on postiz)
# /// script
# requires-python = ">=3.8"
# dependencies = [
# "bech32",
# ]
# ///
#
import os
import bech32
# Set your nsec... key to NOSTR_PRIVATE_KEY or bake it in...
nsec_key = os.environ.get("NOSTR_PRIVATE_KEY")
def decode_nsec(nsec_key):
hrp, data = bech32.bech32_decode(nsec_key)
if hrp != "nsec":
raise ValueError("Not a valid nsec key")
decoded = bech32.convertbits(data, 5, 8, False)
return bytes(decoded).hex()
# Example usage
raw_hex = decode_nsec(nsec_key)
print(f"Raw hex private key: {raw_hex}")
After generating a keypair on a nostr app (I started with primal) I copied my
public key to /.well-known/nostr.json and put that at the root of my site at
https://pype.dev.
The file looks like this:
{
“names”: {
“nic”: “npub1q3fsec2vcv99v80ga72dlv90qwkqmuxqcr6mdyumcmpkgudlhrespyurfj”
}
}
So now I can use nic@pype.dev as on nostr because the client will verify the
pubkey associated with my profile with my domain!
big upgrade from
@primal.net