@@ -15,6 +15,21 @@ import 'protocol/signer.dart';
15
15
16
16
// Rust type: RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_Client>>
17
17
abstract class Client implements RustOpaqueInterface {
18
+ /// Add discovery relay
19
+ ///
20
+ /// If relay already exists, this method automatically add the [`RelayServiceFlags::DISCOVERY`] flag to it and return `false` .
21
+ ///
22
+ /// <https://github.com/nostr-protocol/nips/blob/master/65.md>
23
+ Future <bool > addDiscoveryRelay ({required String url});
24
+
25
+ /// Add read relay
26
+ ///
27
+ /// If relay already exists, this method add the [`RelayServiceFlags::READ`] flag to it and return `false` .
28
+ ///
29
+ /// If are set pool subscriptions, the new added relay will inherit them. Use `subscribe_to` method instead of `subscribe` ,
30
+ /// to avoid to set pool subscriptions.
31
+ Future <bool > addReadRelay ({required String url});
32
+
18
33
/// Add relay
19
34
///
20
35
/// Relays added with this method will have both `READ` and `WRITE` flags enabled.
@@ -26,6 +41,11 @@ abstract class Client implements RustOpaqueInterface {
26
41
/// Connection is **NOT** automatically started with relay, remember to call `connect` method!
27
42
Future <bool > addRelay ({required String url});
28
43
44
+ /// Add write relay
45
+ ///
46
+ /// If relay already exists, this method add the [`RelayServiceFlags::WRITE`] flag to it and return `false` .
47
+ Future <bool > addWriteRelay ({required String url});
48
+
29
49
/// Auto authenticate to relays (default: true)
30
50
///
31
51
/// <https://github.com/nostr-protocol/nips/blob/master/42.md>
0 commit comments