Global Feed Post Login
Replying to Avatar Pip the WoT guy

very noob nostr "dev" question here #asknostr

I am using the python nostr-sdk, and the documentation is seriously lacking (or I couldn't find it after some hours which would be bad).

How can I turn a PubKey() object into an npub?

with to_hex() I get the hex version, but I want the npub...

Avatar
Yuki Kishimoto 1y ago

You have to use the `to_bech32` method.

The book is not ready, but you can find some example related to keys here: https://rust-nostr.org/nostr/03-keys.html

Reply to this note

Please Login to reply.

Discussion

No replies yet.