generateKeyPairFromExistingPrivateKey method

  1. @override
NostrKeyPairs generateKeyPairFromExistingPrivateKey(
  1. String privateKey
)
override

Generates a key pair from an existing privateKey, use this if you want to generate a key pair from an existing private key.

final keyPair = Nostr.instance.keysService.generateKeyPairFromExistingPrivateKey(yourPrivateKey);
print(keyPair.public); // ...
print(keyPair.private); // ...

Implementation

@override
NostrKeyPairs generateKeyPairFromExistingPrivateKey(
  String privateKey,
) {
  return _keyPairFrom(privateKey);
}