Bech32 is how npubs are encoded from hex keys. Secp256k is the right curve for generating nostr keys.

Reply to this note

Please Login to reply.

Discussion

Thanks again. I tried it again, and what I've understood now is that ChatGPT tried to let me use libraries that are for server side (nodejs), so I used browserify to make client side versions of elliptic and bech32 and told chatgpt to use those. The result is at https://gitlab.com/no-limit/hi-plebs/ . Still it's not working. At https://hi-plebs-no-limit-bdb95ca026aabb14656ee72db9d19f41c60c53621bc67.gitlab.io/ a websocket is connecting to a relay well, but when sending a note I am getting "Failed to process private key: EC is not a constructor". Do you know if there is some documentation how to handle the elliptic library with nostr client side? As elliptic file is too big to be fully read by chatgpt.