mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-06-05 13:39:59 +00:00
* bump libp2p pin to release/v2.0.0 (c43199378) * pin nimble.lock: lsquic/websock/boringssl/protobuf_serialization/npeg/jwt * add libp2p_mix dep and point libp2p/protocols/mix -> libp2p_mix * migrate rng to libp2p Rng type (prod, channels, noise, tests) * noise: take Rng, extract bearSslDrbg internally * waku_switch: TransportConfig factory; withMaxInOut; local MaxConnections * waku_relay/rendezvous/discv5/kademlia: v2.0.0 API (rng, config, ServiceDiscovery) * tests: newStandardSwitch shim; PeerId.random(rng); common.rng()/crypto.newRng() * drop libp2p/utils/semaphore (use chronos AsyncSemaphore) * add waku/compat/option_valueor shim where needed * add std/options where transitive re-export dropped
11 lines
218 B
Nim
11 lines
218 B
Nim
# Request utils.
|
|
|
|
{.push raises: [].}
|
|
|
|
import libp2p/crypto/crypto, stew/byteutils
|
|
|
|
proc generateRequestId*(rng: crypto.Rng): string =
|
|
var bytes: array[10, byte]
|
|
rng.generate(bytes)
|
|
return byteutils.toHex(bytes)
|