mirror of https://github.com/waku-org/nwaku.git
16 lines
405 B
Nim
16 lines
405 B
Nim
{.push raises: [].}
|
|
|
|
import results, chronos, libp2p/peerid
|
|
import ../waku_core
|
|
|
|
from ../waku_core/codecs import WakuLightPushCodec
|
|
export WakuLightPushCodec
|
|
|
|
type WakuLightPushResult*[T] = Result[T, string]
|
|
|
|
type PushMessageHandler* = proc(
|
|
peer: PeerId, pubsubTopic: PubsubTopic, message: WakuMessage
|
|
): Future[WakuLightPushResult[void]] {.async.}
|
|
|
|
const TooManyRequestsMessage* = "TOO_MANY_REQUESTS"
|