encodePublicKeyToNpub method
Encodes a Nostr publicKey
to an npub key (bech32 encoding).
final npubString = Nostr.instance.keysService.encodePublicKeyToNpub(yourPublicKey);
print(npubString); // ...
Implementation
@override
String encodePublicKeyToNpub(String publicKey) {
return Nostr.instance.utilsService
.encodeBech32(publicKey, NostrConstants.npub);
}