Why Nostr? What is Njump?
2024-08-30 21:54:43
in reply to

Yuki Kishimoto on Nostr: ```python from nostr_protocol import Keys, Nip19Profile # OR `from nostr_sdk import ...

```python
from nostr_protocol import Keys, Nip19Profile
# OR `from nostr_sdk import Keys, Nip19Profile`

keys = Keys.parse("<private-key>") # nsec or hex
public_key = keys.public_key()

profile = Nip19Profile(public_key, relays=["wss://relay.damus.io"])
print(f"NIP-19: {profile.to_bech32()}")
print(f"NIP-21: {profile.to_nostr_uri()}")
```

You can learn more here (NIP-19 and NIP-21 sections): https://rust-nostr.org/
Author Public Key
npub1drvpzev3syqt0kjrls50050uzf25gehpz9vgdw08hvex7e0vgfeq0eseet