Skip to content

Commit

Permalink
Expose Client::database
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
  • Loading branch information
yukibtc committed Jan 31, 2025
1 parent aa12f68 commit f87530e
Show file tree
Hide file tree
Showing 5 changed files with 464 additions and 364 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
* Expose `ClientBuilder::database` ([Yuki Kishimoto])
* Expose `Client::send_event_to` ([Yuki Kishimoto])
* Expose `Client::fetch_events_from` ([Yuki Kishimoto])
* Expose `Client::database` ([Yuki Kishimoto])

### Fixed

Expand Down
4 changes: 4 additions & 0 deletions lib/src/rust/api/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import '../frb_generated.dart';
import 'client/builder.dart';
import 'client/notification.dart';
import 'client/output.dart';
import 'database.dart';
import 'database/events.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
import 'protocol/event.dart';
Expand Down Expand Up @@ -65,6 +66,9 @@ abstract class Client implements RustOpaqueInterface {
/// Connect to a previously added relay
Future<void> connectRelay({required String url});

/// Get database
Future<NostrDatabase> database();

/// Disconnect from all relays
Future<void> disconnect();

Expand Down
Loading

0 comments on commit f87530e

Please sign in to comment.