diff --git a/CHANGELOG.md b/CHANGELOG.md index e76fed7..2191ffd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ * Expose `EventBuilder::private_msg` ([Yuki Kishimoto]) * Expose `UnwrappedGift` ([Yuki Kishimoto]) * Expose `Client::handle_notifications` ([Yuki Kishimoto]) +* Expose subscribe `Client` methods ([Yuki Kishimoto]) ### Fixed diff --git a/lib/src/rust/api/client.dart b/lib/src/rust/api/client.dart index 7477b18..56c5d8b 100644 --- a/lib/src/rust/api/client.dart +++ b/lib/src/rust/api/client.dart @@ -12,6 +12,7 @@ import 'protocol/event.dart'; import 'protocol/event/builder.dart'; import 'protocol/signer.dart'; import 'protocol/types/filter.dart'; +import 'relay/options.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` @@ -136,6 +137,61 @@ abstract class Client implements RustOpaqueInterface { /// Rise error if it not set. Future signer(); + /// Subscribe to filters + /// + /// This method creates a new subscription. None of the previous subscriptions will be edited/closed when you call this! + /// So remember to unsubscribe when you no longer need it. + /// + /// If `gossip` is enabled (see [`Options::gossip`]) the events will be requested also to + /// NIP65 relays (automatically discovered) of public keys included in filters (if any). + /// + /// # Auto-closing subscription + /// + /// It's possible to automatically close a subscription by configuring the [SubscribeAutoCloseOptions]. + /// + /// Note: auto-closing subscriptions aren't saved in subscriptions map! + Future subscribe( + {required List filters, SubscribeAutoCloseOptions? opts}); + + /// Subscribe to filters to specific relays + /// + /// This method creates a new subscription. None of the previous subscriptions will be edited/closed when you call this! + /// So remember to unsubscribe when you no longer need it. + /// + /// ### Auto-closing subscription + /// + /// It's possible to automatically close a subscription by configuring the [SubscribeAutoCloseOptions]. + Future subscribeTo( + {required List urls, + required List filters, + SubscribeAutoCloseOptions? opts}); + + /// Subscribe to filters with custom [SubscriptionId] + /// + /// If `gossip` is enabled (see [`Options::gossip`]) the events will be requested also to + /// NIP65 relays (automatically discovered) of public keys included in filters (if any). + /// + /// # Auto-closing subscription + /// + /// It's possible to automatically close a subscription by configuring the [SubscribeAutoCloseOptions]. + /// + /// Note: auto-closing subscriptions aren't saved in subscriptions map! + Future subscribeWithId( + {required String id, + required List filters, + SubscribeAutoCloseOptions? opts}); + + /// Subscribe to filters with custom [SubscriptionId] to specific relays + /// + /// ### Auto-closing subscription + /// + /// It's possible to automatically close a subscription by configuring the [SubscribeAutoCloseOptions]. + Future subscribeWithIdTo( + {required List urls, + required String id, + required List filters, + SubscribeAutoCloseOptions? opts}); + /// Unset nostr signer Future unsetSigner(); } diff --git a/lib/src/rust/api/relay/options.dart b/lib/src/rust/api/relay/options.dart index 0b4865a..d9e68fc 100644 --- a/lib/src/rust/api/relay/options.dart +++ b/lib/src/rust/api/relay/options.dart @@ -8,7 +8,22 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'options.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`, `try_from` +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `deref`, `from`, `try_from`, `try_from` + +// Rust type: RustOpaqueMoi> +abstract class SubscribeAutoCloseOptions implements RustOpaqueInterface { + /// Close subscription when the policy is satisfied + SubscribeAutoCloseOptions exitPolicy({required ReqExitPolicy policy}); + + /// Automatically close subscription if no notifications/events are received within the duration. + SubscribeAutoCloseOptions idleTimeout({Duration? timeout}); + + factory SubscribeAutoCloseOptions() => + NostrSdk.instance.api.crateApiRelayOptionsSubscribeAutoCloseOptionsNew(); + + /// Automatically close subscription after duration. + SubscribeAutoCloseOptions timeout({Duration? timeout}); +} @freezed sealed class ConnectionMode with _$ConnectionMode { @@ -35,3 +50,21 @@ sealed class ConnectionMode with _$ConnectionMode { String? customPath, }) = ConnectionMode_Tor; } + +@freezed +sealed class ReqExitPolicy with _$ReqExitPolicy { + const ReqExitPolicy._(); + + /// Exit on EOSE + const factory ReqExitPolicy.exitOnEose() = ReqExitPolicy_ExitOnEOSE; + + /// After EOSE is received, keep listening for N more events that match the filter. + const factory ReqExitPolicy.waitForEventsAfterEose( + int field0, + ) = ReqExitPolicy_WaitForEventsAfterEOSE; + + /// After EOSE is received, keep listening for matching events for `Duration` more time. + const factory ReqExitPolicy.waitDurationAfterEose( + Duration field0, + ) = ReqExitPolicy_WaitDurationAfterEOSE; +} diff --git a/lib/src/rust/frb_generated.dart b/lib/src/rust/frb_generated.dart index 2cf6837..3964c34 100644 --- a/lib/src/rust/frb_generated.dart +++ b/lib/src/rust/frb_generated.dart @@ -75,7 +75,7 @@ class NostrSdk String get codegenVersion => '2.0.0'; @override - int get rustContentHash => -781178950; + int get rustContentHash => -2132613419; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( @@ -152,6 +152,30 @@ abstract class NostrSdkApi extends BaseApi { Future crateApiClientClientSigner({required Client that}); + Future crateApiClientClientSubscribe( + {required Client that, + required List filters, + SubscribeAutoCloseOptions? opts}); + + Future crateApiClientClientSubscribeTo( + {required Client that, + required List urls, + required List filters, + SubscribeAutoCloseOptions? opts}); + + Future crateApiClientClientSubscribeWithId( + {required Client that, + required String id, + required List filters, + SubscribeAutoCloseOptions? opts}); + + Future crateApiClientClientSubscribeWithIdTo( + {required Client that, + required List urls, + required String id, + required List filters, + SubscribeAutoCloseOptions? opts}); + Future crateApiClientClientUnsetSigner({required Client that}); Client crateApiClientBuilderClientBuilderBuild({required ClientBuilder that}); @@ -545,6 +569,21 @@ abstract class NostrSdkApi extends BaseApi { SingleLetterTag crateApiProtocolTypesFilterSingleLetterTagUppercase( {required Alphabet character}); + SubscribeAutoCloseOptions + crateApiRelayOptionsSubscribeAutoCloseOptionsExitPolicy( + {required SubscribeAutoCloseOptions that, + required ReqExitPolicy policy}); + + SubscribeAutoCloseOptions + crateApiRelayOptionsSubscribeAutoCloseOptionsIdleTimeout( + {required SubscribeAutoCloseOptions that, Duration? timeout}); + + SubscribeAutoCloseOptions crateApiRelayOptionsSubscribeAutoCloseOptionsNew(); + + SubscribeAutoCloseOptions + crateApiRelayOptionsSubscribeAutoCloseOptionsTimeout( + {required SubscribeAutoCloseOptions that, Duration? timeout}); + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Client; RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Client; @@ -642,6 +681,15 @@ abstract class NostrSdkApi extends BaseApi { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_SingleLetterTagPtr; + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_SubscribeAutoCloseOptions; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_SubscribeAutoCloseOptions; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_SubscribeAutoCloseOptionsPtr; + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Tag; RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Tag; @@ -1355,15 +1403,155 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { ); @override - Future crateApiClientClientUnsetSigner({required Client that}) { + Future crateApiClientClientSubscribe( + {required Client that, + required List filters, + SubscribeAutoCloseOptions? opts}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( that, serializer); + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + filters, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + opts, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 26, port: port_); }, + codec: SseCodec( + decodeSuccessData: sse_decode_String, + decodeErrorData: sse_decode_AnyhowException, + ), + constMeta: kCrateApiClientClientSubscribeConstMeta, + argValues: [that, filters, opts], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiClientClientSubscribeConstMeta => + const TaskConstMeta( + debugName: "Client_subscribe", + argNames: ["that", "filters", "opts"], + ); + + @override + Future crateApiClientClientSubscribeTo( + {required Client that, + required List urls, + required List filters, + SubscribeAutoCloseOptions? opts}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( + that, serializer); + sse_encode_list_String(urls, serializer); + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + filters, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + opts, serializer); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 27, port: port_); + }, + codec: SseCodec( + decodeSuccessData: sse_decode_String, + decodeErrorData: sse_decode_AnyhowException, + ), + constMeta: kCrateApiClientClientSubscribeToConstMeta, + argValues: [that, urls, filters, opts], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiClientClientSubscribeToConstMeta => + const TaskConstMeta( + debugName: "Client_subscribe_to", + argNames: ["that", "urls", "filters", "opts"], + ); + + @override + Future crateApiClientClientSubscribeWithId( + {required Client that, + required String id, + required List filters, + SubscribeAutoCloseOptions? opts}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( + that, serializer); + sse_encode_String(id, serializer); + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + filters, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + opts, serializer); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 28, port: port_); + }, + codec: SseCodec( + decodeSuccessData: sse_decode_unit, + decodeErrorData: sse_decode_AnyhowException, + ), + constMeta: kCrateApiClientClientSubscribeWithIdConstMeta, + argValues: [that, id, filters, opts], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiClientClientSubscribeWithIdConstMeta => + const TaskConstMeta( + debugName: "Client_subscribe_with_id", + argNames: ["that", "id", "filters", "opts"], + ); + + @override + Future crateApiClientClientSubscribeWithIdTo( + {required Client that, + required List urls, + required String id, + required List filters, + SubscribeAutoCloseOptions? opts}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( + that, serializer); + sse_encode_list_String(urls, serializer); + sse_encode_String(id, serializer); + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + filters, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + opts, serializer); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 29, port: port_); + }, + codec: SseCodec( + decodeSuccessData: sse_decode_unit, + decodeErrorData: sse_decode_AnyhowException, + ), + constMeta: kCrateApiClientClientSubscribeWithIdToConstMeta, + argValues: [that, urls, id, filters, opts], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiClientClientSubscribeWithIdToConstMeta => + const TaskConstMeta( + debugName: "Client_subscribe_with_id_to", + argNames: ["that", "urls", "id", "filters", "opts"], + ); + + @override + Future crateApiClientClientUnsetSigner({required Client that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( + that, serializer); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 30, port: port_); + }, codec: SseCodec( decodeSuccessData: sse_decode_unit, decodeErrorData: null, @@ -1388,7 +1576,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: 27)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 31)!; }, codec: SseCodec( decodeSuccessData: @@ -1412,7 +1600,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 28)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 32)!; }, codec: SseCodec( decodeSuccessData: @@ -1441,7 +1629,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: 29)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 33)!; }, codec: SseCodec( decodeSuccessData: @@ -1470,7 +1658,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: 30)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 34)!; }, codec: SseCodec( decodeSuccessData: @@ -1498,7 +1686,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: 31)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 35)!; }, codec: SseCodec( decodeSuccessData: @@ -1526,7 +1714,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: 32)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 36)!; }, codec: SseCodec( decodeSuccessData: @@ -1557,7 +1745,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: 33)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 37)!; }, codec: SseCodec( decodeSuccessData: @@ -1585,7 +1773,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: 34)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 38)!; }, codec: SseCodec( decodeSuccessData: @@ -1613,7 +1801,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: 35)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 39)!; }, codec: SseCodec( decodeSuccessData: @@ -1637,7 +1825,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 36)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 40)!; }, codec: SseCodec( decodeSuccessData: @@ -1665,7 +1853,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: 37)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 41)!; }, codec: SseCodec( decodeSuccessData: @@ -1692,7 +1880,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: 38)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 42)!; }, codec: SseCodec( decodeSuccessData: @@ -1720,7 +1908,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: 39)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 43)!; }, codec: SseCodec( decodeSuccessData: @@ -1749,7 +1937,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: 40)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 44)!; }, codec: SseCodec( decodeSuccessData: @@ -1773,7 +1961,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 41)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 45)!; }, codec: SseCodec( decodeSuccessData: @@ -1801,7 +1989,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: 42)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 46)!; }, codec: SseCodec( decodeSuccessData: @@ -1827,7 +2015,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: 47)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -1852,7 +2040,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: 48)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -1877,7 +2065,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: 49)!; }, codec: SseCodec( decodeSuccessData: @@ -1903,7 +2091,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: 50)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -1928,7 +2116,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: 47)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 51)!; }, codec: SseCodec( decodeSuccessData: sse_decode_u_64, @@ -1952,7 +2140,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(json, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 48)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 52)!; }, codec: SseCodec( decodeSuccessData: @@ -1978,7 +2166,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: 53)!; }, codec: SseCodec( decodeSuccessData: @@ -2004,7 +2192,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: 54)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2029,7 +2217,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: 55)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2054,7 +2242,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: 56)!; }, codec: SseCodec( decodeSuccessData: sse_decode_u_16, @@ -2079,7 +2267,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: 57)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2104,7 +2292,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: 58)!; }, codec: SseCodec( decodeSuccessData: @@ -2130,7 +2318,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: 59)!; }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -2155,7 +2343,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: 60)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2180,7 +2368,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: 57)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 61)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2208,7 +2396,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: 58)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 62)!; }, codec: SseCodec( decodeSuccessData: @@ -2236,7 +2424,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: 59)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 63)!; }, codec: SseCodec( decodeSuccessData: @@ -2275,7 +2463,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( extraTags, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 60, port: port_); + funcId: 64, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -2309,7 +2497,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: 61)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 65)!; }, codec: SseCodec( decodeSuccessData: @@ -2338,7 +2526,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: 62)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 66)!; }, codec: SseCodec( decodeSuccessData: @@ -2366,7 +2554,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: 63)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 67)!; }, codec: SseCodec( decodeSuccessData: @@ -2402,7 +2590,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( rumorExtraTags, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 64, port: port_); + funcId: 68, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -2437,7 +2625,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( rumor, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 65, port: port_); + funcId: 69, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -2467,7 +2655,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_NostrSigner( signer, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 66, port: port_); + funcId: 70, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -2496,7 +2684,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: 67)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 71)!; }, codec: SseCodec( decodeSuccessData: @@ -2526,7 +2714,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: 68)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 72)!; }, codec: SseCodec( decodeSuccessData: @@ -2555,7 +2743,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: 69)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 73)!; }, codec: SseCodec( decodeSuccessData: @@ -2581,7 +2769,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(content, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 70)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 74)!; }, codec: SseCodec( decodeSuccessData: @@ -2607,7 +2795,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: 71)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 75)!; }, codec: SseCodec( decodeSuccessData: @@ -2643,7 +2831,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: 72)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 76)!; }, codec: SseCodec( decodeSuccessData: @@ -2668,7 +2856,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(id, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 73)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 77)!; }, codec: SseCodec( decodeSuccessData: @@ -2694,7 +2882,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: 78)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2719,7 +2907,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: 79)!; }, codec: SseCodec( decodeSuccessData: sse_decode_list_prim_u_8_strict, @@ -2744,7 +2932,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: 80)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2769,7 +2957,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: 77)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 81)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2794,7 +2982,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: 82)!; }, codec: SseCodec( decodeSuccessData: sse_decode_list_String, @@ -2819,7 +3007,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: 83)!; }, codec: SseCodec( decodeSuccessData: sse_decode_opt_String, @@ -2844,7 +3032,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: 84)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2869,7 +3057,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: 85)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2894,7 +3082,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: 86)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2919,7 +3107,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: 83)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 87)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2943,7 +3131,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_list_String(tag, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 84)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 88)!; }, codec: SseCodec( decodeSuccessData: @@ -2969,7 +3157,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: 85)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 89)!; }, codec: SseCodec( decodeSuccessData: sse_decode_list_String, @@ -2996,7 +3184,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: 86)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 90)!; }, codec: SseCodec( decodeSuccessData: @@ -3025,7 +3213,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: 91)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3052,7 +3240,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: 92)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3080,7 +3268,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: 93)!; }, codec: SseCodec( decodeSuccessData: @@ -3108,7 +3296,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: 94)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3135,7 +3323,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: 91)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 95)!; }, codec: SseCodec( decodeSuccessData: sse_decode_u_64, @@ -3161,7 +3349,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(json, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 92)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 96)!; }, codec: SseCodec( decodeSuccessData: @@ -3189,7 +3377,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: 97)!; }, codec: SseCodec( decodeSuccessData: @@ -3216,7 +3404,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: 98)!; }, codec: SseCodec( decodeSuccessData: sse_decode_u_16, @@ -3242,7 +3430,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: 95)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 99)!; }, codec: SseCodec( decodeSuccessData: @@ -3266,7 +3454,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 96)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 100)!; }, codec: SseCodec( decodeSuccessData: @@ -3292,7 +3480,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: 97)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 101)!; }, codec: SseCodec( decodeSuccessData: @@ -3316,7 +3504,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(secretKey, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 98)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 102)!; }, codec: SseCodec( decodeSuccessData: @@ -3342,7 +3530,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: 103)!; }, codec: SseCodec( decodeSuccessData: @@ -3368,7 +3556,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: 100)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 104)!; }, codec: SseCodec( decodeSuccessData: @@ -3394,7 +3582,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: 101)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 105)!; }, codec: SseCodec( decodeSuccessData: @@ -3420,7 +3608,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(publicKey, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 102)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 106)!; }, codec: SseCodec( decodeSuccessData: @@ -3447,7 +3635,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: 107)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3472,7 +3660,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: 108)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3498,7 +3686,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: 105)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 109)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3523,7 +3711,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: 106)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 110)!; }, codec: SseCodec( decodeSuccessData: @@ -3547,7 +3735,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 107)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 111)!; }, codec: SseCodec( decodeSuccessData: @@ -3573,7 +3761,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(secretKey, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 108)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 112)!; }, codec: SseCodec( decodeSuccessData: @@ -3600,7 +3788,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: 113)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3626,7 +3814,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: 110)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 114)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3656,7 +3844,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( giftWrap, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 111, port: port_); + funcId: 115, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -3684,7 +3872,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: 116)!; }, codec: SseCodec( decodeSuccessData: @@ -3711,7 +3899,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: 113)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 117)!; }, codec: SseCodec( decodeSuccessData: @@ -3738,7 +3926,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: 114)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 118)!; }, codec: SseCodec( decodeSuccessData: sse_decode_signer_backend, @@ -3765,7 +3953,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_NostrSigner( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 115, port: port_); + funcId: 119, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -3791,7 +3979,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: 116)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 120)!; }, codec: SseCodec( decodeSuccessData: @@ -3824,7 +4012,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { publicKey, serializer); sse_encode_String(encryptedContent, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 117, port: port_); + funcId: 121, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3856,7 +4044,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { publicKey, serializer); sse_encode_String(content, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 118, port: port_); + funcId: 122, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3888,7 +4076,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { publicKey, serializer); sse_encode_String(payload, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 119, port: port_); + funcId: 123, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3920,7 +4108,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { publicKey, serializer); sse_encode_String(content, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 120, port: port_); + funcId: 124, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3949,7 +4137,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( unsignedEvent, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 121, port: port_); + funcId: 125, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -3975,7 +4163,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: 122)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 126)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -4003,7 +4191,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: 123)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 127)!; }, codec: SseCodec( decodeSuccessData: @@ -4032,7 +4220,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: 124)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 128)!; }, codec: SseCodec( decodeSuccessData: @@ -4064,7 +4252,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: 125)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 129)!; }, codec: SseCodec( decodeSuccessData: @@ -4093,7 +4281,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: 126)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 130)!; }, codec: SseCodec( decodeSuccessData: @@ -4122,7 +4310,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: 127)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 131)!; }, codec: SseCodec( decodeSuccessData: @@ -4147,7 +4335,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(json, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 128)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 132)!; }, codec: SseCodec( decodeSuccessData: @@ -4175,7 +4363,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: 129)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 133)!; }, codec: SseCodec( decodeSuccessData: @@ -4203,7 +4391,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: 130)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 134)!; }, codec: SseCodec( decodeSuccessData: @@ -4232,7 +4420,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: 131)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 135)!; }, codec: SseCodec( decodeSuccessData: @@ -4260,7 +4448,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: 132)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 136)!; }, codec: SseCodec( decodeSuccessData: @@ -4288,7 +4476,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: 133)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 137)!; }, codec: SseCodec( decodeSuccessData: @@ -4317,7 +4505,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: 134)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 138)!; }, codec: SseCodec( decodeSuccessData: @@ -4343,7 +4531,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: 135)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 139)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -4370,7 +4558,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: 136)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 140)!; }, codec: SseCodec( decodeSuccessData: @@ -4398,7 +4586,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: 137)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 141)!; }, codec: SseCodec( decodeSuccessData: @@ -4426,7 +4614,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: 138)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 142)!; }, codec: SseCodec( decodeSuccessData: @@ -4455,7 +4643,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: 139)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 143)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -4478,7 +4666,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 140)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 144)!; }, codec: SseCodec( decodeSuccessData: @@ -4507,7 +4695,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: 141)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 145)!; }, codec: SseCodec( decodeSuccessData: @@ -4536,7 +4724,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: 142)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 146)!; }, codec: SseCodec( decodeSuccessData: @@ -4564,7 +4752,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: 143)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 147)!; }, codec: SseCodec( decodeSuccessData: @@ -4592,7 +4780,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: 144)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 148)!; }, codec: SseCodec( decodeSuccessData: @@ -4621,7 +4809,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: 145)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 149)!; }, codec: SseCodec( decodeSuccessData: @@ -4653,7 +4841,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: 146)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 150)!; }, codec: SseCodec( decodeSuccessData: @@ -4683,7 +4871,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: 147)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 151)!; }, codec: SseCodec( decodeSuccessData: @@ -4711,7 +4899,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: 148)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 152)!; }, codec: SseCodec( decodeSuccessData: @@ -4739,7 +4927,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: 149)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 153)!; }, codec: SseCodec( decodeSuccessData: @@ -4769,7 +4957,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: 150)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 154)!; }, codec: SseCodec( decodeSuccessData: @@ -4797,7 +4985,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: 151)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 155)!; }, codec: SseCodec( decodeSuccessData: @@ -4823,7 +5011,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: 152)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 156)!; }, codec: SseCodec( decodeSuccessData: @@ -4852,7 +5040,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: 153)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 157)!; }, codec: SseCodec( decodeSuccessData: @@ -4880,7 +5068,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: 154)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 158)!; }, codec: SseCodec( decodeSuccessData: @@ -4907,7 +5095,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: 159)!; }, codec: SseCodec( decodeSuccessData: @@ -4933,7 +5121,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: 160)!; }, codec: SseCodec( decodeSuccessData: @@ -4959,7 +5147,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: 157)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 161)!; }, codec: SseCodec( decodeSuccessData: @@ -4987,7 +5175,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: 158)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 162)!; }, codec: SseCodec( decodeSuccessData: @@ -5015,7 +5203,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: 163)!; }, codec: SseCodec( decodeSuccessData: @@ -5043,7 +5231,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: 160)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 164)!; }, codec: SseCodec( decodeSuccessData: @@ -5070,7 +5258,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: 165)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -5098,78 +5286,196 @@ 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: 162)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 166)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, decodeErrorData: null, ), constMeta: - kCrateApiProtocolTypesFilterSingleLetterTagIsUppercaseConstMeta, - argValues: [that], + kCrateApiProtocolTypesFilterSingleLetterTagIsUppercaseConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiProtocolTypesFilterSingleLetterTagIsUppercaseConstMeta => + const TaskConstMeta( + debugName: "SingleLetterTag_is_uppercase", + argNames: ["that"], + ); + + @override + SingleLetterTag crateApiProtocolTypesFilterSingleLetterTagLowercase( + {required Alphabet character}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_alphabet(character, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 167)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterSingleLetterTagLowercaseConstMeta, + argValues: [character], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiProtocolTypesFilterSingleLetterTagLowercaseConstMeta => + const TaskConstMeta( + debugName: "SingleLetterTag_lowercase", + argNames: ["character"], + ); + + @override + SingleLetterTag crateApiProtocolTypesFilterSingleLetterTagUppercase( + {required Alphabet character}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_alphabet(character, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 168)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag, + decodeErrorData: null, + ), + constMeta: kCrateApiProtocolTypesFilterSingleLetterTagUppercaseConstMeta, + argValues: [character], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiProtocolTypesFilterSingleLetterTagUppercaseConstMeta => + const TaskConstMeta( + debugName: "SingleLetterTag_uppercase", + argNames: ["character"], + ); + + @override + SubscribeAutoCloseOptions + crateApiRelayOptionsSubscribeAutoCloseOptionsExitPolicy( + {required SubscribeAutoCloseOptions that, + required ReqExitPolicy policy}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + that, serializer); + sse_encode_box_autoadd_req_exit_policy(policy, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 169)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions, + decodeErrorData: sse_decode_AnyhowException, + ), + constMeta: + kCrateApiRelayOptionsSubscribeAutoCloseOptionsExitPolicyConstMeta, + argValues: [that, policy], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiRelayOptionsSubscribeAutoCloseOptionsExitPolicyConstMeta => + const TaskConstMeta( + debugName: "SubscribeAutoCloseOptions_exit_policy", + argNames: ["that", "policy"], + ); + + @override + SubscribeAutoCloseOptions + crateApiRelayOptionsSubscribeAutoCloseOptionsIdleTimeout( + {required SubscribeAutoCloseOptions that, Duration? timeout}) { + return handler.executeSync(SyncTask( + callFfi: () { + final serializer = SseSerializer(generalizedFrbRustBinding); + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + that, serializer); + sse_encode_opt_box_autoadd_Chrono_Duration(timeout, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 170)!; + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions, + decodeErrorData: sse_decode_AnyhowException, + ), + constMeta: + kCrateApiRelayOptionsSubscribeAutoCloseOptionsIdleTimeoutConstMeta, + argValues: [that, timeout], apiImpl: this, )); } TaskConstMeta - get kCrateApiProtocolTypesFilterSingleLetterTagIsUppercaseConstMeta => + get kCrateApiRelayOptionsSubscribeAutoCloseOptionsIdleTimeoutConstMeta => const TaskConstMeta( - debugName: "SingleLetterTag_is_uppercase", - argNames: ["that"], + debugName: "SubscribeAutoCloseOptions_idle_timeout", + argNames: ["that", "timeout"], ); @override - SingleLetterTag crateApiProtocolTypesFilterSingleLetterTagLowercase( - {required Alphabet character}) { + SubscribeAutoCloseOptions crateApiRelayOptionsSubscribeAutoCloseOptionsNew() { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_alphabet(character, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 163)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 171)!; }, codec: SseCodec( decodeSuccessData: - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag, + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions, decodeErrorData: null, ), - constMeta: kCrateApiProtocolTypesFilterSingleLetterTagLowercaseConstMeta, - argValues: [character], + constMeta: kCrateApiRelayOptionsSubscribeAutoCloseOptionsNewConstMeta, + argValues: [], apiImpl: this, )); } TaskConstMeta - get kCrateApiProtocolTypesFilterSingleLetterTagLowercaseConstMeta => + get kCrateApiRelayOptionsSubscribeAutoCloseOptionsNewConstMeta => const TaskConstMeta( - debugName: "SingleLetterTag_lowercase", - argNames: ["character"], + debugName: "SubscribeAutoCloseOptions_new", + argNames: [], ); @override - SingleLetterTag crateApiProtocolTypesFilterSingleLetterTagUppercase( - {required Alphabet character}) { + SubscribeAutoCloseOptions + crateApiRelayOptionsSubscribeAutoCloseOptionsTimeout( + {required SubscribeAutoCloseOptions that, Duration? timeout}) { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_alphabet(character, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 164)!; + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + that, serializer); + sse_encode_opt_box_autoadd_Chrono_Duration(timeout, serializer); + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 172)!; }, codec: SseCodec( decodeSuccessData: - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag, - decodeErrorData: null, + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions, + decodeErrorData: sse_decode_AnyhowException, ), - constMeta: kCrateApiProtocolTypesFilterSingleLetterTagUppercaseConstMeta, - argValues: [character], + constMeta: kCrateApiRelayOptionsSubscribeAutoCloseOptionsTimeoutConstMeta, + argValues: [that, timeout], apiImpl: this, )); } TaskConstMeta - get kCrateApiProtocolTypesFilterSingleLetterTagUppercaseConstMeta => + get kCrateApiRelayOptionsSubscribeAutoCloseOptionsTimeoutConstMeta => const TaskConstMeta( - debugName: "SingleLetterTag_uppercase", - argNames: ["character"], + debugName: "SubscribeAutoCloseOptions_timeout", + argNames: ["that", "timeout"], ); RustArcIncrementStrongCountFnType @@ -5272,6 +5578,14 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { get rust_arc_decrement_strong_count_SingleLetterTag => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag; + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_SubscribeAutoCloseOptions => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_SubscribeAutoCloseOptions => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions; + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Tag => wire .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag; @@ -5413,6 +5727,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return SingleLetterTagImpl.frbInternalDcoDecode(raw as List); } + @protected + SubscribeAutoCloseOptions + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return SubscribeAutoCloseOptionsImpl.frbInternalDcoDecode( + raw as List); + } + @protected Tag dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw) { @@ -5540,6 +5863,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return SingleLetterTagImpl.frbInternalDcoDecode(raw as List); } + @protected + SubscribeAutoCloseOptions + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return SubscribeAutoCloseOptionsImpl.frbInternalDcoDecode( + raw as List); + } + @protected Tag dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw) { @@ -5680,6 +6012,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return SingleLetterTagImpl.frbInternalDcoDecode(raw as List); } + @protected + SubscribeAutoCloseOptions + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return SubscribeAutoCloseOptionsImpl.frbInternalDcoDecode( + raw as List); + } + @protected Tag dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw) { @@ -5743,12 +6084,33 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { raw); } + @protected + SubscribeAutoCloseOptions + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + raw); + } + + @protected + Duration dco_decode_box_autoadd_Chrono_Duration(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_Chrono_Duration(raw); + } + @protected ConnectionMode dco_decode_box_autoadd_connection_mode(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return dco_decode_connection_mode(raw); } + @protected + ReqExitPolicy dco_decode_box_autoadd_req_exit_policy(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_req_exit_policy(raw); + } + @protected ConnectionMode dco_decode_connection_mode(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -5894,6 +6256,23 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { raw); } + @protected + SubscribeAutoCloseOptions? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + raw); + } + + @protected + Duration? dco_decode_opt_box_autoadd_Chrono_Duration(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_Chrono_Duration(raw); + } + @protected (String, String) dco_decode_record_string_string(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -5931,6 +6310,25 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { } } + @protected + ReqExitPolicy dco_decode_req_exit_policy(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return ReqExitPolicy_ExitOnEOSE(); + case 1: + return ReqExitPolicy_WaitForEventsAfterEOSE( + dco_decode_u_16(raw[1]), + ); + case 2: + return ReqExitPolicy_WaitDurationAfterEOSE( + dco_decode_Chrono_Duration(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + @protected SendEventOutput dco_decode_send_event_output(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -6128,6 +6526,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } + @protected + SubscribeAutoCloseOptions + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return SubscribeAutoCloseOptionsImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + @protected Tag sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer) { @@ -6271,6 +6678,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } + @protected + SubscribeAutoCloseOptions + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return SubscribeAutoCloseOptionsImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + @protected Tag sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer) { @@ -6429,6 +6845,15 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } + @protected + SubscribeAutoCloseOptions + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return SubscribeAutoCloseOptionsImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + @protected Tag sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer) { @@ -6499,6 +6924,22 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { deserializer)); } + @protected + SubscribeAutoCloseOptions + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + deserializer)); + } + + @protected + Duration sse_decode_box_autoadd_Chrono_Duration( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Chrono_Duration(deserializer)); + } + @protected ConnectionMode sse_decode_box_autoadd_connection_mode( SseDeserializer deserializer) { @@ -6506,6 +6947,13 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return (sse_decode_connection_mode(deserializer)); } + @protected + ReqExitPolicy sse_decode_box_autoadd_req_exit_policy( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_req_exit_policy(deserializer)); + } + @protected ConnectionMode sse_decode_connection_mode(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6702,6 +7150,32 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { } } + @protected + SubscribeAutoCloseOptions? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + deserializer)); + } else { + return null; + } + } + + @protected + Duration? sse_decode_opt_box_autoadd_Chrono_Duration( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Chrono_Duration(deserializer)); + } else { + return null; + } + } + @protected (String, String) sse_decode_record_string_string( SseDeserializer deserializer) { @@ -6740,6 +7214,25 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { } } + @protected + ReqExitPolicy sse_decode_req_exit_policy(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + return ReqExitPolicy_ExitOnEOSE(); + case 1: + var var_field0 = sse_decode_u_16(deserializer); + return ReqExitPolicy_WaitForEventsAfterEOSE(var_field0); + case 2: + var var_field0 = sse_decode_Chrono_Duration(deserializer); + return ReqExitPolicy_WaitDurationAfterEOSE(var_field0); + default: + throw UnimplementedError(''); + } + } + @protected SendEventOutput sse_decode_send_event_output(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6936,6 +7429,17 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { serializer); } + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as SubscribeAutoCloseOptionsImpl) + .frbInternalSseEncode(move: true), + serializer); + } + @protected void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -7087,6 +7591,17 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { serializer); } + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as SubscribeAutoCloseOptionsImpl) + .frbInternalSseEncode(move: false), + serializer); + } + @protected void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -7251,6 +7766,17 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { serializer); } + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as SubscribeAutoCloseOptionsImpl) + .frbInternalSseEncode(move: null), + serializer); + } + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -7326,6 +7852,22 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { self, serializer); } + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + self, serializer); + } + + @protected + void sse_encode_box_autoadd_Chrono_Duration( + Duration self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Chrono_Duration(self, serializer); + } + @protected void sse_encode_box_autoadd_connection_mode( ConnectionMode self, SseSerializer serializer) { @@ -7333,6 +7875,13 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_connection_mode(self, serializer); } + @protected + void sse_encode_box_autoadd_req_exit_policy( + ReqExitPolicy self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_req_exit_policy(self, serializer); + } + @protected void sse_encode_connection_mode( ConnectionMode self, SseSerializer serializer) { @@ -7506,6 +8055,30 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { } } + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_Chrono_Duration( + Duration? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Chrono_Duration(self, serializer); + } + } + @protected void sse_encode_record_string_string( (String, String) self, SseSerializer serializer) { @@ -7543,6 +8116,24 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { } } + @protected + void sse_encode_req_exit_policy( + ReqExitPolicy self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case ReqExitPolicy_ExitOnEOSE(): + sse_encode_i_32(0, serializer); + case ReqExitPolicy_WaitForEventsAfterEOSE(field0: final field0): + sse_encode_i_32(1, serializer); + sse_encode_u_16(field0, serializer); + case ReqExitPolicy_WaitDurationAfterEOSE(field0: final field0): + sse_encode_i_32(2, serializer); + sse_encode_Chrono_Duration(field0, serializer); + default: + throw UnimplementedError(''); + } + } + @protected void sse_encode_send_event_output( SendEventOutput self, SseSerializer serializer) { @@ -7806,6 +8397,69 @@ class ClientImpl extends RustOpaque implements Client { that: this, ); + /// Subscribe to filters + /// + /// This method creates a new subscription. None of the previous subscriptions will be edited/closed when you call this! + /// So remember to unsubscribe when you no longer need it. + /// + /// If `gossip` is enabled (see [`Options::gossip`]) the events will be requested also to + /// NIP65 relays (automatically discovered) of public keys included in filters (if any). + /// + /// # Auto-closing subscription + /// + /// It's possible to automatically close a subscription by configuring the [SubscribeAutoCloseOptions]. + /// + /// Note: auto-closing subscriptions aren't saved in subscriptions map! + Future subscribe( + {required List filters, SubscribeAutoCloseOptions? opts}) => + NostrSdk.instance.api.crateApiClientClientSubscribe( + that: this, filters: filters, opts: opts); + + /// Subscribe to filters to specific relays + /// + /// This method creates a new subscription. None of the previous subscriptions will be edited/closed when you call this! + /// So remember to unsubscribe when you no longer need it. + /// + /// ### Auto-closing subscription + /// + /// It's possible to automatically close a subscription by configuring the [SubscribeAutoCloseOptions]. + Future subscribeTo( + {required List urls, + required List filters, + SubscribeAutoCloseOptions? opts}) => + NostrSdk.instance.api.crateApiClientClientSubscribeTo( + that: this, urls: urls, filters: filters, opts: opts); + + /// Subscribe to filters with custom [SubscriptionId] + /// + /// If `gossip` is enabled (see [`Options::gossip`]) the events will be requested also to + /// NIP65 relays (automatically discovered) of public keys included in filters (if any). + /// + /// # Auto-closing subscription + /// + /// It's possible to automatically close a subscription by configuring the [SubscribeAutoCloseOptions]. + /// + /// Note: auto-closing subscriptions aren't saved in subscriptions map! + Future subscribeWithId( + {required String id, + required List filters, + SubscribeAutoCloseOptions? opts}) => + NostrSdk.instance.api.crateApiClientClientSubscribeWithId( + that: this, id: id, filters: filters, opts: opts); + + /// Subscribe to filters with custom [SubscriptionId] to specific relays + /// + /// ### Auto-closing subscription + /// + /// It's possible to automatically close a subscription by configuring the [SubscribeAutoCloseOptions]. + Future subscribeWithIdTo( + {required List urls, + required String id, + required List filters, + SubscribeAutoCloseOptions? opts}) => + NostrSdk.instance.api.crateApiClientClientSubscribeWithIdTo( + that: this, urls: urls, id: id, filters: filters, opts: opts); + /// Unset nostr signer Future unsetSigner() => NostrSdk.instance.api.crateApiClientClientUnsetSigner( @@ -8467,6 +9121,46 @@ class SingleLetterTagImpl extends RustOpaque implements SingleLetterTag { ); } +@sealed +class SubscribeAutoCloseOptionsImpl extends RustOpaque + implements SubscribeAutoCloseOptions { + // Not to be used by end users + SubscribeAutoCloseOptionsImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + SubscribeAutoCloseOptionsImpl.frbInternalSseDecode( + BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NostrSdk + .instance.api.rust_arc_increment_strong_count_SubscribeAutoCloseOptions, + rustArcDecrementStrongCount: NostrSdk + .instance.api.rust_arc_decrement_strong_count_SubscribeAutoCloseOptions, + rustArcDecrementStrongCountPtr: NostrSdk.instance.api + .rust_arc_decrement_strong_count_SubscribeAutoCloseOptionsPtr, + ); + + /// Close subscription when the policy is satisfied + SubscribeAutoCloseOptions exitPolicy({required ReqExitPolicy policy}) => + NostrSdk.instance.api + .crateApiRelayOptionsSubscribeAutoCloseOptionsExitPolicy( + that: this, policy: policy); + + /// Automatically close subscription if no notifications/events are received within the duration. + SubscribeAutoCloseOptions idleTimeout({Duration? timeout}) => + NostrSdk.instance.api + .crateApiRelayOptionsSubscribeAutoCloseOptionsIdleTimeout( + that: this, timeout: timeout); + + /// Automatically close subscription after duration. + SubscribeAutoCloseOptions timeout({Duration? timeout}) => + NostrSdk.instance.api + .crateApiRelayOptionsSubscribeAutoCloseOptionsTimeout( + that: this, timeout: timeout); +} + @sealed class TagImpl extends RustOpaque implements Tag { // Not to be used by end users diff --git a/lib/src/rust/frb_generated.io.dart b/lib/src/rust/frb_generated.io.dart index e9524f4..6564971 100644 --- a/lib/src/rust/frb_generated.io.dart +++ b/lib/src/rust/frb_generated.io.dart @@ -78,6 +78,10 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { get rust_arc_decrement_strong_count_SingleLetterTagPtr => wire ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTagPtr; + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_SubscribeAutoCloseOptionsPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptionsPtr; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_TagPtr => wire ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_TagPtr; @@ -162,6 +166,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( dynamic raw); + @protected + SubscribeAutoCloseOptions + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw); + @protected Tag dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw); @@ -241,6 +250,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( dynamic raw); + @protected + SubscribeAutoCloseOptions + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw); + @protected Tag dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw); @@ -326,6 +340,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( dynamic raw); + @protected + SubscribeAutoCloseOptions + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw); + @protected Tag dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw); @@ -361,9 +380,20 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( dynamic raw); + @protected + SubscribeAutoCloseOptions + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw); + + @protected + Duration dco_decode_box_autoadd_Chrono_Duration(dynamic raw); + @protected ConnectionMode dco_decode_box_autoadd_connection_mode(dynamic raw); + @protected + ReqExitPolicy dco_decode_box_autoadd_req_exit_policy(dynamic raw); + @protected ConnectionMode dco_decode_connection_mode(dynamic raw); @@ -427,12 +457,23 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( dynamic raw); + @protected + SubscribeAutoCloseOptions? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw); + + @protected + Duration? dco_decode_opt_box_autoadd_Chrono_Duration(dynamic raw); + @protected (String, String) dco_decode_record_string_string(dynamic raw); @protected RelayPoolNotification dco_decode_relay_pool_notification(dynamic raw); + @protected + ReqExitPolicy dco_decode_req_exit_policy(dynamic raw); + @protected SendEventOutput dco_decode_send_event_output(dynamic raw); @@ -527,6 +568,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( SseDeserializer deserializer); + @protected + SubscribeAutoCloseOptions + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer); + @protected Tag sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer); @@ -606,6 +652,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( SseDeserializer deserializer); + @protected + SubscribeAutoCloseOptions + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer); + @protected Tag sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer); @@ -692,6 +743,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( SseDeserializer deserializer); + @protected + SubscribeAutoCloseOptions + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer); + @protected Tag sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer); @@ -728,10 +784,22 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( SseDeserializer deserializer); + @protected + SubscribeAutoCloseOptions + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer); + + @protected + Duration sse_decode_box_autoadd_Chrono_Duration(SseDeserializer deserializer); + @protected ConnectionMode sse_decode_box_autoadd_connection_mode( SseDeserializer deserializer); + @protected + ReqExitPolicy sse_decode_box_autoadd_req_exit_policy( + SseDeserializer deserializer); + @protected ConnectionMode sse_decode_connection_mode(SseDeserializer deserializer); @@ -796,6 +864,15 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( SseDeserializer deserializer); + @protected + SubscribeAutoCloseOptions? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer); + + @protected + Duration? sse_decode_opt_box_autoadd_Chrono_Duration( + SseDeserializer deserializer); + @protected (String, String) sse_decode_record_string_string( SseDeserializer deserializer); @@ -804,6 +881,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { RelayPoolNotification sse_decode_relay_pool_notification( SseDeserializer deserializer); + @protected + ReqExitPolicy sse_decode_req_exit_policy(SseDeserializer deserializer); + @protected SendEventOutput sse_decode_send_event_output(SseDeserializer deserializer); @@ -899,6 +979,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( SingleLetterTag self, SseSerializer serializer); + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions self, SseSerializer serializer); + @protected void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -979,6 +1064,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( SingleLetterTag self, SseSerializer serializer); + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions self, SseSerializer serializer); + @protected void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -1066,6 +1156,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( SingleLetterTag self, SseSerializer serializer); + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions self, SseSerializer serializer); + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -1102,10 +1197,23 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( EventId self, SseSerializer serializer); + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_Chrono_Duration( + Duration self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_connection_mode( ConnectionMode self, SseSerializer serializer); + @protected + void sse_encode_box_autoadd_req_exit_policy( + ReqExitPolicy self, SseSerializer serializer); + @protected void sse_encode_connection_mode( ConnectionMode self, SseSerializer serializer); @@ -1175,6 +1283,15 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( EventId? self, SseSerializer serializer); + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_Chrono_Duration( + Duration? self, SseSerializer serializer); + @protected void sse_encode_record_string_string( (String, String) self, SseSerializer serializer); @@ -1183,6 +1300,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { void sse_encode_relay_pool_notification( RelayPoolNotification self, SseSerializer serializer); + @protected + void sse_encode_req_exit_policy(ReqExitPolicy self, SseSerializer serializer); + @protected void sse_encode_send_event_output( SendEventOutput self, SseSerializer serializer); @@ -1636,6 +1756,38 @@ class NostrSdkWire implements BaseWire { _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTagPtr .asFunction)>(); + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptionsPtr = + _lookup)>>( + 'frbgen_nostr_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions'); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptionsPtr + .asFunction)>(); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptionsPtr = + _lookup)>>( + 'frbgen_nostr_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions'); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptionsPtr + .asFunction)>(); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( ffi.Pointer ptr, diff --git a/lib/src/rust/frb_generated.web.dart b/lib/src/rust/frb_generated.web.dart index cef86e7..5539190 100644 --- a/lib/src/rust/frb_generated.web.dart +++ b/lib/src/rust/frb_generated.web.dart @@ -80,6 +80,10 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { get rust_arc_decrement_strong_count_SingleLetterTagPtr => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag; + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_SubscribeAutoCloseOptionsPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_TagPtr => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag; @@ -164,6 +168,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( dynamic raw); + @protected + SubscribeAutoCloseOptions + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw); + @protected Tag dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw); @@ -243,6 +252,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( dynamic raw); + @protected + SubscribeAutoCloseOptions + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw); + @protected Tag dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw); @@ -328,6 +342,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( dynamic raw); + @protected + SubscribeAutoCloseOptions + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw); + @protected Tag dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( dynamic raw); @@ -363,9 +382,20 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( dynamic raw); + @protected + SubscribeAutoCloseOptions + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw); + + @protected + Duration dco_decode_box_autoadd_Chrono_Duration(dynamic raw); + @protected ConnectionMode dco_decode_box_autoadd_connection_mode(dynamic raw); + @protected + ReqExitPolicy dco_decode_box_autoadd_req_exit_policy(dynamic raw); + @protected ConnectionMode dco_decode_connection_mode(dynamic raw); @@ -429,12 +459,23 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( dynamic raw); + @protected + SubscribeAutoCloseOptions? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + dynamic raw); + + @protected + Duration? dco_decode_opt_box_autoadd_Chrono_Duration(dynamic raw); + @protected (String, String) dco_decode_record_string_string(dynamic raw); @protected RelayPoolNotification dco_decode_relay_pool_notification(dynamic raw); + @protected + ReqExitPolicy dco_decode_req_exit_policy(dynamic raw); + @protected SendEventOutput dco_decode_send_event_output(dynamic raw); @@ -529,6 +570,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( SseDeserializer deserializer); + @protected + SubscribeAutoCloseOptions + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer); + @protected Tag sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer); @@ -608,6 +654,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( SseDeserializer deserializer); + @protected + SubscribeAutoCloseOptions + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer); + @protected Tag sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer); @@ -694,6 +745,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( SseDeserializer deserializer); + @protected + SubscribeAutoCloseOptions + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer); + @protected Tag sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( SseDeserializer deserializer); @@ -730,10 +786,22 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( SseDeserializer deserializer); + @protected + SubscribeAutoCloseOptions + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer); + + @protected + Duration sse_decode_box_autoadd_Chrono_Duration(SseDeserializer deserializer); + @protected ConnectionMode sse_decode_box_autoadd_connection_mode( SseDeserializer deserializer); + @protected + ReqExitPolicy sse_decode_box_autoadd_req_exit_policy( + SseDeserializer deserializer); + @protected ConnectionMode sse_decode_connection_mode(SseDeserializer deserializer); @@ -798,6 +866,15 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( SseDeserializer deserializer); + @protected + SubscribeAutoCloseOptions? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SseDeserializer deserializer); + + @protected + Duration? sse_decode_opt_box_autoadd_Chrono_Duration( + SseDeserializer deserializer); + @protected (String, String) sse_decode_record_string_string( SseDeserializer deserializer); @@ -806,6 +883,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { RelayPoolNotification sse_decode_relay_pool_notification( SseDeserializer deserializer); + @protected + ReqExitPolicy sse_decode_req_exit_policy(SseDeserializer deserializer); + @protected SendEventOutput sse_decode_send_event_output(SseDeserializer deserializer); @@ -901,6 +981,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( SingleLetterTag self, SseSerializer serializer); + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions self, SseSerializer serializer); + @protected void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -981,6 +1066,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( SingleLetterTag self, SseSerializer serializer); + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions self, SseSerializer serializer); + @protected void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -1068,6 +1158,11 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( SingleLetterTag self, SseSerializer serializer); + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions self, SseSerializer serializer); + @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( @@ -1104,10 +1199,23 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( EventId self, SseSerializer serializer); + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_Chrono_Duration( + Duration self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_connection_mode( ConnectionMode self, SseSerializer serializer); + @protected + void sse_encode_box_autoadd_req_exit_policy( + ReqExitPolicy self, SseSerializer serializer); + @protected void sse_encode_connection_mode( ConnectionMode self, SseSerializer serializer); @@ -1177,6 +1285,15 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( EventId? self, SseSerializer serializer); + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + SubscribeAutoCloseOptions? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_Chrono_Duration( + Duration? self, SseSerializer serializer); + @protected void sse_encode_record_string_string( (String, String) self, SseSerializer serializer); @@ -1185,6 +1302,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { void sse_encode_relay_pool_notification( RelayPoolNotification self, SseSerializer serializer); + @protected + void sse_encode_req_exit_policy(ReqExitPolicy self, SseSerializer serializer); + @protected void sse_encode_send_event_output( SendEventOutput self, SseSerializer serializer); @@ -1369,6 +1489,18 @@ class NostrSdkWire implements BaseWire { .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( ptr); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + int ptr) => + wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + ptr); + + void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + int ptr) => + wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + ptr); + void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( int ptr) => wasmModule @@ -1516,6 +1648,14 @@ extension type NostrSdkWasmModule._(JSObject _) implements JSObject { rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SingleLetterTag( int ptr); + external void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + int ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + int ptr); + external void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( int ptr); diff --git a/rust/src/api/client/mod.rs b/rust/src/api/client/mod.rs index 18e8a0a..de84db5 100644 --- a/rust/src/api/client/mod.rs +++ b/rust/src/api/client/mod.rs @@ -19,6 +19,7 @@ use super::protocol::event::_Event; use super::protocol::event::builder::_EventBuilder; use super::protocol::signer::_NostrSigner; use super::protocol::types::filter::_Filter; +use crate::api::relay::options::_SubscribeAutoCloseOptions; use crate::frb_generated::StreamSink; #[frb(name = "Client")] @@ -187,6 +188,98 @@ impl _Client { Ok(self.inner.disconnect().await?) } + /// Subscribe to filters + /// + /// This method creates a new subscription. None of the previous subscriptions will be edited/closed when you call this! + /// So remember to unsubscribe when you no longer need it. + /// + /// If `gossip` is enabled (see [`Options::gossip`]) the events will be requested also to + /// NIP65 relays (automatically discovered) of public keys included in filters (if any). + /// + /// # Auto-closing subscription + /// + /// It's possible to automatically close a subscription by configuring the [SubscribeAutoCloseOptions]. + /// + /// Note: auto-closing subscriptions aren't saved in subscriptions map! + pub async fn subscribe( + &self, + filters: Vec<_Filter>, + opts: Option<_SubscribeAutoCloseOptions>, + ) -> Result { + let filters = filters.into_iter().map(|f| f.inner).collect(); + let opts = opts.map(|o| o.inner); + let output = self.inner.subscribe(filters, opts).await?; + // TODO return output + Ok(output.id().to_string()) + } + + /// Subscribe to filters with custom [SubscriptionId] + /// + /// If `gossip` is enabled (see [`Options::gossip`]) the events will be requested also to + /// NIP65 relays (automatically discovered) of public keys included in filters (if any). + /// + /// # Auto-closing subscription + /// + /// It's possible to automatically close a subscription by configuring the [SubscribeAutoCloseOptions]. + /// + /// Note: auto-closing subscriptions aren't saved in subscriptions map! + pub async fn subscribe_with_id( + &self, + id: &str, + filters: Vec<_Filter>, + opts: Option<_SubscribeAutoCloseOptions>, + ) -> Result<()> { + let id = SubscriptionId::new(id); + let filters = filters.into_iter().map(|f| f.inner).collect(); + let opts = opts.map(|o| o.inner); + self.inner.subscribe_with_id(id, filters, opts).await?; + // TODO return output + Ok(()) + } + + /// Subscribe to filters to specific relays + /// + /// This method creates a new subscription. None of the previous subscriptions will be edited/closed when you call this! + /// So remember to unsubscribe when you no longer need it. + /// + /// ### Auto-closing subscription + /// + /// It's possible to automatically close a subscription by configuring the [SubscribeAutoCloseOptions]. + pub async fn subscribe_to( + &self, + urls: Vec, + filters: Vec<_Filter>, + opts: Option<_SubscribeAutoCloseOptions>, + ) -> Result { + let filters = filters.into_iter().map(|f| f.inner).collect(); + let opts = opts.map(|o| o.inner); + let output = self.inner.subscribe_to(urls, filters, opts).await?; + // TODO return output + Ok(output.id().to_string()) + } + + /// Subscribe to filters with custom [SubscriptionId] to specific relays + /// + /// ### Auto-closing subscription + /// + /// It's possible to automatically close a subscription by configuring the [SubscribeAutoCloseOptions]. + pub async fn subscribe_with_id_to( + &self, + urls: Vec, + id: &str, + filters: Vec<_Filter>, + opts: Option<_SubscribeAutoCloseOptions>, + ) -> Result<()> { + let id = SubscriptionId::new(id); + let filters = filters.into_iter().map(|f| f.inner).collect(); + let opts = opts.map(|o| o.inner); + self.inner + .subscribe_with_id_to(urls, id, filters, opts) + .await?; + // TODO return output + Ok(()) + } + /// Fetch events from relays /// /// If `gossip` is enabled (see [`Options::gossip`]) the events will be requested also to diff --git a/rust/src/api/relay/options.rs b/rust/src/api/relay/options.rs index c995740..ec0e1d0 100644 --- a/rust/src/api/relay/options.rs +++ b/rust/src/api/relay/options.rs @@ -2,11 +2,14 @@ // Copyright (c) 2023-2024 Rust Nostr Developers // Distributed under the MIT software license +use std::ops::Deref; #[cfg(not(target_arch = "wasm32"))] use std::path::PathBuf; -use anyhow::Error; -use nostr_sdk::prelude; +use anyhow::{Error, Result}; +use chrono::Duration; +use flutter_rust_bridge::frb; +use nostr_sdk::prelude::{self, *}; /// Connection mode pub enum ConnectionMode { @@ -65,3 +68,82 @@ impl TryFrom for prelude::ConnectionMode { } } } + +/// Request (REQ) exit policy +pub enum ReqExitPolicy { + /// Exit on EOSE + ExitOnEOSE, + /// After EOSE is received, keep listening for N more events that match the filter. + WaitForEventsAfterEOSE(u16), + /// After EOSE is received, keep listening for matching events for `Duration` more time. + WaitDurationAfterEOSE(Duration), +} + +impl TryFrom for prelude::ReqExitPolicy { + type Error = Error; + + fn try_from(value: ReqExitPolicy) -> Result { + match value { + ReqExitPolicy::ExitOnEOSE => Ok(Self::ExitOnEOSE), + ReqExitPolicy::WaitForEventsAfterEOSE(num) => Ok(Self::WaitForEventsAfterEOSE(num)), + ReqExitPolicy::WaitDurationAfterEOSE(duration) => { + Ok(Self::WaitDurationAfterEOSE(duration.to_std()?)) + } + } + } +} + +/// Auto-closing subscribe options +#[derive(Clone, Copy)] +#[frb(name = "SubscribeAutoCloseOptions")] +pub struct _SubscribeAutoCloseOptions { + pub(crate) inner: SubscribeAutoCloseOptions, +} + +impl Deref for _SubscribeAutoCloseOptions { + type Target = SubscribeAutoCloseOptions; + + fn deref(&self) -> &Self::Target { + &self.inner + } +} + +#[frb(sync)] +impl _SubscribeAutoCloseOptions { + pub fn new() -> Self { + Self { + inner: SubscribeAutoCloseOptions::default(), + } + } + + /// Close subscription when the policy is satisfied + pub fn exit_policy(&self, policy: ReqExitPolicy) -> Result { + let mut builder = self.clone(); + builder.inner = builder.inner.exit_policy(policy.try_into()?); + Ok(builder) + } + + /// Automatically close subscription after duration. + pub fn timeout(&self, timeout: Option) -> Result { + let timeout = match timeout { + Some(timeout) => Some(timeout.to_std()?), + None => None, + }; + + let mut builder = self.clone(); + builder.inner = builder.inner.timeout(timeout); + Ok(builder) + } + + /// Automatically close subscription if no notifications/events are received within the duration. + pub fn idle_timeout(&self, timeout: Option) -> Result { + let timeout = match timeout { + Some(timeout) => Some(timeout.to_std()?), + None => None, + }; + + let mut builder = self.clone(); + builder.inner = builder.inner.idle_timeout(timeout); + Ok(builder) + } +} diff --git a/rust/src/frb_generated.io.rs b/rust/src/frb_generated.io.rs index 6fea3df..1f048a5 100644 --- a/rust/src/frb_generated.io.rs +++ b/rust/src/frb_generated.io.rs @@ -18,6 +18,7 @@ use crate::api::protocol::key::*; use crate::api::protocol::nips::nip59::*; use crate::api::protocol::signer::*; use crate::api::protocol::types::filter::*; +use crate::api::relay::options::*; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; use flutter_rust_bridge::{Handler, IntoIntoDart}; @@ -208,6 +209,20 @@ pub extern "C" fn frbgen_nostr_sdk_rust_arc_decrement_strong_count_RustOpaque_fl MoiArc::>::decrement_strong_count(ptr as _); } +#[no_mangle] +pub extern "C" fn frbgen_nostr_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + ptr: *const std::ffi::c_void, +) { + MoiArc::>::increment_strong_count(ptr as _); +} + +#[no_mangle] +pub extern "C" fn frbgen_nostr_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + ptr: *const std::ffi::c_void, +) { + MoiArc::>::decrement_strong_count(ptr as _); +} + #[no_mangle] pub extern "C" fn frbgen_nostr_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( ptr: *const std::ffi::c_void, diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs index 30ea494..07493e1 100644 --- a/rust/src/frb_generated.rs +++ b/rust/src/frb_generated.rs @@ -39,6 +39,7 @@ use crate::api::protocol::key::*; use crate::api::protocol::nips::nip59::*; use crate::api::protocol::signer::*; use crate::api::protocol::types::filter::*; +use crate::api::relay::options::*; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; use flutter_rust_bridge::{Handler, IntoIntoDart}; @@ -51,7 +52,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 = -781178950; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -2132613419; // Section: executor @@ -1429,6 +1430,262 @@ fn wire__crate__api__client__Client_signer_impl( }, ) } +fn wire__crate__api__client__Client_subscribe_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_subscribe", + 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_filters = >::sse_decode(&mut deserializer); + let api_opts = >::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::subscribe( + &*api_that_guard, + api_filters, + api_opts, + ) + .await?; + Ok(output_ok) + })() + .await, + ) + } + }, + ) +} +fn wire__crate__api__client__Client_subscribe_to_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_subscribe_to", + 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_urls = >::sse_decode(&mut deserializer); + let api_filters = >::sse_decode(&mut deserializer); + let api_opts = >::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::subscribe_to( + &*api_that_guard, + api_urls, + api_filters, + api_opts, + ) + .await?; + Ok(output_ok) + })() + .await, + ) + } + }, + ) +} +fn wire__crate__api__client__Client_subscribe_with_id_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_subscribe_with_id", + 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_id = ::sse_decode(&mut deserializer); + let api_filters = >::sse_decode(&mut deserializer); + let api_opts = >::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::subscribe_with_id( + &*api_that_guard, + &api_id, + api_filters, + api_opts, + ) + .await?; + Ok(output_ok) + })() + .await, + ) + } + }, + ) +} +fn wire__crate__api__client__Client_subscribe_with_id_to_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_subscribe_with_id_to", + 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_urls = >::sse_decode(&mut deserializer); + let api_id = ::sse_decode(&mut deserializer); + let api_filters = >::sse_decode(&mut deserializer); + let api_opts = >::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::subscribe_with_id_to( + &*api_that_guard, + api_urls, + &api_id, + api_filters, + api_opts, + ) + .await?; + Ok(output_ok) + })() + .await, + ) + } + }, + ) +} fn wire__crate__api__client__Client_unset_signer_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, @@ -8250,32 +8507,223 @@ fn wire__crate__api__protocol__types__filter__SingleLetterTag_uppercase_impl( }, ) } - -// Section: related_funcs - -flutter_rust_bridge::frb_generated_moi_arc_impl_value!( - flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_Client> -); -flutter_rust_bridge::frb_generated_moi_arc_impl_value!( - flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_ClientBuilder> -); -flutter_rust_bridge::frb_generated_moi_arc_impl_value!( - flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_ClientOptions> -); -flutter_rust_bridge::frb_generated_moi_arc_impl_value!( - flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_Connection> -); -flutter_rust_bridge::frb_generated_moi_arc_impl_value!( - flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_Event> -); -flutter_rust_bridge::frb_generated_moi_arc_impl_value!( - flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_EventBuilder> -); -flutter_rust_bridge::frb_generated_moi_arc_impl_value!( - flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_EventId> -); -flutter_rust_bridge::frb_generated_moi_arc_impl_value!( - flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_Filter> +fn wire__crate__api__relay__options__SubscribeAutoCloseOptions_exit_policy_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "SubscribeAutoCloseOptions_exit_policy", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + 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_policy = + ::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (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_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + crate::api::relay::options::_SubscribeAutoCloseOptions::exit_policy( + &*api_that_guard, + api_policy, + )?; + Ok(output_ok) + })(), + ) + }, + ) +} +fn wire__crate__api__relay__options__SubscribeAutoCloseOptions_idle_timeout_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "SubscribeAutoCloseOptions_idle_timeout", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + 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_timeout = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (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_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + crate::api::relay::options::_SubscribeAutoCloseOptions::idle_timeout( + &*api_that_guard, + api_timeout, + )?; + Ok(output_ok) + })(), + ) + }, + ) +} +fn wire__crate__api__relay__options__SubscribeAutoCloseOptions_new_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "SubscribeAutoCloseOptions_new", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + 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); + deserializer.end(); + transform_result_sse::<_, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::relay::options::_SubscribeAutoCloseOptions::new(), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__relay__options__SubscribeAutoCloseOptions_timeout_impl( + ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, + rust_vec_len_: i32, + data_len_: i32, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "SubscribeAutoCloseOptions_timeout", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + 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_timeout = >::sse_decode(&mut deserializer); + deserializer.end(); + transform_result_sse::<_, flutter_rust_bridge::for_generated::anyhow::Error>( + (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_sync_ref()), + _ => unreachable!(), + } + } + let api_that_guard = api_that_guard.unwrap(); + let output_ok = + crate::api::relay::options::_SubscribeAutoCloseOptions::timeout( + &*api_that_guard, + api_timeout, + )?; + Ok(output_ok) + })(), + ) + }, + ) +} + +// Section: related_funcs + +flutter_rust_bridge::frb_generated_moi_arc_impl_value!( + flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_Client> +); +flutter_rust_bridge::frb_generated_moi_arc_impl_value!( + flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_ClientBuilder> +); +flutter_rust_bridge::frb_generated_moi_arc_impl_value!( + flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_ClientOptions> +); +flutter_rust_bridge::frb_generated_moi_arc_impl_value!( + flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_Connection> +); +flutter_rust_bridge::frb_generated_moi_arc_impl_value!( + flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_Event> +); +flutter_rust_bridge::frb_generated_moi_arc_impl_value!( + flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_EventBuilder> +); +flutter_rust_bridge::frb_generated_moi_arc_impl_value!( + flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_EventId> +); +flutter_rust_bridge::frb_generated_moi_arc_impl_value!( + flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_Filter> ); flutter_rust_bridge::frb_generated_moi_arc_impl_value!( flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_Keys> @@ -8292,6 +8740,9 @@ flutter_rust_bridge::frb_generated_moi_arc_impl_value!( flutter_rust_bridge::frb_generated_moi_arc_impl_value!( flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_SingleLetterTag> ); +flutter_rust_bridge::frb_generated_moi_arc_impl_value!( + flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_SubscribeAutoCloseOptions> +); flutter_rust_bridge::frb_generated_moi_arc_impl_value!( flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_Tag> ); @@ -8452,6 +8903,16 @@ impl SseDecode for _SingleLetterTag { } } +impl SseDecode for _SubscribeAutoCloseOptions { + // 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_decode_owned(inner); + } +} + impl SseDecode for _Tag { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -8620,6 +9081,18 @@ impl SseDecode } } +impl SseDecode + for RustOpaqueMoi< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_SubscribeAutoCloseOptions>, + > +{ + // 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 decode_rust_opaque_moi(inner); + } +} + impl SseDecode for RustOpaqueMoi> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -8901,6 +9374,28 @@ impl SseDecode for Option<_EventId> { } } +impl SseDecode for Option<_SubscribeAutoCloseOptions> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(<_SubscribeAutoCloseOptions>::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + impl SseDecode for (String, String) { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -8943,6 +9438,33 @@ impl SseDecode for crate::api::client::notification::RelayPoolNotification { } } +impl SseDecode for crate::api::relay::options::ReqExitPolicy { + // 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 => { + return crate::api::relay::options::ReqExitPolicy::ExitOnEOSE; + } + 1 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::relay::options::ReqExitPolicy::WaitForEventsAfterEOSE( + var_field0, + ); + } + 2 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::relay::options::ReqExitPolicy::WaitDurationAfterEOSE( + var_field0, + ); + } + _ => { + 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 { @@ -9085,68 +9607,82 @@ fn pde_ffi_dispatcher_primary_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( + 26 => wire__crate__api__client__Client_subscribe_impl(port, ptr, rust_vec_len, data_len), + 27 => wire__crate__api__client__Client_subscribe_to_impl(port, ptr, rust_vec_len, data_len), + 28 => wire__crate__api__client__Client_subscribe_with_id_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 29 => wire__crate__api__client__Client_subscribe_with_id_to_impl( + port, + ptr, + rust_vec_len, + data_len, + ), + 30 => wire__crate__api__client__Client_unset_signer_impl(port, ptr, rust_vec_len, data_len), + 64 => 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_private_msg_impl( + 68 => 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_seal_impl( + 69 => wire__crate__api__protocol__event__builder__EventBuilder_seal_impl( port, ptr, rust_vec_len, data_len, ), - 66 => wire__crate__api__protocol__event__builder__EventBuilder_sign_impl( + 70 => wire__crate__api__protocol__event__builder__EventBuilder_sign_impl( port, ptr, rust_vec_len, data_len, ), - 111 => wire__crate__api__protocol__nips__nip59__UnwrappedGift_from_gift_wrap_impl( + 115 => wire__crate__api__protocol__nips__nip59__UnwrappedGift_from_gift_wrap_impl( port, ptr, rust_vec_len, data_len, ), - 115 => wire__crate__api__protocol__signer__NostrSigner_get_public_key_impl( + 119 => 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_decrypt_impl( + 121 => wire__crate__api__protocol__signer__NostrSigner_nip04_decrypt_impl( port, ptr, rust_vec_len, data_len, ), - 118 => wire__crate__api__protocol__signer__NostrSigner_nip04_encrypt_impl( + 122 => wire__crate__api__protocol__signer__NostrSigner_nip04_encrypt_impl( port, ptr, rust_vec_len, data_len, ), - 119 => wire__crate__api__protocol__signer__NostrSigner_nip44_decrypt_impl( + 123 => wire__crate__api__protocol__signer__NostrSigner_nip44_decrypt_impl( port, ptr, rust_vec_len, data_len, ), - 120 => wire__crate__api__protocol__signer__NostrSigner_nip44_encrypt_impl( + 124 => 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( + 125 => wire__crate__api__protocol__signer__NostrSigner_sign_event_impl( port, ptr, rust_vec_len, @@ -9171,501 +9707,521 @@ fn pde_ffi_dispatcher_sync_impl( ), 7 => wire__crate__api__client__Client_builder_impl(ptr, rust_vec_len, data_len), 17 => wire__crate__api__client__Client_new_impl(ptr, rust_vec_len, data_len), - 27 => { + 31 => { wire__crate__api__client__builder__ClientBuilder_build_impl(ptr, rust_vec_len, data_len) } - 28 => { + 32 => { wire__crate__api__client__builder__ClientBuilder_new_impl(ptr, rust_vec_len, data_len) } - 29 => { + 33 => { wire__crate__api__client__builder__ClientBuilder_opts_impl(ptr, rust_vec_len, data_len) } - 30 => wire__crate__api__client__builder__ClientBuilder_signer_impl( + 34 => wire__crate__api__client__builder__ClientBuilder_signer_impl( ptr, rust_vec_len, data_len, ), - 31 => wire__crate__api__client__options__ClientOptions_autoconnect_impl( + 35 => wire__crate__api__client__options__ClientOptions_autoconnect_impl( ptr, rust_vec_len, data_len, ), - 32 => wire__crate__api__client__options__ClientOptions_automatic_authentication_impl( + 36 => wire__crate__api__client__options__ClientOptions_automatic_authentication_impl( ptr, rust_vec_len, data_len, ), - 33 => wire__crate__api__client__options__ClientOptions_connection_impl( + 37 => wire__crate__api__client__options__ClientOptions_connection_impl( ptr, rust_vec_len, data_len, ), - 34 => wire__crate__api__client__options__ClientOptions_gossip_impl( + 38 => wire__crate__api__client__options__ClientOptions_gossip_impl( ptr, rust_vec_len, data_len, ), - 35 => wire__crate__api__client__options__ClientOptions_min_pow_impl( + 39 => wire__crate__api__client__options__ClientOptions_min_pow_impl( ptr, rust_vec_len, data_len, ), - 36 => { + 40 => { wire__crate__api__client__options__ClientOptions_new_impl(ptr, rust_vec_len, data_len) } - 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( + 41 => wire__crate__api__client__options__Connection_addr_impl(ptr, rust_vec_len, data_len), + 42 => wire__crate__api__client__options__Connection_embedded_tor_impl( ptr, rust_vec_len, data_len, ), - 39 => wire__crate__api__client__options__Connection_embedded_tor_with_path_impl( + 43 => wire__crate__api__client__options__Connection_embedded_tor_with_path_impl( ptr, rust_vec_len, data_len, ), - 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 => { + 44 => wire__crate__api__client__options__Connection_mode_impl(ptr, rust_vec_len, data_len), + 45 => wire__crate__api__client__options__Connection_new_impl(ptr, rust_vec_len, data_len), + 46 => { wire__crate__api__client__options__Connection_target_impl(ptr, rust_vec_len, data_len) } - 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( + 47 => wire__crate__api__protocol__event__Event_as_json_impl(ptr, rust_vec_len, data_len), + 48 => wire__crate__api__protocol__event__Event_as_pretty_json_impl( ptr, rust_vec_len, data_len, ), - 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 => { + 49 => wire__crate__api__protocol__event__Event_author_impl(ptr, rust_vec_len, data_len), + 50 => wire__crate__api__protocol__event__Event_content_impl(ptr, rust_vec_len, data_len), + 51 => wire__crate__api__protocol__event__Event_created_at_impl(ptr, rust_vec_len, data_len), + 52 => wire__crate__api__protocol__event__Event_from_json_impl(ptr, rust_vec_len, data_len), + 53 => wire__crate__api__protocol__event__Event_id_impl(ptr, rust_vec_len, data_len), + 54 => wire__crate__api__protocol__event__Event_is_expired_impl(ptr, rust_vec_len, data_len), + 55 => { wire__crate__api__protocol__event__Event_is_protected_impl(ptr, rust_vec_len, data_len) } - 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( + 56 => wire__crate__api__protocol__event__Event_kind_impl(ptr, rust_vec_len, data_len), + 57 => wire__crate__api__protocol__event__Event_signature_impl(ptr, rust_vec_len, data_len), + 58 => wire__crate__api__protocol__event__Event_tags_impl(ptr, rust_vec_len, data_len), + 59 => wire__crate__api__protocol__event__Event_verify_impl(ptr, rust_vec_len, data_len), + 60 => wire__crate__api__protocol__event__Event_verify_id_impl(ptr, rust_vec_len, data_len), + 61 => wire__crate__api__protocol__event__Event_verify_signature_impl( ptr, rust_vec_len, data_len, ), - 58 => wire__crate__api__protocol__event__builder__EventBuilder_build_impl( + 62 => wire__crate__api__protocol__event__builder__EventBuilder_build_impl( ptr, rust_vec_len, data_len, ), - 59 => wire__crate__api__protocol__event__builder__EventBuilder_custom_created_at_impl( + 63 => wire__crate__api__protocol__event__builder__EventBuilder_custom_created_at_impl( ptr, rust_vec_len, data_len, ), - 61 => wire__crate__api__protocol__event__builder__EventBuilder_gift_wrap_from_seal_impl( + 65 => wire__crate__api__protocol__event__builder__EventBuilder_gift_wrap_from_seal_impl( ptr, rust_vec_len, data_len, ), - 62 => wire__crate__api__protocol__event__builder__EventBuilder_new_impl( + 66 => wire__crate__api__protocol__event__builder__EventBuilder_new_impl( ptr, rust_vec_len, data_len, ), - 63 => wire__crate__api__protocol__event__builder__EventBuilder_pow_impl( + 67 => wire__crate__api__protocol__event__builder__EventBuilder_pow_impl( ptr, rust_vec_len, data_len, ), - 67 => wire__crate__api__protocol__event__builder__EventBuilder_sign_with_keys_impl( + 71 => wire__crate__api__protocol__event__builder__EventBuilder_sign_with_keys_impl( ptr, rust_vec_len, data_len, ), - 68 => wire__crate__api__protocol__event__builder__EventBuilder_tag_impl( + 72 => wire__crate__api__protocol__event__builder__EventBuilder_tag_impl( ptr, rust_vec_len, data_len, ), - 69 => wire__crate__api__protocol__event__builder__EventBuilder_tags_impl( + 73 => wire__crate__api__protocol__event__builder__EventBuilder_tags_impl( ptr, rust_vec_len, data_len, ), - 70 => wire__crate__api__protocol__event__builder__EventBuilder_text_note_impl( + 74 => wire__crate__api__protocol__event__builder__EventBuilder_text_note_impl( ptr, rust_vec_len, data_len, ), - 71 => wire__crate__api__protocol__event__id__EventId_from_slice_impl( + 75 => wire__crate__api__protocol__event__id__EventId_from_slice_impl( ptr, rust_vec_len, data_len, ), - 72 => wire__crate__api__protocol__event__id__EventId_new_impl(ptr, rust_vec_len, data_len), - 73 => { + 76 => wire__crate__api__protocol__event__id__EventId_new_impl(ptr, rust_vec_len, data_len), + 77 => { wire__crate__api__protocol__event__id__EventId_parse_impl(ptr, rust_vec_len, data_len) } - 74 => wire__crate__api__protocol__event__id__EventId_to_bech32_impl( + 78 => wire__crate__api__protocol__event__id__EventId_to_bech32_impl( ptr, rust_vec_len, data_len, ), - 75 => wire__crate__api__protocol__event__id__EventId_to_bytes_impl( + 79 => wire__crate__api__protocol__event__id__EventId_to_bytes_impl( ptr, rust_vec_len, data_len, ), - 76 => { + 80 => { wire__crate__api__protocol__event__id__EventId_to_hex_impl(ptr, rust_vec_len, data_len) } - 77 => wire__crate__api__protocol__event__id__EventId_to_nostr_uri_impl( + 81 => wire__crate__api__protocol__event__id__EventId_to_nostr_uri_impl( ptr, rust_vec_len, data_len, ), - 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( + 82 => wire__crate__api__protocol__event__tag__Tag_as_vec_impl(ptr, rust_vec_len, data_len), + 83 => wire__crate__api__protocol__event__tag__Tag_content_impl(ptr, rust_vec_len, data_len), + 84 => wire__crate__api__protocol__event__tag__Tag_is_protected_impl( ptr, rust_vec_len, data_len, ), - 81 => { + 85 => { wire__crate__api__protocol__event__tag__Tag_is_reply_impl(ptr, rust_vec_len, data_len) } - 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( + 86 => wire__crate__api__protocol__event__tag__Tag_is_root_impl(ptr, rust_vec_len, data_len), + 87 => wire__crate__api__protocol__event__tag__Tag_kind_impl(ptr, rust_vec_len, data_len), + 88 => wire__crate__api__protocol__event__tag__Tag_parse_impl(ptr, rust_vec_len, data_len), + 89 => wire__crate__api__protocol__event__tag__Tag_to_vec_impl(ptr, rust_vec_len, data_len), + 90 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_add_signature_impl( ptr, rust_vec_len, data_len, ), - 87 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_json_impl( + 91 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_json_impl( ptr, rust_vec_len, data_len, ), - 88 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_pretty_json_impl( + 92 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_pretty_json_impl( ptr, rust_vec_len, data_len, ), - 89 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_author_impl( + 93 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_author_impl( ptr, rust_vec_len, data_len, ), - 90 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_content_impl( + 94 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_content_impl( ptr, rust_vec_len, data_len, ), - 91 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_created_at_impl( + 95 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_created_at_impl( ptr, rust_vec_len, data_len, ), - 92 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_from_json_impl( + 96 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_from_json_impl( ptr, rust_vec_len, data_len, ), - 93 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_id_impl( + 97 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_id_impl( ptr, rust_vec_len, data_len, ), - 94 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_kind_impl( + 98 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_kind_impl( ptr, rust_vec_len, data_len, ), - 95 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_tags_impl( + 99 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_tags_impl( ptr, rust_vec_len, data_len, ), - 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( + 100 => wire__crate__api__protocol__key__Keys_generate_impl(ptr, rust_vec_len, data_len), + 101 => wire__crate__api__protocol__key__Keys_new_impl(ptr, rust_vec_len, data_len), + 102 => wire__crate__api__protocol__key__Keys_parse_impl(ptr, rust_vec_len, data_len), + 103 => wire__crate__api__protocol__key__Keys_public_key_impl(ptr, rust_vec_len, data_len), + 104 => wire__crate__api__protocol__key__Keys_secret_key_impl(ptr, rust_vec_len, data_len), + 105 => wire__crate__api__protocol__key__public_key__PublicKey_from_slice_impl( ptr, rust_vec_len, data_len, ), - 102 => wire__crate__api__protocol__key__public_key__PublicKey_parse_impl( + 106 => wire__crate__api__protocol__key__public_key__PublicKey_parse_impl( ptr, rust_vec_len, data_len, ), - 103 => wire__crate__api__protocol__key__public_key__PublicKey_to_bech32_impl( + 107 => wire__crate__api__protocol__key__public_key__PublicKey_to_bech32_impl( ptr, rust_vec_len, data_len, ), - 104 => wire__crate__api__protocol__key__public_key__PublicKey_to_hex_impl( + 108 => wire__crate__api__protocol__key__public_key__PublicKey_to_hex_impl( ptr, rust_vec_len, data_len, ), - 105 => wire__crate__api__protocol__key__public_key__PublicKey_to_nostr_uri_impl( + 109 => wire__crate__api__protocol__key__public_key__PublicKey_to_nostr_uri_impl( ptr, rust_vec_len, data_len, ), - 106 => wire__crate__api__protocol__key__secret_key__SecretKey_from_slice_impl( + 110 => wire__crate__api__protocol__key__secret_key__SecretKey_from_slice_impl( ptr, rust_vec_len, data_len, ), - 107 => wire__crate__api__protocol__key__secret_key__SecretKey_generate_impl( + 111 => wire__crate__api__protocol__key__secret_key__SecretKey_generate_impl( ptr, rust_vec_len, data_len, ), - 108 => wire__crate__api__protocol__key__secret_key__SecretKey_parse_impl( + 112 => wire__crate__api__protocol__key__secret_key__SecretKey_parse_impl( ptr, rust_vec_len, data_len, ), - 109 => wire__crate__api__protocol__key__secret_key__SecretKey_to_bech32_impl( + 113 => wire__crate__api__protocol__key__secret_key__SecretKey_to_bech32_impl( ptr, rust_vec_len, data_len, ), - 110 => wire__crate__api__protocol__key__secret_key__SecretKey_to_secret_hex_impl( + 114 => wire__crate__api__protocol__key__secret_key__SecretKey_to_secret_hex_impl( ptr, rust_vec_len, data_len, ), - 112 => wire__crate__api__protocol__nips__nip59__UnwrappedGift_rumor_impl( + 116 => wire__crate__api__protocol__nips__nip59__UnwrappedGift_rumor_impl( ptr, rust_vec_len, data_len, ), - 113 => wire__crate__api__protocol__nips__nip59__UnwrappedGift_sender_impl( + 117 => wire__crate__api__protocol__nips__nip59__UnwrappedGift_sender_impl( ptr, rust_vec_len, data_len, ), - 114 => wire__crate__api__protocol__signer__NostrSigner_backend_impl( + 118 => wire__crate__api__protocol__signer__NostrSigner_backend_impl( ptr, rust_vec_len, data_len, ), - 116 => { + 120 => { wire__crate__api__protocol__signer__NostrSigner_keys_impl(ptr, rust_vec_len, data_len) } - 122 => wire__crate__api__protocol__types__filter__Filter_as_json_impl( + 126 => wire__crate__api__protocol__types__filter__Filter_as_json_impl( ptr, rust_vec_len, data_len, ), - 123 => wire__crate__api__protocol__types__filter__Filter_author_impl( + 127 => wire__crate__api__protocol__types__filter__Filter_author_impl( ptr, rust_vec_len, data_len, ), - 124 => wire__crate__api__protocol__types__filter__Filter_authors_impl( + 128 => wire__crate__api__protocol__types__filter__Filter_authors_impl( ptr, rust_vec_len, data_len, ), - 125 => wire__crate__api__protocol__types__filter__Filter_custom_tag_impl( + 129 => wire__crate__api__protocol__types__filter__Filter_custom_tag_impl( ptr, rust_vec_len, data_len, ), - 126 => wire__crate__api__protocol__types__filter__Filter_event_impl( + 130 => wire__crate__api__protocol__types__filter__Filter_event_impl( ptr, rust_vec_len, data_len, ), - 127 => wire__crate__api__protocol__types__filter__Filter_events_impl( + 131 => wire__crate__api__protocol__types__filter__Filter_events_impl( ptr, rust_vec_len, data_len, ), - 128 => wire__crate__api__protocol__types__filter__Filter_from_json_impl( + 132 => wire__crate__api__protocol__types__filter__Filter_from_json_impl( ptr, rust_vec_len, data_len, ), - 129 => wire__crate__api__protocol__types__filter__Filter_hashtag_impl( + 133 => wire__crate__api__protocol__types__filter__Filter_hashtag_impl( ptr, rust_vec_len, data_len, ), - 130 => wire__crate__api__protocol__types__filter__Filter_hashtags_impl( + 134 => wire__crate__api__protocol__types__filter__Filter_hashtags_impl( ptr, rust_vec_len, data_len, ), - 131 => { + 135 => { wire__crate__api__protocol__types__filter__Filter_id_impl(ptr, rust_vec_len, data_len) } - 132 => wire__crate__api__protocol__types__filter__Filter_identifier_impl( + 136 => wire__crate__api__protocol__types__filter__Filter_identifier_impl( ptr, rust_vec_len, data_len, ), - 133 => wire__crate__api__protocol__types__filter__Filter_identifiers_impl( + 137 => wire__crate__api__protocol__types__filter__Filter_identifiers_impl( ptr, rust_vec_len, data_len, ), - 134 => { + 138 => { wire__crate__api__protocol__types__filter__Filter_ids_impl(ptr, rust_vec_len, data_len) } - 135 => wire__crate__api__protocol__types__filter__Filter_is_empty_impl( + 139 => wire__crate__api__protocol__types__filter__Filter_is_empty_impl( ptr, rust_vec_len, data_len, ), - 136 => { + 140 => { wire__crate__api__protocol__types__filter__Filter_kind_impl(ptr, rust_vec_len, data_len) } - 137 => wire__crate__api__protocol__types__filter__Filter_kinds_impl( + 141 => wire__crate__api__protocol__types__filter__Filter_kinds_impl( ptr, rust_vec_len, data_len, ), - 138 => wire__crate__api__protocol__types__filter__Filter_limit_impl( + 142 => wire__crate__api__protocol__types__filter__Filter_limit_impl( ptr, rust_vec_len, data_len, ), - 139 => wire__crate__api__protocol__types__filter__Filter_match_event_impl( + 143 => wire__crate__api__protocol__types__filter__Filter_match_event_impl( ptr, rust_vec_len, data_len, ), - 140 => { + 144 => { wire__crate__api__protocol__types__filter__Filter_new_impl(ptr, rust_vec_len, data_len) } - 141 => wire__crate__api__protocol__types__filter__Filter_pubkey_impl( + 145 => wire__crate__api__protocol__types__filter__Filter_pubkey_impl( + ptr, + rust_vec_len, + data_len, + ), + 146 => wire__crate__api__protocol__types__filter__Filter_pubkeys_impl( + ptr, + rust_vec_len, + data_len, + ), + 147 => wire__crate__api__protocol__types__filter__Filter_reference_impl( + ptr, + rust_vec_len, + data_len, + ), + 148 => wire__crate__api__protocol__types__filter__Filter_references_impl( + ptr, + rust_vec_len, + data_len, + ), + 149 => wire__crate__api__protocol__types__filter__Filter_remove_authors_impl( ptr, rust_vec_len, data_len, ), - 142 => wire__crate__api__protocol__types__filter__Filter_pubkeys_impl( + 150 => wire__crate__api__protocol__types__filter__Filter_remove_custom_tag_impl( ptr, rust_vec_len, data_len, ), - 143 => wire__crate__api__protocol__types__filter__Filter_reference_impl( + 151 => wire__crate__api__protocol__types__filter__Filter_remove_events_impl( ptr, rust_vec_len, data_len, ), - 144 => wire__crate__api__protocol__types__filter__Filter_references_impl( + 152 => wire__crate__api__protocol__types__filter__Filter_remove_hashtags_impl( ptr, rust_vec_len, data_len, ), - 145 => wire__crate__api__protocol__types__filter__Filter_remove_authors_impl( + 153 => wire__crate__api__protocol__types__filter__Filter_remove_identifiers_impl( ptr, rust_vec_len, data_len, ), - 146 => wire__crate__api__protocol__types__filter__Filter_remove_custom_tag_impl( + 154 => wire__crate__api__protocol__types__filter__Filter_remove_ids_impl( ptr, rust_vec_len, data_len, ), - 147 => wire__crate__api__protocol__types__filter__Filter_remove_events_impl( + 155 => wire__crate__api__protocol__types__filter__Filter_remove_kinds_impl( ptr, rust_vec_len, data_len, ), - 148 => wire__crate__api__protocol__types__filter__Filter_remove_hashtags_impl( + 156 => wire__crate__api__protocol__types__filter__Filter_remove_limit_impl( ptr, rust_vec_len, data_len, ), - 149 => wire__crate__api__protocol__types__filter__Filter_remove_identifiers_impl( + 157 => wire__crate__api__protocol__types__filter__Filter_remove_pubkeys_impl( ptr, rust_vec_len, data_len, ), - 150 => wire__crate__api__protocol__types__filter__Filter_remove_ids_impl( + 158 => wire__crate__api__protocol__types__filter__Filter_remove_references_impl( ptr, rust_vec_len, data_len, ), - 151 => wire__crate__api__protocol__types__filter__Filter_remove_kinds_impl( + 159 => wire__crate__api__protocol__types__filter__Filter_remove_search_impl( ptr, rust_vec_len, data_len, ), - 152 => wire__crate__api__protocol__types__filter__Filter_remove_limit_impl( + 160 => wire__crate__api__protocol__types__filter__Filter_remove_since_impl( ptr, rust_vec_len, data_len, ), - 153 => wire__crate__api__protocol__types__filter__Filter_remove_pubkeys_impl( + 161 => wire__crate__api__protocol__types__filter__Filter_remove_until_impl( ptr, rust_vec_len, data_len, ), - 154 => wire__crate__api__protocol__types__filter__Filter_remove_references_impl( + 162 => wire__crate__api__protocol__types__filter__Filter_search_impl( ptr, rust_vec_len, data_len, ), - 155 => wire__crate__api__protocol__types__filter__Filter_remove_search_impl( + 163 => wire__crate__api__protocol__types__filter__Filter_since_impl( ptr, rust_vec_len, data_len, ), - 156 => wire__crate__api__protocol__types__filter__Filter_remove_since_impl( + 164 => wire__crate__api__protocol__types__filter__Filter_until_impl( ptr, rust_vec_len, data_len, ), - 157 => wire__crate__api__protocol__types__filter__Filter_remove_until_impl( + 165 => wire__crate__api__protocol__types__filter__SingleLetterTag_is_lowercase_impl( ptr, rust_vec_len, data_len, ), - 158 => wire__crate__api__protocol__types__filter__Filter_search_impl( + 166 => wire__crate__api__protocol__types__filter__SingleLetterTag_is_uppercase_impl( ptr, rust_vec_len, data_len, ), - 159 => wire__crate__api__protocol__types__filter__Filter_since_impl( + 167 => wire__crate__api__protocol__types__filter__SingleLetterTag_lowercase_impl( ptr, rust_vec_len, data_len, ), - 160 => wire__crate__api__protocol__types__filter__Filter_until_impl( + 168 => wire__crate__api__protocol__types__filter__SingleLetterTag_uppercase_impl( ptr, rust_vec_len, data_len, ), - 161 => wire__crate__api__protocol__types__filter__SingleLetterTag_is_lowercase_impl( + 169 => wire__crate__api__relay__options__SubscribeAutoCloseOptions_exit_policy_impl( ptr, rust_vec_len, data_len, ), - 162 => wire__crate__api__protocol__types__filter__SingleLetterTag_is_uppercase_impl( + 170 => wire__crate__api__relay__options__SubscribeAutoCloseOptions_idle_timeout_impl( ptr, rust_vec_len, data_len, ), - 163 => wire__crate__api__protocol__types__filter__SingleLetterTag_lowercase_impl( + 171 => wire__crate__api__relay__options__SubscribeAutoCloseOptions_new_impl( ptr, rust_vec_len, data_len, ), - 164 => wire__crate__api__protocol__types__filter__SingleLetterTag_uppercase_impl( + 172 => wire__crate__api__relay__options__SubscribeAutoCloseOptions_timeout_impl( ptr, rust_vec_len, data_len, @@ -9871,6 +10427,26 @@ impl flutter_rust_bridge::IntoIntoDart> for _Single } } +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for FrbWrapper<_SubscribeAutoCloseOptions> { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_, MoiArc<_>>(self.0) + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for FrbWrapper<_SubscribeAutoCloseOptions> +{ +} + +impl flutter_rust_bridge::IntoIntoDart> + for _SubscribeAutoCloseOptions +{ + fn into_into_dart(self) -> FrbWrapper<_SubscribeAutoCloseOptions> { + self.into() + } +} + // Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for FrbWrapper<_Tag> { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { @@ -10055,6 +10631,34 @@ impl flutter_rust_bridge::IntoIntoDart flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::relay::options::ReqExitPolicy::ExitOnEOSE => [0.into_dart()].into_dart(), + crate::api::relay::options::ReqExitPolicy::WaitForEventsAfterEOSE(field0) => { + [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::relay::options::ReqExitPolicy::WaitDurationAfterEOSE(field0) => { + [2.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::relay::options::ReqExitPolicy +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::relay::options::ReqExitPolicy +{ + fn into_into_dart(self) -> crate::api::relay::options::ReqExitPolicy { + 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 { [ @@ -10216,6 +10820,18 @@ impl SseEncode for _SingleLetterTag { } } +impl SseEncode for _SubscribeAutoCloseOptions { + // 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_encode::<_, MoiArc<_>>(self), + serializer, + ); + } +} + impl SseEncode for _Tag { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -10393,6 +11009,19 @@ impl SseEncode } } +impl SseEncode + for RustOpaqueMoi< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner<_SubscribeAutoCloseOptions>, + > +{ + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + impl SseEncode for RustOpaqueMoi> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -10659,6 +11288,26 @@ impl SseEncode for Option<_EventId> { } } +impl SseEncode for Option<_SubscribeAutoCloseOptions> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + <_SubscribeAutoCloseOptions>::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + impl SseEncode for (String, String) { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -10699,6 +11348,28 @@ impl SseEncode for crate::api::client::notification::RelayPoolNotification { } } +impl SseEncode for crate::api::relay::options::ReqExitPolicy { + // 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::relay::options::ReqExitPolicy::ExitOnEOSE => { + ::sse_encode(0, serializer); + } + crate::api::relay::options::ReqExitPolicy::WaitForEventsAfterEOSE(field0) => { + ::sse_encode(1, serializer); + ::sse_encode(field0, serializer); + } + crate::api::relay::options::ReqExitPolicy::WaitDurationAfterEOSE(field0) => { + ::sse_encode(2, serializer); + ::sse_encode(field0, 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) { diff --git a/rust/src/frb_generated.web.rs b/rust/src/frb_generated.web.rs index bf0ca05..c7efb9b 100644 --- a/rust/src/frb_generated.web.rs +++ b/rust/src/frb_generated.web.rs @@ -18,6 +18,7 @@ use crate::api::protocol::key::*; use crate::api::protocol::nips::nip59::*; use crate::api::protocol::signer::*; use crate::api::protocol::types::filter::*; +use crate::api::relay::options::*; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::wasm_bindgen; use flutter_rust_bridge::for_generated::wasm_bindgen::prelude::*; @@ -210,6 +211,20 @@ pub fn rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generat MoiArc::>::decrement_strong_count(ptr as _); } +#[wasm_bindgen] +pub fn rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + ptr: *const std::ffi::c_void, +) { + MoiArc::>::increment_strong_count(ptr as _); +} + +#[wasm_bindgen] +pub fn rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_SubscribeAutoCloseOptions( + ptr: *const std::ffi::c_void, +) { + MoiArc::>::decrement_strong_count(ptr as _); +} + #[wasm_bindgen] pub fn rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( ptr: *const std::ffi::c_void,