2024-01-30 12:28:21 +00:00
|
|
|
when (NimMajor, NimMinor) < (1, 4):
|
|
|
|
{.push raises: [Defect].}
|
|
|
|
else:
|
|
|
|
{.push raises: [].}
|
|
|
|
|
2024-03-15 23:08:47 +00:00
|
|
|
import stew/results, chronos, libp2p/peerid
|
|
|
|
import ../waku_core
|
2024-01-30 12:28:21 +00:00
|
|
|
|
|
|
|
const WakuLightPushCodec* = "/vac/waku/lightpush/2.0.0-beta1"
|
|
|
|
|
|
|
|
type WakuLightPushResult*[T] = Result[T, string]
|
|
|
|
|
|
|
|
type PushMessageHandler* = proc(
|
2024-03-15 23:08:47 +00:00
|
|
|
peer: PeerId, pubsubTopic: PubsubTopic, message: WakuMessage
|
|
|
|
): Future[WakuLightPushResult[void]] {.async.}
|