2024-06-28 16:04:57 +05:30
|
|
|
{.push raises: [].}
|
2024-01-30 07:28:21 -05:00
|
|
|
|
2024-07-09 13:14:28 +02:00
|
|
|
import results, chronos, libp2p/peerid
|
2024-03-16 00:08:47 +01:00
|
|
|
import ../waku_core
|
2024-01-30 07:28:21 -05:00
|
|
|
|
2024-10-24 15:31:04 +03:00
|
|
|
from ../waku_core/codecs import WakuLightPushCodec
|
|
|
|
export WakuLightPushCodec
|
2024-01-30 07:28:21 -05:00
|
|
|
|
|
|
|
type WakuLightPushResult*[T] = Result[T, string]
|
|
|
|
|
|
|
|
type PushMessageHandler* = proc(
|
2024-03-16 00:08:47 +01:00
|
|
|
peer: PeerId, pubsubTopic: PubsubTopic, message: WakuMessage
|
|
|
|
): Future[WakuLightPushResult[void]] {.async.}
|
2024-04-15 15:28:35 +02:00
|
|
|
|
|
|
|
const TooManyRequestsMessage* = "TOO_MANY_REQUESTS"
|