NostrKeyPairs constructor

NostrKeyPairs({
  1. required String private,
})

This class is responsible for generating, handling and signing keys. It is used by the NostrClient to sign messages.

Implementation

factory NostrKeyPairs({
  required String private,
}) {
  final possibleKeyPair = _keyPairsCache[private];

  if (possibleKeyPair != null) {
    return possibleKeyPair;
  } else {
    final keyPair = NostrKeyPairs._(private: private);

    _keyPairsCache[private] = keyPair;

    return keyPair;
  }
}