mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-15 17:35:45 +00:00
deploy: b139692b05e3b80bb2365e32d9a19e9a65ff7a25
This commit is contained in:
parent
8e3ae9c2a7
commit
206de4c1e8
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# libtool - Provide generalized library-building support services.
|
# libtool - Provide generalized library-building support services.
|
||||||
# Generated automatically by config.status (libbacktrace) version-unused
|
# Generated automatically by config.status (libbacktrace) version-unused
|
||||||
# Libtool was configured on host fv-az243-417:
|
# Libtool was configured on host fv-az186-171:
|
||||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||||
#
|
#
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
import
|
import
|
||||||
std/strutils,
|
std/strutils,
|
||||||
confutils, confutils/defs, confutils/std/net,
|
confutils,
|
||||||
|
confutils/defs,
|
||||||
|
confutils/std/net,
|
||||||
confutils/toml/defs as confTomlDefs,
|
confutils/toml/defs as confTomlDefs,
|
||||||
confutils/toml/std/net as confTomlNet,
|
confutils/toml/std/net as confTomlNet,
|
||||||
chronicles, chronos,
|
chronicles,
|
||||||
|
chronos,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
libp2p/crypto/secp,
|
libp2p/crypto/secp,
|
||||||
nimcrypto/utils,
|
nimcrypto/utils
|
||||||
eth/keys,
|
|
||||||
../protocol/waku_message
|
|
||||||
|
|
||||||
export
|
export
|
||||||
confTomlDefs,
|
confTomlDefs,
|
||||||
@ -34,11 +35,11 @@ type
|
|||||||
|
|
||||||
nodekey* {.
|
nodekey* {.
|
||||||
desc: "P2P node private key as 64 char hex string.",
|
desc: "P2P node private key as 64 char hex string.",
|
||||||
defaultValue: crypto.PrivateKey.random(Secp256k1, crypto.newRng()[]).tryGet()
|
defaultValue: defaultPrivateKey()
|
||||||
name: "nodekey" }: crypto.PrivateKey
|
name: "nodekey" }: PrivateKey
|
||||||
|
|
||||||
listenAddress* {.
|
listenAddress* {.
|
||||||
defaultValue: defaultListenAddress(config)
|
defaultValue: defaultListenAddress()
|
||||||
desc: "Listening address for LibP2P (and Discovery v5, if enabled) traffic."
|
desc: "Listening address for LibP2P (and Discovery v5, if enabled) traffic."
|
||||||
name: "listen-address"}: ValidIpAddress
|
name: "listen-address"}: ValidIpAddress
|
||||||
|
|
||||||
@ -136,7 +137,7 @@ type
|
|||||||
rlnRelayContentTopic* {.
|
rlnRelayContentTopic* {.
|
||||||
desc: "the pubsub topic for which rln-relay gets enabled",
|
desc: "the pubsub topic for which rln-relay gets enabled",
|
||||||
defaultValue: "/toy-chat/2/luzhou/proto"
|
defaultValue: "/toy-chat/2/luzhou/proto"
|
||||||
name: "rln-relay-content-topic" }: ContentTopic
|
name: "rln-relay-content-topic" }: string
|
||||||
|
|
||||||
rlnRelayDynamic* {.
|
rlnRelayDynamic* {.
|
||||||
desc: "Enable waku-rln-relay with on-chain dynamic group management: true|false",
|
desc: "Enable waku-rln-relay with on-chain dynamic group management: true|false",
|
||||||
@ -458,11 +459,13 @@ proc parseCmdArg*(T: type Port, p: TaintedString): T =
|
|||||||
proc completeCmdArg*(T: type Port, val: TaintedString): seq[string] =
|
proc completeCmdArg*(T: type Port, val: TaintedString): seq[string] =
|
||||||
return @[]
|
return @[]
|
||||||
|
|
||||||
func defaultListenAddress*(conf: WakuNodeConf): ValidIpAddress =
|
proc defaultListenAddress*(): ValidIpAddress =
|
||||||
# TODO: How should we select between IPv4 and IPv6
|
# TODO: How should we select between IPv4 and IPv6
|
||||||
# Maybe there should be a config option for this.
|
# Maybe there should be a config option for this.
|
||||||
(static ValidIpAddress.init("0.0.0.0"))
|
(static ValidIpAddress.init("0.0.0.0"))
|
||||||
|
|
||||||
|
proc defaultPrivateKey*(): PrivateKey =
|
||||||
|
crypto.PrivateKey.random(Secp256k1, crypto.newRng()[]).value
|
||||||
|
|
||||||
proc readValue*(r: var TomlReader, val: var crypto.PrivateKey)
|
proc readValue*(r: var TomlReader, val: var crypto.PrivateKey)
|
||||||
{.raises: [Defect, IOError, SerializationError].} =
|
{.raises: [Defect, IOError, SerializationError].} =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user