2024-06-28 10:34:57 +00:00
|
|
|
{.push raises: [].}
|
2024-01-30 12:28:21 +00:00
|
|
|
|
2024-07-09 11:14:28 +00:00
|
|
|
import results, chronos, libp2p/peerid
|
2024-03-15 23:08:47 +00:00
|
|
|
import ../waku_core
|
2024-01-30 12:28:21 +00:00
|
|
|
|
2024-10-24 12:31:04 +00:00
|
|
|
from ../waku_core/codecs import WakuLightPushCodec
|
|
|
|
export WakuLightPushCodec
|
2024-01-30 12:28:21 +00:00
|
|
|
|
|
|
|
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.}
|
2024-04-15 13:28:35 +00:00
|
|
|
|
|
|
|
const TooManyRequestsMessage* = "TOO_MANY_REQUESTS"
|