mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-15 09:26:38 +00:00
fd6a71cdd7
* bump_dependencies.md: add nim-results dependency * change imports stew/results to results * switching to Nim 2.0.8 * waku.nimble: reflect the requirement nim 1.6.0 to 2.0.8 Adding --mm:refc as nim 2.0 enables a new garbage collector that we're not yet ready to support * adapt waku code to Nim 2.0 * gcsafe adaptations because Nim 2.0 is more strict
15 lines
390 B
Nim
15 lines
390 B
Nim
{.push raises: [].}
|
|
|
|
import results, chronos, libp2p/peerid
|
|
import ../waku_core
|
|
|
|
const WakuLightPushCodec* = "/vac/waku/lightpush/2.0.0-beta1"
|
|
|
|
type WakuLightPushResult*[T] = Result[T, string]
|
|
|
|
type PushMessageHandler* = proc(
|
|
peer: PeerId, pubsubTopic: PubsubTopic, message: WakuMessage
|
|
): Future[WakuLightPushResult[void]] {.async.}
|
|
|
|
const TooManyRequestsMessage* = "TOO_MANY_REQUESTS"
|