diff --git a/CHANGELOG.md b/CHANGELOG.md index 051cb77..e76fed7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ * Expose `EventBuilder::gift_wrap` ([Yuki Kishimoto]) * Expose `EventBuilder::private_msg` ([Yuki Kishimoto]) * Expose `UnwrappedGift` ([Yuki Kishimoto]) +* Expose `Client::handle_notifications` ([Yuki Kishimoto]) ### Fixed diff --git a/lib/nostr_sdk.dart b/lib/nostr_sdk.dart index a3a195c..cc3ae51 100644 --- a/lib/nostr_sdk.dart +++ b/lib/nostr_sdk.dart @@ -16,5 +16,6 @@ export 'src/rust/api/protocol/signer.dart'; export 'src/rust/api/relay/options.dart'; export 'src/rust/api/client.dart'; export 'src/rust/api/client/builder.dart'; +export 'src/rust/api/client/notification.dart'; export 'src/rust/api/client/options.dart'; export 'src/rust/api/client/output.dart'; diff --git a/lib/src/rust/api/client.dart b/lib/src/rust/api/client.dart index b740791..7477b18 100644 --- a/lib/src/rust/api/client.dart +++ b/lib/src/rust/api/client.dart @@ -5,6 +5,7 @@ import '../frb_generated.dart'; import 'client/builder.dart'; +import 'client/notification.dart'; import 'client/output.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'protocol/event.dart'; @@ -83,6 +84,8 @@ abstract class Client implements RustOpaqueInterface { /// Note: this method will remove the relay, also if it's in use for the gossip model or other service! Future forceRemoveRelay({required String url}); + Stream handleNotifications(); + /// Check if signer is configured Future hasSigner(); diff --git a/lib/src/rust/api/client/notification.dart b/lib/src/rust/api/client/notification.dart new file mode 100644 index 0000000..9a2f392 --- /dev/null +++ b/lib/src/rust/api/client/notification.dart @@ -0,0 +1,44 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../../frb_generated.dart'; +import '../protocol/event.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'package:freezed_annotation/freezed_annotation.dart' hide protected; +part 'notification.freezed.dart'; + +// 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` + +@freezed +sealed class RelayPoolNotification with _$RelayPoolNotification { + const RelayPoolNotification._(); + + /// Received an [`Event`]. Does not include events sent by this client. + const factory RelayPoolNotification.event({ + /// Relay url + required String relayUrl, + + /// Subscription ID + required String subscriptionId, + + /// Event + required Event event, + }) = RelayPoolNotification_Event; + + /// Received a [`RelayMessage`]. Includes messages wrapping events that were sent by this client. + const factory RelayPoolNotification.message({ + /// Relay url + required String relayUrl, + + /// Relay Message + required String message, + }) = RelayPoolNotification_Message; + + /// Shutdown + /// + /// This notification variant is sent after [`Client::shutdown`] method is called and all connections have been closed. + const factory RelayPoolNotification.shutdown() = + RelayPoolNotification_Shutdown; +} diff --git a/lib/src/rust/api/client/notification.freezed.dart b/lib/src/rust/api/client/notification.freezed.dart new file mode 100644 index 0000000..2d94dd4 --- /dev/null +++ b/lib/src/rust/api/client/notification.freezed.dart @@ -0,0 +1,581 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'notification.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +/// @nodoc +mixin _$RelayPoolNotification { + @optionalTypeArgs + TResult when({ + required TResult Function( + String relayUrl, String subscriptionId, Event event) + event, + required TResult Function(String relayUrl, String message) message, + required TResult Function() shutdown, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String relayUrl, String subscriptionId, Event event)? + event, + TResult? Function(String relayUrl, String message)? message, + TResult? Function()? shutdown, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String relayUrl, String subscriptionId, Event event)? + event, + TResult Function(String relayUrl, String message)? message, + TResult Function()? shutdown, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(RelayPoolNotification_Event value) event, + required TResult Function(RelayPoolNotification_Message value) message, + required TResult Function(RelayPoolNotification_Shutdown value) shutdown, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(RelayPoolNotification_Event value)? event, + TResult? Function(RelayPoolNotification_Message value)? message, + TResult? Function(RelayPoolNotification_Shutdown value)? shutdown, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(RelayPoolNotification_Event value)? event, + TResult Function(RelayPoolNotification_Message value)? message, + TResult Function(RelayPoolNotification_Shutdown value)? shutdown, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $RelayPoolNotificationCopyWith<$Res> { + factory $RelayPoolNotificationCopyWith(RelayPoolNotification value, + $Res Function(RelayPoolNotification) then) = + _$RelayPoolNotificationCopyWithImpl<$Res, RelayPoolNotification>; +} + +/// @nodoc +class _$RelayPoolNotificationCopyWithImpl<$Res, + $Val extends RelayPoolNotification> + implements $RelayPoolNotificationCopyWith<$Res> { + _$RelayPoolNotificationCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of RelayPoolNotification + /// with the given fields replaced by the non-null parameter values. +} + +/// @nodoc +abstract class _$$RelayPoolNotification_EventImplCopyWith<$Res> { + factory _$$RelayPoolNotification_EventImplCopyWith( + _$RelayPoolNotification_EventImpl value, + $Res Function(_$RelayPoolNotification_EventImpl) then) = + __$$RelayPoolNotification_EventImplCopyWithImpl<$Res>; + @useResult + $Res call({String relayUrl, String subscriptionId, Event event}); +} + +/// @nodoc +class __$$RelayPoolNotification_EventImplCopyWithImpl<$Res> + extends _$RelayPoolNotificationCopyWithImpl<$Res, + _$RelayPoolNotification_EventImpl> + implements _$$RelayPoolNotification_EventImplCopyWith<$Res> { + __$$RelayPoolNotification_EventImplCopyWithImpl( + _$RelayPoolNotification_EventImpl _value, + $Res Function(_$RelayPoolNotification_EventImpl) _then) + : super(_value, _then); + + /// Create a copy of RelayPoolNotification + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? relayUrl = null, + Object? subscriptionId = null, + Object? event = null, + }) { + return _then(_$RelayPoolNotification_EventImpl( + relayUrl: null == relayUrl + ? _value.relayUrl + : relayUrl // ignore: cast_nullable_to_non_nullable + as String, + subscriptionId: null == subscriptionId + ? _value.subscriptionId + : subscriptionId // ignore: cast_nullable_to_non_nullable + as String, + event: null == event + ? _value.event + : event // ignore: cast_nullable_to_non_nullable + as Event, + )); + } +} + +/// @nodoc + +class _$RelayPoolNotification_EventImpl extends RelayPoolNotification_Event { + const _$RelayPoolNotification_EventImpl( + {required this.relayUrl, + required this.subscriptionId, + required this.event}) + : super._(); + + /// Relay url + @override + final String relayUrl; + + /// Subscription ID + @override + final String subscriptionId; + + /// Event + @override + final Event event; + + @override + String toString() { + return 'RelayPoolNotification.event(relayUrl: $relayUrl, subscriptionId: $subscriptionId, event: $event)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$RelayPoolNotification_EventImpl && + (identical(other.relayUrl, relayUrl) || + other.relayUrl == relayUrl) && + (identical(other.subscriptionId, subscriptionId) || + other.subscriptionId == subscriptionId) && + (identical(other.event, event) || other.event == event)); + } + + @override + int get hashCode => Object.hash(runtimeType, relayUrl, subscriptionId, event); + + /// Create a copy of RelayPoolNotification + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$RelayPoolNotification_EventImplCopyWith<_$RelayPoolNotification_EventImpl> + get copyWith => __$$RelayPoolNotification_EventImplCopyWithImpl< + _$RelayPoolNotification_EventImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function( + String relayUrl, String subscriptionId, Event event) + event, + required TResult Function(String relayUrl, String message) message, + required TResult Function() shutdown, + }) { + return event(relayUrl, subscriptionId, this.event); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String relayUrl, String subscriptionId, Event event)? + event, + TResult? Function(String relayUrl, String message)? message, + TResult? Function()? shutdown, + }) { + return event?.call(relayUrl, subscriptionId, this.event); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String relayUrl, String subscriptionId, Event event)? + event, + TResult Function(String relayUrl, String message)? message, + TResult Function()? shutdown, + required TResult orElse(), + }) { + if (event != null) { + return event(relayUrl, subscriptionId, this.event); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(RelayPoolNotification_Event value) event, + required TResult Function(RelayPoolNotification_Message value) message, + required TResult Function(RelayPoolNotification_Shutdown value) shutdown, + }) { + return event(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(RelayPoolNotification_Event value)? event, + TResult? Function(RelayPoolNotification_Message value)? message, + TResult? Function(RelayPoolNotification_Shutdown value)? shutdown, + }) { + return event?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(RelayPoolNotification_Event value)? event, + TResult Function(RelayPoolNotification_Message value)? message, + TResult Function(RelayPoolNotification_Shutdown value)? shutdown, + required TResult orElse(), + }) { + if (event != null) { + return event(this); + } + return orElse(); + } +} + +abstract class RelayPoolNotification_Event extends RelayPoolNotification { + const factory RelayPoolNotification_Event( + {required final String relayUrl, + required final String subscriptionId, + required final Event event}) = _$RelayPoolNotification_EventImpl; + const RelayPoolNotification_Event._() : super._(); + + /// Relay url + String get relayUrl; + + /// Subscription ID + String get subscriptionId; + + /// Event + Event get event; + + /// Create a copy of RelayPoolNotification + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + _$$RelayPoolNotification_EventImplCopyWith<_$RelayPoolNotification_EventImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$RelayPoolNotification_MessageImplCopyWith<$Res> { + factory _$$RelayPoolNotification_MessageImplCopyWith( + _$RelayPoolNotification_MessageImpl value, + $Res Function(_$RelayPoolNotification_MessageImpl) then) = + __$$RelayPoolNotification_MessageImplCopyWithImpl<$Res>; + @useResult + $Res call({String relayUrl, String message}); +} + +/// @nodoc +class __$$RelayPoolNotification_MessageImplCopyWithImpl<$Res> + extends _$RelayPoolNotificationCopyWithImpl<$Res, + _$RelayPoolNotification_MessageImpl> + implements _$$RelayPoolNotification_MessageImplCopyWith<$Res> { + __$$RelayPoolNotification_MessageImplCopyWithImpl( + _$RelayPoolNotification_MessageImpl _value, + $Res Function(_$RelayPoolNotification_MessageImpl) _then) + : super(_value, _then); + + /// Create a copy of RelayPoolNotification + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? relayUrl = null, + Object? message = null, + }) { + return _then(_$RelayPoolNotification_MessageImpl( + relayUrl: null == relayUrl + ? _value.relayUrl + : relayUrl // ignore: cast_nullable_to_non_nullable + as String, + message: null == message + ? _value.message + : message // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$RelayPoolNotification_MessageImpl + extends RelayPoolNotification_Message { + const _$RelayPoolNotification_MessageImpl( + {required this.relayUrl, required this.message}) + : super._(); + + /// Relay url + @override + final String relayUrl; + + /// Relay Message + @override + final String message; + + @override + String toString() { + return 'RelayPoolNotification.message(relayUrl: $relayUrl, message: $message)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$RelayPoolNotification_MessageImpl && + (identical(other.relayUrl, relayUrl) || + other.relayUrl == relayUrl) && + (identical(other.message, message) || other.message == message)); + } + + @override + int get hashCode => Object.hash(runtimeType, relayUrl, message); + + /// Create a copy of RelayPoolNotification + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$RelayPoolNotification_MessageImplCopyWith< + _$RelayPoolNotification_MessageImpl> + get copyWith => __$$RelayPoolNotification_MessageImplCopyWithImpl< + _$RelayPoolNotification_MessageImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function( + String relayUrl, String subscriptionId, Event event) + event, + required TResult Function(String relayUrl, String message) message, + required TResult Function() shutdown, + }) { + return message(relayUrl, this.message); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String relayUrl, String subscriptionId, Event event)? + event, + TResult? Function(String relayUrl, String message)? message, + TResult? Function()? shutdown, + }) { + return message?.call(relayUrl, this.message); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String relayUrl, String subscriptionId, Event event)? + event, + TResult Function(String relayUrl, String message)? message, + TResult Function()? shutdown, + required TResult orElse(), + }) { + if (message != null) { + return message(relayUrl, this.message); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(RelayPoolNotification_Event value) event, + required TResult Function(RelayPoolNotification_Message value) message, + required TResult Function(RelayPoolNotification_Shutdown value) shutdown, + }) { + return message(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(RelayPoolNotification_Event value)? event, + TResult? Function(RelayPoolNotification_Message value)? message, + TResult? Function(RelayPoolNotification_Shutdown value)? shutdown, + }) { + return message?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(RelayPoolNotification_Event value)? event, + TResult Function(RelayPoolNotification_Message value)? message, + TResult Function(RelayPoolNotification_Shutdown value)? shutdown, + required TResult orElse(), + }) { + if (message != null) { + return message(this); + } + return orElse(); + } +} + +abstract class RelayPoolNotification_Message extends RelayPoolNotification { + const factory RelayPoolNotification_Message( + {required final String relayUrl, + required final String message}) = _$RelayPoolNotification_MessageImpl; + const RelayPoolNotification_Message._() : super._(); + + /// Relay url + String get relayUrl; + + /// Relay Message + String get message; + + /// Create a copy of RelayPoolNotification + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + _$$RelayPoolNotification_MessageImplCopyWith< + _$RelayPoolNotification_MessageImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$RelayPoolNotification_ShutdownImplCopyWith<$Res> { + factory _$$RelayPoolNotification_ShutdownImplCopyWith( + _$RelayPoolNotification_ShutdownImpl value, + $Res Function(_$RelayPoolNotification_ShutdownImpl) then) = + __$$RelayPoolNotification_ShutdownImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$RelayPoolNotification_ShutdownImplCopyWithImpl<$Res> + extends _$RelayPoolNotificationCopyWithImpl<$Res, + _$RelayPoolNotification_ShutdownImpl> + implements _$$RelayPoolNotification_ShutdownImplCopyWith<$Res> { + __$$RelayPoolNotification_ShutdownImplCopyWithImpl( + _$RelayPoolNotification_ShutdownImpl _value, + $Res Function(_$RelayPoolNotification_ShutdownImpl) _then) + : super(_value, _then); + + /// Create a copy of RelayPoolNotification + /// with the given fields replaced by the non-null parameter values. +} + +/// @nodoc + +class _$RelayPoolNotification_ShutdownImpl + extends RelayPoolNotification_Shutdown { + const _$RelayPoolNotification_ShutdownImpl() : super._(); + + @override + String toString() { + return 'RelayPoolNotification.shutdown()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$RelayPoolNotification_ShutdownImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function( + String relayUrl, String subscriptionId, Event event) + event, + required TResult Function(String relayUrl, String message) message, + required TResult Function() shutdown, + }) { + return shutdown(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String relayUrl, String subscriptionId, Event event)? + event, + TResult? Function(String relayUrl, String message)? message, + TResult? Function()? shutdown, + }) { + return shutdown?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String relayUrl, String subscriptionId, Event event)? + event, + TResult Function(String relayUrl, String message)? message, + TResult Function()? shutdown, + required TResult orElse(), + }) { + if (shutdown != null) { + return shutdown(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(RelayPoolNotification_Event value) event, + required TResult Function(RelayPoolNotification_Message value) message, + required TResult Function(RelayPoolNotification_Shutdown value) shutdown, + }) { + return shutdown(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(RelayPoolNotification_Event value)? event, + TResult? Function(RelayPoolNotification_Message value)? message, + TResult? Function(RelayPoolNotification_Shutdown value)? shutdown, + }) { + return shutdown?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(RelayPoolNotification_Event value)? event, + TResult Function(RelayPoolNotification_Message value)? message, + TResult Function(RelayPoolNotification_Shutdown value)? shutdown, + required TResult orElse(), + }) { + if (shutdown != null) { + return shutdown(this); + } + return orElse(); + } +} + +abstract class RelayPoolNotification_Shutdown extends RelayPoolNotification { + const factory RelayPoolNotification_Shutdown() = + _$RelayPoolNotification_ShutdownImpl; + const RelayPoolNotification_Shutdown._() : super._(); +} diff --git a/lib/src/rust/frb_generated.dart b/lib/src/rust/frb_generated.dart index e82a85c..2cf6837 100644 --- a/lib/src/rust/frb_generated.dart +++ b/lib/src/rust/frb_generated.dart @@ -5,6 +5,7 @@ import 'api/client.dart'; import 'api/client/builder.dart'; +import 'api/client/notification.dart'; import 'api/client/options.dart'; import 'api/client/output.dart'; import 'api/protocol/event.dart'; @@ -74,7 +75,7 @@ class NostrSdk String get codegenVersion => '2.0.0'; @override - int get rustContentHash => -1770317176; + int get rustContentHash => -781178950; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( @@ -124,6 +125,9 @@ abstract class NostrSdkApi extends BaseApi { Future crateApiClientClientForceRemoveRelay( {required Client that, required String url}); + Stream crateApiClientClientHandleNotifications( + {required Client that}); + Future crateApiClientClientHasSigner({required Client that}); Client crateApiClientClientNew(); @@ -1053,6 +1057,36 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { argNames: ["that", "url"], ); + @override + Stream crateApiClientClientHandleNotifications( + {required Client that}) { + final stream = RustStreamSink(); + unawaited(handler.executeNormal(NormalTask( + callFfi: (port_) { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( + that, serializer); + sse_encode_StreamSink_relay_pool_notification_Sse(stream, serializer); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 15, port: port_); + }, + codec: SseCodec( + decodeSuccessData: sse_decode_unit, + decodeErrorData: sse_decode_AnyhowException, + ), + constMeta: kCrateApiClientClientHandleNotificationsConstMeta, + argValues: [that, stream], + apiImpl: this, + ))); + return stream.stream; + } + + TaskConstMeta get kCrateApiClientClientHandleNotificationsConstMeta => + const TaskConstMeta( + debugName: "Client_handle_notifications", + argNames: ["that", "stream"], + ); + @override Future crateApiClientClientHasSigner({required Client that}) { return handler.executeNormal(NormalTask( @@ -1061,7 +1095,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 15, port: port_); + funcId: 16, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -1084,7 +1118,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 16)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 17)!; }, codec: SseCodec( decodeSuccessData: @@ -1110,7 +1144,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 17, port: port_); + funcId: 18, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -1138,7 +1172,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_String(url, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 18, port: port_); + funcId: 19, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -1164,7 +1198,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 19, port: port_); + funcId: 20, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -1192,7 +1226,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( event, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 20, port: port_); + funcId: 21, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_send_event_output, @@ -1221,7 +1255,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventBuilder( builder, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 21, port: port_); + funcId: 22, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_send_event_output, @@ -1250,7 +1284,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_NostrSigner( signer, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 22, port: port_); + funcId: 23, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -1276,7 +1310,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 23, port: port_); + funcId: 24, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -1302,7 +1336,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 24, port: port_); + funcId: 25, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -1328,7 +1362,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 25, port: port_); + funcId: 26, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -1354,7 +1388,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_ClientBuilder( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 26)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 27)!; }, codec: SseCodec( decodeSuccessData: @@ -1378,7 +1412,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 27)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 28)!; }, codec: SseCodec( decodeSuccessData: @@ -1407,7 +1441,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_ClientOptions( opts, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 28)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 29)!; }, codec: SseCodec( decodeSuccessData: @@ -1436,7 +1470,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_NostrSigner( signer, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 29)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 30)!; }, codec: SseCodec( decodeSuccessData: @@ -1464,7 +1498,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_ClientOptions( that, serializer); sse_encode_bool(val, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 30)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 31)!; }, codec: SseCodec( decodeSuccessData: @@ -1492,7 +1526,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_ClientOptions( that, serializer); sse_encode_bool(enabled, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 31)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 32)!; }, codec: SseCodec( decodeSuccessData: @@ -1523,7 +1557,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Connection( connection, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 32)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 33)!; }, codec: SseCodec( decodeSuccessData: @@ -1551,7 +1585,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_ClientOptions( that, serializer); sse_encode_bool(enabled, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 33)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 34)!; }, codec: SseCodec( decodeSuccessData: @@ -1579,7 +1613,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_ClientOptions( that, serializer); sse_encode_u_8(difficulty, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 34)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 35)!; }, codec: SseCodec( decodeSuccessData: @@ -1603,7 +1637,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 35)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 36)!; }, codec: SseCodec( decodeSuccessData: @@ -1631,7 +1665,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Connection( that, serializer); sse_encode_String(addr, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 36)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 37)!; }, codec: SseCodec( decodeSuccessData: @@ -1658,7 +1692,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Connection( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 37)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 38)!; }, codec: SseCodec( decodeSuccessData: @@ -1686,7 +1720,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Connection( that, serializer); sse_encode_String(dataPath, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 38)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 39)!; }, codec: SseCodec( decodeSuccessData: @@ -1715,7 +1749,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Connection( that, serializer); sse_encode_box_autoadd_connection_mode(mode, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 39)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 40)!; }, codec: SseCodec( decodeSuccessData: @@ -1739,7 +1773,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 40)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 41)!; }, codec: SseCodec( decodeSuccessData: @@ -1767,7 +1801,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Connection( that, serializer); sse_encode_connection_target(target, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 41)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 42)!; }, codec: SseCodec( decodeSuccessData: @@ -1793,7 +1827,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 42)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 43)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -1818,7 +1852,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 43)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 44)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -1843,7 +1877,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 44)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 45)!; }, codec: SseCodec( decodeSuccessData: @@ -1869,7 +1903,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 45)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 46)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -1894,7 +1928,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 46)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 47)!; }, codec: SseCodec( decodeSuccessData: sse_decode_u_64, @@ -1918,7 +1952,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(json, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 47)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 48)!; }, codec: SseCodec( decodeSuccessData: @@ -1944,7 +1978,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 48)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 49)!; }, codec: SseCodec( decodeSuccessData: @@ -1970,7 +2004,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 49)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 50)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -1995,7 +2029,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 50)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 51)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2020,7 +2054,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 51)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 52)!; }, codec: SseCodec( decodeSuccessData: sse_decode_u_16, @@ -2045,7 +2079,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 52)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 53)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2070,7 +2104,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 53)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 54)!; }, codec: SseCodec( decodeSuccessData: @@ -2096,7 +2130,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 54)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 55)!; }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -2121,7 +2155,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 55)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 56)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2146,7 +2180,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 56)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 57)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2174,7 +2208,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( publicKey, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 57)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 58)!; }, codec: SseCodec( decodeSuccessData: @@ -2202,7 +2236,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventBuilder( that, serializer); sse_encode_u_64(createdAt, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 58)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 59)!; }, codec: SseCodec( decodeSuccessData: @@ -2241,7 +2275,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( extraTags, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 59, port: port_); + funcId: 60, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -2275,7 +2309,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { seal, serializer); sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( extraTags, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 60)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 61)!; }, codec: SseCodec( decodeSuccessData: @@ -2304,7 +2338,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_u_16(kind, serializer); sse_encode_String(content, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 61)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 62)!; }, codec: SseCodec( decodeSuccessData: @@ -2332,7 +2366,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventBuilder( that, serializer); sse_encode_u_8(difficulty, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 62)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 63)!; }, codec: SseCodec( decodeSuccessData: @@ -2368,7 +2402,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( rumorExtraTags, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 63, port: port_); + funcId: 64, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -2403,7 +2437,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( rumor, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 64, port: port_); + funcId: 65, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -2433,7 +2467,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_NostrSigner( signer, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 65, port: port_); + funcId: 66, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -2462,7 +2496,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( keys, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 66)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 67)!; }, codec: SseCodec( decodeSuccessData: @@ -2492,7 +2526,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( tag, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 67)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 68)!; }, codec: SseCodec( decodeSuccessData: @@ -2521,7 +2555,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( tags, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 68)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 69)!; }, codec: SseCodec( decodeSuccessData: @@ -2547,7 +2581,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(content, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 69)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 70)!; }, codec: SseCodec( decodeSuccessData: @@ -2573,7 +2607,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_list_prim_u_8_loose(bytes, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 70)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 71)!; }, codec: SseCodec( decodeSuccessData: @@ -2609,7 +2643,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( tags, serializer); sse_encode_String(content, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 71)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 72)!; }, codec: SseCodec( decodeSuccessData: @@ -2634,7 +2668,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(id, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 72)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 73)!; }, codec: SseCodec( decodeSuccessData: @@ -2660,7 +2694,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 73)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 74)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2685,7 +2719,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 74)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 75)!; }, codec: SseCodec( decodeSuccessData: sse_decode_list_prim_u_8_strict, @@ -2710,7 +2744,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 75)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 76)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2735,7 +2769,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 76)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 77)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2760,7 +2794,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 77)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 78)!; }, codec: SseCodec( decodeSuccessData: sse_decode_list_String, @@ -2785,7 +2819,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 78)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 79)!; }, codec: SseCodec( decodeSuccessData: sse_decode_opt_String, @@ -2810,7 +2844,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 79)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 80)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2835,7 +2869,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 80)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 81)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2860,7 +2894,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 81)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 82)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2885,7 +2919,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 82)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 83)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2909,7 +2943,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_list_String(tag, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 83)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 84)!; }, codec: SseCodec( decodeSuccessData: @@ -2935,7 +2969,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 84)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 85)!; }, codec: SseCodec( decodeSuccessData: sse_decode_list_String, @@ -2962,7 +2996,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( that, serializer); sse_encode_String(sig, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 85)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 86)!; }, codec: SseCodec( decodeSuccessData: @@ -2991,7 +3025,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 86)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 87)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3018,7 +3052,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 87)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 88)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3046,7 +3080,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 88)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 89)!; }, codec: SseCodec( decodeSuccessData: @@ -3074,7 +3108,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 89)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 90)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3101,7 +3135,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 90)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 91)!; }, codec: SseCodec( decodeSuccessData: sse_decode_u_64, @@ -3127,7 +3161,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(json, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 91)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 92)!; }, codec: SseCodec( decodeSuccessData: @@ -3155,7 +3189,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 92)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 93)!; }, codec: SseCodec( decodeSuccessData: @@ -3182,7 +3216,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 93)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 94)!; }, codec: SseCodec( decodeSuccessData: sse_decode_u_16, @@ -3208,7 +3242,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 94)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 95)!; }, codec: SseCodec( decodeSuccessData: @@ -3232,7 +3266,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 95)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 96)!; }, codec: SseCodec( decodeSuccessData: @@ -3258,7 +3292,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( secretKey, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 96)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 97)!; }, codec: SseCodec( decodeSuccessData: @@ -3282,7 +3316,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(secretKey, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 97)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 98)!; }, codec: SseCodec( decodeSuccessData: @@ -3308,7 +3342,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 98)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 99)!; }, codec: SseCodec( decodeSuccessData: @@ -3334,7 +3368,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 99)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 100)!; }, codec: SseCodec( decodeSuccessData: @@ -3360,7 +3394,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_list_prim_u_8_loose(publicKey, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 100)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 101)!; }, codec: SseCodec( decodeSuccessData: @@ -3386,7 +3420,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(publicKey, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 101)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 102)!; }, codec: SseCodec( decodeSuccessData: @@ -3413,7 +3447,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 102)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 103)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3438,7 +3472,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 103)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 104)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3464,7 +3498,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 104)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 105)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3489,7 +3523,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_list_prim_u_8_loose(secretKey, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 105)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 106)!; }, codec: SseCodec( decodeSuccessData: @@ -3513,7 +3547,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 106)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 107)!; }, codec: SseCodec( decodeSuccessData: @@ -3539,7 +3573,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(secretKey, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 107)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 108)!; }, codec: SseCodec( decodeSuccessData: @@ -3566,7 +3600,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 108)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 109)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3592,7 +3626,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SecretKey( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 109)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 110)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3622,7 +3656,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( giftWrap, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 110, port: port_); + funcId: 111, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -3650,7 +3684,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnwrappedGift( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 111)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 112)!; }, codec: SseCodec( decodeSuccessData: @@ -3677,7 +3711,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnwrappedGift( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 112)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 113)!; }, codec: SseCodec( decodeSuccessData: @@ -3704,7 +3738,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_NostrSigner( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 113)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 114)!; }, codec: SseCodec( decodeSuccessData: sse_decode_signer_backend, @@ -3731,7 +3765,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_NostrSigner( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 114, port: port_); + funcId: 115, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -3757,7 +3791,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Keys( keys, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 115)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 116)!; }, codec: SseCodec( decodeSuccessData: @@ -3790,7 +3824,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { publicKey, serializer); sse_encode_String(encryptedContent, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 116, port: port_); + funcId: 117, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3822,7 +3856,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { publicKey, serializer); sse_encode_String(content, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 117, port: port_); + funcId: 118, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3854,7 +3888,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { publicKey, serializer); sse_encode_String(payload, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 118, port: port_); + funcId: 119, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3886,7 +3920,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { publicKey, serializer); sse_encode_String(content, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 119, port: port_); + funcId: 120, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3915,7 +3949,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( unsignedEvent, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 120, port: port_); + funcId: 121, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -3941,7 +3975,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 121)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 122)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3969,7 +4003,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( author, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 122)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 123)!; }, codec: SseCodec( decodeSuccessData: @@ -3998,7 +4032,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( authors, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 123)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 124)!; }, codec: SseCodec( decodeSuccessData: @@ -4030,7 +4064,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( tag, serializer); sse_encode_list_String(content, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 124)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 125)!; }, codec: SseCodec( decodeSuccessData: @@ -4059,7 +4093,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( id, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 125)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 126)!; }, codec: SseCodec( decodeSuccessData: @@ -4088,7 +4122,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( ids, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 126)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 127)!; }, codec: SseCodec( decodeSuccessData: @@ -4113,7 +4147,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(json, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 127)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 128)!; }, codec: SseCodec( decodeSuccessData: @@ -4141,7 +4175,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_String(hashtag, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 128)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 129)!; }, codec: SseCodec( decodeSuccessData: @@ -4169,7 +4203,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_list_String(hashtags, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 129)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 130)!; }, codec: SseCodec( decodeSuccessData: @@ -4198,7 +4232,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( id, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 130)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 131)!; }, codec: SseCodec( decodeSuccessData: @@ -4226,7 +4260,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_String(identifier, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 131)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 132)!; }, codec: SseCodec( decodeSuccessData: @@ -4254,7 +4288,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_list_String(identifiers, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 132)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 133)!; }, codec: SseCodec( decodeSuccessData: @@ -4283,7 +4317,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( ids, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 133)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 134)!; }, codec: SseCodec( decodeSuccessData: @@ -4309,7 +4343,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 134)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 135)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -4336,7 +4370,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_u_16(kind, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 135)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 136)!; }, codec: SseCodec( decodeSuccessData: @@ -4364,7 +4398,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_list_prim_u_16_loose(kinds, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 136)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 137)!; }, codec: SseCodec( decodeSuccessData: @@ -4392,7 +4426,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_u_64(limit, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 137)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 138)!; }, codec: SseCodec( decodeSuccessData: @@ -4421,7 +4455,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( event, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 138)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 139)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -4444,7 +4478,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 139)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 140)!; }, codec: SseCodec( decodeSuccessData: @@ -4473,7 +4507,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( pubkey, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 140)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 141)!; }, codec: SseCodec( decodeSuccessData: @@ -4502,7 +4536,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( pubkeys, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 141)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 142)!; }, codec: SseCodec( decodeSuccessData: @@ -4530,7 +4564,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_String(reference, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 142)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 143)!; }, codec: SseCodec( decodeSuccessData: @@ -4558,7 +4592,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_list_String(references, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 143)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 144)!; }, codec: SseCodec( decodeSuccessData: @@ -4587,7 +4621,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( authors, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 144)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 145)!; }, codec: SseCodec( decodeSuccessData: @@ -4619,7 +4653,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( tag, serializer); sse_encode_list_String(content, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 145)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 146)!; }, codec: SseCodec( decodeSuccessData: @@ -4649,7 +4683,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( ids, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 146)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 147)!; }, codec: SseCodec( decodeSuccessData: @@ -4677,7 +4711,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_list_String(hashtags, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 147)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 148)!; }, codec: SseCodec( decodeSuccessData: @@ -4705,7 +4739,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_list_String(identifiers, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 148)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 149)!; }, codec: SseCodec( decodeSuccessData: @@ -4735,7 +4769,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( ids, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 149)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 150)!; }, codec: SseCodec( decodeSuccessData: @@ -4763,7 +4797,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_list_prim_u_16_loose(kinds, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 150)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 151)!; }, codec: SseCodec( decodeSuccessData: @@ -4789,7 +4823,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 151)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 152)!; }, codec: SseCodec( decodeSuccessData: @@ -4818,7 +4852,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( pubkeys, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 152)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 153)!; }, codec: SseCodec( decodeSuccessData: @@ -4846,7 +4880,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_list_String(references, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 153)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 154)!; }, codec: SseCodec( decodeSuccessData: @@ -4873,7 +4907,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 154)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 155)!; }, codec: SseCodec( decodeSuccessData: @@ -4899,7 +4933,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 155)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 156)!; }, codec: SseCodec( decodeSuccessData: @@ -4925,7 +4959,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 156)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 157)!; }, codec: SseCodec( decodeSuccessData: @@ -4953,7 +4987,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_String(text, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 157)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 158)!; }, codec: SseCodec( decodeSuccessData: @@ -4981,7 +5015,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_u_64(timestamp, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 158)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 159)!; }, codec: SseCodec( decodeSuccessData: @@ -5009,7 +5043,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_u_64(timestamp, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 159)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 160)!; }, codec: SseCodec( decodeSuccessData: @@ -5036,7 +5070,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 160)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 161)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -5064,7 +5098,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 161)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 162)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -5091,7 +5125,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_alphabet(character, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 162)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 163)!; }, codec: SseCodec( decodeSuccessData: @@ -5118,7 +5152,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_alphabet(character, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 163)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 164)!; }, codec: SseCodec( decodeSuccessData: @@ -5266,6 +5300,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return AnyhowException(raw as String); } + @protected + Event + dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + raw); + } + @protected Client dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( @@ -5666,6 +5709,13 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return Set.from(dco_decode_list_String(raw)); } + @protected + RustStreamSink + dco_decode_StreamSink_relay_pool_notification_Sse(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + throw UnimplementedError(); + } + @protected String dco_decode_String(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -5857,6 +5907,30 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { ); } + @protected + RelayPoolNotification dco_decode_relay_pool_notification(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return RelayPoolNotification_Event( + relayUrl: dco_decode_String(raw[1]), + subscriptionId: dco_decode_String(raw[2]), + event: + dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + raw[3]), + ); + case 1: + return RelayPoolNotification_Message( + relayUrl: dco_decode_String(raw[1]), + message: dco_decode_String(raw[2]), + ); + case 2: + return RelayPoolNotification_Shutdown(); + default: + throw Exception("unreachable"); + } + } + @protected SendEventOutput dco_decode_send_event_output(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -5926,6 +6000,17 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return AnyhowException(inner); } + @protected + Event + sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + deserializer); + return inner; + } + @protected Client sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( @@ -6377,6 +6462,14 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return Set.from(inner); } + @protected + RustStreamSink + sse_decode_StreamSink_relay_pool_notification_Sse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + throw UnimplementedError('Unreachable ()'); + } + @protected String sse_decode_String(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6618,6 +6711,35 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return (var_field0, var_field1); } + @protected + RelayPoolNotification sse_decode_relay_pool_notification( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_relayUrl = sse_decode_String(deserializer); + var var_subscriptionId = sse_decode_String(deserializer); + var var_event = + sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + deserializer); + return RelayPoolNotification_Event( + relayUrl: var_relayUrl, + subscriptionId: var_subscriptionId, + event: var_event); + case 1: + var var_relayUrl = sse_decode_String(deserializer); + var var_message = sse_decode_String(deserializer); + return RelayPoolNotification_Message( + relayUrl: var_relayUrl, message: var_message); + case 2: + return RelayPoolNotification_Shutdown(); + default: + throw UnimplementedError(''); + } + } + @protected SendEventOutput sse_decode_send_event_output(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6684,6 +6806,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_String(self.message, serializer); } + @protected + void + sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + Event self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + self, serializer); + } + @protected void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( @@ -7155,6 +7286,19 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_list_String(self.toList(), serializer); } + @protected + void sse_encode_StreamSink_relay_pool_notification_Sse( + RustStreamSink self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String( + self.setupAndSerialize( + codec: SseCodec( + decodeSuccessData: sse_decode_relay_pool_notification, + decodeErrorData: sse_decode_AnyhowException, + )), + serializer); + } + @protected void sse_encode_String(String self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -7370,6 +7514,35 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_String(self.$2, serializer); } + @protected + void sse_encode_relay_pool_notification( + RelayPoolNotification self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case RelayPoolNotification_Event( + relayUrl: final relayUrl, + subscriptionId: final subscriptionId, + event: final event + ): + sse_encode_i_32(0, serializer); + sse_encode_String(relayUrl, serializer); + sse_encode_String(subscriptionId, serializer); + sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + event, serializer); + case RelayPoolNotification_Message( + relayUrl: final relayUrl, + message: final message + ): + sse_encode_i_32(1, serializer); + sse_encode_String(relayUrl, serializer); + sse_encode_String(message, serializer); + case RelayPoolNotification_Shutdown(): + sse_encode_i_32(2, serializer); + default: + throw UnimplementedError(''); + } + } + @protected void sse_encode_send_event_output( SendEventOutput self, SseSerializer serializer) { @@ -7561,6 +7734,11 @@ class ClientImpl extends RustOpaque implements Client { Future forceRemoveRelay({required String url}) => NostrSdk.instance.api .crateApiClientClientForceRemoveRelay(that: this, url: url); + Stream handleNotifications() => + NostrSdk.instance.api.crateApiClientClientHandleNotifications( + that: this, + ); + /// Check if signer is configured Future hasSigner() => NostrSdk.instance.api.crateApiClientClientHasSigner( diff --git a/lib/src/rust/frb_generated.io.dart b/lib/src/rust/frb_generated.io.dart index 998303e..e9524f4 100644 --- a/lib/src/rust/frb_generated.io.dart +++ b/lib/src/rust/frb_generated.io.dart @@ -5,6 +5,7 @@ import 'api/client.dart'; import 'api/client/builder.dart'; +import 'api/client/notification.dart'; import 'api/client/options.dart'; import 'api/client/output.dart'; import 'api/protocol/event.dart'; @@ -91,6 +92,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected AnyhowException dco_decode_AnyhowException(dynamic raw); + @protected + Event + dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + dynamic raw); + @protected Client dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( @@ -337,6 +343,10 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected Set dco_decode_Set_String(dynamic raw); + @protected + RustStreamSink + dco_decode_StreamSink_relay_pool_notification_Sse(dynamic raw); + @protected String dco_decode_String(dynamic raw); @@ -420,6 +430,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected (String, String) dco_decode_record_string_string(dynamic raw); + @protected + RelayPoolNotification dco_decode_relay_pool_notification(dynamic raw); + @protected SendEventOutput dco_decode_send_event_output(dynamic raw); @@ -444,6 +457,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer); + @protected + Event + sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + SseDeserializer deserializer); + @protected Client sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( @@ -691,6 +709,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected Set sse_decode_Set_String(SseDeserializer deserializer); + @protected + RustStreamSink + sse_decode_StreamSink_relay_pool_notification_Sse( + SseDeserializer deserializer); + @protected String sse_decode_String(SseDeserializer deserializer); @@ -777,6 +800,10 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { (String, String) sse_decode_record_string_string( SseDeserializer deserializer); + @protected + RelayPoolNotification sse_decode_relay_pool_notification( + SseDeserializer deserializer); + @protected SendEventOutput sse_decode_send_event_output(SseDeserializer deserializer); @@ -802,6 +829,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { void sse_encode_AnyhowException( AnyhowException self, SseSerializer serializer); + @protected + void + sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + Event self, SseSerializer serializer); + @protected void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( @@ -1052,6 +1084,10 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected void sse_encode_Set_String(Set self, SseSerializer serializer); + @protected + void sse_encode_StreamSink_relay_pool_notification_Sse( + RustStreamSink self, SseSerializer serializer); + @protected void sse_encode_String(String self, SseSerializer serializer); @@ -1143,6 +1179,10 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { void sse_encode_record_string_string( (String, String) self, SseSerializer serializer); + @protected + void sse_encode_relay_pool_notification( + RelayPoolNotification self, SseSerializer serializer); + @protected void sse_encode_send_event_output( SendEventOutput self, SseSerializer serializer); diff --git a/lib/src/rust/frb_generated.web.dart b/lib/src/rust/frb_generated.web.dart index 8d70dd2..cef86e7 100644 --- a/lib/src/rust/frb_generated.web.dart +++ b/lib/src/rust/frb_generated.web.dart @@ -8,6 +8,7 @@ import 'api/client.dart'; import 'api/client/builder.dart'; +import 'api/client/notification.dart'; import 'api/client/options.dart'; import 'api/client/output.dart'; import 'api/protocol/event.dart'; @@ -93,6 +94,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected AnyhowException dco_decode_AnyhowException(dynamic raw); + @protected + Event + dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + dynamic raw); + @protected Client dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( @@ -339,6 +345,10 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected Set dco_decode_Set_String(dynamic raw); + @protected + RustStreamSink + dco_decode_StreamSink_relay_pool_notification_Sse(dynamic raw); + @protected String dco_decode_String(dynamic raw); @@ -422,6 +432,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected (String, String) dco_decode_record_string_string(dynamic raw); + @protected + RelayPoolNotification dco_decode_relay_pool_notification(dynamic raw); + @protected SendEventOutput dco_decode_send_event_output(dynamic raw); @@ -446,6 +459,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer); + @protected + Event + sse_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + SseDeserializer deserializer); + @protected Client sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( @@ -693,6 +711,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected Set sse_decode_Set_String(SseDeserializer deserializer); + @protected + RustStreamSink + sse_decode_StreamSink_relay_pool_notification_Sse( + SseDeserializer deserializer); + @protected String sse_decode_String(SseDeserializer deserializer); @@ -779,6 +802,10 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { (String, String) sse_decode_record_string_string( SseDeserializer deserializer); + @protected + RelayPoolNotification sse_decode_relay_pool_notification( + SseDeserializer deserializer); + @protected SendEventOutput sse_decode_send_event_output(SseDeserializer deserializer); @@ -804,6 +831,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { void sse_encode_AnyhowException( AnyhowException self, SseSerializer serializer); + @protected + void + sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + Event self, SseSerializer serializer); + @protected void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( @@ -1054,6 +1086,10 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected void sse_encode_Set_String(Set self, SseSerializer serializer); + @protected + void sse_encode_StreamSink_relay_pool_notification_Sse( + RustStreamSink self, SseSerializer serializer); + @protected void sse_encode_String(String self, SseSerializer serializer); @@ -1145,6 +1181,10 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { void sse_encode_record_string_string( (String, String) self, SseSerializer serializer); + @protected + void sse_encode_relay_pool_notification( + RelayPoolNotification self, SseSerializer serializer); + @protected void sse_encode_send_event_output( SendEventOutput self, SseSerializer serializer); diff --git a/rust/src/api/client/mod.rs b/rust/src/api/client/mod.rs index 2dff0d0..18e8a0a 100644 --- a/rust/src/api/client/mod.rs +++ b/rust/src/api/client/mod.rs @@ -8,15 +8,18 @@ use flutter_rust_bridge::frb; use nostr_sdk::prelude::*; pub mod builder; +pub mod notification; pub mod options; pub mod output; use self::builder::_ClientBuilder; +use self::notification::RelayPoolNotification; use self::output::SendEventOutput; use super::protocol::event::_Event; use super::protocol::event::builder::_EventBuilder; use super::protocol::signer::_NostrSigner; use super::protocol::types::filter::_Filter; +use crate::frb_generated::StreamSink; #[frb(name = "Client")] pub struct _Client { @@ -217,4 +220,18 @@ impl _Client { let output = self.inner.send_event_builder(builder.inner).await?; Ok(output.into()) } + + pub async fn handle_notifications( + &self, + stream: StreamSink, + ) -> Result<()> { + self.inner + .handle_notifications(|notification| async { + let notification: RelayPoolNotification = notification.into(); + stream.add(notification).map_err(|e| anyhow::anyhow!(e))?; + Ok(false) + }) + .await?; + Ok(()) + } } diff --git a/rust/src/api/client/notification.rs b/rust/src/api/client/notification.rs new file mode 100644 index 0000000..d8c2a83 --- /dev/null +++ b/rust/src/api/client/notification.rs @@ -0,0 +1,53 @@ +// Copyright (c) 2022-2023 Yuki Kishimoto +// Copyright (c) 2023-2024 Rust Nostr Developers +// Distributed under the MIT software license + +use nostr_sdk::{pool, JsonUtil}; + +use crate::api::protocol::event::_Event; +use crate::frb_generated::RustAutoOpaque; + +pub enum RelayPoolNotification { + /// Received an [`Event`]. Does not include events sent by this client. + Event { + /// Relay url + relay_url: String, + /// Subscription ID + subscription_id: String, + /// Event + event: RustAutoOpaque<_Event>, + }, + /// Received a [`RelayMessage`]. Includes messages wrapping events that were sent by this client. + Message { + /// Relay url + relay_url: String, + /// Relay Message + message: String, + }, + /// Shutdown + /// + /// This notification variant is sent after [`Client::shutdown`] method is called and all connections have been closed. + Shutdown, +} + +impl From for RelayPoolNotification { + fn from(notification: pool::RelayPoolNotification) -> Self { + match notification { + pool::RelayPoolNotification::Event { + relay_url, + subscription_id, + event, + } => Self::Event { + relay_url: relay_url.to_string(), + subscription_id: subscription_id.to_string(), + event: RustAutoOpaque::new((*event).into()), + }, + pool::RelayPoolNotification::Message { relay_url, message } => Self::Message { + relay_url: relay_url.to_string(), + message: message.as_json(), + }, + pool::RelayPoolNotification::Shutdown => Self::Shutdown, + _ => unreachable!(), + } + } +} diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs index 9d3cdd6..30ea494 100644 --- a/rust/src/frb_generated.rs +++ b/rust/src/frb_generated.rs @@ -51,7 +51,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_auto_opaque = RustAutoOpaqueMoi, ); pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -1770317176; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -781178950; // Section: executor @@ -820,6 +820,69 @@ fn wire__crate__api__client__Client_force_remove_relay_impl( }, ) } +fn wire__crate__api__client__Client_handle_notifications_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "Client_handle_notifications", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let message = unsafe { + flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire( + ptr_, + rust_vec_len_, + data_len_, + ) + }; + let mut deserializer = + flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let api_that = , + >>::sse_decode(&mut deserializer); + let api_stream = >::sse_decode(&mut deserializer); + deserializer.end(); + move |context| async move { + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || async move { + let mut api_that_guard = None; + let decode_indices_ = + flutter_rust_bridge::for_generated::lockable_compute_decode_order( + vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new( + &api_that, 0, false, + )], + ); + for i in decode_indices_ { + match i { + 0 => { + api_that_guard = + Some(api_that.lockable_decode_async_ref().await) + } + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = crate::api::client::_Client::handle_notifications( + &*api_that_guard, + api_stream, + ) + .await?; + Ok(output_ok) + })() + .await, + ) + } + }, + ) +} fn wire__crate__api__client__Client_has_signer_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, @@ -8249,6 +8312,16 @@ impl SseDecode for flutter_rust_bridge::for_generated::anyhow::Error { } } +impl SseDecode for RustAutoOpaqueMoi<_Event> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = , + >>::sse_decode(deserializer); + return flutter_rust_bridge::for_generated::rust_auto_opaque_explicit_decode(inner); + } +} + impl SseDecode for _Client { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -8583,6 +8656,19 @@ impl SseDecode for std::collections::HashSet { } } +impl SseDecode + for StreamSink< + crate::api::client::notification::RelayPoolNotification, + flutter_rust_bridge::for_generated::SseCodec, + > +{ + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return StreamSink::deserialize(inner); + } +} + impl SseDecode for String { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -8824,6 +8910,39 @@ impl SseDecode for (String, String) { } } +impl SseDecode for crate::api::client::notification::RelayPoolNotification { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_relayUrl = ::sse_decode(deserializer); + let mut var_subscriptionId = ::sse_decode(deserializer); + let mut var_event = >::sse_decode(deserializer); + return crate::api::client::notification::RelayPoolNotification::Event { + relay_url: var_relayUrl, + subscription_id: var_subscriptionId, + event: var_event, + }; + } + 1 => { + let mut var_relayUrl = ::sse_decode(deserializer); + let mut var_message = ::sse_decode(deserializer); + return crate::api::client::notification::RelayPoolNotification::Message { + relay_url: var_relayUrl, + message: var_message, + }; + } + 2 => { + return crate::api::client::notification::RelayPoolNotification::Shutdown; + } + _ => { + unimplemented!(""); + } + } + } +} + impl SseDecode for crate::api::client::output::SendEventOutput { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -8941,87 +9060,93 @@ fn pde_ffi_dispatcher_primary_impl( rust_vec_len, data_len, ), - 15 => wire__crate__api__client__Client_has_signer_impl(port, ptr, rust_vec_len, data_len), - 17 => wire__crate__api__client__Client_remove_all_relays_impl( + 15 => wire__crate__api__client__Client_handle_notifications_impl( port, ptr, rust_vec_len, data_len, ), - 18 => wire__crate__api__client__Client_remove_relay_impl(port, ptr, rust_vec_len, data_len), - 19 => wire__crate__api__client__Client_reset_impl(port, ptr, rust_vec_len, data_len), - 20 => wire__crate__api__client__Client_send_event_impl(port, ptr, rust_vec_len, data_len), - 21 => wire__crate__api__client__Client_send_event_builder_impl( + 16 => wire__crate__api__client__Client_has_signer_impl(port, ptr, rust_vec_len, data_len), + 18 => wire__crate__api__client__Client_remove_all_relays_impl( port, ptr, rust_vec_len, data_len, ), - 22 => wire__crate__api__client__Client_set_signer_impl(port, ptr, rust_vec_len, data_len), - 23 => wire__crate__api__client__Client_shutdown_impl(port, ptr, rust_vec_len, data_len), - 24 => wire__crate__api__client__Client_signer_impl(port, ptr, rust_vec_len, data_len), - 25 => wire__crate__api__client__Client_unset_signer_impl(port, ptr, rust_vec_len, data_len), - 59 => wire__crate__api__protocol__event__builder__EventBuilder_gift_wrap_impl( + 19 => wire__crate__api__client__Client_remove_relay_impl(port, ptr, rust_vec_len, data_len), + 20 => wire__crate__api__client__Client_reset_impl(port, ptr, rust_vec_len, data_len), + 21 => wire__crate__api__client__Client_send_event_impl(port, ptr, rust_vec_len, data_len), + 22 => wire__crate__api__client__Client_send_event_builder_impl( port, ptr, rust_vec_len, data_len, ), - 63 => wire__crate__api__protocol__event__builder__EventBuilder_private_msg_impl( + 23 => wire__crate__api__client__Client_set_signer_impl(port, ptr, rust_vec_len, data_len), + 24 => wire__crate__api__client__Client_shutdown_impl(port, ptr, rust_vec_len, data_len), + 25 => wire__crate__api__client__Client_signer_impl(port, ptr, rust_vec_len, data_len), + 26 => wire__crate__api__client__Client_unset_signer_impl(port, ptr, rust_vec_len, data_len), + 60 => wire__crate__api__protocol__event__builder__EventBuilder_gift_wrap_impl( port, ptr, rust_vec_len, data_len, ), - 64 => wire__crate__api__protocol__event__builder__EventBuilder_seal_impl( + 64 => wire__crate__api__protocol__event__builder__EventBuilder_private_msg_impl( port, ptr, rust_vec_len, data_len, ), - 65 => wire__crate__api__protocol__event__builder__EventBuilder_sign_impl( + 65 => wire__crate__api__protocol__event__builder__EventBuilder_seal_impl( port, ptr, rust_vec_len, data_len, ), - 110 => wire__crate__api__protocol__nips__nip59__UnwrappedGift_from_gift_wrap_impl( + 66 => wire__crate__api__protocol__event__builder__EventBuilder_sign_impl( port, ptr, rust_vec_len, data_len, ), - 114 => wire__crate__api__protocol__signer__NostrSigner_get_public_key_impl( + 111 => wire__crate__api__protocol__nips__nip59__UnwrappedGift_from_gift_wrap_impl( port, ptr, rust_vec_len, data_len, ), - 116 => wire__crate__api__protocol__signer__NostrSigner_nip04_decrypt_impl( + 115 => wire__crate__api__protocol__signer__NostrSigner_get_public_key_impl( port, ptr, rust_vec_len, data_len, ), - 117 => wire__crate__api__protocol__signer__NostrSigner_nip04_encrypt_impl( + 117 => wire__crate__api__protocol__signer__NostrSigner_nip04_decrypt_impl( port, ptr, rust_vec_len, data_len, ), - 118 => wire__crate__api__protocol__signer__NostrSigner_nip44_decrypt_impl( + 118 => wire__crate__api__protocol__signer__NostrSigner_nip04_encrypt_impl( port, ptr, rust_vec_len, data_len, ), - 119 => wire__crate__api__protocol__signer__NostrSigner_nip44_encrypt_impl( + 119 => wire__crate__api__protocol__signer__NostrSigner_nip44_decrypt_impl( port, ptr, rust_vec_len, data_len, ), - 120 => wire__crate__api__protocol__signer__NostrSigner_sign_event_impl( + 120 => wire__crate__api__protocol__signer__NostrSigner_nip44_encrypt_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 121 => wire__crate__api__protocol__signer__NostrSigner_sign_event_impl( port, ptr, rust_vec_len, @@ -9045,502 +9170,502 @@ fn pde_ffi_dispatcher_sync_impl( data_len, ), 7 => wire__crate__api__client__Client_builder_impl(ptr, rust_vec_len, data_len), - 16 => wire__crate__api__client__Client_new_impl(ptr, rust_vec_len, data_len), - 26 => { + 17 => wire__crate__api__client__Client_new_impl(ptr, rust_vec_len, data_len), + 27 => { wire__crate__api__client__builder__ClientBuilder_build_impl(ptr, rust_vec_len, data_len) } - 27 => { + 28 => { wire__crate__api__client__builder__ClientBuilder_new_impl(ptr, rust_vec_len, data_len) } - 28 => { + 29 => { wire__crate__api__client__builder__ClientBuilder_opts_impl(ptr, rust_vec_len, data_len) } - 29 => wire__crate__api__client__builder__ClientBuilder_signer_impl( + 30 => wire__crate__api__client__builder__ClientBuilder_signer_impl( ptr, rust_vec_len, data_len, ), - 30 => wire__crate__api__client__options__ClientOptions_autoconnect_impl( + 31 => wire__crate__api__client__options__ClientOptions_autoconnect_impl( ptr, rust_vec_len, data_len, ), - 31 => wire__crate__api__client__options__ClientOptions_automatic_authentication_impl( + 32 => wire__crate__api__client__options__ClientOptions_automatic_authentication_impl( ptr, rust_vec_len, data_len, ), - 32 => wire__crate__api__client__options__ClientOptions_connection_impl( + 33 => wire__crate__api__client__options__ClientOptions_connection_impl( ptr, rust_vec_len, data_len, ), - 33 => wire__crate__api__client__options__ClientOptions_gossip_impl( + 34 => wire__crate__api__client__options__ClientOptions_gossip_impl( ptr, rust_vec_len, data_len, ), - 34 => wire__crate__api__client__options__ClientOptions_min_pow_impl( + 35 => wire__crate__api__client__options__ClientOptions_min_pow_impl( ptr, rust_vec_len, data_len, ), - 35 => { + 36 => { wire__crate__api__client__options__ClientOptions_new_impl(ptr, rust_vec_len, data_len) } - 36 => wire__crate__api__client__options__Connection_addr_impl(ptr, rust_vec_len, data_len), - 37 => wire__crate__api__client__options__Connection_embedded_tor_impl( + 37 => wire__crate__api__client__options__Connection_addr_impl(ptr, rust_vec_len, data_len), + 38 => wire__crate__api__client__options__Connection_embedded_tor_impl( ptr, rust_vec_len, data_len, ), - 38 => wire__crate__api__client__options__Connection_embedded_tor_with_path_impl( + 39 => wire__crate__api__client__options__Connection_embedded_tor_with_path_impl( ptr, rust_vec_len, data_len, ), - 39 => wire__crate__api__client__options__Connection_mode_impl(ptr, rust_vec_len, data_len), - 40 => wire__crate__api__client__options__Connection_new_impl(ptr, rust_vec_len, data_len), - 41 => { + 40 => wire__crate__api__client__options__Connection_mode_impl(ptr, rust_vec_len, data_len), + 41 => wire__crate__api__client__options__Connection_new_impl(ptr, rust_vec_len, data_len), + 42 => { wire__crate__api__client__options__Connection_target_impl(ptr, rust_vec_len, data_len) } - 42 => wire__crate__api__protocol__event__Event_as_json_impl(ptr, rust_vec_len, data_len), - 43 => wire__crate__api__protocol__event__Event_as_pretty_json_impl( + 43 => wire__crate__api__protocol__event__Event_as_json_impl(ptr, rust_vec_len, data_len), + 44 => wire__crate__api__protocol__event__Event_as_pretty_json_impl( ptr, rust_vec_len, data_len, ), - 44 => wire__crate__api__protocol__event__Event_author_impl(ptr, rust_vec_len, data_len), - 45 => wire__crate__api__protocol__event__Event_content_impl(ptr, rust_vec_len, data_len), - 46 => wire__crate__api__protocol__event__Event_created_at_impl(ptr, rust_vec_len, data_len), - 47 => wire__crate__api__protocol__event__Event_from_json_impl(ptr, rust_vec_len, data_len), - 48 => wire__crate__api__protocol__event__Event_id_impl(ptr, rust_vec_len, data_len), - 49 => wire__crate__api__protocol__event__Event_is_expired_impl(ptr, rust_vec_len, data_len), - 50 => { + 45 => wire__crate__api__protocol__event__Event_author_impl(ptr, rust_vec_len, data_len), + 46 => wire__crate__api__protocol__event__Event_content_impl(ptr, rust_vec_len, data_len), + 47 => wire__crate__api__protocol__event__Event_created_at_impl(ptr, rust_vec_len, data_len), + 48 => wire__crate__api__protocol__event__Event_from_json_impl(ptr, rust_vec_len, data_len), + 49 => wire__crate__api__protocol__event__Event_id_impl(ptr, rust_vec_len, data_len), + 50 => wire__crate__api__protocol__event__Event_is_expired_impl(ptr, rust_vec_len, data_len), + 51 => { wire__crate__api__protocol__event__Event_is_protected_impl(ptr, rust_vec_len, data_len) } - 51 => wire__crate__api__protocol__event__Event_kind_impl(ptr, rust_vec_len, data_len), - 52 => wire__crate__api__protocol__event__Event_signature_impl(ptr, rust_vec_len, data_len), - 53 => wire__crate__api__protocol__event__Event_tags_impl(ptr, rust_vec_len, data_len), - 54 => wire__crate__api__protocol__event__Event_verify_impl(ptr, rust_vec_len, data_len), - 55 => wire__crate__api__protocol__event__Event_verify_id_impl(ptr, rust_vec_len, data_len), - 56 => wire__crate__api__protocol__event__Event_verify_signature_impl( + 52 => wire__crate__api__protocol__event__Event_kind_impl(ptr, rust_vec_len, data_len), + 53 => wire__crate__api__protocol__event__Event_signature_impl(ptr, rust_vec_len, data_len), + 54 => wire__crate__api__protocol__event__Event_tags_impl(ptr, rust_vec_len, data_len), + 55 => wire__crate__api__protocol__event__Event_verify_impl(ptr, rust_vec_len, data_len), + 56 => wire__crate__api__protocol__event__Event_verify_id_impl(ptr, rust_vec_len, data_len), + 57 => wire__crate__api__protocol__event__Event_verify_signature_impl( ptr, rust_vec_len, data_len, ), - 57 => wire__crate__api__protocol__event__builder__EventBuilder_build_impl( + 58 => wire__crate__api__protocol__event__builder__EventBuilder_build_impl( ptr, rust_vec_len, data_len, ), - 58 => wire__crate__api__protocol__event__builder__EventBuilder_custom_created_at_impl( + 59 => wire__crate__api__protocol__event__builder__EventBuilder_custom_created_at_impl( ptr, rust_vec_len, data_len, ), - 60 => wire__crate__api__protocol__event__builder__EventBuilder_gift_wrap_from_seal_impl( + 61 => wire__crate__api__protocol__event__builder__EventBuilder_gift_wrap_from_seal_impl( ptr, rust_vec_len, data_len, ), - 61 => wire__crate__api__protocol__event__builder__EventBuilder_new_impl( + 62 => wire__crate__api__protocol__event__builder__EventBuilder_new_impl( ptr, rust_vec_len, data_len, ), - 62 => wire__crate__api__protocol__event__builder__EventBuilder_pow_impl( + 63 => wire__crate__api__protocol__event__builder__EventBuilder_pow_impl( ptr, rust_vec_len, data_len, ), - 66 => wire__crate__api__protocol__event__builder__EventBuilder_sign_with_keys_impl( + 67 => wire__crate__api__protocol__event__builder__EventBuilder_sign_with_keys_impl( ptr, rust_vec_len, data_len, ), - 67 => wire__crate__api__protocol__event__builder__EventBuilder_tag_impl( + 68 => wire__crate__api__protocol__event__builder__EventBuilder_tag_impl( ptr, rust_vec_len, data_len, ), - 68 => wire__crate__api__protocol__event__builder__EventBuilder_tags_impl( + 69 => wire__crate__api__protocol__event__builder__EventBuilder_tags_impl( ptr, rust_vec_len, data_len, ), - 69 => wire__crate__api__protocol__event__builder__EventBuilder_text_note_impl( + 70 => wire__crate__api__protocol__event__builder__EventBuilder_text_note_impl( ptr, rust_vec_len, data_len, ), - 70 => wire__crate__api__protocol__event__id__EventId_from_slice_impl( + 71 => wire__crate__api__protocol__event__id__EventId_from_slice_impl( ptr, rust_vec_len, data_len, ), - 71 => wire__crate__api__protocol__event__id__EventId_new_impl(ptr, rust_vec_len, data_len), - 72 => { + 72 => wire__crate__api__protocol__event__id__EventId_new_impl(ptr, rust_vec_len, data_len), + 73 => { wire__crate__api__protocol__event__id__EventId_parse_impl(ptr, rust_vec_len, data_len) } - 73 => wire__crate__api__protocol__event__id__EventId_to_bech32_impl( + 74 => wire__crate__api__protocol__event__id__EventId_to_bech32_impl( ptr, rust_vec_len, data_len, ), - 74 => wire__crate__api__protocol__event__id__EventId_to_bytes_impl( + 75 => wire__crate__api__protocol__event__id__EventId_to_bytes_impl( ptr, rust_vec_len, data_len, ), - 75 => { + 76 => { wire__crate__api__protocol__event__id__EventId_to_hex_impl(ptr, rust_vec_len, data_len) } - 76 => wire__crate__api__protocol__event__id__EventId_to_nostr_uri_impl( + 77 => wire__crate__api__protocol__event__id__EventId_to_nostr_uri_impl( ptr, rust_vec_len, data_len, ), - 77 => wire__crate__api__protocol__event__tag__Tag_as_vec_impl(ptr, rust_vec_len, data_len), - 78 => wire__crate__api__protocol__event__tag__Tag_content_impl(ptr, rust_vec_len, data_len), - 79 => wire__crate__api__protocol__event__tag__Tag_is_protected_impl( + 78 => wire__crate__api__protocol__event__tag__Tag_as_vec_impl(ptr, rust_vec_len, data_len), + 79 => wire__crate__api__protocol__event__tag__Tag_content_impl(ptr, rust_vec_len, data_len), + 80 => wire__crate__api__protocol__event__tag__Tag_is_protected_impl( ptr, rust_vec_len, data_len, ), - 80 => { + 81 => { wire__crate__api__protocol__event__tag__Tag_is_reply_impl(ptr, rust_vec_len, data_len) } - 81 => wire__crate__api__protocol__event__tag__Tag_is_root_impl(ptr, rust_vec_len, data_len), - 82 => wire__crate__api__protocol__event__tag__Tag_kind_impl(ptr, rust_vec_len, data_len), - 83 => wire__crate__api__protocol__event__tag__Tag_parse_impl(ptr, rust_vec_len, data_len), - 84 => wire__crate__api__protocol__event__tag__Tag_to_vec_impl(ptr, rust_vec_len, data_len), - 85 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_add_signature_impl( + 82 => wire__crate__api__protocol__event__tag__Tag_is_root_impl(ptr, rust_vec_len, data_len), + 83 => wire__crate__api__protocol__event__tag__Tag_kind_impl(ptr, rust_vec_len, data_len), + 84 => wire__crate__api__protocol__event__tag__Tag_parse_impl(ptr, rust_vec_len, data_len), + 85 => wire__crate__api__protocol__event__tag__Tag_to_vec_impl(ptr, rust_vec_len, data_len), + 86 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_add_signature_impl( ptr, rust_vec_len, data_len, ), - 86 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_json_impl( + 87 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_json_impl( ptr, rust_vec_len, data_len, ), - 87 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_pretty_json_impl( + 88 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_pretty_json_impl( ptr, rust_vec_len, data_len, ), - 88 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_author_impl( + 89 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_author_impl( ptr, rust_vec_len, data_len, ), - 89 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_content_impl( + 90 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_content_impl( ptr, rust_vec_len, data_len, ), - 90 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_created_at_impl( + 91 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_created_at_impl( ptr, rust_vec_len, data_len, ), - 91 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_from_json_impl( + 92 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_from_json_impl( ptr, rust_vec_len, data_len, ), - 92 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_id_impl( + 93 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_id_impl( ptr, rust_vec_len, data_len, ), - 93 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_kind_impl( + 94 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_kind_impl( ptr, rust_vec_len, data_len, ), - 94 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_tags_impl( + 95 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_tags_impl( ptr, rust_vec_len, data_len, ), - 95 => wire__crate__api__protocol__key__Keys_generate_impl(ptr, rust_vec_len, data_len), - 96 => wire__crate__api__protocol__key__Keys_new_impl(ptr, rust_vec_len, data_len), - 97 => wire__crate__api__protocol__key__Keys_parse_impl(ptr, rust_vec_len, data_len), - 98 => wire__crate__api__protocol__key__Keys_public_key_impl(ptr, rust_vec_len, data_len), - 99 => wire__crate__api__protocol__key__Keys_secret_key_impl(ptr, rust_vec_len, data_len), - 100 => wire__crate__api__protocol__key__public_key__PublicKey_from_slice_impl( + 96 => wire__crate__api__protocol__key__Keys_generate_impl(ptr, rust_vec_len, data_len), + 97 => wire__crate__api__protocol__key__Keys_new_impl(ptr, rust_vec_len, data_len), + 98 => wire__crate__api__protocol__key__Keys_parse_impl(ptr, rust_vec_len, data_len), + 99 => wire__crate__api__protocol__key__Keys_public_key_impl(ptr, rust_vec_len, data_len), + 100 => wire__crate__api__protocol__key__Keys_secret_key_impl(ptr, rust_vec_len, data_len), + 101 => wire__crate__api__protocol__key__public_key__PublicKey_from_slice_impl( ptr, rust_vec_len, data_len, ), - 101 => wire__crate__api__protocol__key__public_key__PublicKey_parse_impl( + 102 => wire__crate__api__protocol__key__public_key__PublicKey_parse_impl( ptr, rust_vec_len, data_len, ), - 102 => wire__crate__api__protocol__key__public_key__PublicKey_to_bech32_impl( + 103 => wire__crate__api__protocol__key__public_key__PublicKey_to_bech32_impl( ptr, rust_vec_len, data_len, ), - 103 => wire__crate__api__protocol__key__public_key__PublicKey_to_hex_impl( + 104 => wire__crate__api__protocol__key__public_key__PublicKey_to_hex_impl( ptr, rust_vec_len, data_len, ), - 104 => wire__crate__api__protocol__key__public_key__PublicKey_to_nostr_uri_impl( + 105 => wire__crate__api__protocol__key__public_key__PublicKey_to_nostr_uri_impl( ptr, rust_vec_len, data_len, ), - 105 => wire__crate__api__protocol__key__secret_key__SecretKey_from_slice_impl( + 106 => wire__crate__api__protocol__key__secret_key__SecretKey_from_slice_impl( ptr, rust_vec_len, data_len, ), - 106 => wire__crate__api__protocol__key__secret_key__SecretKey_generate_impl( + 107 => wire__crate__api__protocol__key__secret_key__SecretKey_generate_impl( ptr, rust_vec_len, data_len, ), - 107 => wire__crate__api__protocol__key__secret_key__SecretKey_parse_impl( + 108 => wire__crate__api__protocol__key__secret_key__SecretKey_parse_impl( ptr, rust_vec_len, data_len, ), - 108 => wire__crate__api__protocol__key__secret_key__SecretKey_to_bech32_impl( + 109 => wire__crate__api__protocol__key__secret_key__SecretKey_to_bech32_impl( ptr, rust_vec_len, data_len, ), - 109 => wire__crate__api__protocol__key__secret_key__SecretKey_to_secret_hex_impl( + 110 => wire__crate__api__protocol__key__secret_key__SecretKey_to_secret_hex_impl( ptr, rust_vec_len, data_len, ), - 111 => wire__crate__api__protocol__nips__nip59__UnwrappedGift_rumor_impl( + 112 => wire__crate__api__protocol__nips__nip59__UnwrappedGift_rumor_impl( ptr, rust_vec_len, data_len, ), - 112 => wire__crate__api__protocol__nips__nip59__UnwrappedGift_sender_impl( + 113 => wire__crate__api__protocol__nips__nip59__UnwrappedGift_sender_impl( ptr, rust_vec_len, data_len, ), - 113 => wire__crate__api__protocol__signer__NostrSigner_backend_impl( + 114 => wire__crate__api__protocol__signer__NostrSigner_backend_impl( ptr, rust_vec_len, data_len, ), - 115 => { + 116 => { wire__crate__api__protocol__signer__NostrSigner_keys_impl(ptr, rust_vec_len, data_len) } - 121 => wire__crate__api__protocol__types__filter__Filter_as_json_impl( + 122 => wire__crate__api__protocol__types__filter__Filter_as_json_impl( ptr, rust_vec_len, data_len, ), - 122 => wire__crate__api__protocol__types__filter__Filter_author_impl( + 123 => wire__crate__api__protocol__types__filter__Filter_author_impl( ptr, rust_vec_len, data_len, ), - 123 => wire__crate__api__protocol__types__filter__Filter_authors_impl( + 124 => wire__crate__api__protocol__types__filter__Filter_authors_impl( ptr, rust_vec_len, data_len, ), - 124 => wire__crate__api__protocol__types__filter__Filter_custom_tag_impl( + 125 => wire__crate__api__protocol__types__filter__Filter_custom_tag_impl( ptr, rust_vec_len, data_len, ), - 125 => wire__crate__api__protocol__types__filter__Filter_event_impl( + 126 => wire__crate__api__protocol__types__filter__Filter_event_impl( ptr, rust_vec_len, data_len, ), - 126 => wire__crate__api__protocol__types__filter__Filter_events_impl( + 127 => wire__crate__api__protocol__types__filter__Filter_events_impl( ptr, rust_vec_len, data_len, ), - 127 => wire__crate__api__protocol__types__filter__Filter_from_json_impl( + 128 => wire__crate__api__protocol__types__filter__Filter_from_json_impl( ptr, rust_vec_len, data_len, ), - 128 => wire__crate__api__protocol__types__filter__Filter_hashtag_impl( + 129 => wire__crate__api__protocol__types__filter__Filter_hashtag_impl( ptr, rust_vec_len, data_len, ), - 129 => wire__crate__api__protocol__types__filter__Filter_hashtags_impl( + 130 => wire__crate__api__protocol__types__filter__Filter_hashtags_impl( ptr, rust_vec_len, data_len, ), - 130 => { + 131 => { wire__crate__api__protocol__types__filter__Filter_id_impl(ptr, rust_vec_len, data_len) } - 131 => wire__crate__api__protocol__types__filter__Filter_identifier_impl( + 132 => wire__crate__api__protocol__types__filter__Filter_identifier_impl( ptr, rust_vec_len, data_len, ), - 132 => wire__crate__api__protocol__types__filter__Filter_identifiers_impl( + 133 => wire__crate__api__protocol__types__filter__Filter_identifiers_impl( ptr, rust_vec_len, data_len, ), - 133 => { + 134 => { wire__crate__api__protocol__types__filter__Filter_ids_impl(ptr, rust_vec_len, data_len) } - 134 => wire__crate__api__protocol__types__filter__Filter_is_empty_impl( + 135 => wire__crate__api__protocol__types__filter__Filter_is_empty_impl( ptr, rust_vec_len, data_len, ), - 135 => { + 136 => { wire__crate__api__protocol__types__filter__Filter_kind_impl(ptr, rust_vec_len, data_len) } - 136 => wire__crate__api__protocol__types__filter__Filter_kinds_impl( + 137 => wire__crate__api__protocol__types__filter__Filter_kinds_impl( ptr, rust_vec_len, data_len, ), - 137 => wire__crate__api__protocol__types__filter__Filter_limit_impl( + 138 => wire__crate__api__protocol__types__filter__Filter_limit_impl( ptr, rust_vec_len, data_len, ), - 138 => wire__crate__api__protocol__types__filter__Filter_match_event_impl( + 139 => wire__crate__api__protocol__types__filter__Filter_match_event_impl( ptr, rust_vec_len, data_len, ), - 139 => { + 140 => { wire__crate__api__protocol__types__filter__Filter_new_impl(ptr, rust_vec_len, data_len) } - 140 => wire__crate__api__protocol__types__filter__Filter_pubkey_impl( + 141 => wire__crate__api__protocol__types__filter__Filter_pubkey_impl( ptr, rust_vec_len, data_len, ), - 141 => wire__crate__api__protocol__types__filter__Filter_pubkeys_impl( + 142 => wire__crate__api__protocol__types__filter__Filter_pubkeys_impl( ptr, rust_vec_len, data_len, ), - 142 => wire__crate__api__protocol__types__filter__Filter_reference_impl( + 143 => wire__crate__api__protocol__types__filter__Filter_reference_impl( ptr, rust_vec_len, data_len, ), - 143 => wire__crate__api__protocol__types__filter__Filter_references_impl( + 144 => wire__crate__api__protocol__types__filter__Filter_references_impl( ptr, rust_vec_len, data_len, ), - 144 => wire__crate__api__protocol__types__filter__Filter_remove_authors_impl( + 145 => wire__crate__api__protocol__types__filter__Filter_remove_authors_impl( ptr, rust_vec_len, data_len, ), - 145 => wire__crate__api__protocol__types__filter__Filter_remove_custom_tag_impl( + 146 => wire__crate__api__protocol__types__filter__Filter_remove_custom_tag_impl( ptr, rust_vec_len, data_len, ), - 146 => wire__crate__api__protocol__types__filter__Filter_remove_events_impl( + 147 => wire__crate__api__protocol__types__filter__Filter_remove_events_impl( ptr, rust_vec_len, data_len, ), - 147 => wire__crate__api__protocol__types__filter__Filter_remove_hashtags_impl( + 148 => wire__crate__api__protocol__types__filter__Filter_remove_hashtags_impl( ptr, rust_vec_len, data_len, ), - 148 => wire__crate__api__protocol__types__filter__Filter_remove_identifiers_impl( + 149 => wire__crate__api__protocol__types__filter__Filter_remove_identifiers_impl( ptr, rust_vec_len, data_len, ), - 149 => wire__crate__api__protocol__types__filter__Filter_remove_ids_impl( + 150 => wire__crate__api__protocol__types__filter__Filter_remove_ids_impl( ptr, rust_vec_len, data_len, ), - 150 => wire__crate__api__protocol__types__filter__Filter_remove_kinds_impl( + 151 => wire__crate__api__protocol__types__filter__Filter_remove_kinds_impl( ptr, rust_vec_len, data_len, ), - 151 => wire__crate__api__protocol__types__filter__Filter_remove_limit_impl( + 152 => wire__crate__api__protocol__types__filter__Filter_remove_limit_impl( ptr, rust_vec_len, data_len, ), - 152 => wire__crate__api__protocol__types__filter__Filter_remove_pubkeys_impl( + 153 => wire__crate__api__protocol__types__filter__Filter_remove_pubkeys_impl( ptr, rust_vec_len, data_len, ), - 153 => wire__crate__api__protocol__types__filter__Filter_remove_references_impl( + 154 => wire__crate__api__protocol__types__filter__Filter_remove_references_impl( ptr, rust_vec_len, data_len, ), - 154 => wire__crate__api__protocol__types__filter__Filter_remove_search_impl( + 155 => wire__crate__api__protocol__types__filter__Filter_remove_search_impl( ptr, rust_vec_len, data_len, ), - 155 => wire__crate__api__protocol__types__filter__Filter_remove_since_impl( + 156 => wire__crate__api__protocol__types__filter__Filter_remove_since_impl( ptr, rust_vec_len, data_len, ), - 156 => wire__crate__api__protocol__types__filter__Filter_remove_until_impl( + 157 => wire__crate__api__protocol__types__filter__Filter_remove_until_impl( ptr, rust_vec_len, data_len, ), - 157 => wire__crate__api__protocol__types__filter__Filter_search_impl( + 158 => wire__crate__api__protocol__types__filter__Filter_search_impl( ptr, rust_vec_len, data_len, ), - 158 => wire__crate__api__protocol__types__filter__Filter_since_impl( + 159 => wire__crate__api__protocol__types__filter__Filter_since_impl( ptr, rust_vec_len, data_len, ), - 159 => wire__crate__api__protocol__types__filter__Filter_until_impl( + 160 => wire__crate__api__protocol__types__filter__Filter_until_impl( ptr, rust_vec_len, data_len, ), - 160 => wire__crate__api__protocol__types__filter__SingleLetterTag_is_lowercase_impl( + 161 => wire__crate__api__protocol__types__filter__SingleLetterTag_is_lowercase_impl( ptr, rust_vec_len, data_len, ), - 161 => wire__crate__api__protocol__types__filter__SingleLetterTag_is_uppercase_impl( + 162 => wire__crate__api__protocol__types__filter__SingleLetterTag_is_uppercase_impl( ptr, rust_vec_len, data_len, ), - 162 => wire__crate__api__protocol__types__filter__SingleLetterTag_lowercase_impl( + 163 => wire__crate__api__protocol__types__filter__SingleLetterTag_lowercase_impl( ptr, rust_vec_len, data_len, ), - 163 => wire__crate__api__protocol__types__filter__SingleLetterTag_uppercase_impl( + 164 => wire__crate__api__protocol__types__filter__SingleLetterTag_uppercase_impl( ptr, rust_vec_len, data_len, @@ -9886,6 +10011,50 @@ impl flutter_rust_bridge::IntoIntoDart flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::client::notification::RelayPoolNotification::Event { + relay_url, + subscription_id, + event, + } => [ + 0.into_dart(), + relay_url.into_into_dart().into_dart(), + subscription_id.into_into_dart().into_dart(), + event.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::client::notification::RelayPoolNotification::Message { + relay_url, + message, + } => [ + 1.into_dart(), + relay_url.into_into_dart().into_dart(), + message.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::client::notification::RelayPoolNotification::Shutdown => { + [2.into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::client::notification::RelayPoolNotification +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::client::notification::RelayPoolNotification +{ + fn into_into_dart(self) -> crate::api::client::notification::RelayPoolNotification { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::api::client::output::SendEventOutput { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ @@ -9946,6 +10115,13 @@ impl SseEncode for flutter_rust_bridge::for_generated::anyhow::Error { } } +impl SseEncode for RustAutoOpaqueMoi<_Event> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >>::sse_encode(flutter_rust_bridge::for_generated::rust_auto_opaque_explicit_encode(self), serializer); + } +} + impl SseEncode for _Client { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -10255,6 +10431,18 @@ impl SseEncode for std::collections::HashSet { } } +impl SseEncode + for StreamSink< + crate::api::client::notification::RelayPoolNotification, + flutter_rust_bridge::for_generated::SseCodec, + > +{ + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + unimplemented!("") + } +} + impl SseEncode for String { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -10479,6 +10667,38 @@ impl SseEncode for (String, String) { } } +impl SseEncode for crate::api::client::notification::RelayPoolNotification { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::client::notification::RelayPoolNotification::Event { + relay_url, + subscription_id, + event, + } => { + ::sse_encode(0, serializer); + ::sse_encode(relay_url, serializer); + ::sse_encode(subscription_id, serializer); + >::sse_encode(event, serializer); + } + crate::api::client::notification::RelayPoolNotification::Message { + relay_url, + message, + } => { + ::sse_encode(1, serializer); + ::sse_encode(relay_url, serializer); + ::sse_encode(message, serializer); + } + crate::api::client::notification::RelayPoolNotification::Shutdown => { + ::sse_encode(2, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + impl SseEncode for crate::api::client::output::SendEventOutput { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {