File tree Expand file tree Collapse file tree 5 files changed +582
-170
lines changed Expand file tree Collapse file tree 5 files changed +582
-170
lines changed Original file line number Diff line number Diff line change 43
43
* Expose ` EventBuilder ` ([ Yuki Kishimoto] )
44
44
* Expose ` Client::send_event_builder ` ([ Yuki Kishimoto] )
45
45
* Expose ` Client::automatic_authentication ` ([ Yuki Kishimoto] )
46
+ * Expose signer methods for ` Client ` ([ Yuki Kishimoto] )
46
47
* Add ` SendEventOutput ` ([ Yuki Kishimoto] )
47
48
48
49
### Fixed
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import 'client/output.dart';
9
9
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart' ;
10
10
import 'protocol/event.dart' ;
11
11
import 'protocol/event/builder.dart' ;
12
+ import 'protocol/signer.dart' ;
12
13
13
14
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `from`
14
15
@@ -37,6 +38,9 @@ abstract class Client implements RustOpaqueInterface {
37
38
/// Connect to all added relays
38
39
Future <void > connect ();
39
40
41
+ /// Check if signer is configured
42
+ Future <bool > hasSigner ();
43
+
40
44
factory Client () => NostrSdk .instance.api.crateApiClientClientNew ();
41
45
42
46
/// Send event
@@ -51,4 +55,15 @@ abstract class Client implements RustOpaqueInterface {
51
55
///
52
56
/// Return an error if the [`NostrSigner`] is not set.
53
57
Future <SendEventOutput > sendEventBuilder ({required EventBuilder builder});
58
+
59
+ /// Set nostr signer
60
+ Future <void > setSigner ({required NostrSigner signer});
61
+
62
+ /// Get current nostr signer
63
+ ///
64
+ /// Rise error if it not set.
65
+ Future <NostrSigner > signer ();
66
+
67
+ /// Unset nostr signer
68
+ Future <void > unsetSigner ();
54
69
}
You can’t perform that action at this time.
0 commit comments