WebEventSigner class
Web implementation of EventSigner using @noble/curves and Web Crypto API via JS interop for fast BIP-340 signing, NIP-04 and NIP-44 encryption.
Constructors
- WebEventSigner({required String? privateKey, required String publicKey})
- Get a new web event signer with the given keys
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
pendingRequests
→ List<
PendingSignerRequest> -
Current list of pending requests (synchronous snapshot).
no setteroverride
-
pendingRequestsStream
→ Stream<
List< PendingSignerRequest> > -
Stream of pending requests waiting for user approval.
Emits whenever the list changes (request added, completed, or cancelled).
no setteroverride
- privateKey ↔ String?
-
hex private key
getter/setter pair
- publicKey ↔ String
-
hex public key
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancelRequest(
String requestId) → bool -
Cancel a pending request by its ID.
override
-
canSign(
) → bool -
override
-
decrypt(
String msg, String destPubKey, {String? id}) → Future< String?> -
override
-
decryptNip44(
{required String ciphertext, required String senderPubKey}) → Future< String?> -
override
-
dispose(
) → Future< void> -
Dispose of resources used by the signer.
override
-
encrypt(
String msg, String destPubKey, {String? id}) → Future< String?> -
override
-
encryptNip44(
{required String plaintext, required String recipientPubKey}) → Future< String?> -
override
-
getPublicKey(
) → String -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sign(
Nip01Event event) → Future< Nip01Event> -
Signs the given event and returns the signed event
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited