Ivan FB 53c83184d0
FFI: typed kernel_api operations (nim-ffi v0.2.0)
Convert the kernel_api operations — relay/filter/lightpush/store,
peer_manager, discovery, ping, debug/node-info — to typed {.ffi.} procs that
pass parameters directly and ride generic CBOR (no per-op request wrappers).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 04:18:56 +02:00

8 lines
309 B
Nim

proc lightpush_publish*(
self: LogosDelivery, pubsubTopic: string, message: WakuMessage
): Future[Result[string, string]] {.ffi.} =
## Returns the published message hash.
let hash = (await self.waku.lightpushPublish(PubsubTopic(pubsubTopic), message)).valueOr:
return err(error)
return ok(hash)