derivePublicKey method

  1. @override
String derivePublicKey({
  1. required String privateKey,
})
override

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 = NostrKeyPairs(private: privateKey);
  NostrClientUtils.log(
    "derived public key from private key, with it's value is: ${nostrKeyPairs.public}",
  );

  return nostrKeyPairs.public;
}