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
277 B
Nim

proc ping_peer*(
self: LogosDelivery, peerAddr: string, timeoutMs: int
): Future[Result[string, string]] {.ffi.} =
## Returns the round-trip time in nanoseconds.
let rtt = (await self.waku.pingPeer(peerAddr, timeoutMs)).valueOr:
return err(error)
return ok($rtt)