derivePublicKey method
Derives a public key from a privateKey
directly, use this if you want a quick way to get a public key from a private key.
final publicKey = Nostr.instance.services.keys.derivePublicKey(privateKey: yourPrivateKey);
print(publicKey); // ...
Implementation
String derivePublicKey({required String privateKey}) {
final nostrKeyPairs = _keyPairFrom(privateKey);
logger.log(
"derived public key from private key, with it's value is: ${nostrKeyPairs.public}",
);
return nostrKeyPairs.public;
}