Skip to content

Commit

Permalink
feat: add privateKey prop for EventSigner
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-kreios committed Dec 10, 2024
1 parent 1864965 commit 8739320
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/src/crypto/key_store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import 'dart:async';
import 'package:nostr_dart/src/crypto/utils.dart';

mixin EventSigner {

String get publicKey;

FutureOr<String> sign({required String message});
String get privateKey;

FutureOr<String> sign({required String message});
}

/// Encapsulation of crypto-related tasks.
Expand All @@ -24,6 +24,7 @@ class KeyStore with EventSigner {
/// 32-bytes lowercase hex-encoded private key.
/// Used to decrypt messages and generate message signatures.
/// Must be kept secret.
@override
final String privateKey;

/// Produces the [KeyStore] from a private key.
Expand Down

0 comments on commit 8739320

Please sign in to comment.