crateApiEventVerifierVerifyNostrEvent method

  1. @override
Future<bool> crateApiEventVerifierVerifyNostrEvent({
  1. required String eventIdHex,
  2. required String pubKeyHex,
  3. required BigInt createdAt,
  4. required int kind,
  5. required List<List<String>> tags,
  6. required String content,
  7. required String signatureHex,
})
override

Implementation

@override
Future<bool> crateApiEventVerifierVerifyNostrEvent(
    {required String eventIdHex,
    required String pubKeyHex,
    required BigInt createdAt,
    required int kind,
    required List<List<String>> tags,
    required String content,
    required String signatureHex}) {
  return handler.executeNormal(NormalTask(
    callFfi: (port_) {
      final serializer = SseSerializer(generalizedFrbRustBinding);
      sse_encode_String(eventIdHex, serializer);
      sse_encode_String(pubKeyHex, serializer);
      sse_encode_u_64(createdAt, serializer);
      sse_encode_u_16(kind, serializer);
      sse_encode_list_list_String(tags, serializer);
      sse_encode_String(content, serializer);
      sse_encode_String(signatureHex, serializer);
      pdeCallFfi(generalizedFrbRustBinding, serializer,
          funcId: 3, port: port_);
    },
    codec: SseCodec(
      decodeSuccessData: sse_decode_bool,
      decodeErrorData: null,
    ),
    constMeta: kCrateApiEventVerifierVerifyNostrEventConstMeta,
    argValues: [
      eventIdHex,
      pubKeyHex,
      createdAt,
      kind,
      tags,
      content,
      signatureHex
    ],
    apiImpl: this,
  ));
}