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.keysService.derivePublicKey(privateKey: yourPrivateKey);
print(publicKey); // ...
Implementation
@override
String derivePublicKey({required String privateKey}) {
final nostrKeyPairs = _keyPairFrom(privateKey);
utils.log(
"derived public key from private key, with it's value is: ${nostrKeyPairs.public}",
);
return nostrKeyPairs.public;
}