generatePrivateKey method

  1. @override
String generatePrivateKey()
override

You can use this method to generate a key pair for your end users. it returns the private key of the generated key pair.

final privateKey = Nostr.instance.keysService.generatePrivateKey();
print(privateKey); // ...

Implementation

@override
String generatePrivateKey() {
  return _generateKeyPair().private;
}