mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-18 02:41:47 +00:00
a41b9ac80b
* refactors waku_filter * refactors waku_lightpush * refactors waku_swap * refactor namespacing.nim * refactor peers * refactors requests * adds top level {.push raises: [Defect].} * log scope for rln relay * cleans up comments * removes comments * comments out raise Defect * defines temp var then pass to constructor * Update waku/v2/protocol/waku_rln_relay/rln.nim Co-authored-by: oskarth <ot@oskarthoren.com> * Update waku/v2/protocol/waku_swap/waku_swap.nim Co-authored-by: oskarth <ot@oskarthoren.com> * explains the potential exception in waku_swap * creates temp var before return * adjusts spaces * adds line breaks, temp vars and fixes format * removes type declaration * fixes and indentation issue * adjusts spacing * adjusts line <80ch * formating improvement Co-authored-by: oskarth <ot@oskarthoren.com>
9 lines
198 B
Nim
9 lines
198 B
Nim
# Request utils.
|
|
|
|
import bearssl, stew/byteutils
|
|
|
|
proc generateRequestId*(rng: ref BrHmacDrbgContext): string =
|
|
var bytes: array[10, byte]
|
|
brHmacDrbgGenerate(rng[], bytes)
|
|
return toHex(bytes)
|