diff --git a/CHANGELOG.md b/CHANGELOG.md index c78ce85..39016f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ * Expose `EventId` ([Yuki Kishimoto]) * Expose `Alphabet`, `SingleLetterTag` and `Filter` ([Yuki Kishimoto]) +* Expose `Client::fetch_events` ([Yuki Kishimoto]) ### Fixed diff --git a/lib/src/rust/api/client.dart b/lib/src/rust/api/client.dart index 6a86092..b740791 100644 --- a/lib/src/rust/api/client.dart +++ b/lib/src/rust/api/client.dart @@ -10,6 +10,7 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'protocol/event.dart'; import 'protocol/event/builder.dart'; import 'protocol/signer.dart'; +import 'protocol/types/filter.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` @@ -67,6 +68,13 @@ abstract class Client implements RustOpaqueInterface { /// Disconnect relay Future disconnectRelay({required String url}); + /// Fetch events from relays + /// + /// 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). + Future> fetchEvents( + {required List filters, required Duration timeout}); + /// Disconnect and force remove all relays Future forceRemoveAllRelays(); diff --git a/lib/src/rust/frb_generated.dart b/lib/src/rust/frb_generated.dart index e13f524..38ad1b8 100644 --- a/lib/src/rust/frb_generated.dart +++ b/lib/src/rust/frb_generated.dart @@ -73,7 +73,7 @@ class NostrSdk String get codegenVersion => '2.0.0'; @override - int get rustContentHash => -1971857889; + int get rustContentHash => -1436647437; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( @@ -113,6 +113,11 @@ abstract class NostrSdkApi extends BaseApi { Future crateApiClientClientDisconnectRelay( {required Client that, required String url}); + Future> crateApiClientClientFetchEvents( + {required Client that, + required List filters, + required Duration timeout}); + Future crateApiClientClientForceRemoveAllRelays({required Client that}); Future crateApiClientClientForceRemoveRelay( @@ -919,6 +924,39 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { argNames: ["that", "url"], ); + @override + Future> crateApiClientClientFetchEvents( + {required Client that, + required List filters, + required Duration timeout}) { + 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_Chrono_Duration(timeout, serializer); + pdeCallFfi(generalizedFrbRustBinding, serializer, + funcId: 12, port: port_); + }, + codec: SseCodec( + decodeSuccessData: + sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event, + decodeErrorData: sse_decode_AnyhowException, + ), + constMeta: kCrateApiClientClientFetchEventsConstMeta, + argValues: [that, filters, timeout], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiClientClientFetchEventsConstMeta => + const TaskConstMeta( + debugName: "Client_fetch_events", + argNames: ["that", "filters", "timeout"], + ); + @override Future crateApiClientClientForceRemoveAllRelays( {required Client that}) { @@ -928,7 +966,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 12, port: port_); + funcId: 13, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -956,7 +994,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_String(url, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 13, port: port_); + funcId: 14, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -982,7 +1020,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 14, port: port_); + funcId: 15, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -1005,7 +1043,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 15)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 16)!; }, codec: SseCodec( decodeSuccessData: @@ -1031,7 +1069,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 16, port: port_); + funcId: 17, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -1059,7 +1097,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { that, serializer); sse_encode_String(url, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 17, port: port_); + funcId: 18, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -1085,7 +1123,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 18, port: port_); + funcId: 19, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -1113,7 +1151,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( event, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 19, port: port_); + funcId: 20, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_send_event_output, @@ -1142,7 +1180,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventBuilder( builder, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 20, port: port_); + funcId: 21, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_send_event_output, @@ -1171,7 +1209,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_NostrSigner( signer, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 21, port: port_); + funcId: 22, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -1197,7 +1235,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 22, port: port_); + funcId: 23, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -1223,7 +1261,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 23, port: port_); + funcId: 24, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -1249,7 +1287,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Client( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 24, port: port_); + funcId: 25, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -1275,7 +1313,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: 25)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 26)!; }, codec: SseCodec( decodeSuccessData: @@ -1299,7 +1337,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 26)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 27)!; }, codec: SseCodec( decodeSuccessData: @@ -1328,7 +1366,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: 27)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 28)!; }, codec: SseCodec( decodeSuccessData: @@ -1357,7 +1395,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: 28)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 29)!; }, codec: SseCodec( decodeSuccessData: @@ -1385,7 +1423,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: 29)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 30)!; }, codec: SseCodec( decodeSuccessData: @@ -1413,7 +1451,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: 30)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 31)!; }, codec: SseCodec( decodeSuccessData: @@ -1444,7 +1482,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: 31)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 32)!; }, codec: SseCodec( decodeSuccessData: @@ -1472,7 +1510,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: 33)!; }, codec: SseCodec( decodeSuccessData: @@ -1500,7 +1538,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: 33)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 34)!; }, codec: SseCodec( decodeSuccessData: @@ -1524,7 +1562,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 34)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 35)!; }, codec: SseCodec( decodeSuccessData: @@ -1552,7 +1590,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: 35)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 36)!; }, codec: SseCodec( decodeSuccessData: @@ -1579,7 +1617,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: 36)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 37)!; }, codec: SseCodec( decodeSuccessData: @@ -1607,7 +1645,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: 37)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 38)!; }, codec: SseCodec( decodeSuccessData: @@ -1636,7 +1674,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: 38)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 39)!; }, codec: SseCodec( decodeSuccessData: @@ -1660,7 +1698,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 39)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 40)!; }, codec: SseCodec( decodeSuccessData: @@ -1688,7 +1726,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: 40)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 41)!; }, codec: SseCodec( decodeSuccessData: @@ -1714,7 +1752,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: 41)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 42)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -1739,7 +1777,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 42)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 43)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -1764,7 +1802,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 43)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 44)!; }, codec: SseCodec( decodeSuccessData: @@ -1790,7 +1828,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 44)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 45)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -1815,7 +1853,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 45)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 46)!; }, codec: SseCodec( decodeSuccessData: sse_decode_u_64, @@ -1839,7 +1877,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(json, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 46)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 47)!; }, codec: SseCodec( decodeSuccessData: @@ -1865,7 +1903,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 47)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 48)!; }, codec: SseCodec( decodeSuccessData: @@ -1891,7 +1929,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 48)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 49)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -1916,7 +1954,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 49)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 50)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -1941,7 +1979,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 50)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 51)!; }, codec: SseCodec( decodeSuccessData: sse_decode_u_16, @@ -1966,7 +2004,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 51)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 52)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -1991,7 +2029,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 52)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 53)!; }, codec: SseCodec( decodeSuccessData: @@ -2017,7 +2055,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 53)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 54)!; }, codec: SseCodec( decodeSuccessData: sse_decode_unit, @@ -2042,7 +2080,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 54)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 55)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2067,7 +2105,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 55)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 56)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2095,7 +2133,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: 56)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 57)!; }, codec: SseCodec( decodeSuccessData: @@ -2123,7 +2161,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: 57)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 58)!; }, codec: SseCodec( decodeSuccessData: @@ -2152,7 +2190,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: 58)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 59)!; }, codec: SseCodec( decodeSuccessData: @@ -2180,7 +2218,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: 59)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 60)!; }, codec: SseCodec( decodeSuccessData: @@ -2210,7 +2248,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_NostrSigner( signer, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 60, port: port_); + funcId: 61, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -2239,7 +2277,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: 61)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 62)!; }, codec: SseCodec( decodeSuccessData: @@ -2269,7 +2307,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: 62)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 63)!; }, codec: SseCodec( decodeSuccessData: @@ -2298,7 +2336,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: 63)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 64)!; }, codec: SseCodec( decodeSuccessData: @@ -2324,7 +2362,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(content, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 64)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 65)!; }, codec: SseCodec( decodeSuccessData: @@ -2350,7 +2388,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: 65)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 66)!; }, codec: SseCodec( decodeSuccessData: @@ -2386,7 +2424,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: 66)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 67)!; }, codec: SseCodec( decodeSuccessData: @@ -2411,7 +2449,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(id, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 67)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 68)!; }, codec: SseCodec( decodeSuccessData: @@ -2437,7 +2475,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: 68)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 69)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2462,7 +2500,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: 69)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 70)!; }, codec: SseCodec( decodeSuccessData: sse_decode_list_prim_u_8_strict, @@ -2487,7 +2525,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: 70)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 71)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2512,7 +2550,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: 71)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 72)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2537,7 +2575,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: 72)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 73)!; }, codec: SseCodec( decodeSuccessData: sse_decode_list_String, @@ -2562,7 +2600,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: 73)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 74)!; }, codec: SseCodec( decodeSuccessData: sse_decode_opt_String, @@ -2587,7 +2625,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: 74)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 75)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2612,7 +2650,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: 75)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 76)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2637,7 +2675,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: 76)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 77)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -2662,7 +2700,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Tag( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 77)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 78)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2686,7 +2724,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_list_String(tag, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 78)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 79)!; }, codec: SseCodec( decodeSuccessData: @@ -2712,7 +2750,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: 79)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 80)!; }, codec: SseCodec( decodeSuccessData: sse_decode_list_String, @@ -2739,7 +2777,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: 80)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 81)!; }, codec: SseCodec( decodeSuccessData: @@ -2768,7 +2806,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: 81)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 82)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2795,7 +2833,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: 82)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 83)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2823,7 +2861,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: 83)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 84)!; }, codec: SseCodec( decodeSuccessData: @@ -2851,7 +2889,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: 84)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 85)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -2878,7 +2916,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: 85)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 86)!; }, codec: SseCodec( decodeSuccessData: sse_decode_u_64, @@ -2904,7 +2942,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(json, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 86)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 87)!; }, codec: SseCodec( decodeSuccessData: @@ -2932,7 +2970,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 87)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 88)!; }, codec: SseCodec( decodeSuccessData: @@ -2959,7 +2997,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 88)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 89)!; }, codec: SseCodec( decodeSuccessData: sse_decode_u_16, @@ -2985,7 +3023,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 89)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 90)!; }, codec: SseCodec( decodeSuccessData: @@ -3009,7 +3047,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 90)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 91)!; }, codec: SseCodec( decodeSuccessData: @@ -3035,7 +3073,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: 91)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 92)!; }, codec: SseCodec( decodeSuccessData: @@ -3059,7 +3097,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(secretKey, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 92)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 93)!; }, codec: SseCodec( decodeSuccessData: @@ -3085,7 +3123,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: 93)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 94)!; }, codec: SseCodec( decodeSuccessData: @@ -3111,7 +3149,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: 94)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 95)!; }, codec: SseCodec( decodeSuccessData: @@ -3137,7 +3175,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: 95)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 96)!; }, codec: SseCodec( decodeSuccessData: @@ -3163,7 +3201,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(publicKey, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 96)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 97)!; }, codec: SseCodec( decodeSuccessData: @@ -3190,7 +3228,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: 97)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 98)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3215,7 +3253,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: 98)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 99)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3241,7 +3279,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: 99)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 100)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3266,7 +3304,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: 100)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 101)!; }, codec: SseCodec( decodeSuccessData: @@ -3290,7 +3328,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 101)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 102)!; }, codec: SseCodec( decodeSuccessData: @@ -3316,7 +3354,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(secretKey, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 102)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 103)!; }, codec: SseCodec( decodeSuccessData: @@ -3343,7 +3381,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: 103)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 104)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3369,7 +3407,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: 104)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 105)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3396,7 +3434,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: 105)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 106)!; }, codec: SseCodec( decodeSuccessData: sse_decode_signer_backend, @@ -3423,7 +3461,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_NostrSigner( that, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 106, port: port_); + funcId: 107, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -3449,7 +3487,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: 107)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 108)!; }, codec: SseCodec( decodeSuccessData: @@ -3482,7 +3520,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { publicKey, serializer); sse_encode_String(encryptedContent, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 108, port: port_); + funcId: 109, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3514,7 +3552,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { publicKey, serializer); sse_encode_String(content, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 109, port: port_); + funcId: 110, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3546,7 +3584,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { publicKey, serializer); sse_encode_String(payload, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 110, port: port_); + funcId: 111, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3578,7 +3616,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { publicKey, serializer); sse_encode_String(content, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 111, port: port_); + funcId: 112, port: port_); }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3607,7 +3645,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( unsignedEvent, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, - funcId: 112, port: port_); + funcId: 113, port: port_); }, codec: SseCodec( decodeSuccessData: @@ -3633,7 +3671,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: 113)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 114)!; }, codec: SseCodec( decodeSuccessData: sse_decode_String, @@ -3661,7 +3699,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: 114)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 115)!; }, codec: SseCodec( decodeSuccessData: @@ -3690,7 +3728,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: 115)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 116)!; }, codec: SseCodec( decodeSuccessData: @@ -3722,7 +3760,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: 116)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 117)!; }, codec: SseCodec( decodeSuccessData: @@ -3751,7 +3789,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: 117)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 118)!; }, codec: SseCodec( decodeSuccessData: @@ -3780,7 +3818,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: 118)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 119)!; }, codec: SseCodec( decodeSuccessData: @@ -3805,7 +3843,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_String(json, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 119)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 120)!; }, codec: SseCodec( decodeSuccessData: @@ -3833,7 +3871,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: 120)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 121)!; }, codec: SseCodec( decodeSuccessData: @@ -3861,7 +3899,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: 121)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 122)!; }, codec: SseCodec( decodeSuccessData: @@ -3890,7 +3928,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: 122)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 123)!; }, codec: SseCodec( decodeSuccessData: @@ -3918,7 +3956,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: 123)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 124)!; }, codec: SseCodec( decodeSuccessData: @@ -3946,7 +3984,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: 124)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 125)!; }, codec: SseCodec( decodeSuccessData: @@ -3975,7 +4013,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: 125)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 126)!; }, codec: SseCodec( decodeSuccessData: @@ -4001,7 +4039,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: 126)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 127)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -4028,7 +4066,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: 127)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 128)!; }, codec: SseCodec( decodeSuccessData: @@ -4056,7 +4094,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: 128)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 129)!; }, codec: SseCodec( decodeSuccessData: @@ -4084,7 +4122,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: 129)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 130)!; }, codec: SseCodec( decodeSuccessData: @@ -4113,7 +4151,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: 130)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 131)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -4136,7 +4174,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return handler.executeSync(SyncTask( callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 131)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 132)!; }, codec: SseCodec( decodeSuccessData: @@ -4165,7 +4203,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: 132)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 133)!; }, codec: SseCodec( decodeSuccessData: @@ -4194,7 +4232,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: 133)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 134)!; }, codec: SseCodec( decodeSuccessData: @@ -4222,7 +4260,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: 134)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 135)!; }, codec: SseCodec( decodeSuccessData: @@ -4250,7 +4288,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( that, serializer); sse_encode_list_String(references, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 135)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 136)!; }, codec: SseCodec( decodeSuccessData: @@ -4279,7 +4317,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: 136)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 137)!; }, codec: SseCodec( decodeSuccessData: @@ -4311,7 +4349,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: 137)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 138)!; }, codec: SseCodec( decodeSuccessData: @@ -4341,7 +4379,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: 138)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 139)!; }, codec: SseCodec( decodeSuccessData: @@ -4369,7 +4407,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: 139)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 140)!; }, codec: SseCodec( decodeSuccessData: @@ -4397,7 +4435,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: 140)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 141)!; }, codec: SseCodec( decodeSuccessData: @@ -4427,7 +4465,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: 141)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 142)!; }, codec: SseCodec( decodeSuccessData: @@ -4455,7 +4493,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: 142)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 143)!; }, codec: SseCodec( decodeSuccessData: @@ -4481,7 +4519,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: 143)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 144)!; }, codec: SseCodec( decodeSuccessData: @@ -4510,7 +4548,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: 144)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 145)!; }, codec: SseCodec( decodeSuccessData: @@ -4538,7 +4576,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: 145)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 146)!; }, codec: SseCodec( decodeSuccessData: @@ -4565,7 +4603,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: 146)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 147)!; }, codec: SseCodec( decodeSuccessData: @@ -4591,7 +4629,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: 147)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 148)!; }, codec: SseCodec( decodeSuccessData: @@ -4617,7 +4655,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: 148)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 149)!; }, codec: SseCodec( decodeSuccessData: @@ -4645,7 +4683,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: 149)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 150)!; }, codec: SseCodec( decodeSuccessData: @@ -4673,7 +4711,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: 150)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 151)!; }, codec: SseCodec( decodeSuccessData: @@ -4701,7 +4739,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: 151)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 152)!; }, codec: SseCodec( decodeSuccessData: @@ -4728,7 +4766,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: 152)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 153)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -4756,7 +4794,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: 153)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 154)!; }, codec: SseCodec( decodeSuccessData: sse_decode_bool, @@ -4783,7 +4821,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_alphabet(character, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 154)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 155)!; }, codec: SseCodec( decodeSuccessData: @@ -4810,7 +4848,7 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { callFfi: () { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_alphabet(character, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 155)!; + return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 156)!; }, codec: SseCodec( decodeSuccessData: @@ -5188,6 +5226,12 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return UnsignedEventImpl.frbInternalDcoDecode(raw as List); } + @protected + Duration dco_decode_Chrono_Duration(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeDuration(dco_decode_i_64(raw).toInt()); + } + @protected Map dco_decode_Map_String_String(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -5384,6 +5428,23 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return raw as int; } + @protected + PlatformInt64 dco_decode_i_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeI64(raw); + } + + @protected + List + dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List) + .map( + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event) + .toList(); + } + @protected List dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( @@ -5395,6 +5456,17 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { .toList(); } + @protected + List + dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List) + .map( + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter) + .toList(); + } + @protected List dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( @@ -5820,6 +5892,13 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } + @protected + Duration sse_decode_Chrono_Duration(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_64(deserializer); + return Duration(microseconds: inner.toInt()); + } + @protected Map sse_decode_Map_String_String( SseDeserializer deserializer) { @@ -6037,6 +6116,28 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return deserializer.buffer.getInt32(); } + @protected + PlatformInt64 sse_decode_i_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getPlatformInt64(); + } + + @protected + List + sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add( + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + deserializer)); + } + return ans_; + } + @protected List sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( @@ -6053,6 +6154,22 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { return ans_; } + @protected + List + sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add( + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + deserializer)); + } + return ans_; + } + @protected List sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( @@ -6519,6 +6636,12 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { serializer); } + @protected + void sse_encode_Chrono_Duration(Duration self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_64(PlatformInt64Util.from(self.inMicroseconds), serializer); + } + @protected void sse_encode_Map_String_String( Map self, SseSerializer serializer) { @@ -6738,6 +6861,24 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { serializer.buffer.putInt32(self); } + @protected + void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putPlatformInt64(self); + } + + @protected + void + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + item, serializer); + } + } + @protected void sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( @@ -6750,6 +6891,18 @@ class NostrSdkApiImpl extends NostrSdkApiImplPlatform implements NostrSdkApi { } } + @protected + void + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + item, serializer); + } + } + @protected void sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( @@ -7028,6 +7181,15 @@ class ClientImpl extends RustOpaque implements Client { Future disconnectRelay({required String url}) => NostrSdk.instance.api .crateApiClientClientDisconnectRelay(that: this, url: url); + /// Fetch events from relays + /// + /// 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). + Future> fetchEvents( + {required List filters, required Duration timeout}) => + NostrSdk.instance.api.crateApiClientClientFetchEvents( + that: this, filters: filters, timeout: timeout); + /// Disconnect and force remove all relays Future forceRemoveAllRelays() => NostrSdk.instance.api.crateApiClientClientForceRemoveAllRelays( diff --git a/lib/src/rust/frb_generated.io.dart b/lib/src/rust/frb_generated.io.dart index 865fa31..30f528e 100644 --- a/lib/src/rust/frb_generated.io.dart +++ b/lib/src/rust/frb_generated.io.dart @@ -234,6 +234,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( dynamic raw); + @protected + Duration dco_decode_Chrono_Duration(dynamic raw); + @protected Map dco_decode_Map_String_String(dynamic raw); @@ -340,11 +343,24 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected int dco_decode_i_32(dynamic raw); + @protected + PlatformInt64 dco_decode_i_64(dynamic raw); + + @protected + List + dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + dynamic raw); + @protected List dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( dynamic raw); + @protected + List + dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + dynamic raw); + @protected List dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( @@ -556,6 +572,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( SseDeserializer deserializer); + @protected + Duration sse_decode_Chrono_Duration(SseDeserializer deserializer); + @protected Map sse_decode_Map_String_String( SseDeserializer deserializer); @@ -664,11 +683,24 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected int sse_decode_i_32(SseDeserializer deserializer); + @protected + PlatformInt64 sse_decode_i_64(SseDeserializer deserializer); + + @protected + List + sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + SseDeserializer deserializer); + @protected List sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( SseDeserializer deserializer); + @protected + List + sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + SseDeserializer deserializer); + @protected List sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( @@ -885,6 +917,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( UnsignedEvent self, SseSerializer serializer); + @protected + void sse_encode_Chrono_Duration(Duration self, SseSerializer serializer); + @protected void sse_encode_Map_String_String( Map self, SseSerializer serializer); @@ -996,11 +1031,24 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected void sse_encode_i_32(int self, SseSerializer serializer); + @protected + void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer); + + @protected + void + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + List self, SseSerializer serializer); + @protected void sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( List self, SseSerializer serializer); + @protected + void + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + List self, SseSerializer serializer); + @protected void sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( diff --git a/lib/src/rust/frb_generated.web.dart b/lib/src/rust/frb_generated.web.dart index 276141a..e0bc52b 100644 --- a/lib/src/rust/frb_generated.web.dart +++ b/lib/src/rust/frb_generated.web.dart @@ -236,6 +236,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( dynamic raw); + @protected + Duration dco_decode_Chrono_Duration(dynamic raw); + @protected Map dco_decode_Map_String_String(dynamic raw); @@ -342,11 +345,24 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected int dco_decode_i_32(dynamic raw); + @protected + PlatformInt64 dco_decode_i_64(dynamic raw); + + @protected + List + dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + dynamic raw); + @protected List dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( dynamic raw); + @protected + List + dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + dynamic raw); + @protected List dco_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( @@ -558,6 +574,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( SseDeserializer deserializer); + @protected + Duration sse_decode_Chrono_Duration(SseDeserializer deserializer); + @protected Map sse_decode_Map_String_String( SseDeserializer deserializer); @@ -666,11 +685,24 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected int sse_decode_i_32(SseDeserializer deserializer); + @protected + PlatformInt64 sse_decode_i_64(SseDeserializer deserializer); + + @protected + List + sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + SseDeserializer deserializer); + @protected List sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( SseDeserializer deserializer); + @protected + List + sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + SseDeserializer deserializer); + @protected List sse_decode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( @@ -887,6 +919,9 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_UnsignedEvent( UnsignedEvent self, SseSerializer serializer); + @protected + void sse_encode_Chrono_Duration(Duration self, SseSerializer serializer); + @protected void sse_encode_Map_String_String( Map self, SseSerializer serializer); @@ -998,11 +1033,24 @@ abstract class NostrSdkApiImplPlatform extends BaseApiImpl { @protected void sse_encode_i_32(int self, SseSerializer serializer); + @protected + void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer); + + @protected + void + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Event( + List self, SseSerializer serializer); + @protected void sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_EventId( List self, SseSerializer serializer); + @protected + void + sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_Filter( + List self, SseSerializer serializer); + @protected void sse_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInner_PublicKey( diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 0ee4b77..9817a87 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -75,6 +75,7 @@ dependencies = [ "anyhow", "atomic 0.5.3", "backtrace", + "chrono", ] [[package]] @@ -1564,6 +1565,7 @@ dependencies = [ "build-target", "bytemuck", "byteorder", + "chrono", "console_error_panic_hook", "dart-sys-fork", "delegate-attr", @@ -2736,6 +2738,7 @@ name = "nostr_sdk" version = "0.1.0" dependencies = [ "anyhow", + "chrono", "flutter_rust_bridge", "flutter_rust_bridge_codegen", "nostr-sdk", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 6b20fba..bb7c34b 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -18,7 +18,8 @@ codegen = ["dep:flutter_rust_bridge_codegen"] [dependencies] anyhow = "1.0" -flutter_rust_bridge = "=2.0.0" +chrono = "0.4" +flutter_rust_bridge = { version = "=2.0.0", features = ["anyhow", "chrono"] } flutter_rust_bridge_codegen = { version = "=2.0.0", optional = true } nostr-sdk = { git = "https://github.com/rust-nostr/nostr", rev = "c54427849014e8451af54a56664e633e4dc0fac1", default-features = false, features = ["all-nips", "tor"] } diff --git a/rust/src/api/client/mod.rs b/rust/src/api/client/mod.rs index 3395934..2dff0d0 100644 --- a/rust/src/api/client/mod.rs +++ b/rust/src/api/client/mod.rs @@ -3,6 +3,7 @@ // Distributed under the MIT software license use anyhow::Result; +use chrono::Duration; use flutter_rust_bridge::frb; use nostr_sdk::prelude::*; @@ -15,6 +16,7 @@ use self::output::SendEventOutput; use super::protocol::event::_Event; use super::protocol::event::builder::_EventBuilder; use super::protocol::signer::_NostrSigner; +use super::protocol::types::filter::_Filter; #[frb(name = "Client")] pub struct _Client { @@ -182,6 +184,21 @@ impl _Client { Ok(self.inner.disconnect().await?) } + /// Fetch events from relays + /// + /// 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). + // TODO: return `Events` struct + pub async fn fetch_events( + &self, + filters: Vec<_Filter>, + timeout: Duration, + ) -> Result> { + let filters = filters.into_iter().map(|f| f.inner).collect(); + let events = self.inner.fetch_events(filters, timeout.to_std()?).await?; + Ok(events.into_iter().map(|e| e.into()).collect()) + } + /// Send event /// /// Send `Event` to all relays with `WRITE` flag. diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs index 1cbcf85..6398bf5 100644 --- a/rust/src/frb_generated.rs +++ b/rust/src/frb_generated.rs @@ -50,7 +50,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 = -1971857889; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -1436647437; // Section: executor @@ -640,6 +640,68 @@ fn wire__crate__api__client__Client_disconnect_relay_impl( }, ) } +fn wire__crate__api__client__Client_fetch_events_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_fetch_events", + 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_timeout = ::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::fetch_events( + &*api_that_guard, + api_filters, + api_timeout, + ) + .await?; + Ok(output_ok) + })() + .await, + ) + } + }, + ) +} fn wire__crate__api__client__Client_force_remove_all_relays_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, @@ -7866,6 +7928,14 @@ impl SseDecode for _UnsignedEvent { } } +impl SseDecode for chrono::Duration { + // 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 chrono::Duration::microseconds(inner); + } +} + impl SseDecode for std::collections::HashMap { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -8117,6 +8187,25 @@ impl SseDecode for i32 { } } +impl SseDecode for i64 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + deserializer.cursor.read_i64::().unwrap() + } +} + +impl SseDecode for Vec<_Event> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(<_Event>::sse_decode(deserializer)); + } + return ans_; + } +} + impl SseDecode for Vec<_EventId> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -8129,6 +8218,18 @@ impl SseDecode for Vec<_EventId> { } } +impl SseDecode for Vec<_Filter> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(<_Filter>::sse_decode(deserializer)); + } + return ans_; + } +} + impl SseDecode for Vec<_PublicKey> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -8336,75 +8437,76 @@ fn pde_ffi_dispatcher_primary_impl( rust_vec_len, data_len, ), - 12 => wire__crate__api__client__Client_force_remove_all_relays_impl( + 12 => wire__crate__api__client__Client_fetch_events_impl(port, ptr, rust_vec_len, data_len), + 13 => wire__crate__api__client__Client_force_remove_all_relays_impl( port, ptr, rust_vec_len, data_len, ), - 13 => wire__crate__api__client__Client_force_remove_relay_impl( + 14 => wire__crate__api__client__Client_force_remove_relay_impl( port, ptr, rust_vec_len, data_len, ), - 14 => wire__crate__api__client__Client_has_signer_impl(port, ptr, rust_vec_len, data_len), - 16 => wire__crate__api__client__Client_remove_all_relays_impl( + 15 => wire__crate__api__client__Client_has_signer_impl(port, ptr, rust_vec_len, data_len), + 17 => wire__crate__api__client__Client_remove_all_relays_impl( port, ptr, rust_vec_len, data_len, ), - 17 => wire__crate__api__client__Client_remove_relay_impl(port, ptr, rust_vec_len, data_len), - 18 => wire__crate__api__client__Client_reset_impl(port, ptr, rust_vec_len, data_len), - 19 => wire__crate__api__client__Client_send_event_impl(port, ptr, rust_vec_len, data_len), - 20 => wire__crate__api__client__Client_send_event_builder_impl( + 18 => wire__crate__api__client__Client_remove_relay_impl(port, ptr, rust_vec_len, data_len), + 19 => wire__crate__api__client__Client_reset_impl(port, ptr, rust_vec_len, data_len), + 20 => wire__crate__api__client__Client_send_event_impl(port, ptr, rust_vec_len, data_len), + 21 => wire__crate__api__client__Client_send_event_builder_impl( port, ptr, rust_vec_len, data_len, ), - 21 => wire__crate__api__client__Client_set_signer_impl(port, ptr, rust_vec_len, data_len), - 22 => wire__crate__api__client__Client_shutdown_impl(port, ptr, rust_vec_len, data_len), - 23 => wire__crate__api__client__Client_signer_impl(port, ptr, rust_vec_len, data_len), - 24 => wire__crate__api__client__Client_unset_signer_impl(port, ptr, rust_vec_len, data_len), - 60 => wire__crate__api__protocol__event__builder__EventBuilder_sign_impl( + 22 => wire__crate__api__client__Client_set_signer_impl(port, ptr, rust_vec_len, data_len), + 23 => wire__crate__api__client__Client_shutdown_impl(port, ptr, rust_vec_len, data_len), + 24 => wire__crate__api__client__Client_signer_impl(port, ptr, rust_vec_len, data_len), + 25 => wire__crate__api__client__Client_unset_signer_impl(port, ptr, rust_vec_len, data_len), + 61 => wire__crate__api__protocol__event__builder__EventBuilder_sign_impl( port, ptr, rust_vec_len, data_len, ), - 106 => wire__crate__api__protocol__signer__NostrSigner_get_public_key_impl( + 107 => wire__crate__api__protocol__signer__NostrSigner_get_public_key_impl( port, ptr, rust_vec_len, data_len, ), - 108 => wire__crate__api__protocol__signer__NostrSigner_nip04_decrypt_impl( + 109 => wire__crate__api__protocol__signer__NostrSigner_nip04_decrypt_impl( port, ptr, rust_vec_len, data_len, ), - 109 => wire__crate__api__protocol__signer__NostrSigner_nip04_encrypt_impl( + 110 => wire__crate__api__protocol__signer__NostrSigner_nip04_encrypt_impl( port, ptr, rust_vec_len, data_len, ), - 110 => wire__crate__api__protocol__signer__NostrSigner_nip44_decrypt_impl( + 111 => wire__crate__api__protocol__signer__NostrSigner_nip44_decrypt_impl( port, ptr, rust_vec_len, data_len, ), - 111 => wire__crate__api__protocol__signer__NostrSigner_nip44_encrypt_impl( + 112 => wire__crate__api__protocol__signer__NostrSigner_nip44_encrypt_impl( port, ptr, rust_vec_len, data_len, ), - 112 => wire__crate__api__protocol__signer__NostrSigner_sign_event_impl( + 113 => wire__crate__api__protocol__signer__NostrSigner_sign_event_impl( port, ptr, rust_vec_len, @@ -8428,487 +8530,487 @@ fn pde_ffi_dispatcher_sync_impl( data_len, ), 7 => wire__crate__api__client__Client_builder_impl(ptr, rust_vec_len, data_len), - 15 => wire__crate__api__client__Client_new_impl(ptr, rust_vec_len, data_len), - 25 => { + 16 => wire__crate__api__client__Client_new_impl(ptr, rust_vec_len, data_len), + 26 => { wire__crate__api__client__builder__ClientBuilder_build_impl(ptr, rust_vec_len, data_len) } - 26 => { + 27 => { wire__crate__api__client__builder__ClientBuilder_new_impl(ptr, rust_vec_len, data_len) } - 27 => { + 28 => { wire__crate__api__client__builder__ClientBuilder_opts_impl(ptr, rust_vec_len, data_len) } - 28 => wire__crate__api__client__builder__ClientBuilder_signer_impl( + 29 => wire__crate__api__client__builder__ClientBuilder_signer_impl( ptr, rust_vec_len, data_len, ), - 29 => wire__crate__api__client__options__ClientOptions_autoconnect_impl( + 30 => wire__crate__api__client__options__ClientOptions_autoconnect_impl( ptr, rust_vec_len, data_len, ), - 30 => wire__crate__api__client__options__ClientOptions_automatic_authentication_impl( + 31 => wire__crate__api__client__options__ClientOptions_automatic_authentication_impl( ptr, rust_vec_len, data_len, ), - 31 => wire__crate__api__client__options__ClientOptions_connection_impl( + 32 => wire__crate__api__client__options__ClientOptions_connection_impl( ptr, rust_vec_len, data_len, ), - 32 => wire__crate__api__client__options__ClientOptions_gossip_impl( + 33 => wire__crate__api__client__options__ClientOptions_gossip_impl( ptr, rust_vec_len, data_len, ), - 33 => wire__crate__api__client__options__ClientOptions_min_pow_impl( + 34 => wire__crate__api__client__options__ClientOptions_min_pow_impl( ptr, rust_vec_len, data_len, ), - 34 => { + 35 => { wire__crate__api__client__options__ClientOptions_new_impl(ptr, rust_vec_len, data_len) } - 35 => wire__crate__api__client__options__Connection_addr_impl(ptr, rust_vec_len, data_len), - 36 => wire__crate__api__client__options__Connection_embedded_tor_impl( + 36 => wire__crate__api__client__options__Connection_addr_impl(ptr, rust_vec_len, data_len), + 37 => wire__crate__api__client__options__Connection_embedded_tor_impl( ptr, rust_vec_len, data_len, ), - 37 => wire__crate__api__client__options__Connection_embedded_tor_with_path_impl( + 38 => wire__crate__api__client__options__Connection_embedded_tor_with_path_impl( ptr, rust_vec_len, data_len, ), - 38 => wire__crate__api__client__options__Connection_mode_impl(ptr, rust_vec_len, data_len), - 39 => wire__crate__api__client__options__Connection_new_impl(ptr, rust_vec_len, data_len), - 40 => { + 39 => wire__crate__api__client__options__Connection_mode_impl(ptr, rust_vec_len, data_len), + 40 => wire__crate__api__client__options__Connection_new_impl(ptr, rust_vec_len, data_len), + 41 => { wire__crate__api__client__options__Connection_target_impl(ptr, rust_vec_len, data_len) } - 41 => wire__crate__api__protocol__event__Event_as_json_impl(ptr, rust_vec_len, data_len), - 42 => wire__crate__api__protocol__event__Event_as_pretty_json_impl( + 42 => wire__crate__api__protocol__event__Event_as_json_impl(ptr, rust_vec_len, data_len), + 43 => wire__crate__api__protocol__event__Event_as_pretty_json_impl( ptr, rust_vec_len, data_len, ), - 43 => wire__crate__api__protocol__event__Event_author_impl(ptr, rust_vec_len, data_len), - 44 => wire__crate__api__protocol__event__Event_content_impl(ptr, rust_vec_len, data_len), - 45 => wire__crate__api__protocol__event__Event_created_at_impl(ptr, rust_vec_len, data_len), - 46 => wire__crate__api__protocol__event__Event_from_json_impl(ptr, rust_vec_len, data_len), - 47 => wire__crate__api__protocol__event__Event_id_impl(ptr, rust_vec_len, data_len), - 48 => wire__crate__api__protocol__event__Event_is_expired_impl(ptr, rust_vec_len, data_len), - 49 => { + 44 => wire__crate__api__protocol__event__Event_author_impl(ptr, rust_vec_len, data_len), + 45 => wire__crate__api__protocol__event__Event_content_impl(ptr, rust_vec_len, data_len), + 46 => wire__crate__api__protocol__event__Event_created_at_impl(ptr, rust_vec_len, data_len), + 47 => wire__crate__api__protocol__event__Event_from_json_impl(ptr, rust_vec_len, data_len), + 48 => wire__crate__api__protocol__event__Event_id_impl(ptr, rust_vec_len, data_len), + 49 => wire__crate__api__protocol__event__Event_is_expired_impl(ptr, rust_vec_len, data_len), + 50 => { wire__crate__api__protocol__event__Event_is_protected_impl(ptr, rust_vec_len, data_len) } - 50 => wire__crate__api__protocol__event__Event_kind_impl(ptr, rust_vec_len, data_len), - 51 => wire__crate__api__protocol__event__Event_signature_impl(ptr, rust_vec_len, data_len), - 52 => wire__crate__api__protocol__event__Event_tags_impl(ptr, rust_vec_len, data_len), - 53 => wire__crate__api__protocol__event__Event_verify_impl(ptr, rust_vec_len, data_len), - 54 => wire__crate__api__protocol__event__Event_verify_id_impl(ptr, rust_vec_len, data_len), - 55 => wire__crate__api__protocol__event__Event_verify_signature_impl( + 51 => wire__crate__api__protocol__event__Event_kind_impl(ptr, rust_vec_len, data_len), + 52 => wire__crate__api__protocol__event__Event_signature_impl(ptr, rust_vec_len, data_len), + 53 => wire__crate__api__protocol__event__Event_tags_impl(ptr, rust_vec_len, data_len), + 54 => wire__crate__api__protocol__event__Event_verify_impl(ptr, rust_vec_len, data_len), + 55 => wire__crate__api__protocol__event__Event_verify_id_impl(ptr, rust_vec_len, data_len), + 56 => wire__crate__api__protocol__event__Event_verify_signature_impl( ptr, rust_vec_len, data_len, ), - 56 => wire__crate__api__protocol__event__builder__EventBuilder_build_impl( + 57 => wire__crate__api__protocol__event__builder__EventBuilder_build_impl( ptr, rust_vec_len, data_len, ), - 57 => wire__crate__api__protocol__event__builder__EventBuilder_custom_created_at_impl( + 58 => wire__crate__api__protocol__event__builder__EventBuilder_custom_created_at_impl( ptr, rust_vec_len, data_len, ), - 58 => wire__crate__api__protocol__event__builder__EventBuilder_new_impl( + 59 => wire__crate__api__protocol__event__builder__EventBuilder_new_impl( ptr, rust_vec_len, data_len, ), - 59 => wire__crate__api__protocol__event__builder__EventBuilder_pow_impl( + 60 => wire__crate__api__protocol__event__builder__EventBuilder_pow_impl( ptr, rust_vec_len, data_len, ), - 61 => wire__crate__api__protocol__event__builder__EventBuilder_sign_with_keys_impl( + 62 => wire__crate__api__protocol__event__builder__EventBuilder_sign_with_keys_impl( ptr, rust_vec_len, data_len, ), - 62 => wire__crate__api__protocol__event__builder__EventBuilder_tag_impl( + 63 => wire__crate__api__protocol__event__builder__EventBuilder_tag_impl( ptr, rust_vec_len, data_len, ), - 63 => wire__crate__api__protocol__event__builder__EventBuilder_tags_impl( + 64 => wire__crate__api__protocol__event__builder__EventBuilder_tags_impl( ptr, rust_vec_len, data_len, ), - 64 => wire__crate__api__protocol__event__builder__EventBuilder_text_note_impl( + 65 => wire__crate__api__protocol__event__builder__EventBuilder_text_note_impl( ptr, rust_vec_len, data_len, ), - 65 => wire__crate__api__protocol__event__id__EventId_from_slice_impl( + 66 => wire__crate__api__protocol__event__id__EventId_from_slice_impl( ptr, rust_vec_len, data_len, ), - 66 => wire__crate__api__protocol__event__id__EventId_new_impl(ptr, rust_vec_len, data_len), - 67 => { + 67 => wire__crate__api__protocol__event__id__EventId_new_impl(ptr, rust_vec_len, data_len), + 68 => { wire__crate__api__protocol__event__id__EventId_parse_impl(ptr, rust_vec_len, data_len) } - 68 => wire__crate__api__protocol__event__id__EventId_to_bech32_impl( + 69 => wire__crate__api__protocol__event__id__EventId_to_bech32_impl( ptr, rust_vec_len, data_len, ), - 69 => wire__crate__api__protocol__event__id__EventId_to_bytes_impl( + 70 => wire__crate__api__protocol__event__id__EventId_to_bytes_impl( ptr, rust_vec_len, data_len, ), - 70 => { + 71 => { wire__crate__api__protocol__event__id__EventId_to_hex_impl(ptr, rust_vec_len, data_len) } - 71 => wire__crate__api__protocol__event__id__EventId_to_nostr_uri_impl( + 72 => wire__crate__api__protocol__event__id__EventId_to_nostr_uri_impl( ptr, rust_vec_len, data_len, ), - 72 => wire__crate__api__protocol__event__tag__Tag_as_vec_impl(ptr, rust_vec_len, data_len), - 73 => wire__crate__api__protocol__event__tag__Tag_content_impl(ptr, rust_vec_len, data_len), - 74 => wire__crate__api__protocol__event__tag__Tag_is_protected_impl( + 73 => wire__crate__api__protocol__event__tag__Tag_as_vec_impl(ptr, rust_vec_len, data_len), + 74 => wire__crate__api__protocol__event__tag__Tag_content_impl(ptr, rust_vec_len, data_len), + 75 => wire__crate__api__protocol__event__tag__Tag_is_protected_impl( ptr, rust_vec_len, data_len, ), - 75 => { + 76 => { wire__crate__api__protocol__event__tag__Tag_is_reply_impl(ptr, rust_vec_len, data_len) } - 76 => wire__crate__api__protocol__event__tag__Tag_is_root_impl(ptr, rust_vec_len, data_len), - 77 => wire__crate__api__protocol__event__tag__Tag_kind_impl(ptr, rust_vec_len, data_len), - 78 => wire__crate__api__protocol__event__tag__Tag_parse_impl(ptr, rust_vec_len, data_len), - 79 => wire__crate__api__protocol__event__tag__Tag_to_vec_impl(ptr, rust_vec_len, data_len), - 80 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_add_signature_impl( + 77 => wire__crate__api__protocol__event__tag__Tag_is_root_impl(ptr, rust_vec_len, data_len), + 78 => wire__crate__api__protocol__event__tag__Tag_kind_impl(ptr, rust_vec_len, data_len), + 79 => wire__crate__api__protocol__event__tag__Tag_parse_impl(ptr, rust_vec_len, data_len), + 80 => wire__crate__api__protocol__event__tag__Tag_to_vec_impl(ptr, rust_vec_len, data_len), + 81 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_add_signature_impl( ptr, rust_vec_len, data_len, ), - 81 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_json_impl( + 82 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_json_impl( ptr, rust_vec_len, data_len, ), - 82 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_pretty_json_impl( + 83 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_as_pretty_json_impl( ptr, rust_vec_len, data_len, ), - 83 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_author_impl( + 84 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_author_impl( ptr, rust_vec_len, data_len, ), - 84 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_content_impl( + 85 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_content_impl( ptr, rust_vec_len, data_len, ), - 85 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_created_at_impl( + 86 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_created_at_impl( ptr, rust_vec_len, data_len, ), - 86 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_from_json_impl( + 87 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_from_json_impl( ptr, rust_vec_len, data_len, ), - 87 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_id_impl( + 88 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_id_impl( ptr, rust_vec_len, data_len, ), - 88 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_kind_impl( + 89 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_kind_impl( ptr, rust_vec_len, data_len, ), - 89 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_tags_impl( + 90 => wire__crate__api__protocol__event__unsigned__UnsignedEvent_tags_impl( ptr, rust_vec_len, data_len, ), - 90 => wire__crate__api__protocol__key__Keys_generate_impl(ptr, rust_vec_len, data_len), - 91 => wire__crate__api__protocol__key__Keys_new_impl(ptr, rust_vec_len, data_len), - 92 => wire__crate__api__protocol__key__Keys_parse_impl(ptr, rust_vec_len, data_len), - 93 => wire__crate__api__protocol__key__Keys_public_key_impl(ptr, rust_vec_len, data_len), - 94 => wire__crate__api__protocol__key__Keys_secret_key_impl(ptr, rust_vec_len, data_len), - 95 => wire__crate__api__protocol__key__public_key__PublicKey_from_slice_impl( + 91 => wire__crate__api__protocol__key__Keys_generate_impl(ptr, rust_vec_len, data_len), + 92 => wire__crate__api__protocol__key__Keys_new_impl(ptr, rust_vec_len, data_len), + 93 => wire__crate__api__protocol__key__Keys_parse_impl(ptr, rust_vec_len, data_len), + 94 => wire__crate__api__protocol__key__Keys_public_key_impl(ptr, rust_vec_len, data_len), + 95 => wire__crate__api__protocol__key__Keys_secret_key_impl(ptr, rust_vec_len, data_len), + 96 => wire__crate__api__protocol__key__public_key__PublicKey_from_slice_impl( ptr, rust_vec_len, data_len, ), - 96 => wire__crate__api__protocol__key__public_key__PublicKey_parse_impl( + 97 => wire__crate__api__protocol__key__public_key__PublicKey_parse_impl( ptr, rust_vec_len, data_len, ), - 97 => wire__crate__api__protocol__key__public_key__PublicKey_to_bech32_impl( + 98 => wire__crate__api__protocol__key__public_key__PublicKey_to_bech32_impl( ptr, rust_vec_len, data_len, ), - 98 => wire__crate__api__protocol__key__public_key__PublicKey_to_hex_impl( + 99 => wire__crate__api__protocol__key__public_key__PublicKey_to_hex_impl( ptr, rust_vec_len, data_len, ), - 99 => wire__crate__api__protocol__key__public_key__PublicKey_to_nostr_uri_impl( + 100 => wire__crate__api__protocol__key__public_key__PublicKey_to_nostr_uri_impl( ptr, rust_vec_len, data_len, ), - 100 => wire__crate__api__protocol__key__secret_key__SecretKey_from_slice_impl( + 101 => wire__crate__api__protocol__key__secret_key__SecretKey_from_slice_impl( ptr, rust_vec_len, data_len, ), - 101 => wire__crate__api__protocol__key__secret_key__SecretKey_generate_impl( + 102 => wire__crate__api__protocol__key__secret_key__SecretKey_generate_impl( ptr, rust_vec_len, data_len, ), - 102 => wire__crate__api__protocol__key__secret_key__SecretKey_parse_impl( + 103 => wire__crate__api__protocol__key__secret_key__SecretKey_parse_impl( ptr, rust_vec_len, data_len, ), - 103 => wire__crate__api__protocol__key__secret_key__SecretKey_to_bech32_impl( + 104 => wire__crate__api__protocol__key__secret_key__SecretKey_to_bech32_impl( ptr, rust_vec_len, data_len, ), - 104 => wire__crate__api__protocol__key__secret_key__SecretKey_to_secret_hex_impl( + 105 => wire__crate__api__protocol__key__secret_key__SecretKey_to_secret_hex_impl( ptr, rust_vec_len, data_len, ), - 105 => wire__crate__api__protocol__signer__NostrSigner_backend_impl( + 106 => wire__crate__api__protocol__signer__NostrSigner_backend_impl( ptr, rust_vec_len, data_len, ), - 107 => { + 108 => { wire__crate__api__protocol__signer__NostrSigner_keys_impl(ptr, rust_vec_len, data_len) } - 113 => wire__crate__api__protocol__types__filter__Filter_as_json_impl( + 114 => wire__crate__api__protocol__types__filter__Filter_as_json_impl( ptr, rust_vec_len, data_len, ), - 114 => wire__crate__api__protocol__types__filter__Filter_author_impl( + 115 => wire__crate__api__protocol__types__filter__Filter_author_impl( ptr, rust_vec_len, data_len, ), - 115 => wire__crate__api__protocol__types__filter__Filter_authors_impl( + 116 => wire__crate__api__protocol__types__filter__Filter_authors_impl( ptr, rust_vec_len, data_len, ), - 116 => wire__crate__api__protocol__types__filter__Filter_custom_tag_impl( + 117 => wire__crate__api__protocol__types__filter__Filter_custom_tag_impl( ptr, rust_vec_len, data_len, ), - 117 => wire__crate__api__protocol__types__filter__Filter_event_impl( + 118 => wire__crate__api__protocol__types__filter__Filter_event_impl( ptr, rust_vec_len, data_len, ), - 118 => wire__crate__api__protocol__types__filter__Filter_events_impl( + 119 => wire__crate__api__protocol__types__filter__Filter_events_impl( ptr, rust_vec_len, data_len, ), - 119 => wire__crate__api__protocol__types__filter__Filter_from_json_impl( + 120 => wire__crate__api__protocol__types__filter__Filter_from_json_impl( ptr, rust_vec_len, data_len, ), - 120 => wire__crate__api__protocol__types__filter__Filter_hashtag_impl( + 121 => wire__crate__api__protocol__types__filter__Filter_hashtag_impl( ptr, rust_vec_len, data_len, ), - 121 => wire__crate__api__protocol__types__filter__Filter_hashtags_impl( + 122 => wire__crate__api__protocol__types__filter__Filter_hashtags_impl( ptr, rust_vec_len, data_len, ), - 122 => { + 123 => { wire__crate__api__protocol__types__filter__Filter_id_impl(ptr, rust_vec_len, data_len) } - 123 => wire__crate__api__protocol__types__filter__Filter_identifier_impl( + 124 => wire__crate__api__protocol__types__filter__Filter_identifier_impl( ptr, rust_vec_len, data_len, ), - 124 => wire__crate__api__protocol__types__filter__Filter_identifiers_impl( + 125 => wire__crate__api__protocol__types__filter__Filter_identifiers_impl( ptr, rust_vec_len, data_len, ), - 125 => { + 126 => { wire__crate__api__protocol__types__filter__Filter_ids_impl(ptr, rust_vec_len, data_len) } - 126 => wire__crate__api__protocol__types__filter__Filter_is_empty_impl( + 127 => wire__crate__api__protocol__types__filter__Filter_is_empty_impl( ptr, rust_vec_len, data_len, ), - 127 => { + 128 => { wire__crate__api__protocol__types__filter__Filter_kind_impl(ptr, rust_vec_len, data_len) } - 128 => wire__crate__api__protocol__types__filter__Filter_kinds_impl( + 129 => wire__crate__api__protocol__types__filter__Filter_kinds_impl( ptr, rust_vec_len, data_len, ), - 129 => wire__crate__api__protocol__types__filter__Filter_limit_impl( + 130 => wire__crate__api__protocol__types__filter__Filter_limit_impl( ptr, rust_vec_len, data_len, ), - 130 => wire__crate__api__protocol__types__filter__Filter_match_event_impl( + 131 => wire__crate__api__protocol__types__filter__Filter_match_event_impl( ptr, rust_vec_len, data_len, ), - 131 => { + 132 => { wire__crate__api__protocol__types__filter__Filter_new_impl(ptr, rust_vec_len, data_len) } - 132 => wire__crate__api__protocol__types__filter__Filter_pubkey_impl( + 133 => wire__crate__api__protocol__types__filter__Filter_pubkey_impl( ptr, rust_vec_len, data_len, ), - 133 => wire__crate__api__protocol__types__filter__Filter_pubkeys_impl( + 134 => wire__crate__api__protocol__types__filter__Filter_pubkeys_impl( ptr, rust_vec_len, data_len, ), - 134 => wire__crate__api__protocol__types__filter__Filter_reference_impl( + 135 => wire__crate__api__protocol__types__filter__Filter_reference_impl( ptr, rust_vec_len, data_len, ), - 135 => wire__crate__api__protocol__types__filter__Filter_references_impl( + 136 => wire__crate__api__protocol__types__filter__Filter_references_impl( ptr, rust_vec_len, data_len, ), - 136 => wire__crate__api__protocol__types__filter__Filter_remove_authors_impl( + 137 => wire__crate__api__protocol__types__filter__Filter_remove_authors_impl( ptr, rust_vec_len, data_len, ), - 137 => wire__crate__api__protocol__types__filter__Filter_remove_custom_tag_impl( + 138 => wire__crate__api__protocol__types__filter__Filter_remove_custom_tag_impl( ptr, rust_vec_len, data_len, ), - 138 => wire__crate__api__protocol__types__filter__Filter_remove_events_impl( + 139 => wire__crate__api__protocol__types__filter__Filter_remove_events_impl( ptr, rust_vec_len, data_len, ), - 139 => wire__crate__api__protocol__types__filter__Filter_remove_hashtags_impl( + 140 => wire__crate__api__protocol__types__filter__Filter_remove_hashtags_impl( ptr, rust_vec_len, data_len, ), - 140 => wire__crate__api__protocol__types__filter__Filter_remove_identifiers_impl( + 141 => wire__crate__api__protocol__types__filter__Filter_remove_identifiers_impl( ptr, rust_vec_len, data_len, ), - 141 => wire__crate__api__protocol__types__filter__Filter_remove_ids_impl( + 142 => wire__crate__api__protocol__types__filter__Filter_remove_ids_impl( ptr, rust_vec_len, data_len, ), - 142 => wire__crate__api__protocol__types__filter__Filter_remove_kinds_impl( + 143 => wire__crate__api__protocol__types__filter__Filter_remove_kinds_impl( ptr, rust_vec_len, data_len, ), - 143 => wire__crate__api__protocol__types__filter__Filter_remove_limit_impl( + 144 => wire__crate__api__protocol__types__filter__Filter_remove_limit_impl( ptr, rust_vec_len, data_len, ), - 144 => wire__crate__api__protocol__types__filter__Filter_remove_pubkeys_impl( + 145 => wire__crate__api__protocol__types__filter__Filter_remove_pubkeys_impl( ptr, rust_vec_len, data_len, ), - 145 => wire__crate__api__protocol__types__filter__Filter_remove_references_impl( + 146 => wire__crate__api__protocol__types__filter__Filter_remove_references_impl( ptr, rust_vec_len, data_len, ), - 146 => wire__crate__api__protocol__types__filter__Filter_remove_search_impl( + 147 => wire__crate__api__protocol__types__filter__Filter_remove_search_impl( ptr, rust_vec_len, data_len, ), - 147 => wire__crate__api__protocol__types__filter__Filter_remove_since_impl( + 148 => wire__crate__api__protocol__types__filter__Filter_remove_since_impl( ptr, rust_vec_len, data_len, ), - 148 => wire__crate__api__protocol__types__filter__Filter_remove_until_impl( + 149 => wire__crate__api__protocol__types__filter__Filter_remove_until_impl( ptr, rust_vec_len, data_len, ), - 149 => wire__crate__api__protocol__types__filter__Filter_search_impl( + 150 => wire__crate__api__protocol__types__filter__Filter_search_impl( ptr, rust_vec_len, data_len, ), - 150 => wire__crate__api__protocol__types__filter__Filter_since_impl( + 151 => wire__crate__api__protocol__types__filter__Filter_since_impl( ptr, rust_vec_len, data_len, ), - 151 => wire__crate__api__protocol__types__filter__Filter_until_impl( + 152 => wire__crate__api__protocol__types__filter__Filter_until_impl( ptr, rust_vec_len, data_len, ), - 152 => wire__crate__api__protocol__types__filter__SingleLetterTag_is_lowercase_impl( + 153 => wire__crate__api__protocol__types__filter__SingleLetterTag_is_lowercase_impl( ptr, rust_vec_len, data_len, ), - 153 => wire__crate__api__protocol__types__filter__SingleLetterTag_is_uppercase_impl( + 154 => wire__crate__api__protocol__types__filter__SingleLetterTag_is_uppercase_impl( ptr, rust_vec_len, data_len, ), - 154 => wire__crate__api__protocol__types__filter__SingleLetterTag_lowercase_impl( + 155 => wire__crate__api__protocol__types__filter__SingleLetterTag_lowercase_impl( ptr, rust_vec_len, data_len, ), - 155 => wire__crate__api__protocol__types__filter__SingleLetterTag_uppercase_impl( + 156 => wire__crate__api__protocol__types__filter__SingleLetterTag_uppercase_impl( ptr, rust_vec_len, data_len, @@ -9410,6 +9512,17 @@ impl SseEncode for _UnsignedEvent { } } +impl SseEncode for chrono::Duration { + // 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.num_microseconds() + .expect("cannot get microseconds from time"), + serializer, + ); + } +} + impl SseEncode for std::collections::HashMap { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -9678,6 +9791,23 @@ impl SseEncode for i32 { } } +impl SseEncode for i64 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + serializer.cursor.write_i64::(self).unwrap(); + } +} + +impl SseEncode for Vec<_Event> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + <_Event>::sse_encode(item, serializer); + } + } +} + impl SseEncode for Vec<_EventId> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -9688,6 +9818,16 @@ impl SseEncode for Vec<_EventId> { } } +impl SseEncode for Vec<_Filter> { + // 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.len() as _, serializer); + for item in self { + <_Filter>::sse_encode(item, serializer); + } + } +} + impl SseEncode for Vec<_PublicKey> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {