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/
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/